symb_table.c
Implementation of the compile.symb_table package
SymbCache.c
The SymbCache class implementation
SymbLayer.c
Implementation of the system-wide SymbLayer
SymbTable.c
Implementation of the system-wide SymbolTable
SymbType.c
Implementation of functions dealing with the type of variables in a symbol table.

symb_table.c

Implementation of the compile.symb_table package

By: Andrei Tchaltsev

SymbTablePkg_init()
Initialises the class package.
SymbTablePkg_quit()
Shut down the package.
SymbTablePkg_no_type()
returns a no-type
SymbTablePkg_statement_type()
returns a no-type
SymbTablePkg_boolean_enum_type()
returns a boolean enum type
SymbTablePkg_pure_symbolic_enum_type()
returns a pure symbolic enum type.
SymbTablePkg_int_symbolic_enum_type()
returns a enum type containing integers AND symbolic constants
SymbTablePkg_pure_int_enum_type()
returns a pure integer enum type
SymbTablePkg_integer_type()
returns an Integer type.
SymbTablePkg_real_type()
returns a Real type.
SymbTablePkg_word_type()
returns a Word type (with a given width)
SymbTablePkg_wordarray_type()
Returns a WordArray type (given array width and value width)
SymbTablePkg_boolean_set_type()
returns a boolean-set type.
SymbTablePkg_integer_set_type()
returns a integer-set type.
SymbTablePkg_symbolic_set_type()
returns a symbolic-set type.
SymbTablePkg_integer_symbolic_set_type()
returns a integer-symbolic-set type.
SymbTablePkg_error_type()
returns an Error-type.

SymbCache.c

The SymbCache class implementation

By: Roberto Cavada

See AlsoSymbCache.h

SymbCache_create()
Class constructor
SymbCache_destroy()
Class destructor
SymbCache_get_vars()
Returns the list of all declared variables
SymbCache_get_state_vars()
Returns the list of all declared state variables
SymbCache_get_input_vars()
Returns the list of all declared input variables
SymbCache_get_constants()
Returns the list of all declared constants
SymbCache_get_defines()
Returns the list of all DEFINEs
SymbCache_get_state_symbols()
Returns the list of all state variables and those DEFINEs whose body refer directly or indirectly to state variables
SymbCache_get_input_symbols()
Returns the list of all input variables and those DEFINEs whose body refer directly or indirectly to input variables
SymbCache_get_state_input_symbols()
Returns the list of those DEFINEs whose body refer directly or indirectly to both state and input variables
SymbCache_new_input_var()
Declares a new input variable.
SymbCache_new_state_var()
Declares a new state variable.
SymbCache_remove_var()
Removes a variable from the cache of symbols, and from the flattener module
SymbCache_new_define()
Declares a new DEFINE.
SymbCache_remove_define()
Removes a DEFINE from the cache of symbols, and from the flattener define hash
SymbCache_new_constant()
Declares a new constant.
SymbCache_remove_constant()
Removes a constant from the cache of symbols, and from the flattener module
SymbCache_get_var_type()
Returns the type of a given variable
SymbCache_get_define_body()
Returns the body of the given DEFINE name
SymbCache_get_define_flatten_body()
Returns the flattenized body of the given DEFINE name
SymbCache_get_define_context()
Returns the context of the given DEFINE name
SymbCache_is_symbol_state_var()
Returns true if the given symbol is a state variable.
SymbCache_is_symbol_input_var()
Returns true if the given symbol is an input variable.
SymbCache_is_symbol_var()
Returns true if the given symbol is either a state or an input variable.
SymbCache_is_symbol_declared()
Returns true if the given symbol is declared
SymbCache_is_symbol_constant()
Returns true if the given symbol is a declared constant
SymbCache_is_symbol_define()
Returns true if the given symbol is a declared DEFINE
SymbCache_list_contains_input_var()
Returns true if var_list contains at least one input variable
SymbCache_list_contains_state_var()
Returns true if var_list contains at least one state variable
SymbCache_list_contains_undef_var()
Returns true if the given symbols list contains one or more undeclared variable names
symb_cache_new_symbol()
Insert a new value in the symbol hash
symb_cache_remove_symbol()
Removes any reference of the given symbol from the cache, and from the flattener internal hashes as well
symb_cache_lookup_symbol()
Returns the definition of the given symbol
symb_cache_init()
Private initializer
symb_cache_deinit()
Private deinitializer
symb_cache_define_to_symbols_lists()
Used to update symbols lists when a DEFINE is declared. The given DEFINE will be added to one of state, input or state-input symbols lists.
symb_cache_resolve_pending_defines()
If there are pending DEFINEs that wait for an assignment within the lists of state, input and state-input symbols list, they are resolved and assigned.

SymbLayer.c

