![]() |
lingua-franca 0.10.1
Lingua Franca code generator
|
The AST transformation enabling enclaved execution in the C target. More...
Inherits org.lflang.ast.AstTransformation.
Public Member Functions | |
| void | applyTransformation (List< Reactor > reactors) |
| Part of the AstTransformation interface. | |
| CEnclavedReactorTransformation (Resource mainResource, CTypes types) | |
| void | setEnvParams (ReactorInstance conn, ReactorInstance source, ReactorInstance dest) |
| Set the environment pointers which are parameters to the enclave connection reactor. | |
Public Attributes | |
| final ConnectionGraph< Instantiation, EnclaveConnection > | connGraph |
| The AST transformation also collects information about the enclave connections. | |
| final Map< Instantiation, Pair< Instantiation, Instantiation > > | enclavedConnections |
| We also expose a map of Instantiations of EnclavedConnection reactors to their upstream and downstream Instantiations. | |
| Instantiation | PARENT = factory.createInstantiation() |
Static Public Attributes | |
| static String | delayParamName = "delay" |
| static String | destEnvParamName = "dest_env" |
| static String | enclaveConnectionLibraryPath = "/lib/c/EnclaveConnection.lf" |
| static final LfFactory | factory = ASTUtils.factory |
| static String | hasAfterDelayParamName = "has_after_delay" |
| static String | isPhysicalParamName = "is_physical" |
| static String | sourceEnvParamName = "source_env" |
Protected Attributes | |
| CTypes | types |
Package Attributes | |
| Reactor | connectionReactor = null |
| We only need a single ConnectionReactor since it uses generics. | |
The AST transformation enabling enclaved execution in the C target.
This transformation finds all connections involving an enclave and inserts a special connection Reactor there. The connection Reactor is inspired by the after-delay reactors. They consist of an action and two reactions. The first reaction, the delay reaction, schedules events received onto the action. The other reaction, the forward reaction writes the scheduled event to its output port.
| org.lflang.generator.c.CEnclavedReactorTransformation.CEnclavedReactorTransformation | ( | Resource | mainResource, |
| CTypes | types ) |
| void org.lflang.generator.c.CEnclavedReactorTransformation.applyTransformation | ( | List< Reactor > | reactors | ) |
Part of the AstTransformation interface.
Performs the transformation.
| reactors | A list of Reactor instances to perform the AST transformation on. |
Implements org.lflang.ast.AstTransformation.
| void org.lflang.generator.c.CEnclavedReactorTransformation.setEnvParams | ( | ReactorInstance | conn, |
| ReactorInstance | source, | ||
| ReactorInstance | dest ) |
Set the environment pointers which are parameters to the enclave connection reactor.
| conn | The generated enclave connection reactor |
| source | The upstream reactor |
| dest | The downstream reactor |
|
package |
We only need a single ConnectionReactor since it uses generics.
| final ConnectionGraph<Instantiation, EnclaveConnection> org.lflang.generator.c.CEnclavedReactorTransformation.connGraph |
The AST transformation also collects information about the enclave connections.
Note that this is on the AST graph, containing Instantiations, not ReactorInstances. This graph is exposed and used later to build the graph of ReactorInstances that are enclaves.
|
static |
|
static |
|
static |
| final Map<Instantiation, Pair<Instantiation, Instantiation> > org.lflang.generator.c.CEnclavedReactorTransformation.enclavedConnections |
We also expose a map of Instantiations of EnclavedConnection reactors to their upstream and downstream Instantiations.
|
static |
|
static |
|
static |
| Instantiation org.lflang.generator.c.CEnclavedReactorTransformation.PARENT = factory.createInstantiation() |
|
static |
|
protected |