RobotML / Athena-VLE

This project is dedicated to the definition of the specifications of *Athena* and *VLE* generator from **RobotML** models
0 stars 0 forks source link

Generation of operation #13

Closed patinusb closed 10 years ago

patinusb commented 11 years ago

I manage here problems linked to generation of operations.

patinusb commented 11 years ago

For the time being, state is associated to an operation. Then we specify the behaviour for this operation. Considering the behaviour we create an opaque behaviour that can encapsulate athena or alf code (or whatever but it does not concern us). Nevertheless, considering generation, there is one name to ignore here. I propose to ignore the opaquebehaviour name and to keep the operation name. Code as defined in the opaque behaviour is the code of the operation (same as processing in athena) and thus leads to generation of the processing associating the name of the operation and the code of the opaque behaviour.

onto our example (pegase)

model: state = InitN0PegaseEnvt operation = oProessingContainer opaque behaviour name = ProcessingContainer opaque behaviour code in athena format (defined eventually in an external file because of editor) =

external file:

// import for testing reasons and due to no capability to extract datatypes from model import "athena-generated-files/DatatypeDecl.adl" import "athena-generated-files/FunctionDecl.adl"

processing oProcessingContainer( ) begin parameter GeoPos p1 = "" parameter ConfigLocNoise p2 = "" parameter GeoPos p3 = "" execute computeLoc(p1, p2, p3) end

included code (body):

parameter GeoPos p1 = ""
parameter ConfigLocNoise p2 = ""
parameter GeoPos p3 = ""
execute computeLoc(p1, p2, p3)

Final generated code in the Function_Decl.adl file:

processing oProcessingContainer begin parameter GeoPos p1 = "" parameter ConfigLocNoise p2 = "" parameter GeoPos p3 = "" execute computeLoc(p1, p2, p3) end

To replace is done differently in the two cases...

nbrodnan commented 10 years ago

Deprecated. Operation validation not complete.