Implementation of the system-wide SymbLayer

By: Roberto Cavada

See AlsoSymbLayer.h

SymbLayer_create()
Class SymbLayer constructor
SymbLayer_destroy()
Class SymbLayer destructor
SymbLayer_set_name()
Sets the layer name.
SymbLayer_get_name()
Returns the name self had been registered with.
SymbLayer_get_insert_policy()
Returns the policy that must be adopted to stack this layer into a layers stack, within a SymbTable instance
SymbLayer_must_insert_before()
Compares the insertion policies of self and other, and returns true if self must be inserted *before* other
SymbLayer_committed_to_enc()
Called every time an instance is committed within an encoding.
SymbLayer_removed_from_enc()
Called every time an instance is removed from an encoding.
SymbLayer_can_declare_constant()
Call this method to know if a new constant can be declared within this layer.
SymbLayer_can_declare_var()
Call this method to know if a new variable can be declared within this layer.
SymbLayer_can_declare_define()
Call this method to know if a new DEFINE can be declared within this layer.
SymbLayer_declare_constant()
Insert a new constant
SymbLayer_declare_input_var()
Insert a new input variable
SymbLayer_declare_state_var()
Insert a new state variable
SymbLayer_declare_define()
Insert a new DEFINE
SymbLayer_remove_var()
Removes a variable previously delcared
SymbLayer_get_constants()
Returns the list of declared contants
SymbLayer_get_state_vars_num()
Returns the number of declared state variables.
SymbLayer_get_bool_state_vars_num()
Returns the number of declared boolean state variables
SymbLayer_get_input_vars_num()
Returns the number of declared input variables
SymbLayer_get_bool_input_vars_num()
Returns the number of declared boolean input variables
SymbLayer_get_defines_num()
Returns the number of DEFINEs.
SymbLayer_get_defines()
Returns the list of DEFINEs.
SymbLayer_get_all_vars()
Returns the entire list of variables declared in this layer
SymbLayer_get_all_symbols()
Returns the entire list of symbols (constants, variables, etc.) declared in this layer
SymbLayer_get_state_vars()
Returns the list of state variables declared in this layer
SymbLayer_get_input_vars()
Returns the list of input variables declared in this layer
SymbLayer_get_bool_input_vars()
Returns the list of declared boolean input variables declared in this layer
SymbLayer_get_bool_state_vars()
Returns the list of declared boolean state variables declared in this layer
SymbLayer_get_bool_vars()
Returns the list of boolean variables declared in this layer
symb_layer_init()
Private method called by the constructor
symb_layer_deinit()
Private method called by the destructor

SymbTable.c

Implementation of the system-wide SymbolTable

By: Roberto Cavada

See AlsoSymbTable.h

SymbTable_create()
Class constructor
SymbTable_destroy()
Class destructor
SymbTable_create_layer()
Creates and adds a new layer
SymbTable_remove_layer()
Removes and destroys a layer
SymbTable_rename_layer()
Renames an existing layer
SymbTable_get_vars()
Returns the list of all declared variables
SymbTable_get_state_vars()
Returns the list of all declared state variables
SymbTable_get_input_vars()
Returns the list of all declared input variables
SymbTable_get_constants()
Returns the list of all declared constants
SymbTable_get_defines()
Returns the list of all DEFINEs
SymbTable_get_vars_num()
Returns the number of all declared variables
SymbTable_get_state_vars_num()
Returns the number of all declared state variables
SymbTable_get_input_vars_num()
Returns the number of all declared input variables
SymbTable_get_constants_num()
Returns the number of all declared constants
SymbTable_get_defines_num()
Returns the number of all DEFINEs
SymbTable_get_state_symbols()
Returns the list of all state variables and those DEFINEs whose body refer directly or indirectly to state variables
SymbTable_get_input_symbols()
Returns the list of all input variables and those DEFINEs whose body refer directly or indirectly to input variables
SymbTable_get_state_input_symbols()
Returns the list of those DEFINEs whose body refer directly or indirectly to both state and input variables
SymbTable_get_model_state_symbols()
Returns the list of state symbols that belong to the layer of the model symbols
SymbTable_get_model_input_symbols()
Returns the list of input symbols that belong to the layer of the model symbols
SymbTable_get_model_state_input_symbols()
Returns the list of both state and input symbols that belong to the layer of the model symbols. It returns those DEFINES whose body contain both state and input variables. This methods does _NOT_ return the state symbols plus the input symbols.
SymbTable_get_layers_state_symbols()
Returns the list of state symbols that belong to the given layers
SymbTable_get_layers_input_symbols()
Returns the list of input symbols that belong to the given layers
SymbTable_get_layers_state_input_symbols()
Returns the list of state and input symbols that belong to the given layers, meaning those DEFINES whose body contain both state and input variables. This methods does _NOT_ return the state symbols plus the input symbols.
SymbTable_get_var_type()
Returns the type of a given variable
SymbTable_get_define_body()
Returns the body of the given DEFINE name
SymbTable_get_define_flatten_body()
Returns the flattenized body of the given DEFINE name
SymbTable_get_define_context()
Returns the context of the given DEFINE name
SymbTable_is_symbol_state_var()
Returns true if the given symbol is a state variable.
SymbTable_is_symbol_input_var()
Returns true if the given symbol is an input variable.
SymbTable_is_symbol_var()
Returns true if the given symbol is either a state or an input variable.
SymbTable_is_symbol_bool_var()
Returns true if the given symbol is a variable of enum type with the values 0 and 1 (boolean)
SymbTable_is_symbol_declared()
Returns true if the given symbol is declared
SymbTable_is_symbol_define()
Returns true if the given symbol is a declared DEFINE
SymbTable_is_symbol_constant()
Returns true if the given symbol is a declared constant
SymbTable_list_contains_input_var()
Returns true if var_list contains at least one input variable, false otherwise
SymbTable_list_contains_state_var()
Returns true if var_list contains at least one state variable, false otherwise
SymbTable_list_contains_undef_var()
Returns true if the given symbols list contains one or more undeclared variable names, false otherwise
symb_table_init()
Private initializer
symb_table_deinit()
Private deinitializer
symb_table_layer_exists()
Returns true if the given name corresponds to an already registered layer.
symb_table_filter_layer_symbols()
Given a list of symbols, returns a new list that contains only those symbols that have been declared within the model layer
symb_table_filter_layers_symbols()
Given a list of symbols and a list of layers names, returns a new list that contains only those symbols that have been declared within the given layers

