MicroModelicaCCompiler  4.5.3
MicroModelica::IR::ModelChecker Class Reference

#include <mmo_model_checker.hpp>

Inheritance diagram for MicroModelica::IR::ModelChecker:
Collaboration diagram for MicroModelica::IR::ModelChecker:

Public Member Functions

 ModelChecker (string name)
 
 ~ModelChecker ()
 
void visit (AST_Class x)
 
void leave (AST_Class x)
 
void visit (AST_Composition x)
 
void leave (AST_Composition x)
 
void visit (AST_CompositionElement x)
 
void leave (AST_CompositionElement x)
 
void visit (AST_CompositionEqsAlgs x)
 
void leave (AST_CompositionEqsAlgs x)
 
void visit (AST_External_Function_Call)
 
void visit (AST_Element x)
 
void visit (AST_Modification x)
 
void leave (AST_Modification x)
 
void visit (AST_Comment x)
 
void visit (AST_Equation x)
 
void visit (AST_ForIndex x)
 
void visit (AST_Equation_Else x)
 
void visit (AST_Expression x)
 
void visit (AST_Argument x)
 
void visit (AST_Statement x)
 
void leave (AST_Statement x)
 
void visit (AST_Statement_Else x)
 
void visit (AST_StoredDefinition x)
 
void leave (AST_StoredDefinition x)
 
int apply (AST_Node x)
 
- Public Member Functions inherited from AST_Visitor
 ~AST_Visitor ()=default
 

Private Member Functions

bool _lValue (AST_Expression left)
 
bool _whenStatement (AST_Expression cond)
 

Private Attributes

bool _has_parent
 
std::string _class_name
 
AST_ClassPrefix _class_prefix
 
bool _class_modification
 
bool _else_when
 

Detailed Description

Definition at line 65 of file mmo_model_checker.hpp.

Constructor & Destructor Documentation

◆ ModelChecker()

MicroModelica::IR::ModelChecker::ModelChecker ( string  name)

Definition at line 40 of file mmo_model_checker.cpp.

◆ ~ModelChecker()

MicroModelica::IR::ModelChecker::~ModelChecker ( )

Definition at line 44 of file mmo_model_checker.cpp.

Member Function Documentation

◆ _lValue()

bool MicroModelica::IR::ModelChecker::_lValue ( AST_Expression  left)
private

◆ _whenStatement()

bool MicroModelica::IR::ModelChecker::_whenStatement ( AST_Expression  cond)
private

Definition at line 386 of file mmo_model_checker.cpp.

References AST_ListFirst(), BINOPGREATER, BINOPGREATEREQ, BINOPLOWER, BINOPLOWEREQ, EXPBINOP, and EXPOUTPUT.

Referenced by visit().

Here is the call graph for this function:

◆ apply()

int MicroModelica::IR::ModelChecker::apply ( AST_Node  x)
virtual

Implements AST_Visitor.

Definition at line 492 of file mmo_model_checker.cpp.

References MicroModelica::Util::Error::errors(), and MicroModelica::Util::Error::instance().

Referenced by main(), and parsePackages().

Here is the call graph for this function:

◆ leave() [1/7]

void MicroModelica::IR::ModelChecker::leave ( AST_Class  x)
virtual

Implements AST_Visitor.

Definition at line 98 of file mmo_model_checker.cpp.

References _has_parent, and CP_MODEL.

◆ leave() [2/7]

void MicroModelica::IR::ModelChecker::leave ( AST_Composition  x)
virtual

Implements AST_Visitor.

Definition at line 131 of file mmo_model_checker.cpp.

◆ leave() [3/7]

void MicroModelica::IR::ModelChecker::leave ( AST_CompositionElement  x)
virtual

Implements AST_Visitor.

Definition at line 142 of file mmo_model_checker.cpp.

◆ leave() [4/7]

void MicroModelica::IR::ModelChecker::leave ( AST_CompositionEqsAlgs  x)
virtual

Implements AST_Visitor.

Definition at line 153 of file mmo_model_checker.cpp.

◆ leave() [5/7]

void MicroModelica::IR::ModelChecker::leave ( AST_Modification  x)
virtual

Implements AST_Visitor.

Definition at line 245 of file mmo_model_checker.cpp.

References _class_modification, and MODCLASS.

◆ leave() [6/7]

void MicroModelica::IR::ModelChecker::leave ( AST_Statement  x)
virtual

