Commit ac5791dd authored by Jaime Arias's avatar Jaime Arias
Browse files

feature: add service that export adtree model into adt2amas input format

parent 3067132f
......@@ -11,7 +11,7 @@
<attribute name="maven.pomderived" value="true"/>
<classpathentry excluding="**|target/generated-test-sources/test-annotations/|target/generated-sources/annotations/" kind="src" output="target/classes" path="target">
<classpathentry excluding="**|target/generated-sources/annotations/" kind="src" output="target/classes" path="target">
<attribute name="maven.pomderived" value="true"/>
......@@ -37,6 +37,9 @@
<attribute name="optional" value="true"/>
<attribute name="test" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="ignore_optional_problems" value="true"/>
<attribute name="m2e-apt" value="true"/>
<classpathentry kind="src" path="target/generated-sources/annotations">
......@@ -9,7 +9,8 @@
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
// Use 'forwardPorts' to make a list of ports inside the container available locally.
......@@ -95,8 +95,8 @@ public class EAMASTranslation extends BinaryService{
latexFile = files[1];
@Example(name = "Example of the minimal scheduling algorithm",
help = "Example of the minimal scheduling algorithm")
@Example(name = "Example of the EAMAS translation",
help = "Example of the EAMAS translation")
public EAMASTranslation example() {
EAMASTranslation result = new EAMASTranslation();
package org.cosyverif.service.adt2amas;
import org.cosyverif.alligator.service.BinaryService;
import org.cosyverif.alligator.service.Parameter.Direction;
import org.cosyverif.alligator.service.AnnotatedService.Task;
import org.cosyverif.alligator.service.annotation.Parameter;
import org.cosyverif.alligator.service.annotation.Example;
import org.cosyverif.alligator.service.annotation.Launch;
import org.cosyverif.alligator.service.annotation.Service;
import org.cosyverif.model.Model;
@Service(name = "ADT2AMAS Format Export",
help = "Export ADTree model into the ADT2AMAS format",
version = "1.0.0",
tool = "adt2amas",
authors = {
"Jaime Arias",
"Laure Petrucci",
"Wojciech Penczek",
"Teofil Sidoruk"
public class InputFormatExport extends BinaryService {
GrmlParser parser;
@Parameter(name = "Model parameter",
help = "Attack-Defence Tree model",
direction = Direction.IN,
formalism = "")
private Model modelParameter;
@Parameter(name = "ADT2AMAS input file",
help = "ADTree model written with the ADT2AMAS format",
direction = Direction.OUT,
contenttype = "plain/text")
private File fileParameter = null;
public Task executeBinary() throws IOException {
parser = GrmlParser.create(modelParameter);
fileParameter = parser.parse();
return null;
@Example(name = "Example of the input format export",
help = "Example of the input format export")
public InputFormatExport example() {
InputFormatExport result = new InputFormatExport();
result.modelParameter = loadModelResource("treasure-hunters.grml");
return result;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment