![]() |
lingua-franca 0.10.1
Lingua Franca code generator
|
An AST visitor that converts an original AST into the If Normal Form. More...
Inherits org.lflang.analyses.c.CBaseAstVisitor< Void >.
Public Attributes | |
| CAst.StatementSequenceNode | INF = new CAst.StatementSequenceNode() |
An AST visitor that converts an original AST into the If Normal Form.
See "Bounded Model Checking of Software using SMT Solvers instead of SAT Solvers" for details about the If Normal Form (https://link.springer.com/chapter/10.1007/11691617_9).
There are several requirements for an AST to be in INF: 1. There should be a single StatementSequence (SS) root node; 2. Each child of the SS node should be an IfBlockNode; 3. Variables in a subsequent child should be marked as "primed" versions of those in the previous child.
Limitations: 1. The implementation does not take the scope into account. E.g. "int i = 0; { int j = 0; }" is treated the same as "int i = 0; int j = 0;". 2. Due to the above limitation, the implementation assumes that each variable has a unique name. E.g. "{ int i = 0; }{ int i = 0; }" is an ill-formed program.
In this program, visit() is the normalise() in the paper.
|
inherited |
Visit an AST, and return a user-defined result of the operation.
| tree | The CAst.AstNode to visit. |
|
inherited |
Visit an AST with a list of other AST nodes holding some information, and return a user-defined result of the operation.
| tree | The CAst.AstNode to visit. |
| nodeList | A list of CAst.AstNode passed down the recursive call. |
|
inherited |
Arithmetic operators.
|
inherited |
| Void org.lflang.analyses.c.IfNormalFormAstVisitor.visitAssignmentNode | ( | CAst.AssignmentNode | node, |
| List< CAst.AstNode > | conditions ) |
|
inherited |
These default implementations are not meant to be used.
They should be overriden by the child class. In theory, this base visitor can be deleted? Let's keep it here for now for consistency.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Comparison operators.
|
inherited |
|
inherited |
|
inherited |
| Void org.lflang.analyses.c.IfNormalFormAstVisitor.visitIfBlockNode | ( | CAst.IfBlockNode | node, |
| List< CAst.AstNode > | conditions ) |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
| Void org.lflang.analyses.c.IfNormalFormAstVisitor.visitScheduleActionIntNode | ( | CAst.ScheduleActionIntNode | node, |
| List< CAst.AstNode > | conditions ) |
|
inherited |
| Void org.lflang.analyses.c.IfNormalFormAstVisitor.visitScheduleActionNode | ( | CAst.ScheduleActionNode | node, |
| List< CAst.AstNode > | conditions ) |
|
inherited |
LF built-in operations.
| Void org.lflang.analyses.c.IfNormalFormAstVisitor.visitSetPortNode | ( | CAst.SetPortNode | node, |
| List< CAst.AstNode > | conditions ) |
|
inherited |
| Void org.lflang.analyses.c.IfNormalFormAstVisitor.visitStatementSequenceNode | ( | CAst.StatementSequenceNode | node, |
| List< CAst.AstNode > | conditions ) |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
| CAst.StatementSequenceNode org.lflang.analyses.c.IfNormalFormAstVisitor.INF = new CAst.StatementSequenceNode() |