C# Class DataDictionary.Interpreter.BinaryExpression

Inheritance: Expression
Afficher le fichier Open project: ERTMSSolutions/ERTMSFormalSpecs Class Usage Examples

Méthodes publiques

Свойство Type Description
Operators Operator[]
OperatorsByLevel Operator[][]
OperatorsImages string[]
OperatorsLevel0 Operator[]
OperatorsLevel1 Operator[]
OperatorsLevel2 Operator[]
OperatorsLevel3 Operator[]
OperatorsLevel4 Operator[]
OperatorsLevel5 Operator[]

Méthodes publiques

Méthode Description
BinaryExpression ( ModelElement root, ModelElement log, Expression left, Operator op, Expression right, DataDictionary.Interpreter.ParsingData parsingData ) : System

Constructor

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

Fill ( List retVal, DataDictionary.Interpreter.Filter.BaseFilter filter ) : void

Fills the list provided with the element matching the filter provided

FindOperatorByName ( string op ) : Operator

Provides the operator, based on its image

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

Provides the callable that is called by this expression

GetExplain ( TextualExplanation explanation, bool explainSubElements = true ) : void

Builds the explanation of the element

GetExpressionType ( ) : Type

Provides the type of this expression

GetStaticCallable ( ) : ICallable

Provides the ICallable which corresponds to this expression

Image ( Operator op ) : string

Provides the image of a given operator

Images ( Operator ops ) : string[]

Provides the image of a given operator

Inverse ( Operator Operator ) : Operator

Inverses the operator provided

IsSimpleEquality ( ) : bool

Indicates that the expression is an equality of the form variable == literal

SemanticAnalysis ( INamable instance, DataDictionary.Interpreter.Filter.BaseFilter expectation ) : bool

Performs the semantic analysis of the expression

Méthodes protégées

Méthode Description
GetValue ( DataDictionary.Interpreter.InterpretationContext context, ExplanationPart explain ) : IValue

Provides the value associated to this Expression

Private Methods

Méthode Description
CombineGraph ( IGraph leftGraph, IGraph rightGraph ) : IGraph

Combines two graphs using the operator of this binary expression

CombineSurface ( Surface leftSurface, Surface rightSurface ) : Surface

Combines two surfaces using the operator of this binary expression

CreateGraphResult ( DataDictionary.Interpreter.InterpretationContext context, DataDictionary.Functions.Function leftFunction, List unboundLeft, DataDictionary.Functions.Function rightFunction, List unboundRight, ExplanationPart explain ) : ICallable

Creates the result as a surface

CreateSurfaceForUnbound ( DataDictionary.Interpreter.InterpretationContext context, Expression expression, DataDictionary.Functions.Function function, List unbound, ExplanationPart explain ) : Surface

Creates the graph for the unbount parameters provided

CreateSurfaceResult ( DataDictionary.Interpreter.InterpretationContext context, DataDictionary.Functions.Function leftFunction, List unboundLeft, DataDictionary.Functions.Function rightFunction, List unboundRight, ExplanationPart explain ) : ICallable

Creates the result as a surface

createGraphForUnbound ( DataDictionary.Interpreter.InterpretationContext context, Expression expression, DataDictionary.Functions.Function function, List unbound, ExplanationPart explain ) : Graph

Creates the graph for the unbound parameters provided

getUnboundParameter ( DataDictionary.Interpreter.InterpretationContext context, DataDictionary.Functions.Function function ) : List

Gets the unbound parameters from the function definition and place holders

getUnboundParametersFromValue ( DataDictionary.Functions.Function leftFunction ) : List

Gets the unbound parameters from either the surface or the graph of the function

Method Details

BinaryExpression() public méthode

Constructor
public BinaryExpression ( ModelElement root, ModelElement log, Expression left, Operator op, Expression right, DataDictionary.Interpreter.ParsingData parsingData ) : System
root ModelElement
log ModelElement
left Expression
op Operator
right Expression
parsingData DataDictionary.Interpreter.ParsingData Additional information about the parsing process
Résultat System

CheckExpression() public méthode

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

CreateGraph() public méthode

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
Résultat Graph

CreateSurface() public méthode

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
Résultat Surface

Fill() public méthode

Fills the list provided with the element matching the filter provided
public Fill ( List retVal, DataDictionary.Interpreter.Filter.BaseFilter filter ) : void
retVal List The list to be filled with the element matching the condition expressed in the filter
filter DataDictionary.Interpreter.Filter.BaseFilter The filter to apply
Résultat void

FindOperatorByName() public static méthode

Provides the operator, based on its image
public static FindOperatorByName ( string op ) : Operator
op string
Résultat Operator

GetCalled() public méthode

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

GetExplain() public méthode

Builds the explanation of the element
public GetExplain ( TextualExplanation explanation, bool explainSubElements = true ) : void
explanation TextualExplanation
explainSubElements bool Precises if we need to explain the sub elements (if any)
Résultat void

GetExpressionType() public méthode

Provides the type of this expression
public GetExpressionType ( ) : Type
Résultat DataDictionary.Types.Type

GetStaticCallable() public méthode

Provides the ICallable which corresponds to this expression
public GetStaticCallable ( ) : ICallable
Résultat ICallable

GetValue() protected méthode

Provides the value associated to this Expression
protected GetValue ( DataDictionary.Interpreter.InterpretationContext context, ExplanationPart explain ) : IValue
context DataDictionary.Interpreter.InterpretationContext The context on which the value must be found
explain ExplanationPart The explanation to fill, if any
Résultat IValue

Image() public static méthode

Provides the image of a given operator
public static Image ( Operator op ) : string
op Operator
Résultat string

Images() public static méthode

Provides the image of a given operator
public static Images ( Operator ops ) : string[]
ops Operator
Résultat string[]

Inverse() public static méthode

Inverses the operator provided
public static Inverse ( Operator Operator ) : Operator
Operator Operator
Résultat Operator

IsSimpleEquality() public méthode

Indicates that the expression is an equality of the form variable == literal
public IsSimpleEquality ( ) : bool
Résultat bool

SemanticAnalysis() public méthode

Performs the semantic analysis of the expression
public SemanticAnalysis ( INamable instance, DataDictionary.Interpreter.Filter.BaseFilter expectation ) : bool
instance INamable the reference instance on which this element should analysed
expectation DataDictionary.Interpreter.Filter.BaseFilter Indicates the kind of element we are looking for
Résultat bool

Property Details

Operators public_oe static_oe property

The available operators
public static Operator[] Operators
Résultat Operator[]

OperatorsByLevel public_oe static_oe property

public static Operator[][] OperatorsByLevel
Résultat Operator[][]

OperatorsImages public_oe static_oe property

The corresponding operator images
public static string[] OperatorsImages
Résultat string[]

OperatorsLevel0 public_oe static_oe property

public static Operator[] OperatorsLevel0
Résultat Operator[]

OperatorsLevel1 public_oe static_oe property

public static Operator[] OperatorsLevel1
Résultat Operator[]

OperatorsLevel2 public_oe static_oe property

public static Operator[] OperatorsLevel2
Résultat Operator[]

OperatorsLevel3 public_oe static_oe property

public static Operator[] OperatorsLevel3
Résultat Operator[]

OperatorsLevel4 public_oe static_oe property

public static Operator[] OperatorsLevel4
Résultat Operator[]

OperatorsLevel5 public_oe static_oe property

public static Operator[] OperatorsLevel5
Résultat Operator[]