C# Class DataDictionary.Interpreter.Expression

Inheritance: DataDictionary.Interpreter.InterpreterTreeNode, IReference
Exibir arquivo Open project: ERTMSSolutions/ERTMSFormalSpecs Class Usage Examples

Public Methods

Method Description
AddErrorAndExplain ( string message, ExplanationPart explain ) : void

Adds an error message to the root element and explains it

CheckExpression ( ) : void

Checks the expression and appends errors to the root tree node when inconsistencies are found

CreateGraph ( DataDictionary.Interpreter.InterpretationContext context, Parameter parameter, ExplanationPart explain ) : Graph

Creates the graph associated to this expression, when the given parameter ranges over the X axis

CreateSurface ( DataDictionary.Interpreter.InterpretationContext context, Parameter xParam, Parameter yParam, ExplanationPart explain ) : Surface

Provides the surface of this function if it has been statically defined

Explain ( DataDictionary.Interpreter.InterpretationContext context = null ) : ExplanationPart

Provides all the steps used to get the value of the expression

Fill ( List retVal, BaseFilter filter ) : void

Fills the list provided with the element matching the filter provided

GetCalled ( DataDictionary.Interpreter.InterpretationContext context, ExplanationPart explain ) : ICallable

Provides the callable that is called by this expression

GetExpressionType ( ) : Type

Provides the type of this expression

GetExpressionValue ( DataDictionary.Interpreter.InterpretationContext context, ExplanationPart explain ) : IValue

Provides the value associated to this Expression

GetLiterals ( ) : List

Provides the list of literals found in the expression

GetReferenceTypes ( INamable instance, BaseFilter expectation, bool last ) : DataDictionary.Interpreter.ReturnValue

Provides the possible references types for this expression (used in semantic analysis)

GetReferences ( INamable instance, BaseFilter expectation, bool last ) : DataDictionary.Interpreter.ReturnValue

Provides the possible references for this expression (only available during semantic analysis)

GetRightSides ( ) : List

Provides the right sides used by this expression

GetStaticCallable ( ) : ICallable

Provides the ICallable that is statically defined

GetVariable ( DataDictionary.Interpreter.InterpretationContext context ) : IVariable

Provides the variable referenced by this expression, if any

GetVariables ( ) : List

Provides the variables used by this expression

IsInstance ( ) : bool

Indicates whether this expression references an instance

SemanticAnalysis ( BaseFilter expectation ) : bool

Performs the semantic analysis of the expression

SemanticAnalysis ( INamable instance = null ) : bool

Performs the semantic analysis of the expression

SemanticAnalysis ( INamable instance, BaseFilter expectation ) : bool

Performs the semantic analysis of the expression

Protected Methods

Method Description
Expression ( ModelElement root, ModelElement log, DataDictionary.Interpreter.ParsingData parsingData ) : System

Constructor

GetValue ( DataDictionary.Interpreter.InterpretationContext context, ExplanationPart explain ) : IValue

Provides the value associated to this Expression

Method Details

AddErrorAndExplain() public method

Adds an error message to the root element and explains it
public AddErrorAndExplain ( string message, ExplanationPart explain ) : void
message string
explain ExplanationPart
return void

CheckExpression() public method

Checks the expression and appends errors to the root tree node when inconsistencies are found
public CheckExpression ( ) : void
return void

CreateGraph() public method

Creates the graph associated to this expression, when the given parameter ranges over the X axis
public CreateGraph ( DataDictionary.Interpreter.InterpretationContext context, Parameter parameter, ExplanationPart explain ) : Graph
context DataDictionary.Interpreter.InterpretationContext The interpretation context
parameter Parameter The parameters of *the enclosing function* for which the graph should be created
explain ExplanationPart
return Graph

CreateSurface() public method

Provides the surface of this function if it has been statically defined
public CreateSurface ( DataDictionary.Interpreter.InterpretationContext context, Parameter xParam, Parameter yParam, ExplanationPart explain ) : Surface
context DataDictionary.Interpreter.InterpretationContext the context used to create the surface
xParam Parameter The X axis of this surface
yParam Parameter The Y axis of this surface
explain ExplanationPart
return Surface

Explain() public method

Provides all the steps used to get the value of the expression
public Explain ( DataDictionary.Interpreter.InterpretationContext context = null ) : ExplanationPart
context DataDictionary.Interpreter.InterpretationContext
return ExplanationPart

Expression() protected method

Constructor
protected Expression ( ModelElement root, ModelElement log, DataDictionary.Interpreter.ParsingData parsingData ) : System
root ModelElement The root for which this expression should be evaluated
log ModelElement
parsingData DataDictionary.Interpreter.ParsingData Additional information about the parsing process
return System

Fill() public abstract method

Fills the list provided with the element matching the filter provided
public abstract Fill ( List retVal, BaseFilter filter ) : void
retVal List The list to be filled with the element matching the condition expressed in the filter
filter BaseFilter The filter to apply
return void

GetCalled() public method

Provides the callable that is called by this expression
public GetCalled ( DataDictionary.Interpreter.InterpretationContext context, ExplanationPart explain ) : ICallable
context DataDictionary.Interpreter.InterpretationContext
explain ExplanationPart
return ICallable

GetExpressionType() public abstract method

Provides the type of this expression
public abstract GetExpressionType ( ) : Type
return DataDictionary.Types.Type

GetExpressionValue() public method

Provides the value associated to this Expression
public GetExpressionValue ( DataDictionary.Interpreter.InterpretationContext context, ExplanationPart explain ) : IValue
context DataDictionary.Interpreter.InterpretationContext The context on which the value must be found
explain ExplanationPart
return IValue

GetLiterals() public method

Provides the list of literals found in the expression
public GetLiterals ( ) : List
return List

GetReferenceTypes() public method

Provides the possible references types for this expression (used in semantic analysis)
public GetReferenceTypes ( INamable instance, BaseFilter expectation, bool last ) : DataDictionary.Interpreter.ReturnValue
instance INamable the reference instance on which this element should analysed
expectation BaseFilter Indicates the kind of element we are looking for
last bool indicates that this is the last element in a dereference chain
return DataDictionary.Interpreter.ReturnValue

GetReferences() public method

Provides the possible references for this expression (only available during semantic analysis)
public GetReferences ( INamable instance, BaseFilter expectation, bool last ) : DataDictionary.Interpreter.ReturnValue
instance INamable the instance on which this element should be found.
expectation BaseFilter the expectation on the element found
last bool indicates that this is the last element in a dereference chain
return DataDictionary.Interpreter.ReturnValue

GetRightSides() public method

Provides the right sides used by this expression
public GetRightSides ( ) : List
return List

GetStaticCallable() public method

Provides the ICallable that is statically defined
public GetStaticCallable ( ) : ICallable
return ICallable

GetValue() protected abstract method

Provides the value associated to this Expression
protected abstract GetValue ( DataDictionary.Interpreter.InterpretationContext context, ExplanationPart explain ) : IValue
context DataDictionary.Interpreter.InterpretationContext The context on which the value must be found
explain ExplanationPart
return IValue

GetVariable() public method

Provides the variable referenced by this expression, if any
public GetVariable ( DataDictionary.Interpreter.InterpretationContext context ) : IVariable
context DataDictionary.Interpreter.InterpretationContext The context on which the variable must be found
return IVariable

GetVariables() public method

Provides the variables used by this expression
public GetVariables ( ) : List
return List

IsInstance() public method

Indicates whether this expression references an instance
public IsInstance ( ) : bool
return bool

SemanticAnalysis() public method

Performs the semantic analysis of the expression
public SemanticAnalysis ( BaseFilter expectation ) : bool
expectation BaseFilter
return bool

SemanticAnalysis() public method

Performs the semantic analysis of the expression
public SemanticAnalysis ( INamable instance = null ) : bool
instance INamable the reference instance on which this element should analysed
return bool

SemanticAnalysis() public method

Performs the semantic analysis of the expression
public SemanticAnalysis ( INamable instance, BaseFilter expectation ) : bool
instance INamable the reference instance on which this element should analysed
expectation BaseFilter Indicates the kind of element we are looking for
return bool