Package com.veromodo.tempo.sem

Provides classes to support the semantic analysis of an abstract syntax tree produced by the parser.

See:
          Description

Interface Summary
IImportAdder  
IScope  
ISymbolAdder  
IVocFactory  
 

Class Summary
ArrayFactory  
CheckActionFormals Used by SimProofAnalyze Adds all the formals in a formal list to the enviroment per the SymbolAdder.
CheckAndExtractEvolve This class is a Evolve Expression Pattern Matcher and Type Checker Given an ASTExpr, determines if the expression is a correct Evolve Expression
CheckAssignment  
CheckComponent  
CheckComponentWhere  
CheckExpr  
CheckExprAutomaton This class test an expressoin to see if it resolves to an automaton descriptor It returns a set of automaton descriptors that the expression can refer to If no automaton descriptors are found it returns the empty set This class was created to allow for complex automaton state derfs and invocations ex: A.b, Autos[i].b, ect...
CheckExprInfer  
CheckFormulas This class is builds a set of all possible tuple type combinations from lists of expressions.
CheckFunctionDef  
CheckHidden  
CheckImport This visitor is used exclusively to analyze the import clause of an automaton.
CheckInvariant  
CheckLeftValue This class is a Left Value Pattern Matcher Given an ASTExpr, determines if the expression is a possible left value
CheckMSGInvoke  
CheckSchedule  
CheckSignature  
CheckSimProof  
CheckSimStatement  
CheckSimulation  
CheckState  
CheckStatement  
CheckStateSchedule  
CheckTask  
CheckTrajectory  
CheckTransition  
CheckType  
CheckTypeDef Designed to work on one ASTRootDeclType, Analyzes the type declaration adding types into the Enviroment Could possibly use some clean up, was ripped nearly verbadum from check Vocab
CheckTypeFormal  
CheckTypeVocab  
CheckVocabDefineType  
CheckVocabulary Designed to work on one ASTRootDeclVocab, Analyzes the vocab adding its information into the Enviroment
CheckYieldStatement  
CollectActuals Collects a list of actuals and generates a tuple type of them.
CollectFormalNames Collects a list of formals and generates a tuple type of them.
CollectFormals Collects a list of formals and generates a tuple type of them.
CollectFormalsAuto  
CollectFormalsComponent  
CollectFormalsSig  
CollectFormalsTask  
CollectFormalsTypeFormal  
CollectImports This visitor is used exclusively to analyze the import clause of an automaton.
CollectionVocabRef  
CollectLocals Collects a list of formals and generates a tuple type of them.
CollectOperators Designed to operate on a ASTNameList Scans over the list building a collection of all the operation definitions
CollectTypeParameters  
CollectVocabTypeParameters  
CollectVocabularyActuals  
DefaultSymbolAdder  
DefaultTypeParameterContext  
DummyLog  
Environment  
ExprFindTypes  
ExprFindTypesInfer  
ExprFreeVariables  
ExprNarrowTypes  
ExprNarrowTypesInfer  
FormalFlattener Used by TransitionAnalyze Makes a vector pointing to all the formals in a formal list.
HTScope  
ImportContext  
intWrapper  
ListVocabulary  
MapFactory  
RootScope  
SAnalyzePass1 Visitor for semantic analysis.
SAnalyzePass2 Visitor for semantic analysis.
SAnalyzePass3 Visitor for semantic analysis.
SemanticAnalysis  
SetOfDescriptor  
SetOfType  
SortedLog  
Tracker  
TypeParameterPair  
VectorActuals  
VocabOp Encapsulates all the operators that can be in the AST used by Vocab Analyze Classes
VocabRef  
Vocabulary  
 

Enum Summary
VocabOp.OpNotation  
Vocabulary.VStatus  
 

Package com.veromodo.tempo.sem Description

Provides classes to support the semantic analysis of an abstract syntax tree produced by the parser.

The package contain two sub-packages for the type system (@see Type) and the semantic descriptors (@see desc) values that are produced during the course of the semantic analysis.

The analysis itself consist of several passes (3) over the AST to analyze the vocabularies, automaton, signatures and finally the transitions, proofs and invariants. Each pass goes increasingly "deeper" into the AST and adds information to the symbol table for the pieces newly discovered. The multi-pass approach facilitates the analysis of Tempo specification where multiple automata can be refer to each other and be declared in any order.

The Tempo language allows overloading of names (both local names and operator names, either builtin or defined in vocabularies). While extremely convenient to users, this creates difficulties in the analysis and calls for an analysis of expressions based on two passes. The first first pass down an expression basically computes the set of potential type assignment for each internal node of the expression tree. The second pass uses the context (e.g., type of the LHS in an assignment or a formal in a call) to disambiguate and choose a type from the set of candidates. The process is recursive and disambiguate all the subtrees of a node once the root is disambiguated. The process thus annotates every single expression nodes with

Package Specification

Related Documentation