Implements AST_Visitor.

Definition at line 462 of file mmo_model_checker.cpp.

References _else_when, and STWHEN.

◆ leave() [7/7]

void MicroModelica::IR::ModelChecker::leave ( AST_StoredDefinition  x)
virtual

Implements AST_Visitor.

Definition at line 490 of file mmo_model_checker.cpp.

References MicroModelica::Util::Error::instance(), and MicroModelica::Util::Error::show().

Here is the call graph for this function:

◆ visit() [1/16]

void MicroModelica::IR::ModelChecker::visit ( AST_Argument  x)
virtual

◆ visit() [2/16]

◆ visit() [3/16]

void MicroModelica::IR::ModelChecker::visit ( AST_Comment  x)
virtual

Implements AST_Visitor.

Definition at line 252 of file mmo_model_checker.cpp.

◆ visit() [4/16]

void MicroModelica::IR::ModelChecker::visit ( AST_Composition  x)
virtual

◆ visit() [5/16]

void MicroModelica::IR::ModelChecker::visit ( AST_CompositionElement  x)
virtual

◆ visit() [6/16]

void MicroModelica::IR::ModelChecker::visit ( AST_CompositionEqsAlgs  x)
virtual

◆ visit() [7/16]

◆ visit() [8/16]

void MicroModelica::IR::ModelChecker::visit ( AST_Equation  x)
virtual

◆ visit() [9/16]

void MicroModelica::IR::ModelChecker::visit ( AST_Equation_Else  x)
virtual

Implements AST_Visitor.

Definition at line 339 of file mmo_model_checker.cpp.

References MicroModelica::Util::Error::add(), EM_AST, EM_CLASS_DEFINITION, MicroModelica::Util::ER_Error, and MicroModelica::Util::Error::instance().

Here is the call graph for this function:

◆ visit() [10/16]

void MicroModelica::IR::ModelChecker::visit ( AST_Expression  x)
virtual

◆ visit() [11/16]

void MicroModelica::IR::ModelChecker::visit ( AST_External_Function_Call  x)
virtual

◆ visit() [12/16]

void MicroModelica::IR::ModelChecker::visit ( AST_ForIndex  x)
virtual

Implements AST_Visitor.

Definition at line 328 of file mmo_model_checker.cpp.

References MicroModelica::Util::Error::add(), EM_AST, EM_CLASS_DEFINITION, MicroModelica::Util::ER_Error, EXPRANGE, and MicroModelica::Util::Error::instance().

Here is the call graph for this function:

◆ visit() [13/16]

void MicroModelica::IR::ModelChecker::visit ( AST_Modification  x)
virtual

◆ visit() [14/16]

void MicroModelica::IR::ModelChecker::visit ( AST_Statement  x)
virtual

◆ visit() [15/16]

void MicroModelica::IR::ModelChecker::visit ( AST_Statement_Else  x)
virtual

Implements AST_Visitor.

Definition at line 471 of file mmo_model_checker.cpp.

References _else_when, _whenStatement(), current_element, and visit().

Here is the call graph for this function:

◆ visit() [16/16]

void MicroModelica::IR::ModelChecker::visit ( AST_StoredDefinition  x)
virtual

Implements AST_Visitor.

Definition at line 483 of file mmo_model_checker.cpp.

References MicroModelica::Util::Error::add(), EM_AST, EM_DEFINITION_NOT_ALLOWED, MicroModelica::Util::ER_Error, and MicroModelica::Util::Error::instance().

Here is the call graph for this function:

Member Data Documentation

◆ _class_modification

bool MicroModelica::IR::ModelChecker::_class_modification
private

Definition at line 117 of file mmo_model_checker.hpp.

Referenced by leave(), and visit().

◆ _class_name

std::string MicroModelica::IR::ModelChecker::_class_name
private

Definition at line 115 of file mmo_model_checker.hpp.

◆ _class_prefix

AST_ClassPrefix MicroModelica::IR::ModelChecker::_class_prefix
private

Definition at line 116 of file mmo_model_checker.hpp.

Referenced by visit().

◆ _else_when

bool MicroModelica::IR::ModelChecker::_else_when
private

Definition at line 118 of file mmo_model_checker.hpp.

Referenced by leave(), and visit().

◆ _has_parent

bool MicroModelica::IR::ModelChecker::_has_parent
private

Definition at line 114 of file mmo_model_checker.hpp.

Referenced by leave(), and visit().


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