Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
authorMario de Sousa <msousa@fe.up.pt>
Fri, 26 Oct 2012 10:11:28 +0100
changeset 693 51a2fa6441b9
parent 692 c3287ffaee8c
child 694 a010763dd4cb
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
absyntax_utils/get_datatype_info.cc
absyntax_utils/get_datatype_info.hh
absyntax_utils/search_varfb_instance_type.cc
stage3/datatype_functions.cc
stage3/fill_candidate_datatypes.cc
stage3/forced_narrow_candidate_datatypes.cc
stage3/narrow_candidate_datatypes.cc
stage4/generate_c/generate_c_il.cc
stage4/generate_c/generate_c_inlinefcall.cc
stage4/generate_c/generate_c_st.cc
--- a/absyntax_utils/get_datatype_info.cc	Thu Oct 25 18:51:55 2012 +0100
+++ b/absyntax_utils/get_datatype_info.cc	Fri Oct 26 10:11:28 2012 +0100
@@ -673,3 +673,86 @@
   return false;
 }
 
+
+
+
+
+
+
+
+
+
+invalid_type_name_c      get_datatype_info_c::invalid_type_name;
+
+/**********************/
+/* B.1.3 - Data types */
+/**********************/
+/***********************************/
+/* B 1.3.1 - Elementary Data Types */
+/***********************************/
+real_type_name_c         get_datatype_info_c::lreal_type_name;
+real_type_name_c         get_datatype_info_c::real_type_name;
+
+lint_type_name_c         get_datatype_info_c::lint_type_name;
+dint_type_name_c         get_datatype_info_c::dint_type_name;
+int_type_name_c          get_datatype_info_c::int_type_name;
+sint_type_name_c         get_datatype_info_c::sint_type_name;
+
+ulint_type_name_c        get_datatype_info_c::ulint_type_name;
+udint_type_name_c        get_datatype_info_c::udint_type_name;
+uint_type_name_c         get_datatype_info_c::uint_type_name;
+usint_type_name_c        get_datatype_info_c::usint_type_name;
+
+lword_type_name_c        get_datatype_info_c::lword_type_name;
+dword_type_name_c        get_datatype_info_c::dword_type_name;
+word_type_name_c         get_datatype_info_c::word_type_name;
+byte_type_name_c         get_datatype_info_c::byte_type_name;
+bool_type_name_c         get_datatype_info_c::bool_type_name;
+
+wstring_type_name_c      get_datatype_info_c::wstring_type_name;
+string_type_name_c       get_datatype_info_c::string_type_name;
+
+dt_type_name_c           get_datatype_info_c::dt_type_name;
+date_type_name_c         get_datatype_info_c::date_type_name;
+tod_type_name_c          get_datatype_info_c::tod_type_name;
+time_type_name_c         get_datatype_info_c::time_type_name;
+
+
+/******************************************************/
+/* Extensions to the base standard as defined in      */
+/* "Safety Software Technical Specification,          */
+/*  Part 1: Concepts and Function Blocks,             */
+/*  Version 1.0 – Official Release"                   */
+/* by PLCopen - Technical Committee 5 - 2006-01-31    */
+/******************************************************/  
+safereal_type_name_c     get_datatype_info_c::safelreal_type_name;
+safereal_type_name_c     get_datatype_info_c::safereal_type_name;
+
+safelint_type_name_c     get_datatype_info_c::safelint_type_name;
+safedint_type_name_c     get_datatype_info_c::safedint_type_name;
+safeint_type_name_c      get_datatype_info_c::safeint_type_name;
+safesint_type_name_c     get_datatype_info_c::safesint_type_name;
+
+safeulint_type_name_c    get_datatype_info_c::safeulint_type_name;
+safeudint_type_name_c    get_datatype_info_c::safeudint_type_name;
+safeuint_type_name_c     get_datatype_info_c::safeuint_type_name;
+safeusint_type_name_c    get_datatype_info_c::safeusint_type_name;
+
+safelword_type_name_c    get_datatype_info_c::safelword_type_name;
+safedword_type_name_c    get_datatype_info_c::safedword_type_name;
+safeword_type_name_c     get_datatype_info_c::safeword_type_name;
+safebyte_type_name_c     get_datatype_info_c::safebyte_type_name;
+safebool_type_name_c     get_datatype_info_c::safebool_type_name;
+
+safewstring_type_name_c  get_datatype_info_c::safewstring_type_name;
+safestring_type_name_c   get_datatype_info_c::safestring_type_name;
+
+safedt_type_name_c       get_datatype_info_c::safedt_type_name;
+safedate_type_name_c     get_datatype_info_c::safedate_type_name;
+safetod_type_name_c      get_datatype_info_c::safetod_type_name;
+safetime_type_name_c     get_datatype_info_c::safetime_type_name;
+
+
+
+
+
--- a/absyntax_utils/get_datatype_info.hh	Thu Oct 25 18:51:55 2012 +0100
+++ b/absyntax_utils/get_datatype_info.hh	Fri Oct 26 10:11:28 2012 +0100
@@ -55,7 +55,7 @@
      get_datatype_info_c(void) {};
     ~get_datatype_info_c(void) {};
 
- 
+  
   public:
     static bool is_type_equal(symbol_c *first_type, symbol_c *second_type);
     static bool is_type_valid(symbol_c *type);
@@ -72,7 +72,6 @@
     static bool is_structure                       (symbol_c *type_symbol);
 
   
-  
     static bool is_ANY_ELEMENTARY                  (symbol_c *type_symbol);
     static bool is_ANY_SAFEELEMENTARY              (symbol_c *type_symbol);
     static bool is_ANY_ELEMENTARY_compatible       (symbol_c *type_symbol);
@@ -133,5 +132,80 @@
     static bool is_ANY_SAFESTRING                  (symbol_c *type_symbol);
     static bool is_ANY_STRING_compatible           (symbol_c *type_symbol);
 
+    
+    
+    
+  public:
+    /* object used to identify an entry in the abstract syntax tree with an invalid data type */
+    /* This is only used from stage3 onwards. Stages 1 and 2 will never create any instances of invalid_type_name_c */
+    static invalid_type_name_c     invalid_type_name;
+
+    /**********************/
+    /* B.1.3 - Data types */
+    /**********************/
+    /***********************************/
+    /* B 1.3.1 - Elementary Data Types */
+    /***********************************/
+    static real_type_name_c         lreal_type_name;
+    static real_type_name_c         real_type_name;
+    
+    static lint_type_name_c         lint_type_name;
+    static dint_type_name_c         dint_type_name;
+    static int_type_name_c          int_type_name;
+    static sint_type_name_c         sint_type_name;
+    
+    static ulint_type_name_c        ulint_type_name;
+    static udint_type_name_c        udint_type_name;
+    static uint_type_name_c         uint_type_name;
+    static usint_type_name_c        usint_type_name;
+
+    static lword_type_name_c        lword_type_name;
+    static dword_type_name_c        dword_type_name;
+    static word_type_name_c         word_type_name;
+    static byte_type_name_c         byte_type_name;
+    static bool_type_name_c         bool_type_name;
+    
+    static wstring_type_name_c      wstring_type_name;
+    static string_type_name_c       string_type_name;
+    
+    static dt_type_name_c           dt_type_name;
+    static date_type_name_c         date_type_name;
+    static tod_type_name_c          tod_type_name;
+    static time_type_name_c         time_type_name;
+
+
+    /******************************************************/
+    /* Extensions to the base standard as defined in      */
+    /* "Safety Software Technical Specification,          */
+    /*  Part 1: Concepts and Function Blocks,             */
+    /*  Version 1.0 – Official Release"                   */
+    /* by PLCopen - Technical Committee 5 - 2006-01-31    */
+    /******************************************************/  
+    static safereal_type_name_c     safelreal_type_name;
+    static safereal_type_name_c     safereal_type_name;
+    
+    static safelint_type_name_c     safelint_type_name;
+    static safedint_type_name_c     safedint_type_name;
+    static safeint_type_name_c      safeint_type_name;
+    static safesint_type_name_c     safesint_type_name;
+           
+    static safeulint_type_name_c    safeulint_type_name;
+    static safeudint_type_name_c    safeudint_type_name;
+    static safeuint_type_name_c     safeuint_type_name;
+    static safeusint_type_name_c    safeusint_type_name;
+           
+    static safelword_type_name_c    safelword_type_name;
+    static safedword_type_name_c    safedword_type_name;
+    static safeword_type_name_c     safeword_type_name;
+    static safebyte_type_name_c     safebyte_type_name;
+    static safebool_type_name_c     safebool_type_name;
+    
+    static safewstring_type_name_c  safewstring_type_name;
+    static safestring_type_name_c   safestring_type_name;
+    
+    static safedt_type_name_c       safedt_type_name;
+    static safedate_type_name_c     safedate_type_name;
+    static safetod_type_name_c      safetod_type_name;
+    static safetime_type_name_c     safetime_type_name;               
 };
 
--- a/absyntax_utils/search_varfb_instance_type.cc	Thu Oct 25 18:51:55 2012 +0100
+++ b/absyntax_utils/search_varfb_instance_type.cc	Fri Oct 26 10:11:28 2012 +0100
@@ -383,10 +383,11 @@
   identifier_c T("T");
   identifier_c X("X");
   
