lingua-franca 0.10.1
Lingua Franca code generator
Loading...
Searching...
No Matches
org.lflang.validation.LFValidator Class Reference

Custom validation checks for Lingua Franca programs. More...

Inherits org.lflang.validation.BaseLFValidator.

Public Member Functions

void checkAction (Action action)
void checkAssignment (Assignment assignment)
void checkAttributes (Attribute attr)
 Check whether an attribute is supported and the validity of the attribute.
void checkBracedExpression (BracedListExpression expr)
void checkBracketExpression (BracketListExpression expr)
void checkCEnclaveNotInMode (Reactor reactor)
void checkCEnclaves (Instantiation inst)
void checkConnection (Connection connection)
void checkDeadline (Deadline deadline)
void checkEnclaveOnWindows (Instantiation inst)
void checkHost (Host host)
void checkImport (Import imp)
void checkImportedReactor (ImportedReactor reactor)
void checkInitializer (Initializer init)
void checkInitialMode (Reactor reactor)
void checkInput (Input input)
void checkInstantiation (Instantiation instantiation)
void checkMissingStateResetInMode (Reactor reactor)
void checkModeActionNamespace (Reactor reactor)
void checkModeInstanceNamespace (Reactor reactor)
void checkModel (Model model)
void checkModeStateNamespace (Reactor reactor)
void checkModeTimerNamespace (Reactor reactor)
void checkOutput (Output output)
void checkParameter (Parameter param)
void checkParenthesisExpression (ParenthesisListExpression expr)
void checkPreamble (Preamble preamble)
void checkReaction (Reaction reaction)
void checkReactor (Reactor reactor) throws IOException
void checkReactorIconAttribute (Reactor reactor)
void checkReactorName (String name) throws IOException
void checkSerializer (Serializer serializer)
 Check if the requested serialization is supported.
void checkState (StateVar stateVar)
void checkStateResetWithoutInitialValue (StateVar state)
void checkTargetDecl (TargetDecl target) throws IOException
void checkTargetProperties (KeyValuePairs targetProperties)
 Check for consistency of the target properties, which are defined as KeyValuePairs.
void checkTime (Time time)
void checkTimer (Timer timer)
void checkType (Type type)
void checkUnspecifiedTransitionType (Reaction reaction)
void checkVarRef (VarRef varRef)
void checkWidthSpec (WidthSpec widthSpec)
ValidatorMessageReporter getErrorReporter ()
 Return the error reporter for this validator.
ValidationMessageAcceptor getMessageAcceptor ()
 Implementation required by xtext to report validation errors.
void typeCheck (Initializer init, InferredType type, EStructuralFeature feature)
 Check that the initializer is compatible with the type.
void updateModelInfo (Model model)

Protected Member Functions

void error (java.lang.String message, org.eclipse.emf.ecore.EStructuralFeature feature)
 Generate an error message for an AST node.

Package Functions

private< T extends TypedVariable > void checkConflict (EList< T > superVars, EList< T > sameKind, List< Variable > allOwn, HashSet< Variable > conflicts)
 For each input, report a conflict if: 1) the input exists and the type doesn't match; or 2) the input has a name clash with variable that is not an input.

Detailed Description

Custom validation checks for Lingua Franca programs.

Also see: ...

Author
Edward A. Lee
Marten Lohstroh
Matt Weber
Christian Menard
Hou Seng Wong
Clément Fournier

Member Function Documentation

◆ checkAction()

void org.lflang.validation.LFValidator.checkAction ( Action action)

◆ checkAssignment()

void org.lflang.validation.LFValidator.checkAssignment ( Assignment assignment)

◆ checkAttributes()

void org.lflang.validation.LFValidator.checkAttributes ( Attribute attr)

Check whether an attribute is supported and the validity of the attribute.

Parameters
attrThe attribute being checked

◆ checkBracedExpression()

void org.lflang.validation.LFValidator.checkBracedExpression ( BracedListExpression expr)

◆ checkBracketExpression()

void org.lflang.validation.LFValidator.checkBracketExpression ( BracketListExpression expr)

◆ checkCEnclaveNotInMode()

void org.lflang.validation.LFValidator.checkCEnclaveNotInMode ( Reactor reactor)

◆ checkCEnclaves()

void org.lflang.validation.LFValidator.checkCEnclaves ( Instantiation inst)

◆ checkConflict()

private< T extends TypedVariable > void org.lflang.validation.LFValidator.checkConflict ( EList< T > superVars,
EList< T > sameKind,
List< Variable > allOwn,
HashSet< Variable > conflicts )
package

For each input, report a conflict if: 1) the input exists and the type doesn't match; or 2) the input has a name clash with variable that is not an input.

Parameters
superVarsList of typed variables of a particular kind (i.e., inputs, outputs, or actions), found in a super class.
sameKindTyped variables of the same kind, found in the subclass.
allOwnAccumulator of non-conflicting variables incorporated in the subclass.
conflictsSet of variables that are in conflict, to be used by this function to report conflicts.

◆ checkConnection()

void org.lflang.validation.LFValidator.checkConnection ( Connection connection)

◆ checkDeadline()

