mCRL2
Loading...
Searching...
No Matches
mcrl2::data::type_checker Class Reference

#include <type_checker.h>

Inheritance diagram for mcrl2::data::type_checker:
mcrl2::data::sort_type_checker

Public Member Functions

 type_checker (const data_specification &data_spec)
 
const std::map< core::identifier_string, sort_expression_list > & system_constants () const
 
const std::map< core::identifier_string, function_sort_list > & system_functions () const
 
const std::map< core::identifier_string, sort_expression > & user_constants () const
 
const std::map< core::identifier_string, function_sort_list > & user_functions () const
 
- Public Member Functions inherited from mcrl2::data::sort_type_checker
 sort_type_checker (const sort_specification &sort_spec, bool must_check_aliases=true)
 constructs a sort expression checker.
 
const sort_specificationget_sort_specification () const
 
void operator() (const sort_expression &x) const
 Type check a sort expression. Throws an exception if the expression is not well typed.
 

Protected Member Functions

void add_system_constant (const data::function_symbol &f)
 
void add_system_function (const data::function_symbol &f)
 
sort_expression unwind_sort_expression (const sort_expression &x) const
 
bool equal_types (const sort_expression &x1, const sort_expression &x2) const
 
bool find_sort (const sort_expression &x, const function_sort_list &sorts) const
 
void initialise_system_defined_functions ()
 
void add_constant (const data::function_symbol &f, const std::string &msg)
 
void add_function (const data::function_symbol &f, const std::string &msg, bool allow_double_decls=false)
 
void read_sort (const sort_expression &x)
 
void read_constructors_and_mappings (const function_symbol_vector &constructors, const function_symbol_vector &mappings, const function_symbol_vector &normalized_constructors)
 
- Protected Member Functions inherited from mcrl2::data::sort_type_checker
void check_alias_circularity (const data::basic_sort &lhs, const data::sort_expression &rhs, std::set< basic_sort > sort_already_seen, const std::map< basic_sort, sort_expression > &alias_map)
 
void check_sorts ()
 
void check_aliases ()
 
void check_for_sort_alias_loop_through_function_sort (const basic_sort &end_search, const sort_expression &start_search, std::set< basic_sort > &visited, const bool observed_a_sort_constructor, const std::map< basic_sort, sort_expression > &alias_map)
 
void check_basic_sort_is_declared (const basic_sort &x) const
 
void check_sort_list_is_declared (const sort_expression_list &SortExprList) const
 
void check_sort_is_declared (const sort_expression &x) const
 
void check_for_empty_constructor_domains (const function_symbol_vector &constructors)
 

Protected Attributes

std::map< core::identifier_string, sort_expression_listm_system_constants
 
std::map< core::identifier_string, function_sort_listm_system_functions
 
std::map< core::identifier_string, sort_expressionm_user_constants
 
std::map< core::identifier_string, function_sort_listm_user_functions
 
- Protected Attributes inherited from mcrl2::data::sort_type_checker
sort_specification m_sort_specification
 

Detailed Description

Definition at line 98 of file type_checker.h.

Constructor & Destructor Documentation

◆ type_checker()

mcrl2::data::type_checker::type_checker ( const data_specification data_spec)
inline

Definition at line 502 of file type_checker.h.

Member Function Documentation

◆ add_constant()

void mcrl2::data::type_checker::add_constant ( const data::function_symbol f,
const std::string &  msg 
)
inlineprotected

Definition at line 326 of file type_checker.h.

◆ add_function()

void mcrl2::data::type_checker::add_function ( const data::function_symbol f,
const std::string &  msg,
bool  allow_double_decls = false 
)
inlineprotected

Definition at line 339 of file type_checker.h.

◆ add_system_constant()

void mcrl2::data::type_checker::add_system_constant ( const data::function_symbol f)
inlineprotected

Definition at line 106 of file type_checker.h.

◆ add_system_function()

void mcrl2::data::type_checker::add_system_function ( const data::function_symbol f)
inlineprotected

Definition at line 119 of file type_checker.h.

◆ equal_types()

bool mcrl2::data::type_checker::equal_types ( const sort_expression x1,
const sort_expression x2 
) const
inlineprotected

Definition at line 129 of file type_checker.h.

◆ find_sort()

bool mcrl2::data::type_checker::find_sort ( const sort_expression x,
const function_sort_list sorts 
) const
inlineprotected

Definition at line 138 of file type_checker.h.

◆ initialise_system_defined_functions()

void mcrl2::data::type_checker::initialise_system_defined_functions ( )
inlineprotected

Definition at line 143 of file type_checker.h.

◆ read_constructors_and_mappings()

void mcrl2::data::type_checker::read_constructors_and_mappings ( const function_symbol_vector constructors,
const function_symbol_vector mappings,
const function_symbol_vector normalized_constructors 
)
inlineprotected

Definition at line 429 of file type_checker.h.

◆ read_sort()

void mcrl2::data::type_checker::read_sort ( const sort_expression x)
inlineprotected

Definition at line 372 of file type_checker.h.

◆ system_constants()

const std::map< core::identifier_string, sort_expression_list > & mcrl2::data::type_checker::system_constants ( ) const
inline

Definition at line 520 of file type_checker.h.

◆ system_functions()

const std::map< core::identifier_string, function_sort_list > & mcrl2::data::type_checker::system_functions ( ) const
inline

Definition at line 525 of file type_checker.h.

◆ unwind_sort_expression()

sort_expression mcrl2::data::type_checker::unwind_sort_expression ( const sort_expression x) const
inlineprotected

Definition at line 124 of file type_checker.h.

◆ user_constants()

const std::map< core::identifier_string, sort_expression > & mcrl2::data::type_checker::user_constants ( ) const
inline

Definition at line 530 of file type_checker.h.

◆ user_functions()

const std::map< core::identifier_string, function_sort_list > & mcrl2::data::type_checker::user_functions ( ) const
inline

Definition at line 535 of file type_checker.h.

Member Data Documentation

◆ m_system_constants

std::map<core::identifier_string, sort_expression_list> mcrl2::data::type_checker::m_system_constants
protected

Definition at line 101 of file type_checker.h.

◆ m_system_functions

std::map<core::identifier_string, function_sort_list> mcrl2::data::type_checker::m_system_functions
protected

Definition at line 102 of file type_checker.h.

◆ m_user_constants

std::map<core::identifier_string, sort_expression> mcrl2::data::type_checker::m_user_constants
protected

Definition at line 103 of file type_checker.h.

◆ m_user_functions

std::map<core::identifier_string, function_sort_list> mcrl2::data::type_checker::m_user_functions
protected

Definition at line 104 of file type_checker.h.


The documentation for this class was generated from the following file: