This is the implementation of EEL (Energy Estimation Language), presented in the SLE 2020 paper "Annotating Executable DSLs with Energy Estimation Formulas". Note that GEMOC Studio 3.2.0 do not work on MacOS.
This directory contains all the Eclipse plugins to perform energy estimations using EEL:
- The EEL meta-model:
org.atlanmod.energy.estimation.metamodel(.*)?
- The EEL concrete syntax:
org.atlanmod.energy.estimation.dsl(.*)?
- The EEL engine, that extends GEMOC's engine, and enables the estimation of energy consumption at runtime:
org.atlanmod.energy.estimation.engine
- An additional extension of GEMOC's engine, for ArduinoML, used to define events happening when simulating Arduino systems.
org.atlanmod.arduino.sequential.eventengine
This directory contains the Eclipse plugins that define ArduinoML. We provide minor changes to the operational semantics, first described here This directory contains:
- The ArduinoML meta-model:
org.gemoc.arduino.sequential.model(.*)?
- ArduinoML operational semantics, defined with K3:
org.gemoc.arduino.sequential.k3dsa
- An Acceleo plugin for generating C code for Arduino out of ArduinoML models:
fr.obeo.dsl.arduino.gen
- GEMOC's XDSML plugin for linking together ArduinoML meta-model, and operational semantics:
org.gemoc.arduino.sequential.xdsml
Note that all the plugins defined in Language_Workbench
and Engine
are meant to be imported in GEMOC's Language workbench.
This directory contains the models to be executed in GEMOC.
They are all located in the same repository: org.gemoc.arduino.sequential.models
.
It contains:
- ArduinoML models, with the
.arduino
extension, corresponding to the Arduino models used as benchmarks, and estimated in the evaluation of the paper.activeWaitIRBlueLED.arduino
corresponds to the Arduino model in Figure 2.waitForIRBlueLED.arduino
corresponds to the Arduino model in Figure 5.blink.arduino
,photoresistor.arduino
andservo9g.arduino
corresponds to the models used as benchmarks in Figure 8.servoIrButton.arduino
is the model in Figure 9.
- EEL models, with the
.eel
extensionmodel.eel
corresponds to the excerpt in Listing 1.
- The additional EEL models in the
usecases
repository, define with EEL the energy estimation formulas for the existing languages from the state-of-the-art.
Note that the metrics
directory contains all the measurements performed for the evaluation of the paper, in .mat
Octave files, as well as the Arduino C code generated.
These results were compared with the energy estimations provided by EEL.
This artifact evaluation is performed on GEMOC Studio V3.2.0. It relies on xText, which needs Java ≥ 9. We used Java 9.0.4 for the evaluation.
- Start GEMOC and create a new workspace. Make sure that the JRE version used by GEMOC is Java 9, as well as the Compiler Compliance.
File > Import > General > Existing Projects into Workspace
- Pick
eel/language_workbench
directory - Same for
eel/engine
directory. Run > Run configuration > New Eclipse Application
- Make sure that the product is
gemoc_studio
, and the execution environment is Java 9.
- Make sure that the product is
- Run (Gemoc might throw some errors related to egit, but that's not related to our app.)
- Switch to the new Gemoc Runtime Window
File > Import > General > Existing Projects into Workspace
- Pick
eel/modeling_workbench
- Open the
blink.arduino
and themodel.eel
models, to make sure that the plugins are properly loaded.
- In the Gemoc Runtime, click on the
Energy > Estimation model > Set model
- Select
model.eel
, validate. ADone
message should appear in the console, confirming that the energy estimation model is properly loaded. Run > Run configuration > Executable model with Gemoc Java Engine
- Complete the configuration with the following data:
- Model to execute:
blink.arduino
- Language:
org.gemoc.arduino.sequential.arduino.Arduino
- Main method:
org.gemoc.arduino.sequential.k3dsa.Project_ExecutableAspect.main(org.gemoc.sequential.model.arduino.Project)
- Main model element path:
Project
(This is the root of the Arduino model)
- Model to execute:
- In the Engine addon tab, check
Energy estimation
. - Run. The energy estimations should be printed, at runtime, in the Language workbench.
- Many more Arduino models are available, and an other EEL model that estimates a Arduino Mini platform. They correspond to the usecases presented in the paper.
- Changing the EEL model can be done through
Energy > Estimation model > Load model
, and selecting the other EEL model. - Some Arduino models require external inputs. These are defined in the event addon. Thus, running the
waitForIRBlueLed.arduino
model requires to check theEvent addon
in the Engine addon tab, along with theEnergy estimation
.
Our EEL engine can automatically persist measures and measurements in a metamodel conforming to the SMM standard.
In the engine addon
tab, several options are available:
- The first one enables the modeled estimations to refer to the xDSL.
- The second one enables the modeled estimations to refer to the executed model.
- The third one refers to the SMM model that will be created, or that will be extended with additional estimations.
A Sirius representation can be created on top of this SMM model, three views are available:
- The observation view displays the SMM model. Each model execution corresponds to one
Observation
. Furthermore, each EEL model used corresponds to oneMeasureLibrary
. The color of the observations refers to the total energy estimation of the model, compared to the other observations. This can be used to find the less energy consuming scenarios.
- Measures can be double-clicked to display the EEL model. The dependencies between eel estimations can be displayed, and are helpful for understanding how the estimations are computed.
- Observations can be double-clicked to display the SMM
Measurements
. Each measurement corresponds to one EEL energy estimation, and refer either to the xDSL or to the executed model. The relationship betweenMeasurements
can be followed to retrace the execution of the model.
- This view can be customized in order to display the executed model, or the xDSL it conforms to. As usual, the color scheme can be used to locate energy consuming behaviour.
- Finally, the measures used to perform the estimations can also be added to the view.
Link: https://youtu.be/MgnarNZ2q6E
java.lang.ClassNotFoundException: org.eclipse.jgit.lfs.BuiltinLFS cannot be found by org.eclipse.egit.core_5.0.0.201806131550-r
This is not due to EEL, and thus can be ignored.
class has been compiled by a more recent version of the Java Runtime (class file version 54.0), this version of the Java Runtime only recognizes class file versions up to 53.0
The compiler compliance level do not match the jdk used. To fix:
Window > Preferences > Java > Compiler > Compiler compliance level > 9