+  /* Hard code the datatypes of the implicit variables Stepname.X and Stepname.T */
   if (compare_identifiers(&T, current_field_selector) == 0)   
-    current_type_id = &search_constant_type_c::time_type_name;
+    current_type_id = &get_datatype_info_c::time_type_name;
   if (compare_identifiers(&X, current_field_selector) == 0)   
-    current_type_id = &search_constant_type_c::bool_type_name;
+    current_type_id = &get_datatype_info_c::bool_type_name;
   
   current_basetype_decl = search_base_type.get_basetype_decl(current_type_id);
   current_basetype_id   = search_base_type.get_basetype_id  (current_type_id);
--- a/stage3/datatype_functions.cc	Thu Oct 25 18:51:55 2012 +0100
+++ b/stage3/datatype_functions.cc	Fri Oct 26 10:11:28 2012 +0100
@@ -101,10 +101,10 @@
 
 const struct widen_entry widen_ADD_table[] = {
 #define __add(TYPE)       \
-    { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::TYPE##_type_name,       widen_entry::ok                 }, \
-    { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::TYPE##_type_name,       widen_entry::ok                 }, \
-    { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::TYPE##_type_name,       widen_entry::ok                 }, \
-    { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::safe##TYPE##_type_name, widen_entry::ok                 },
+    { &get_datatype_info_c::TYPE##_type_name,        &get_datatype_info_c::TYPE##_type_name,          &get_datatype_info_c::TYPE##_type_name,       widen_entry::ok                 }, \
+    { &get_datatype_info_c::safe##TYPE##_type_name,  &get_datatype_info_c::TYPE##_type_name,          &get_datatype_info_c::TYPE##_type_name,       widen_entry::ok                 }, \
+    { &get_datatype_info_c::TYPE##_type_name,        &get_datatype_info_c::safe##TYPE##_type_name,    &get_datatype_info_c::TYPE##_type_name,       widen_entry::ok                 }, \
+    { &get_datatype_info_c::safe##TYPE##_type_name,  &get_datatype_info_c::safe##TYPE##_type_name,    &get_datatype_info_c::safe##TYPE##_type_name, widen_entry::ok                 },
     __ANY_NUM(__add)
 #undef __add
 
@@ -113,54 +113,54 @@
     /*** Operations with TIME, DT and TOD... ***/
     /*******************************************/
     /*******************************************/ 
-    { &search_constant_type_c::time_type_name,          &search_constant_type_c::time_type_name,            &search_constant_type_c::time_type_name,         widen_entry::ok                 },
-    { &search_constant_type_c::tod_type_name,           &search_constant_type_c::time_type_name,            &search_constant_type_c::tod_type_name,          ANYTIME_OPER_DEPRECATION_STATUS },
-    /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
-    /* not currently supported by stage4, so it is best no tto add it for now... */
-//  { &search_constant_type_c::time_type_name,          &search_constant_type_c::tod_type_name,             &search_constant_type_c::tod_type_name,          ANYTIME_OPER_DEPRECATION_STATUS },
-    { &search_constant_type_c::dt_type_name,            &search_constant_type_c::time_type_name,            &search_constant_type_c::dt_type_name,           ANYTIME_OPER_DEPRECATION_STATUS },         
-    /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
-    /* not currently supported by stage4, so it is best no tto add it for now... */
-//  { &search_constant_type_c::time_type_name,          &search_constant_type_c::dt_type_name,              &search_constant_type_c::dt_type_name,           ANYTIME_OPER_DEPRECATION_STATUS },         
+    { &get_datatype_info_c::time_type_name,          &get_datatype_info_c::time_type_name,            &get_datatype_info_c::time_type_name,         widen_entry::ok                 },
+    { &get_datatype_info_c::tod_type_name,           &get_datatype_info_c::time_type_name,            &get_datatype_info_c::tod_type_name,          ANYTIME_OPER_DEPRECATION_STATUS },
+    /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
+    /* not currently supported by stage4, so it is best no tto add it for now... */
+//  { &get_datatype_info_c::time_type_name,          &get_datatype_info_c::tod_type_name,             &get_datatype_info_c::tod_type_name,          ANYTIME_OPER_DEPRECATION_STATUS },
+    { &get_datatype_info_c::dt_type_name,            &get_datatype_info_c::time_type_name,            &get_datatype_info_c::dt_type_name,           ANYTIME_OPER_DEPRECATION_STATUS },         
+    /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
+    /* not currently supported by stage4, so it is best no tto add it for now... */
+//  { &get_datatype_info_c::time_type_name,          &get_datatype_info_c::dt_type_name,              &get_datatype_info_c::dt_type_name,           ANYTIME_OPER_DEPRECATION_STATUS },         
 
     /*******************************/
     /* SAFE version on the left... */
     /*******************************/
-    { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::time_type_name,            &search_constant_type_c::time_type_name,         widen_entry::ok                 },
-    { &search_constant_type_c::safetod_type_name,       &search_constant_type_c::time_type_name,            &search_constant_type_c::tod_type_name,          ANYTIME_OPER_DEPRECATION_STATUS },
-    /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
-    /* not currently supported by stage4, so it is best no tto add it for now... */
-//  { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::tod_type_name,             &search_constant_type_c::tod_type_name,          ANYTIME_OPER_DEPRECATION_STATUS },
-    { &search_constant_type_c::safedt_type_name,        &search_constant_type_c::time_type_name,            &search_constant_type_c::dt_type_name,           ANYTIME_OPER_DEPRECATION_STATUS },         
-    /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
-    /* not currently supported by stage4, so it is best no tto add it for now... */
-//  { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::dt_type_name,              &search_constant_type_c::dt_type_name,           ANYTIME_OPER_DEPRECATION_STATUS },         
+    { &get_datatype_info_c::safetime_type_name,      &get_datatype_info_c::time_type_name,            &get_datatype_info_c::time_type_name,         widen_entry::ok                 },
+    { &get_datatype_info_c::safetod_type_name,       &get_datatype_info_c::time_type_name,            &get_datatype_info_c::tod_type_name,          ANYTIME_OPER_DEPRECATION_STATUS },
+    /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
+    /* not currently supported by stage4, so it is best no tto add it for now... */
+//  { &get_datatype_info_c::safetime_type_name,      &get_datatype_info_c::tod_type_name,             &get_datatype_info_c::tod_type_name,          ANYTIME_OPER_DEPRECATION_STATUS },
+    { &get_datatype_info_c::safedt_type_name,        &get_datatype_info_c::time_type_name,            &get_datatype_info_c::dt_type_name,           ANYTIME_OPER_DEPRECATION_STATUS },         
+    /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
+    /* not currently supported by stage4, so it is best no tto add it for now... */
+//  { &get_datatype_info_c::safetime_type_name,      &get_datatype_info_c::dt_type_name,              &get_datatype_info_c::dt_type_name,           ANYTIME_OPER_DEPRECATION_STATUS },         
 
     /********************************/
     /* SAFE version on the right... */
     /********************************/
-    { &search_constant_type_c::time_type_name,          &search_constant_type_c::safetime_type_name,        &search_constant_type_c::time_type_name,         widen_entry::ok         },
-    { &search_constant_type_c::tod_type_name,           &search_constant_type_c::safetime_type_name,        &search_constant_type_c::tod_type_name,          ANYTIME_OPER_DEPRECATION_STATUS },
-    /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
-    /* not currently supported by stage4, so it is best no tto add it for now... */
-//  { &search_constant_type_c::time_type_name,          &search_constant_type_c::safetod_type_name,         &search_constant_type_c::tod_type_name,          ANYTIME_OPER_DEPRECATION_STATUS },
-    { &search_constant_type_c::dt_type_name,            &search_constant_type_c::safetime_type_name,        &search_constant_type_c::dt_type_name,           ANYTIME_OPER_DEPRECATION_STATUS },         
-    /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
-    /* not currently supported by stage4, so it is best no tto add it for now... */
-//  { &search_constant_type_c::time_type_name,          &search_constant_type_c::safedt_type_name,          &search_constant_type_c::dt_type_name,           ANYTIME_OPER_DEPRECATION_STATUS },         
+    { &get_datatype_info_c::time_type_name,          &get_datatype_info_c::safetime_type_name,        &get_datatype_info_c::time_type_name,         widen_entry::ok         },
+    { &get_datatype_info_c::tod_type_name,           &get_datatype_info_c::safetime_type_name,        &get_datatype_info_c::tod_type_name,          ANYTIME_OPER_DEPRECATION_STATUS },
+    /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
+    /* not currently supported by stage4, so it is best no tto add it for now... */
+//  { &get_datatype_info_c::time_type_name,          &get_datatype_info_c::safetod_type_name,         &get_datatype_info_c::tod_type_name,          ANYTIME_OPER_DEPRECATION_STATUS },
+    { &get_datatype_info_c::dt_type_name,            &get_datatype_info_c::safetime_type_name,        &get_datatype_info_c::dt_type_name,           ANYTIME_OPER_DEPRECATION_STATUS },         
+    /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
+    /* not currently supported by stage4, so it is best no tto add it for now... */
+//  { &get_datatype_info_c::time_type_name,          &get_datatype_info_c::safedt_type_name,          &get_datatype_info_c::dt_type_name,           ANYTIME_OPER_DEPRECATION_STATUS },         
 
     /*************************************/
     /* SAFE version on left and right... */
     /*************************************/
-    { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::safetime_type_name,        &search_constant_type_c::safetime_type_name,     widen_entry::ok                 },
-    { &search_constant_type_c::safetod_type_name,       &search_constant_type_c::safetime_type_name,        &search_constant_type_c::safetod_type_name,      ANYTIME_OPER_DEPRECATION_STATUS },
-    /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
-    /* not currently supported by stage4, so it is best no tto add it for now... */
-//  { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::safetod_type_name,         &search_constant_type_c::safetod_type_name,      ANYTIME_OPER_DEPRECATION_STATUS },
-    { &search_constant_type_c::safedt_type_name,        &search_constant_type_c::safetime_type_name,        &search_constant_type_c::safedt_type_name,       ANYTIME_OPER_DEPRECATION_STATUS },         
-    /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
-    /* not currently supported by stage4, so it is best no tto add it for now... */
-//  { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::safedt_type_name,          &search_constant_type_c::safedt_type_name,       ANYTIME_OPER_DEPRECATION_STATUS },
+    { &get_datatype_info_c::safetime_type_name,      &get_datatype_info_c::safetime_type_name,        &get_datatype_info_c::safetime_type_name,     widen_entry::ok                 },
+    { &get_datatype_info_c::safetod_type_name,       &get_datatype_info_c::safetime_type_name,        &get_datatype_info_c::safetod_type_name,      ANYTIME_OPER_DEPRECATION_STATUS },
+    /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
+    /* not currently supported by stage4, so it is best no tto add it for now... */
+//  { &get_datatype_info_c::safetime_type_name,      &get_datatype_info_c::safetod_type_name,         &get_datatype_info_c::safetod_type_name,      ANYTIME_OPER_DEPRECATION_STATUS },
+    { &get_datatype_info_c::safedt_type_name,        &get_datatype_info_c::safetime_type_name,        &get_datatype_info_c::safedt_type_name,       ANYTIME_OPER_DEPRECATION_STATUS },         
+    /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
+    /* not currently supported by stage4, so it is best no tto add it for now... */
+//  { &get_datatype_info_c::safetime_type_name,      &get_datatype_info_c::safedt_type_name,          &get_datatype_info_c::safedt_type_name,       ANYTIME_OPER_DEPRECATION_STATUS },
    
     { NULL, NULL, NULL, widen_entry::ok },
 };
@@ -173,10 +173,10 @@
 
 const struct widen_entry widen_SUB_table[] = {
 #define __sub(TYPE)       \
-    { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::TYPE##_type_name,       widen_entry::ok                 }, \
-    { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::TYPE##_type_name,       widen_entry::ok                 }, \
-    { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::TYPE##_type_name,       widen_entry::ok                 }, \
-    { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::safe##TYPE##_type_name, widen_entry::ok                 },
+    { &get_datatype_info_c::TYPE##_type_name,        &get_datatype_info_c::TYPE##_type_name,          &get_datatype_info_c::TYPE##_type_name,       widen_entry::ok                 }, \
+    { &get_datatype_info_c::safe##TYPE##_type_name,  &get_datatype_info_c::TYPE##_type_name,          &get_datatype_info_c::TYPE##_type_name,       widen_entry::ok                 }, \
+    { &get_datatype_info_c::TYPE##_type_name,        &get_datatype_info_c::safe##TYPE##_type_name,    &get_datatype_info_c::TYPE##_type_name,       widen_entry::ok                 }, \
+    { &get_datatype_info_c::safe##TYPE##_type_name,  &get_datatype_info_c::safe##TYPE##_type_name,    &get_datatype_info_c::safe##TYPE##_type_name, widen_entry::ok                 },
     __ANY_NUM(__sub)
 #undef __sub
 
@@ -185,42 +185,42 @@
     /*** Operations with TIME, DT and TOD... ***/
     /*******************************************/
     /*******************************************/ 
-    { &search_constant_type_c::time_type_name,          &search_constant_type_c::time_type_name,            &search_constant_type_c::time_type_name,         widen_entry::ok                 },
-    { &search_constant_type_c::date_type_name,          &search_constant_type_c::date_type_name,            &search_constant_type_c::time_type_name,         ANYTIME_OPER_DEPRECATION_STATUS },
-    { &search_constant_type_c::tod_type_name,           &search_constant_type_c::time_type_name,            &search_constant_type_c::tod_type_name,          ANYTIME_OPER_DEPRECATION_STATUS },
-    { &search_constant_type_c::tod_type_name,           &search_constant_type_c::tod_type_name,             &search_constant_type_c::time_type_name,         ANYTIME_OPER_DEPRECATION_STATUS },
-    { &search_constant_type_c::dt_type_name,            &search_constant_type_c::time_type_name,            &search_constant_type_c::dt_type_name,           ANYTIME_OPER_DEPRECATION_STATUS },
-    { &search_constant_type_c::dt_type_name,            &search_constant_type_c::dt_type_name,              &search_constant_type_c::time_type_name,         ANYTIME_OPER_DEPRECATION_STATUS },        
+    { &get_datatype_info_c::time_type_name,          &get_datatype_info_c::time_type_name,            &get_datatype_info_c::time_type_name,         widen_entry::ok                 },
+    { &get_datatype_info_c::date_type_name,          &get_datatype_info_c::date_type_name,            &get_datatype_info_c::time_type_name,         ANYTIME_OPER_DEPRECATION_STATUS },
+    { &get_datatype_info_c::tod_type_name,           &get_datatype_info_c::time_type_name,            &get_datatype_info_c::tod_type_name,          ANYTIME_OPER_DEPRECATION_STATUS },
+    { &get_datatype_info_c::tod_type_name,           &get_datatype_info_c::tod_type_name,             &get_datatype_info_c::time_type_name,         ANYTIME_OPER_DEPRECATION_STATUS },
+    { &get_datatype_info_c::dt_type_name,            &get_datatype_info_c::time_type_name,            &get_datatype_info_c::dt_type_name,           ANYTIME_OPER_DEPRECATION_STATUS },
+    { &get_datatype_info_c::dt_type_name,            &get_datatype_info_c::dt_type_name,              &get_datatype_info_c::time_type_name,         ANYTIME_OPER_DEPRECATION_STATUS },        
 
     /*******************************/
     /* SAFE version on the left... */
     /*******************************/
-    { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::time_type_name,            &search_constant_type_c::time_type_name,         widen_entry::ok                 },
-    { &search_constant_type_c::safedate_type_name,      &search_constant_type_c::date_type_name,            &search_constant_type_c::time_type_name,         ANYTIME_OPER_DEPRECATION_STATUS },
-    { &search_constant_type_c::safetod_type_name,       &search_constant_type_c::time_type_name,            &search_constant_type_c::tod_type_name,          ANYTIME_OPER_DEPRECATION_STATUS },
-    { &search_constant_type_c::safetod_type_name,       &search_constant_type_c::tod_type_name,             &search_constant_type_c::time_type_name,         ANYTIME_OPER_DEPRECATION_STATUS },
-    { &search_constant_type_c::safedt_type_name,        &search_constant_type_c::time_type_name,            &search_constant_type_c::dt_type_name,           ANYTIME_OPER_DEPRECATION_STATUS },
-    { &search_constant_type_c::safedt_type_name,        &search_constant_type_c::dt_type_name,              &search_constant_type_c::time_type_name,         ANYTIME_OPER_DEPRECATION_STATUS },        
+    { &get_datatype_info_c::safetime_type_name,      &get_datatype_info_c::time_type_name,            &get_datatype_info_c::time_type_name,         widen_entry::ok                 },
+    { &get_datatype_info_c::safedate_type_name,      &get_datatype_info_c::date_type_name,            &get_datatype_info_c::time_type_name,         ANYTIME_OPER_DEPRECATION_STATUS },
+    { &get_datatype_info_c::safetod_type_name,       &get_datatype_info_c::time_type_name,            &get_datatype_info_c::tod_type_name,          ANYTIME_OPER_DEPRECATION_STATUS },
+    { &get_datatype_info_c::safetod_type_name,       &get_datatype_info_c::tod_type_name,             &get_datatype_info_c::time_type_name,         ANYTIME_OPER_DEPRECATION_STATUS },
+    { &get_datatype_info_c::safedt_type_name,        &get_datatype_info_c::time_type_name,            &get_datatype_info_c::dt_type_name,           ANYTIME_OPER_DEPRECATION_STATUS },
+    { &get_datatype_info_c::safedt_type_name,        &get_datatype_info_c::dt_type_name,              &get_datatype_info_c::time_type_name,         ANYTIME_OPER_DEPRECATION_STATUS },        
 
     /********************************/
     /* SAFE version on the right... */
     /********************************/
-    { &search_constant_type_c::time_type_name,          &search_constant_type_c::safetime_type_name,        &search_constant_type_c::time_type_name,         widen_entry::ok                 },
-    { &search_constant_type_c::date_type_name,          &search_constant_type_c::safedate_type_name,        &search_constant_type_c::time_type_name,         ANYTIME_OPER_DEPRECATION_STATUS },
-    { &search_constant_type_c::tod_type_name,           &search_constant_type_c::safetime_type_name,        &search_constant_type_c::tod_type_name,          ANYTIME_OPER_DEPRECATION_STATUS },
-    { &search_constant_type_c::tod_type_name,           &search_constant_type_c::safetod_type_name,         &search_constant_type_c::time_type_name,         ANYTIME_OPER_DEPRECATION_STATUS },
-    { &search_constant_type_c::dt_type_name,            &search_constant_type_c::safetime_type_name,        &search_constant_type_c::dt_type_name,           ANYTIME_OPER_DEPRECATION_STATUS },
-    { &search_constant_type_c::dt_type_name,            &search_constant_type_c::safedt_type_name,          &search_constant_type_c::time_type_name,         ANYTIME_OPER_DEPRECATION_STATUS },        
+    { &get_datatype_info_c::time_type_name,          &get_datatype_info_c::safetime_type_name,        &get_datatype_info_c::time_type_name,         widen_entry::ok                 },
+    { &get_datatype_info_c::date_type_name,          &get_datatype_info_c::safedate_type_name,        &get_datatype_info_c::time_type_name,         ANYTIME_OPER_DEPRECATION_STATUS },
+    { &get_datatype_info_c::tod_type_name,           &get_datatype_info_c::safetime_type_name,        &get_datatype_info_c::tod_type_name,          ANYTIME_OPER_DEPRECATION_STATUS },
+    { &get_datatype_info_c::tod_type_name,           &get_datatype_info_c::safetod_type_name,         &get_datatype_info_c::time_type_name,         ANYTIME_OPER_DEPRECATION_STATUS },
+    { &get_datatype_info_c::dt_type_name,            &get_datatype_info_c::safetime_type_name,        &get_datatype_info_c::dt_type_name,           ANYTIME_OPER_DEPRECATION_STATUS },
+    { &get_datatype_info_c::dt_type_name,            &get_datatype_info_c::safedt_type_name,          &get_datatype_info_c::time_type_name,         ANYTIME_OPER_DEPRECATION_STATUS },        
 
     /*************************************/
     /* SAFE version on left and right... */
     /*************************************/
-    { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::safetime_type_name,        &search_constant_type_c::safetime_type_name,     widen_entry::ok                 },
-    { &search_constant_type_c::safedate_type_name,      &search_constant_type_c::safedate_type_name,        &search_constant_type_c::safetime_type_name,     ANYTIME_OPER_DEPRECATION_STATUS },
-    { &search_constant_type_c::safetod_type_name,       &search_constant_type_c::safetime_type_name,        &search_constant_type_c::safetod_type_name,      ANYTIME_OPER_DEPRECATION_STATUS },
-    { &search_constant_type_c::safetod_type_name,       &search_constant_type_c::safetod_type_name,         &search_constant_type_c::safetime_type_name,     ANYTIME_OPER_DEPRECATION_STATUS },
-    { &search_constant_type_c::safedt_type_name,        &search_constant_type_c::safetime_type_name,        &search_constant_type_c::safedt_type_name,       ANYTIME_OPER_DEPRECATION_STATUS },
-    { &search_constant_type_c::safedt_type_name,        &search_constant_type_c::safedt_type_name,          &search_constant_type_c::safetime_type_name,     ANYTIME_OPER_DEPRECATION_STATUS },        
+    { &get_datatype_info_c::safetime_type_name,      &get_datatype_info_c::safetime_type_name,        &get_datatype_info_c::safetime_type_name,     widen_entry::ok                 },
+    { &get_datatype_info_c::safedate_type_name,      &get_datatype_info_c::safedate_type_name,        &get_datatype_info_c::safetime_type_name,     ANYTIME_OPER_DEPRECATION_STATUS },
+    { &get_datatype_info_c::safetod_type_name,       &get_datatype_info_c::safetime_type_name,        &get_datatype_info_c::safetod_type_name,      ANYTIME_OPER_DEPRECATION_STATUS },
+    { &get_datatype_info_c::safetod_type_name,       &get_datatype_info_c::safetod_type_name,         &get_datatype_info_c::safetime_type_name,     ANYTIME_OPER_DEPRECATION_STATUS },
+    { &get_datatype_info_c::safedt_type_name,        &get_datatype_info_c::safetime_type_name,        &get_datatype_info_c::safedt_type_name,       ANYTIME_OPER_DEPRECATION_STATUS },
+    { &get_datatype_info_c::safedt_type_name,        &get_datatype_info_c::safedt_type_name,          &get_datatype_info_c::safetime_type_name,     ANYTIME_OPER_DEPRECATION_STATUS },        
 
     { NULL, NULL, NULL, widen_entry::ok },
 };
@@ -233,10 +233,10 @@
 
 const struct widen_entry widen_MUL_table[] = {
 #define __mul(TYPE)       \
-    { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::TYPE##_type_name,       widen_entry::ok                 }, \
-    { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::TYPE##_type_name,       widen_entry::ok                 }, \
-    { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::TYPE##_type_name,       widen_entry::ok                 }, \
-    { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::safe##TYPE##_type_name, widen_entry::ok                 },
+    { &get_datatype_info_c::TYPE##_type_name,        &get_datatype_info_c::TYPE##_type_name,          &get_datatype_info_c::TYPE##_type_name,       widen_entry::ok                 }, \
+    { &get_datatype_info_c::safe##TYPE##_type_name,  &get_datatype_info_c::TYPE##_type_name,          &get_datatype_info_c::TYPE##_type_name,       widen_entry::ok                 }, \
+    { &get_datatype_info_c::TYPE##_type_name,        &get_datatype_info_c::safe##TYPE##_type_name,    &get_datatype_info_c::TYPE##_type_name,       widen_entry::ok                 }, \
+    { &get_datatype_info_c::safe##TYPE##_type_name,  &get_datatype_info_c::safe##TYPE##_type_name,    &get_datatype_info_c::safe##TYPE##_type_name, widen_entry::ok                 },
     __ANY_NUM(__mul)
 #undef __mul
 
@@ -246,15 +246,15 @@
     /*******************************************/
     /*******************************************/ 
 #define __multime(TYPE)       \
-    { &search_constant_type_c::time_type_name,          &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::time_type_name,         ANYTIME_OPER_DEPRECATION_STATUS }, \
-    { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::time_type_name,         ANYTIME_OPER_DEPRECATION_STATUS }, \
-    { &search_constant_type_c::time_type_name,          &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::time_type_name,         ANYTIME_OPER_DEPRECATION_STATUS }, \
-    { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::safetime_type_name,     ANYTIME_OPER_DEPRECATION_STATUS }, \
+    { &get_datatype_info_c::time_type_name,          &get_datatype_info_c::TYPE##_type_name,          &get_datatype_info_c::time_type_name,         ANYTIME_OPER_DEPRECATION_STATUS }, \
+    { &get_datatype_info_c::safetime_type_name,      &get_datatype_info_c::TYPE##_type_name,          &get_datatype_info_c::time_type_name,         ANYTIME_OPER_DEPRECATION_STATUS }, \
+    { &get_datatype_info_c::time_type_name,          &get_datatype_info_c::safe##TYPE##_type_name,    &get_datatype_info_c::time_type_name,         ANYTIME_OPER_DEPRECATION_STATUS }, \
+    { &get_datatype_info_c::safetime_type_name,      &get_datatype_info_c::safe##TYPE##_type_name,    &get_datatype_info_c::safetime_type_name,     ANYTIME_OPER_DEPRECATION_STATUS }, \
     /* NOTE: the standard des not explicitly support the following semantics. However, since 'multiplication' is supposed to be commutative, we add it anyway... */                 \
-    { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::time_type_name,            &search_constant_type_c::time_type_name,         ANYTIME_OPER_DEPRECATION_STATUS }, \
-    { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::time_type_name,            &search_constant_type_c::time_type_name,         ANYTIME_OPER_DEPRECATION_STATUS }, \
-    { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::safetime_type_name,        &search_constant_type_c::time_type_name,         ANYTIME_OPER_DEPRECATION_STATUS }, \
-    { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::safetime_type_name,        &search_constant_type_c::safetime_type_name,     ANYTIME_OPER_DEPRECATION_STATUS },
+    { &get_datatype_info_c::TYPE##_type_name,        &get_datatype_info_c::time_type_name,            &get_datatype_info_c::time_type_name,         ANYTIME_OPER_DEPRECATION_STATUS }, \
+    { &get_datatype_info_c::safe##TYPE##_type_name,  &get_datatype_info_c::time_type_name,            &get_datatype_info_c::time_type_name,         ANYTIME_OPER_DEPRECATION_STATUS }, \
+    { &get_datatype_info_c::TYPE##_type_name,        &get_datatype_info_c::safetime_type_name,        &get_datatype_info_c::time_type_name,         ANYTIME_OPER_DEPRECATION_STATUS }, \
+    { &get_datatype_info_c::safe##TYPE##_type_name,  &get_datatype_info_c::safetime_type_name,        &get_datatype_info_c::safetime_type_name,     ANYTIME_OPER_DEPRECATION_STATUS },
     __ANY_NUM(__multime)
 #undef __multime
 
@@ -267,10 +267,10 @@
 
 const struct widen_entry widen_DIV_table[] = {
 #define __div(TYPE)       \
-    { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::TYPE##_type_name,       widen_entry::ok                 }, \
-    { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::TYPE##_type_name,       widen_entry::ok                 }, \
-    { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::TYPE##_type_name,       widen_entry::ok                 }, \
-    { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::safe##TYPE##_type_name, widen_entry::ok                 },
+    { &get_datatype_info_c::TYPE##_type_name,        &get_datatype_info_c::TYPE##_type_name,          &get_datatype_info_c::TYPE##_type_name,       widen_entry::ok                 }, \
+    { &get_datatype_info_c::safe##TYPE##_type_name,  &get_datatype_info_c::TYPE##_type_name,          &get_datatype_info_c::TYPE##_type_name,       widen_entry::ok                 }, \
+    { &get_datatype_info_c::TYPE##_type_name,        &get_datatype_info_c::safe##TYPE##_type_name,    &get_datatype_info_c::TYPE##_type_name,       widen_entry::ok                 }, \
+    { &get_datatype_info_c::safe##TYPE##_type_name,  &get_datatype_info_c::safe##TYPE##_type_name,    &get_datatype_info_c::safe##TYPE##_type_name, widen_entry::ok                 },
     __ANY_NUM(__div)
 #undef __div
 
@@ -280,10 +280,10 @@
     /*******************************************/
     /*******************************************/ 
 #define __divtime(TYPE)       \
-    { &search_constant_type_c::time_type_name,          &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::time_type_name,         ANYTIME_OPER_DEPRECATION_STATUS }, \
-    { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::time_type_name,         ANYTIME_OPER_DEPRECATION_STATUS }, \
-    { &search_constant_type_c::time_type_name,          &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::time_type_name,         ANYTIME_OPER_DEPRECATION_STATUS }, \
-    { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::safetime_type_name,     ANYTIME_OPER_DEPRECATION_STATUS },
+    { &get_datatype_info_c::time_type_name,          &get_datatype_info_c::TYPE##_type_name,          &get_datatype_info_c::time_type_name,         ANYTIME_OPER_DEPRECATION_STATUS }, \
+    { &get_datatype_info_c::safetime_type_name,      &get_datatype_info_c::TYPE##_type_name,          &get_datatype_info_c::time_type_name,         ANYTIME_OPER_DEPRECATION_STATUS }, \
+    { &get_datatype_info_c::time_type_name,          &get_datatype_info_c::safe##TYPE##_type_name,    &get_datatype_info_c::time_type_name,         ANYTIME_OPER_DEPRECATION_STATUS }, \
+    { &get_datatype_info_c::safetime_type_name,      &get_datatype_info_c::safe##TYPE##_type_name,    &get_datatype_info_c::safetime_type_name,     ANYTIME_OPER_DEPRECATION_STATUS },
     __ANY_NUM(__divtime)
 #undef __divtime
 
@@ -295,10 +295,10 @@
 
 const struct widen_entry widen_MOD_table[] = {
 #define __mod(TYPE)       \
-    { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::TYPE##_type_name,       widen_entry::ok                 }, \
-    { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::TYPE##_type_name,       widen_entry::ok                 }, \
-    { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::TYPE##_type_name,       widen_entry::ok                 }, \
-    { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::safe##TYPE##_type_name, widen_entry::ok                 },
+    { &get_datatype_info_c::TYPE##_type_name,        &get_datatype_info_c::TYPE##_type_name,          &get_datatype_info_c::TYPE##_type_name,       widen_entry::ok                 }, \
+    { &get_datatype_info_c::safe##TYPE##_type_name,  &get_datatype_info_c::TYPE##_type_name,          &get_datatype_info_c::TYPE##_type_name,       widen_entry::ok                 }, \
+    { &get_datatype_info_c::TYPE##_type_name,        &get_datatype_info_c::safe##TYPE##_type_name,    &get_datatype_info_c::TYPE##_type_name,       widen_entry::ok                 }, \
+    { &get_datatype_info_c::safe##TYPE##_type_name,  &get_datatype_info_c::safe##TYPE##_type_name,    &get_datatype_info_c::safe##TYPE##_type_name, widen_entry::ok                 },
     __ANY_NUM(__mod)
 #undef __mod
 
@@ -310,10 +310,10 @@
 
 const struct widen_entry widen_EXPT_table[] = {
 #define __expt(IN2TYPE, IN1TYPE)       \
-    { &search_constant_type_c::IN1TYPE##_type_name,        &search_constant_type_c::IN2TYPE##_type_name,          &search_constant_type_c::IN1TYPE##_type_name,       widen_entry::ok        }, \
-    { &search_constant_type_c::safe##IN1TYPE##_type_name,  &search_constant_type_c::IN2TYPE##_type_name,          &search_constant_type_c::IN1TYPE##_type_name,       widen_entry::ok        }, \
-    { &search_constant_type_c::IN1TYPE##_type_name,        &search_constant_type_c::safe##IN2TYPE##_type_name,    &search_constant_type_c::IN1TYPE##_type_name,       widen_entry::ok        }, \
-    { &search_constant_type_c::safe##IN1TYPE##_type_name,  &search_constant_type_c::safe##IN2TYPE##_type_name,    &search_constant_type_c::safe##IN1TYPE##_type_name, widen_entry::ok        },
+    { &get_datatype_info_c::IN1TYPE##_type_name,        &get_datatype_info_c::IN2TYPE##_type_name,          &get_datatype_info_c::IN1TYPE##_type_name,       widen_entry::ok        }, \
+    { &get_datatype_info_c::safe##IN1TYPE##_type_name,  &get_datatype_info_c::IN2TYPE##_type_name,          &get_datatype_info_c::IN1TYPE##_type_name,       widen_entry::ok        }, \
+    { &get_datatype_info_c::IN1TYPE##_type_name,        &get_datatype_info_c::safe##IN2TYPE##_type_name,    &get_datatype_info_c::IN1TYPE##_type_name,       widen_entry::ok        }, \
+    { &get_datatype_info_c::safe##IN1TYPE##_type_name,  &get_datatype_info_c::safe##IN2TYPE##_type_name,    &get_datatype_info_c::safe##IN1TYPE##_type_name, widen_entry::ok        },
 #define __IN2_anynum_(IN1_TYPENAME)   __ANY_NUM_1(__expt,IN1_TYPENAME)
     __ANY_REAL(__IN2_anynum_)
 #undef __expt
@@ -335,10 +335,10 @@
 /* table used by AND and ANDN operators, and and_expression */
 const struct widen_entry widen_AND_table[] = {
 #define __and(TYPE)       \
-    { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::TYPE##_type_name,       widen_entry::ok                 }, \
-    { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::TYPE##_type_name,       widen_entry::ok                 }, \
-    { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::TYPE##_type_name,       widen_entry::ok                 }, \
-    { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::safe##TYPE##_type_name, widen_entry::ok                 },
+    { &get_datatype_info_c::TYPE##_type_name,        &get_datatype_info_c::TYPE##_type_name,          &get_datatype_info_c::TYPE##_type_name,       widen_entry::ok                 }, \
+    { &get_datatype_info_c::safe##TYPE##_type_name,  &get_datatype_info_c::TYPE##_type_name,          &get_datatype_info_c::TYPE##_type_name,       widen_entry::ok                 }, \
+    { &get_datatype_info_c::TYPE##_type_name,        &get_datatype_info_c::safe##TYPE##_type_name,    &get_datatype_info_c::TYPE##_type_name,       widen_entry::ok                 }, \
+    { &get_datatype_info_c::safe##TYPE##_type_name,  &get_datatype_info_c::safe##TYPE##_type_name,    &get_datatype_info_c::safe##TYPE##_type_name, widen_entry::ok                 },
     __ANY_BIT(__and)
 #undef __and
 
@@ -348,10 +348,10 @@
 /* table used by OR and ORN operators, and or_expression */
 const struct widen_entry widen_OR_table[] = {
 #define __or(TYPE)       \
-    { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::TYPE##_type_name,       widen_entry::ok                 }, \
-    { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::TYPE##_type_name,       widen_entry::ok                 }, \
-    { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::TYPE##_type_name,       widen_entry::ok                 }, \
-    { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::safe##TYPE##_type_name, widen_entry::ok                 },
+    { &get_datatype_info_c::TYPE##_type_name,        &get_datatype_info_c::TYPE##_type_name,          &get_datatype_info_c::TYPE##_type_name,       widen_entry::ok                 }, \
+    { &get_datatype_info_c::safe##TYPE##_type_name,  &get_datatype_info_c::TYPE##_type_name,          &get_datatype_info_c::TYPE##_type_name,       widen_entry::ok                 }, \
+    { &get_datatype_info_c::TYPE##_type_name,        &get_datatype_info_c::safe##TYPE##_type_name,    &get_datatype_info_c::TYPE##_type_name,       widen_entry::ok                 }, \
+    { &get_datatype_info_c::safe##TYPE##_type_name,  &get_datatype_info_c::safe##TYPE##_type_name,    &get_datatype_info_c::safe##TYPE##_type_name, widen_entry::ok                 },
     __ANY_BIT(__or)
 #undef __or
 
@@ -362,10 +362,10 @@
 /* table used by XOR and XORN operators, and xor_expression */
 const struct widen_entry widen_XOR_table[] = {
 #define __xor(TYPE)       \
-    { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::TYPE##_type_name,       widen_entry::ok                 }, \
-    { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::TYPE##_type_name,       widen_entry::ok                 }, \
-    { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::TYPE##_type_name,       widen_entry::ok                 }, \
-    { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::safe##TYPE##_type_name, widen_entry::ok                 },
+    { &get_datatype_info_c::TYPE##_type_name,        &get_datatype_info_c::TYPE##_type_name,          &get_datatype_info_c::TYPE##_type_name,       widen_entry::ok                 }, \
+    { &get_datatype_info_c::safe##TYPE##_type_name,  &get_datatype_info_c::TYPE##_type_name,          &get_datatype_info_c::TYPE##_type_name,       widen_entry::ok                 }, \
+    { &get_datatype_info_c::TYPE##_type_name,        &get_datatype_info_c::safe##TYPE##_type_name,    &get_datatype_info_c::TYPE##_type_name,       widen_entry::ok                 }, \
+    { &get_datatype_info_c::safe##TYPE##_type_name,  &get_datatype_info_c::safe##TYPE##_type_name,    &get_datatype_info_c::safe##TYPE##_type_name, widen_entry::ok                 },
     __ANY_BIT(__xor)
 #undef __xor
 
@@ -384,10 +384,10 @@
 /* table used by GT, GE, EQ, LE, LT, and NE  operators, and equivalent ST expressions. */
 const struct widen_entry widen_CMP_table[] = {
 #define __cmp(TYPE)       \
-    { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::bool_type_name,         widen_entry::ok                 }, \
-    { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::bool_type_name,         widen_entry::ok                 }, \
-    { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::bool_type_name,         widen_entry::ok                 }, \
-    { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::safebool_type_name,     widen_entry::ok                 },
+    { &get_datatype_info_c::TYPE##_type_name,        &get_datatype_info_c::TYPE##_type_name,          &get_datatype_info_c::bool_type_name,         widen_entry::ok                 }, \
+    { &get_datatype_info_c::safe##TYPE##_type_name,  &get_datatype_info_c::TYPE##_type_name,          &get_datatype_info_c::bool_type_name,         widen_entry::ok                 }, \
+    { &get_datatype_info_c::TYPE##_type_name,        &get_datatype_info_c::safe##TYPE##_type_name,    &get_datatype_info_c::bool_type_name,         widen_entry::ok                 }, \
+    { &get_datatype_info_c::safe##TYPE##_type_name,  &get_datatype_info_c::safe##TYPE##_type_name,    &get_datatype_info_c::safebool_type_name,     widen_entry::ok                 },
     __ANY_ELEMENTARY(__cmp)
 #undef __cmp
 
--- a/stage3/fill_candidate_datatypes.cc	Thu Oct 25 18:51:55 2012 +0100
+++ b/stage3/fill_candidate_datatypes.cc	Fri Oct 26 10:11:28 2012 +0100
@@ -122,8 +122,8 @@
     #error __REMOVE__ macro already exists. Choose another name!
   #endif
   #define __REMOVE__(datatype)\
-      remove_from_candidate_datatype_list(&search_constant_type_c::datatype,       symbol->candidate_datatypes);\
-      remove_from_candidate_datatype_list(&search_constant_type_c::safe##datatype, symbol->candidate_datatypes);
+      remove_from_candidate_datatype_list(&get_datatype_info_c::datatype,       symbol->candidate_datatypes);\
+      remove_from_candidate_datatype_list(&get_datatype_info_c::safe##datatype, symbol->candidate_datatypes);
   
   {/* Remove unsigned data types */
     uint64_t value = 0;
@@ -426,7 +426,7 @@
 	for(unsigned int i = 0; i < l_expr->candidate_datatypes.size(); i++)
 		for(unsigned int j = 0; j < r_expr->candidate_datatypes.size(); j++) {
 			if ((l_expr->candidate_datatypes[i] == r_expr->candidate_datatypes[j]) && search_base_type.type_is_enumerated(l_expr->candidate_datatypes[i]))
-				add_datatype_to_candidate_list(symbol, &search_constant_type_c::bool_type_name);
+				add_datatype_to_candidate_list(symbol, &get_datatype_info_c::bool_type_name);
 		}
 	return NULL;
 }
@@ -451,19 +451,19 @@
 #define sizeoftype(symbol) get_sizeof_datatype_c::getsize(symbol)
 
 void *fill_candidate_datatypes_c::handle_any_integer(symbol_c *symbol) {
-	add_2datatypes_to_candidate_list(symbol, &search_constant_type_c::bool_type_name,  &search_constant_type_c::safebool_type_name);
-	add_2datatypes_to_candidate_list(symbol, &search_constant_type_c::byte_type_name,  &search_constant_type_c::safebyte_type_name);
-	add_2datatypes_to_candidate_list(symbol, &search_constant_type_c::word_type_name,  &search_constant_type_c::safeword_type_name);
-	add_2datatypes_to_candidate_list(symbol, &search_constant_type_c::dword_type_name, &search_constant_type_c::safedword_type_name);
-	add_2datatypes_to_candidate_list(symbol, &search_constant_type_c::lword_type_name, &search_constant_type_c::safelword_type_name);
-	add_2datatypes_to_candidate_list(symbol, &search_constant_type_c::sint_type_name,  &search_constant_type_c::safesint_type_name);
-	add_2datatypes_to_candidate_list(symbol, &search_constant_type_c::int_type_name,   &search_constant_type_c::safeint_type_name);
-	add_2datatypes_to_candidate_list(symbol, &search_constant_type_c::dint_type_name,  &search_constant_type_c::safedint_type_name);
-	add_2datatypes_to_candidate_list(symbol, &search_constant_type_c::lint_type_name,  &search_constant_type_c::safelint_type_name);
-	add_2datatypes_to_candidate_list(symbol, &search_constant_type_c::usint_type_name, &search_constant_type_c::safeusint_type_name);
-	add_2datatypes_to_candidate_list(symbol, &search_constant_type_c::uint_type_name,  &search_constant_type_c::safeuint_type_name);
-	add_2datatypes_to_candidate_list(symbol, &search_constant_type_c::udint_type_name, &search_constant_type_c::safeudint_type_name);
-	add_2datatypes_to_candidate_list(symbol, &search_constant_type_c::ulint_type_name, &search_constant_type_c::safeulint_type_name);
+	add_2datatypes_to_candidate_list(symbol, &get_datatype_info_c::bool_type_name,  &get_datatype_info_c::safebool_type_name);
+	add_2datatypes_to_candidate_list(symbol, &get_datatype_info_c::byte_type_name,  &get_datatype_info_c::safebyte_type_name);
+	add_2datatypes_to_candidate_list(symbol, &get_datatype_info_c::word_type_name,  &get_datatype_info_c::safeword_type_name);
+	add_2datatypes_to_candidate_list(symbol, &get_datatype_info_c::dword_type_name, &get_datatype_info_c::safedword_type_name);
+	add_2datatypes_to_candidate_list(symbol, &get_datatype_info_c::lword_type_name, &get_datatype_info_c::safelword_type_name);
+	add_2datatypes_to_candidate_list(symbol, &get_datatype_info_c::sint_type_name,  &get_datatype_info_c::safesint_type_name);
+	add_2datatypes_to_candidate_list(symbol, &get_datatype_info_c::int_type_name,   &get_datatype_info_c::safeint_type_name);
+	add_2datatypes_to_candidate_list(symbol, &get_datatype_info_c::dint_type_name,  &get_datatype_info_c::safedint_type_name);
+	add_2datatypes_to_candidate_list(symbol, &get_datatype_info_c::lint_type_name,  &get_datatype_info_c::safelint_type_name);
+	add_2datatypes_to_candidate_list(symbol, &get_datatype_info_c::usint_type_name, &get_datatype_info_c::safeusint_type_name);
+	add_2datatypes_to_candidate_list(symbol, &get_datatype_info_c::uint_type_name,  &get_datatype_info_c::safeuint_type_name);
+	add_2datatypes_to_candidate_list(symbol, &get_datatype_info_c::udint_type_name, &get_datatype_info_c::safeudint_type_name);
+	add_2datatypes_to_candidate_list(symbol, &get_datatype_info_c::ulint_type_name, &get_datatype_info_c::safeulint_type_name);
 	remove_incompatible_datatypes(symbol);
 	if (debug) std::cout << "ANY_INT [" << symbol->candidate_datatypes.size()<< "]" << std::endl;
 	return NULL;
@@ -472,8 +472,8 @@
 
 
 void *fill_candidate_datatypes_c::handle_any_real(symbol_c *symbol) {
-	add_2datatypes_to_candidate_list(symbol, &search_constant_type_c::real_type_name,  &search_constant_type_c::safereal_type_name);
-	add_2datatypes_to_candidate_list(symbol, &search_constant_type_c::lreal_type_name, &search_constant_type_c::safelreal_type_name);
+	add_2datatypes_to_candidate_list(symbol, &get_datatype_info_c::real_type_name,  &get_datatype_info_c::safereal_type_name);
+	add_2datatypes_to_candidate_list(symbol, &get_datatype_info_c::lreal_type_name, &get_datatype_info_c::safelreal_type_name);
 	remove_incompatible_datatypes(symbol);
 	if (debug) std::cout << "ANY_REAL [" << symbol->candidate_datatypes.size() << "]" << std::endl;
 	return NULL;
@@ -499,10 +499,10 @@
 
 void *fill_candidate_datatypes_c::visit(neg_integer_c *symbol) {
 	/* Please read the comment in neg_expression_c method, as it also applies here */
-	add_2datatypes_to_candidate_list(symbol, &search_constant_type_c::int_type_name, &search_constant_type_c::safeint_type_name);
-	add_2datatypes_to_candidate_list(symbol, &search_constant_type_c::sint_type_name, &search_constant_type_c::safesint_type_name);
-	add_2datatypes_to_candidate_list(symbol, &search_constant_type_c::dint_type_name, &search_constant_type_c::safedint_type_name);
-	add_2datatypes_to_candidate_list(symbol, &search_constant_type_c::lint_type_name, &search_constant_type_c::safelint_type_name);
+	add_2datatypes_to_candidate_list(symbol, &get_datatype_info_c::int_type_name, &get_datatype_info_c::safeint_type_name);
+	add_2datatypes_to_candidate_list(symbol, &get_datatype_info_c::sint_type_name, &get_datatype_info_c::safesint_type_name);
+	add_2datatypes_to_candidate_list(symbol, &get_datatype_info_c::dint_type_name, &get_datatype_info_c::safedint_type_name);
+	add_2datatypes_to_candidate_list(symbol, &get_datatype_info_c::lint_type_name, &get_datatype_info_c::safelint_type_name);
 	remove_incompatible_datatypes(symbol);
 	if (debug) std::cout << "neg ANY_INT [" << symbol->candidate_datatypes.size() << "]" << std::endl;
 	return NULL;
@@ -539,12 +539,12 @@
 
 
 void *fill_candidate_datatypes_c::visit(boolean_true_c *symbol) {
-	add_2datatypes_to_candidate_list(symbol, &search_constant_type_c::bool_type_name, &search_constant_type_c::safebool_type_name);
+	add_2datatypes_to_candidate_list(symbol, &get_datatype_info_c::bool_type_name, &get_datatype_info_c::safebool_type_name);
 	return NULL;
 }
 
 void *fill_candidate_datatypes_c::visit(boolean_false_c *symbol) {
-	add_2datatypes_to_candidate_list(symbol, &search_constant_type_c::bool_type_name, &search_constant_type_c::safebool_type_name);
+	add_2datatypes_to_candidate_list(symbol, &get_datatype_info_c::bool_type_name, &get_datatype_info_c::safebool_type_name);
 	return NULL;
 }
 
@@ -552,12 +552,12 @@
 /* B.1.2.2   Character Strings */
 /*******************************/
 void *fill_candidate_datatypes_c::visit(double_byte_character_string_c *symbol) {
-	add_2datatypes_to_candidate_list(symbol, &search_constant_type_c::wstring_type_name, &search_constant_type_c::safewstring_type_name);
+	add_2datatypes_to_candidate_list(symbol, &get_datatype_info_c::wstring_type_name, &get_datatype_info_c::safewstring_type_name);
 	return NULL;
 }
 
 void *fill_candidate_datatypes_c::visit(single_byte_character_string_c *symbol) {
-	add_2datatypes_to_candidate_list(symbol, &search_constant_type_c::string_type_name, &search_constant_type_c::safestring_type_name);
+	add_2datatypes_to_candidate_list(symbol, &get_datatype_info_c::string_type_name, &get_datatype_info_c::safestring_type_name);
 	return NULL;
 }
 
@@ -671,13 +671,13 @@
 	 * if (symbol->value[1] == '\0') ERROR;
 	 */
 	switch (symbol->value[2]) {
-		case 'x': case 'X': /* bit   -  1 bit  */ add_datatype_to_candidate_list(symbol, &search_constant_type_c::bool_type_name);  break;
-		case 'b': case 'B': /* byte  -  8 bits */ add_datatype_to_candidate_list(symbol, &search_constant_type_c::byte_type_name);  break;
-		case 'w': case 'W': /* word  - 16 bits */ add_datatype_to_candidate_list(symbol, &search_constant_type_c::word_type_name);  break;
-		case 'd': case 'D': /* dword - 32 bits */ add_datatype_to_candidate_list(symbol, &search_constant_type_c::dword_type_name); break;
-		case 'l': case 'L': /* lword - 64 bits */ add_datatype_to_candidate_list(symbol, &search_constant_type_c::lword_type_name); break;
+		case 'x': case 'X': /* bit   -  1 bit  */ add_datatype_to_candidate_list(symbol, &get_datatype_info_c::bool_type_name);  break;
+		case 'b': case 'B': /* byte  -  8 bits */ add_datatype_to_candidate_list(symbol, &get_datatype_info_c::byte_type_name);  break;
+		case 'w': case 'W': /* word  - 16 bits */ add_datatype_to_candidate_list(symbol, &get_datatype_info_c::word_type_name);  break;
+		case 'd': case 'D': /* dword - 32 bits */ add_datatype_to_candidate_list(symbol, &get_datatype_info_c::dword_type_name); break;
+		case 'l': case 'L': /* lword - 64 bits */ add_datatype_to_candidate_list(symbol, &get_datatype_info_c::lword_type_name); break;
         	          /* if none of the above, then the empty string was used <=> boolean */
-		default:                        add_datatype_to_candidate_list(symbol, &search_constant_type_c::bool_type_name);  break;
+		default:                        add_datatype_to_candidate_list(symbol, &get_datatype_info_c::bool_type_name);  break;
 	}
 	return NULL;
 }
@@ -776,44 +776,44 @@
 	for (unsigned int i = 0; i < symbol->direct_variable->candidate_datatypes.size(); i++) {
         	switch (get_sizeof_datatype_c::getsize(symbol->direct_variable->candidate_datatypes[i])) {
 			case  1: /* bit   -  1 bit  */
-					add_datatype_to_candidate_list(symbol, &search_constant_type_c::bool_type_name);
-					add_datatype_to_candidate_list(symbol, &search_constant_type_c::safebool_type_name);
+					add_datatype_to_candidate_list(symbol, &get_datatype_info_c::bool_type_name);
+					add_datatype_to_candidate_list(symbol, &get_datatype_info_c::safebool_type_name);
 					break;
 			case  8: /* byte  -  8 bits */
-					add_datatype_to_candidate_list(symbol, &search_constant_type_c::byte_type_name);
-					add_datatype_to_candidate_list(symbol, &search_constant_type_c::safebyte_type_name);
-					add_datatype_to_candidate_list(symbol, &search_constant_type_c::sint_type_name);
-					add_datatype_to_candidate_list(symbol, &search_constant_type_c::safesint_type_name);
-					add_datatype_to_candidate_list(symbol, &search_constant_type_c::usint_type_name);
-					add_datatype_to_candidate_list(symbol, &search_constant_type_c::safeusint_type_name);
+					add_datatype_to_candidate_list(symbol, &get_datatype_info_c::byte_type_name);
+					add_datatype_to_candidate_list(symbol, &get_datatype_info_c::safebyte_type_name);
+					add_datatype_to_candidate_list(symbol, &get_datatype_info_c::sint_type_name);
+					add_datatype_to_candidate_list(symbol, &get_datatype_info_c::safesint_type_name);
+					add_datatype_to_candidate_list(symbol, &get_datatype_info_c::usint_type_name);
+					add_datatype_to_candidate_list(symbol, &get_datatype_info_c::safeusint_type_name);
 					break;
 			case 16: /* word  - 16 bits */
-	 				add_datatype_to_candidate_list(symbol, &search_constant_type_c::word_type_name);
-					add_datatype_to_candidate_list(symbol, &search_constant_type_c::safeword_type_name);
-					add_datatype_to_candidate_list(symbol, &search_constant_type_c::int_type_name);
-					add_datatype_to_candidate_list(symbol, &search_constant_type_c::safeint_type_name);
-					add_datatype_to_candidate_list(symbol, &search_constant_type_c::uint_type_name);
-					add_datatype_to_candidate_list(symbol, &search_constant_type_c::safeuint_type_name);
+	 				add_datatype_to_candidate_list(symbol, &get_datatype_info_c::word_type_name);
+					add_datatype_to_candidate_list(symbol, &get_datatype_info_c::safeword_type_name);
+					add_datatype_to_candidate_list(symbol, &get_datatype_info_c::int_type_name);
+					add_datatype_to_candidate_list(symbol, &get_datatype_info_c::safeint_type_name);
+					add_datatype_to_candidate_list(symbol, &get_datatype_info_c::uint_type_name);
+					add_datatype_to_candidate_list(symbol, &get_datatype_info_c::safeuint_type_name);
 					break;
 			case 32: /* dword - 32 bits */
-					add_datatype_to_candidate_list(symbol, &search_constant_type_c::dword_type_name);
-					add_datatype_to_candidate_list(symbol, &search_constant_type_c::safedword_type_name);
-					add_datatype_to_candidate_list(symbol, &search_constant_type_c::dint_type_name);
-					add_datatype_to_candidate_list(symbol, &search_constant_type_c::safedint_type_name);
-					add_datatype_to_candidate_list(symbol, &search_constant_type_c::udint_type_name);
-					add_datatype_to_candidate_list(symbol, &search_constant_type_c::safeudint_type_name);
-					add_datatype_to_candidate_list(symbol, &search_constant_type_c::real_type_name);
-					add_datatype_to_candidate_list(symbol, &search_constant_type_c::safereal_type_name);
+					add_datatype_to_candidate_list(symbol, &get_datatype_info_c::dword_type_name);
+					add_datatype_to_candidate_list(symbol, &get_datatype_info_c::safedword_type_name);
+					add_datatype_to_candidate_list(symbol, &get_datatype_info_c::dint_type_name);
+					add_datatype_to_candidate_list(symbol, &get_datatype_info_c::safedint_type_name);
+					add_datatype_to_candidate_list(symbol, &get_datatype_info_c::udint_type_name);
+					add_datatype_to_candidate_list(symbol, &get_datatype_info_c::safeudint_type_name);
+					add_datatype_to_candidate_list(symbol, &get_datatype_info_c::real_type_name);
+					add_datatype_to_candidate_list(symbol, &get_datatype_info_c::safereal_type_name);
 					break;
 			case 64: /* lword - 64 bits */
-					add_datatype_to_candidate_list(symbol, &search_constant_type_c::lword_type_name);
-					add_datatype_to_candidate_list(symbol, &search_constant_type_c::safelword_type_name);
-					add_datatype_to_candidate_list(symbol, &search_constant_type_c::lint_type_name);
-					add_datatype_to_candidate_list(symbol, &search_constant_type_c::safelint_type_name);
-					add_datatype_to_candidate_list(symbol, &search_constant_type_c::ulint_type_name);
-					add_datatype_to_candidate_list(symbol, &search_constant_type_c::safeulint_type_name);
-					add_datatype_to_candidate_list(symbol, &search_constant_type_c::lreal_type_name);
-					add_datatype_to_candidate_list(symbol, &search_constant_type_c::safelreal_type_name);
+					add_datatype_to_candidate_list(symbol, &get_datatype_info_c::lword_type_name);
+					add_datatype_to_candidate_list(symbol, &get_datatype_info_c::safelword_type_name);
+					add_datatype_to_candidate_list(symbol, &get_datatype_info_c::lint_type_name);
+					add_datatype_to_candidate_list(symbol, &get_datatype_info_c::safelint_type_name);
+					add_datatype_to_candidate_list(symbol, &get_datatype_info_c::ulint_type_name);
+					add_datatype_to_candidate_list(symbol, &get_datatype_info_c::safeulint_type_name);
+					add_datatype_to_candidate_list(symbol, &get_datatype_info_c::lreal_type_name);
+					add_datatype_to_candidate_list(symbol, &get_datatype_info_c::safelreal_type_name);
 					break;
 			default: /* if none of the above, then no valid datatype allowed... */
 					break;
--- a/stage3/forced_narrow_candidate_datatypes.cc	Thu Oct 25 18:51:55 2012 +0100
+++ b/stage3/forced_narrow_candidate_datatypes.cc	Fri Oct 26 10:11:28 2012 +0100
@@ -123,7 +123,7 @@
 void forced_narrow_candidate_datatypes_c::forced_narrow_il_instruction(symbol_c *symbol, std::vector <symbol_c *> &next_il_instruction) {
   if (NULL == symbol->datatype) {
     if (symbol->candidate_datatypes.empty()) {
-      symbol->datatype = &(search_constant_type_c::invalid_type_name); // This will occur in the situations (a) in the above example
+      symbol->datatype = &(get_datatype_info_c::invalid_type_name); // This will occur in the situations (a) in the above example
       // return NULL; // No need to return control to the visit() method of the base class... But we do so, just to be safe (called at the end of this function)!
     } else {
       if (next_il_instruction.empty()) {
--- a/stage3/narrow_candidate_datatypes.cc	Thu Oct 25 18:51:55 2012 +0100
+++ b/stage3/narrow_candidate_datatypes.cc	Fri Oct 26 10:11:28 2012 +0100
@@ -89,7 +89,7 @@
 	if ((NULL == datatype) && (NULL == symbol->datatype)) return;
 	
 	if (search_in_candidate_datatype_list(datatype, symbol->candidate_datatypes) < 0)
-		symbol->datatype = &(search_constant_type_c::invalid_type_name);   
+		symbol->datatype = &(get_datatype_info_c::invalid_type_name);   
 	else {
 		if (NULL == symbol->datatype)   
 			/* not yet set to anything, so we set it to the requested data type */
@@ -97,7 +97,7 @@
 		else {
 			/* had already been set previously to some data type. Let's check if they are the same! */
 			if (!get_datatype_info_c::is_type_equal(symbol->datatype, datatype))
-				symbol->datatype = &(search_constant_type_c::invalid_type_name);
+				symbol->datatype = &(get_datatype_info_c::invalid_type_name);
 // 			else 
 				/* we leave it unchanged, as it is the same as the requested data type! */
 		}
@@ -401,7 +401,7 @@
 	if ((NULL == il_instruction->datatype) || (get_datatype_info_c::is_type_equal(param_value.datatype, il_instruction->datatype))) {
 		set_datatype_in_prev_il_instructions(param_value.datatype, fake_prev_il_instruction);
 	} else {
-		set_datatype_in_prev_il_instructions(&search_constant_type_c::invalid_type_name, fake_prev_il_instruction);
+		set_datatype_in_prev_il_instructions(&get_datatype_info_c::invalid_type_name, fake_prev_il_instruction);
 	}
 	return NULL;
 }
--- a/stage4/generate_c/generate_c_il.cc	Thu Oct 25 18:51:55 2012 +0100
+++ b/stage4/generate_c/generate_c_il.cc	Fri Oct 26 10:11:28 2012 +0100
@@ -256,10 +256,10 @@
     /* a small helper function */
     symbol_c *default_literal_type(symbol_c *symbol) {
       if (get_datatype_info_c::is_ANY_INT_literal(symbol)) {
-        return &search_constant_type_c::lint_type_name;
+        return &get_datatype_info_c::lint_type_name;
       }
       else if (get_datatype_info_c::is_ANY_REAL_literal(symbol)) {
-        return &search_constant_type_c::lreal_type_name;
+        return &get_datatype_info_c::lreal_type_name;
       }
       return symbol;
     }
@@ -908,9 +908,9 @@
         if (param_value == NULL) ERROR;
         s4o.print("(");
         if (get_datatype_info_c::is_ANY_INT_literal(current_param_type))
-          search_constant_type_c::lint_type_name.accept(*this);
+          get_datatype_info_c::lint_type_name.accept(*this);
         else if (get_datatype_info_c::is_ANY_REAL_literal(current_param_type))
-          search_constant_type_c::lreal_type_name.accept(*this);
+          get_datatype_info_c::lreal_type_name.accept(*this);
         else
           current_param_type->accept(*this);
         s4o.print(")");
@@ -1296,10 +1296,10 @@
         }
         if (param_value == NULL) ERROR;
         s4o.print("(");
-        if (get_datatype_info_c::is_ANY_INT_literal(current_param_type))
-          search_constant_type_c::lint_type_name.accept(*this);
+        if      (get_datatype_info_c::is_ANY_INT_literal(current_param_type))
+                 get_datatype_info_c::lint_type_name.accept(*this);
         else if (get_datatype_info_c::is_ANY_REAL_literal(current_param_type))
-          search_constant_type_c::lreal_type_name.accept(*this);
+                 get_datatype_info_c::lreal_type_name.accept(*this);
         else
           current_param_type->accept(*this);
         s4o.print(")");
--- a/stage4/generate_c/generate_c_inlinefcall.cc	Thu Oct 25 18:51:55 2012 +0100
+++ b/stage4/generate_c/generate_c_inlinefcall.cc	Fri Oct 26 10:11:28 2012 +0100
@@ -232,10 +232,10 @@
     /* a small helper function */
     symbol_c *default_literal_type(symbol_c *symbol) {
       if (get_datatype_info_c::is_ANY_INT_literal(symbol)) {
-        return &search_constant_type_c::lint_type_name;
+        return &get_datatype_info_c::lint_type_name;
       }
       else if (get_datatype_info_c::is_ANY_REAL_literal(symbol)) {
-        return &search_constant_type_c::lreal_type_name;
+        return &get_datatype_info_c::lreal_type_name;
       }
       return symbol;
     }
--- a/stage4/generate_c/generate_c_st.cc	Thu Oct 25 18:51:55 2012 +0100
+++ b/stage4/generate_c/generate_c_st.cc	Fri Oct 26 10:11:28 2012 +0100
@@ -759,9 +759,9 @@
         if (param_value == NULL) ERROR;
         s4o.print("(");
         if      (get_datatype_info_c::is_ANY_INT_literal(current_param_type))
-          search_constant_type_c::lint_type_name.accept(*this);
+          get_datatype_info_c::lint_type_name.accept(*this);
         else if (get_datatype_info_c::is_ANY_REAL_literal(current_param_type))
-          search_constant_type_c::lreal_type_name.accept(*this);
+          get_datatype_info_c::lreal_type_name.accept(*this);
         else
           current_param_type->accept(*this);
         s4o.print(")");
@@ -1037,9 +1037,9 @@
   s4o.indent_right();
   s4o.print(s4o.indent_spaces);
   if      (get_datatype_info_c::is_ANY_INT_literal(expression_type))
-        search_constant_type_c::lint_type_name.accept(*this);
+           get_datatype_info_c::lint_type_name.accept(*this);
   else if (get_datatype_info_c::is_ANY_REAL_literal(expression_type))
-        search_constant_type_c::lreal_type_name.accept(*this);
+           get_datatype_info_c::lreal_type_name.accept(*this);
   else
     expression_type->accept(*this);
   s4o.print(" __case_expression = ");