public class ProgramBuilder
extends java.lang.Object
| Constructor and Description |
|---|
ProgramBuilder()
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addContract(ContractBuilder contractBuilder)
add a contract
|
void |
addFunction(ComponentBuilder componentBuilder)
add a function
|
void |
addNode(ComponentBuilder componentBuilder)
add a node
|
Program |
build()
construct a lustre program
|
IdExpr |
createConst(java.lang.String name,
Expr expr)
define a global constant
|
IdExpr |
createConst(java.lang.String name,
Type type)
define a global symbolic constant
|
IdExpr |
createConst(java.lang.String name,
Type type,
Expr expr)
define a global constant
|
Type |
defineType(java.lang.String name)
define a type
|
Type |
defineType(java.lang.String name,
Type type)
define a type
|
void |
importFunction(ImportedComponentBuilder importedComponentBuilder)
import a function
|
void |
importNode(ImportedComponentBuilder importedComponentBuilder)
import a node
|
void |
setMain(java.lang.String main)
set the main node/function
|
public Type defineType(java.lang.String name)
name - name of the type to definepublic Type defineType(java.lang.String name, Type type)
name - name of the type to definetype - the type to definepublic IdExpr createConst(java.lang.String name, Type type)
name - name of the global constanttype - type of the global constantpublic IdExpr createConst(java.lang.String name, Expr expr)
name - name of the global constantexpr - definition of the global constantpublic IdExpr createConst(java.lang.String name, Type type, Expr expr)
name - name of the global constanttype - type of the global constantexpr - definition of the global constantpublic void addContract(ContractBuilder contractBuilder)
contractBuilder - builder for the contract to addpublic void importFunction(ImportedComponentBuilder importedComponentBuilder)
importedComponentBuilder - a builder for the function to importpublic void addFunction(ComponentBuilder componentBuilder)
componentBuilder - a builder for the function to addpublic void importNode(ImportedComponentBuilder importedComponentBuilder)
importedComponentBuilder - a builder for the node to importpublic void addNode(ComponentBuilder componentBuilder)
componentBuilder - a builder for the node to addpublic void setMain(java.lang.String main)
main - name of the main node/functionpublic Program build()