SymbType.c

Implementation of functions dealing with the type of variables in a symbol table.

By: Andrei Tchaltsev

See AlsoSymbType.h

SymbType_create()
Class SymbType constructor
SymbType_destroy()
Class SymbType destructor
SymbType_copy()
Class SymbType copy-constructor
SymbType_create_memory_sharing_type()
Private class SymbType constructor for memory sharing type instances
SymbType_destroy_memory_sharing_type()
Private Class SymbType destructor for memory sharing instances of types.
SymbType_get_tag()
Returns the tag (the kind) of the type
SymbType_is_boolean_enum()
Returns true, if the type is a enum-type and its values are from boolean range. Otherwise - returns false.
SymbType_is_pure_int_enum()
Returns true, if the type is a enum-type and its value are integers only. Otherwise - returns false.
SymbType_is_pure_symbolic_enum()
Returns true, if the type is a enum-type and its value are symbolic constants only. Otherwise - returns false.
SymbType_is_int_symbolic_enum()
Returns true, if the type is a enum-type and its value are symbolic AND integer constants. Otherwise - returns false.
SymbType_is_word_1()
Returns true, if the type is a Word type and the width of the word is 1. Otherwise - returns false.
SymbType_is_word()
Returns true, if the type is a Word type
SymbType_is_set()
Returns true, if the type is one of the set-types, i.e. boolean-set, integer-set, symbolic-set, integer-symbolic-set, and false otherwise.
SymbType_is_error()
Returns true, if the type is a error-type, and false otherwise.
SymbType_is_statement()
Returns true, if the type is a statement-type, and false otherwise.
SymbType_generate_all_word_values()
Genereate and returns a list of all possible values of a particular Word type
SymbType_get_word_width()
Returns the width of a Word type
SymbType_get_wordarray_awidth()
Returns the width of the address in a WordArray type
SymbType_get_wordarray_vwidth()
Returns the width of the value in a WordArray type
SymbType_get_word_line_number()
Returns the line number where the type was declared.
SymbType_get_enum_type_values()
Returns the list of values of an enum type
SymbType_print()
Prints the type structure to the output stream.
SymbType_is_back_comp()
returns true if the given type is "backward compatible", i.e. a enum or integer type.
SymbType_get_greater()
Returns one of the given types, if the other one can be implicitly converted to the former one. Otherwise - Nil.
SymbType_convert_right_to_left()
Returns the left type, if the right one can be implicitly converted to the left one. NULL - otherwise
SymbType_get_minimal_common()
Returns the minimal type to which the both given types can be converted, or Nil if there is none.
SymbType_make_set_type()
Returns a minimal set-type which the given type can be implicitly converted to, or NULL if this is impossible.
SymbType_make_from_set_type()
This function is opposite to SymbType_make_set_type, i.e. if the given type is one of the set-types, then the type without "set" suffix is returned. Otherwise the time is returned without change.
SymbType_make_memory_shared()
This function takes a NOT memory shared type and returns a memory shared one.

Last updated on 2009/03/04 12h:51