void org.lflang.validation.LFValidator.checkDeadline ( Deadline deadline)

◆ checkEnclaveOnWindows()

void org.lflang.validation.LFValidator.checkEnclaveOnWindows ( Instantiation inst)

◆ checkHost()

void org.lflang.validation.LFValidator.checkHost ( Host host)

◆ checkImport()

void org.lflang.validation.LFValidator.checkImport ( Import imp)

◆ checkImportedReactor()

void org.lflang.validation.LFValidator.checkImportedReactor ( ImportedReactor reactor)

◆ checkInitializer()

void org.lflang.validation.LFValidator.checkInitializer ( Initializer init)

◆ checkInitialMode()

void org.lflang.validation.LFValidator.checkInitialMode ( Reactor reactor)

◆ checkInput()

void org.lflang.validation.LFValidator.checkInput ( Input input)

◆ checkInstantiation()

void org.lflang.validation.LFValidator.checkInstantiation ( Instantiation instantiation)

◆ checkMissingStateResetInMode()

void org.lflang.validation.LFValidator.checkMissingStateResetInMode ( Reactor reactor)

◆ checkModeActionNamespace()

void org.lflang.validation.LFValidator.checkModeActionNamespace ( Reactor reactor)

◆ checkModeInstanceNamespace()

void org.lflang.validation.LFValidator.checkModeInstanceNamespace ( Reactor reactor)

◆ checkModel()

void org.lflang.validation.LFValidator.checkModel ( Model model)

◆ checkModeStateNamespace()

void org.lflang.validation.LFValidator.checkModeStateNamespace ( Reactor reactor)

◆ checkModeTimerNamespace()

void org.lflang.validation.LFValidator.checkModeTimerNamespace ( Reactor reactor)

◆ checkOutput()

void org.lflang.validation.LFValidator.checkOutput ( Output output)

◆ checkParameter()

void org.lflang.validation.LFValidator.checkParameter ( Parameter param)

◆ checkParenthesisExpression()

void org.lflang.validation.LFValidator.checkParenthesisExpression ( ParenthesisListExpression expr)

◆ checkPreamble()

void org.lflang.validation.LFValidator.checkPreamble ( Preamble preamble)

◆ checkReaction()

void org.lflang.validation.LFValidator.checkReaction ( Reaction reaction)

◆ checkReactor()

void org.lflang.validation.LFValidator.checkReactor ( Reactor reactor) throws IOException

◆ checkReactorIconAttribute()

void org.lflang.validation.LFValidator.checkReactorIconAttribute ( Reactor reactor)

◆ checkReactorName()

void org.lflang.validation.LFValidator.checkReactorName ( String name) throws IOException

◆ checkSerializer()

void org.lflang.validation.LFValidator.checkSerializer ( Serializer serializer)

Check if the requested serialization is supported.

◆ checkState()

void org.lflang.validation.LFValidator.checkState ( StateVar stateVar)

◆ checkStateResetWithoutInitialValue()

void org.lflang.validation.LFValidator.checkStateResetWithoutInitialValue ( StateVar state)

◆ checkTargetDecl()

void org.lflang.validation.LFValidator.checkTargetDecl ( TargetDecl target) throws IOException

◆ checkTargetProperties()

void org.lflang.validation.LFValidator.checkTargetProperties ( KeyValuePairs targetProperties)

Check for consistency of the target properties, which are defined as KeyValuePairs.

Parameters
targetPropertiesThe target properties defined in the current Lingua Franca program.

◆ checkTime()

void org.lflang.validation.BaseLFValidator.checkTime ( Time time)
inherited

◆ checkTimer()

void org.lflang.validation.LFValidator.checkTimer ( Timer timer)

◆ checkType()

void org.lflang.validation.LFValidator.checkType ( Type type)

◆ checkUnspecifiedTransitionType()

void org.lflang.validation.LFValidator.checkUnspecifiedTransitionType ( Reaction reaction)

◆ checkVarRef()

void org.lflang.validation.LFValidator.checkVarRef ( VarRef varRef)

◆ checkWidthSpec()

void org.lflang.validation.LFValidator.checkWidthSpec ( WidthSpec widthSpec)

◆ error()

void org.lflang.validation.LFValidator.error ( java.lang.String message,
org.eclipse.emf.ecore.EStructuralFeature feature )
protected

Generate an error message for an AST node.

◆ getErrorReporter()

ValidatorMessageReporter org.lflang.validation.LFValidator.getErrorReporter ( )

Return the error reporter for this validator.

◆ getMessageAcceptor()

ValidationMessageAcceptor org.lflang.validation.LFValidator.getMessageAcceptor ( )

Implementation required by xtext to report validation errors.

◆ typeCheck()

void org.lflang.validation.LFValidator.typeCheck ( Initializer init,
InferredType type,
EStructuralFeature feature )

Check that the initializer is compatible with the type.

Note that if the type is inferred it will necessarily be compatible so this method is not harmful.

◆ updateModelInfo()

void org.lflang.validation.LFValidator.updateModelInfo ( Model model)

The documentation for this class was generated from the following file:
  • /Users/runner/work/lingua-franca/lingua-franca/core/src/main/java/org/lflang/validation/LFValidator.java