{
+ /**
+ * Name of the parameter as specified in TDL model.
+ */
+ private String parameterName;
+
+ public Argument(T type, V value, String parameterName) {
+ super(type, value);
+ this.parameterName = parameterName;
+ }
+
+ public String getParameterName() {
+ return parameterName;
+ }
+}
diff --git a/plugins/org.etsi.mts.tdl.execution.java/runtime-src/org/etsi/mts/tdl/execution/java/tri/ComponentInstanceRole.java b/plugins/org.etsi.mts.tdl.execution.java/runtime-src/org/etsi/mts/tdl/execution/java/tri/ComponentInstanceRole.java
new file mode 100644
index 0000000000000000000000000000000000000000..8f8052b0a8752fa8727b98907656fdacacd39f45
--- /dev/null
+++ b/plugins/org.etsi.mts.tdl.execution.java/runtime-src/org/etsi/mts/tdl/execution/java/tri/ComponentInstanceRole.java
@@ -0,0 +1,9 @@
+package org.etsi.mts.tdl.execution.java.tri;
+
+/**
+ * Predefined roles of test components as specified in TDL.
+ */
+public enum ComponentInstanceRole {
+ SUT,
+ Tester
+}
diff --git a/plugins/org.etsi.mts.tdl.execution.java/runtime-src/org/etsi/mts/tdl/execution/java/tri/Connection.java b/plugins/org.etsi.mts.tdl.execution.java/runtime-src/org/etsi/mts/tdl/execution/java/tri/Connection.java
new file mode 100644
index 0000000000000000000000000000000000000000..3b0303f1a260f75908e1f26c81b336f7a86fe14b
--- /dev/null
+++ b/plugins/org.etsi.mts.tdl.execution.java/runtime-src/org/etsi/mts/tdl/execution/java/tri/Connection.java
@@ -0,0 +1,26 @@
+package org.etsi.mts.tdl.execution.java.tri;
+
+/**
+ * Encapsulation of connected GateReferences.
+ *
+ */
+public class Connection extends Element {
+
+ /**
+ * The end-points of this connection as specified in TDL model.
+ */
+ public final GateReference[] endPoints = new GateReference[2];
+
+ public Connection(String name, GateReference sourceGate, GateReference targetGate) {
+ super(name);
+ endPoints[0] = sourceGate;
+ endPoints[1] = targetGate;
+ }
+
+ @Override
+ public String toString() {
+ if (name != null)
+ return name;
+ return endPoints[0].toString() + " :: " + endPoints[1].toString();
+ }
+}
diff --git a/plugins/org.etsi.mts.tdl.execution.java/runtime-src/org/etsi/mts/tdl/execution/java/tri/Data.java b/plugins/org.etsi.mts.tdl.execution.java/runtime-src/org/etsi/mts/tdl/execution/java/tri/Data.java
new file mode 100644
index 0000000000000000000000000000000000000000..6f45ace0a54113a316a0566e2558e2a7c0b658d0
--- /dev/null
+++ b/plugins/org.etsi.mts.tdl.execution.java/runtime-src/org/etsi/mts/tdl/execution/java/tri/Data.java
@@ -0,0 +1,43 @@
+package org.etsi.mts.tdl.execution.java.tri;
+
+/**
+ * Encapsulation of type and value. The objects are resolved using TDL data
+ * mappings.
+ *
+ * In Java environment the type is a Java class and
+ * value is an object of that class or a lambda expression that
+ * returns such object.
+ */
+public class Data {
+
+ /**
+ * The type information in environment specific form that can be used to decode
+ * incoming data. For example, an annotated class.
+ */
+ private T type;
+
+ /**
+ * The decoded value of the data that matches the type.
+ */
+ private V value;
+
+ public Data(T type, V value) {
+ this.type = type;
+ this.value = value;
+ }
+
+ /**
+ * @see #value
+ */
+ public V getValue() {
+ return value;
+ }
+
+ /**
+ * @see #type
+ */
+ public T getType() {
+ return type;
+ }
+
+}
diff --git a/plugins/org.etsi.mts.tdl.execution.java/runtime-src/org/etsi/mts/tdl/execution/java/tri/Element.java b/plugins/org.etsi.mts.tdl.execution.java/runtime-src/org/etsi/mts/tdl/execution/java/tri/Element.java
new file mode 100644
index 0000000000000000000000000000000000000000..138de06601a5b9ca12f8fc90eea28b25fe403ffc
--- /dev/null
+++ b/plugins/org.etsi.mts.tdl.execution.java/runtime-src/org/etsi/mts/tdl/execution/java/tri/Element.java
@@ -0,0 +1,30 @@
+package org.etsi.mts.tdl.execution.java.tri;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Generic class for encapsulating information about model elements. The
+ * concrete type of the element is specified by a sub-class or the context where
+ * the element is used. Note that the element does not always represent a TDL
+ * meta-class.
+ *
+ */
+public class Element {
+ /**
+ * The name of the element as specified in TDL model.
+ */
+ public String name;
+
+ /**
+ * The annotations assigned to the element as specified in TDL model.
+ */
+ public List annotations = new ArrayList();
+
+ public Element() {
+ }
+
+ public Element(String name) {
+ this.name = name;
+ }
+}
diff --git a/plugins/org.etsi.mts.tdl.execution.java/runtime-src/org/etsi/mts/tdl/execution/java/tri/ElementAnnotation.java b/plugins/org.etsi.mts.tdl.execution.java/runtime-src/org/etsi/mts/tdl/execution/java/tri/ElementAnnotation.java
new file mode 100644
index 0000000000000000000000000000000000000000..62a1d4f957168270f2a96f9d22ca194e66d9be6d
--- /dev/null
+++ b/plugins/org.etsi.mts.tdl.execution.java/runtime-src/org/etsi/mts/tdl/execution/java/tri/ElementAnnotation.java
@@ -0,0 +1,17 @@
+package org.etsi.mts.tdl.execution.java.tri;
+
+/**
+ * Annotation as specified in TDL model.
+ */
+public class ElementAnnotation {
+ /**
+ * Key and value of the annotation.
+ */
+ public String key, value;
+
+ public ElementAnnotation(String key, String value) {
+ this.key = key;
+ this.value = value;
+ }
+
+}
diff --git a/plugins/org.etsi.mts.tdl.execution.java/runtime-src/org/etsi/mts/tdl/execution/java/tri/GateReference.java b/plugins/org.etsi.mts.tdl.execution.java/runtime-src/org/etsi/mts/tdl/execution/java/tri/GateReference.java
new file mode 100644
index 0000000000000000000000000000000000000000..f00f9e1d66df60ebfe37fd1dc4f563db1f8c82a0
--- /dev/null
+++ b/plugins/org.etsi.mts.tdl.execution.java/runtime-src/org/etsi/mts/tdl/execution/java/tri/GateReference.java
@@ -0,0 +1,47 @@
+package org.etsi.mts.tdl.execution.java.tri;
+
+/**
+ * Encapsulation of a connection end-point specification. It's an aggregation of
+ * following TDL model elements:
+ *
+ * - GateInstance
+ * - GateType
+ * - ComponentInstance
+ * - ComponentType
+ * - ComponentInstanceRole
+ *
+ *
+ */
+public class GateReference {
+ public Element gate;
+ public Element gateType;
+ public Element component;
+ public Element componentType;
+ public ComponentInstanceRole role;
+
+ public GateReference(Element gate, Element gateType, Element component, Element componentType,
+ ComponentInstanceRole role) {
+ this.gate = gate;
+ this.gateType = gateType;
+ this.component = component;
+ this.componentType = componentType;
+ this.role = role;
+ }
+
+ @Override
+ public int hashCode() {
+ return gate.hashCode() << 8 + gateType.hashCode() << 6 + component.hashCode() << 4
+ + componentType.hashCode() << 2 + role.hashCode();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (obj instanceof GateReference) {
+ GateReference gr = (GateReference) obj;
+ return gate.equals(gr.gate) && gateType.equals(gr.gateType) && component.equals(gr.component)
+ && componentType.equals(gr.componentType) && role.equals(gr.role);
+ }
+ return super.equals(obj);
+ }
+
+}
\ No newline at end of file
diff --git a/plugins/org.etsi.mts.tdl.execution.java/runtime-src/org/etsi/mts/tdl/execution/java/tri/GateTypeKind.java b/plugins/org.etsi.mts.tdl.execution.java/runtime-src/org/etsi/mts/tdl/execution/java/tri/GateTypeKind.java
new file mode 100644
index 0000000000000000000000000000000000000000..b1443689890f3094764c5efb6604e3a80442dfa9
--- /dev/null
+++ b/plugins/org.etsi.mts.tdl.execution.java/runtime-src/org/etsi/mts/tdl/execution/java/tri/GateTypeKind.java
@@ -0,0 +1,8 @@
+package org.etsi.mts.tdl.execution.java.tri;
+/**
+ * Predefined types of gates as specified in TDL.
+ */
+public enum GateTypeKind {
+ Message,
+ Procedure
+}
diff --git a/plugins/org.etsi.mts.tdl.execution.java/runtime-src/org/etsi/mts/tdl/execution/java/tri/NamedElement.java b/plugins/org.etsi.mts.tdl.execution.java/runtime-src/org/etsi/mts/tdl/execution/java/tri/NamedElement.java
new file mode 100644
index 0000000000000000000000000000000000000000..33f9847044a0f06afb3fffa27cce43bba19ae610
--- /dev/null
+++ b/plugins/org.etsi.mts.tdl.execution.java/runtime-src/org/etsi/mts/tdl/execution/java/tri/NamedElement.java
@@ -0,0 +1,21 @@
+package org.etsi.mts.tdl.execution.java.tri;
+
+/**
+ * Extends the Element class to provide qualified name as specified
+ * in TDL.
+ *
+ */
+public class NamedElement extends Element {
+ /**
+ * The qualified name of the element as specified in TDL model.
+ */
+ public String qualifiedName;
+
+ public NamedElement() {
+ }
+
+ public NamedElement(String name, String qualifiedName) {
+ super(name);
+ this.qualifiedName = qualifiedName;
+ }
+}
diff --git a/plugins/org.etsi.mts.tdl.execution.java/runtime-src/org/etsi/mts/tdl/execution/java/tri/PredefinedFunctions.java b/plugins/org.etsi.mts.tdl.execution.java/runtime-src/org/etsi/mts/tdl/execution/java/tri/PredefinedFunctions.java
new file mode 100644
index 0000000000000000000000000000000000000000..16bea9c893cf71bfefedaaff7e1bf79aa6e08b53
--- /dev/null
+++ b/plugins/org.etsi.mts.tdl.execution.java/runtime-src/org/etsi/mts/tdl/execution/java/tri/PredefinedFunctions.java
@@ -0,0 +1,122 @@
+package org.etsi.mts.tdl.execution.java.tri;
+
+import java.util.Collection;
+
+import com.google.inject.Inject;
+
+/**
+ * Default implementation of predefined functions specified in TDL.
+ */
+public class PredefinedFunctions {
+
+ public RuntimeHelper helper;
+
+ @Inject
+ public PredefinedFunctions(RuntimeHelper helper) {
+ this.helper = helper;
+ }
+
+ public boolean equals(Data, ?> d0, Data, ?> d1) {
+ return helper.equals(d0.getValue(), d1.getValue());
+ }
+
+ public boolean notEquals(Data, ?> d0, Data, ?> d1) {
+ return !equals(d0, d1);
+ }
+
+ public boolean and(boolean b0, boolean b1) {
+ return b0 && b1;
+ }
+
+ public boolean or(boolean b0, boolean b1) {
+ return b0 || b1;
+ }
+
+ public boolean xor(boolean b0, boolean b1) {
+ return b0 ^ b1;
+ }
+
+ public boolean not(boolean b) {
+ return !b;
+ }
+
+ public boolean lt(int i0, int i1) {
+ return i0 < i1;
+ }
+
+ public boolean gt(int i0, int i1) {
+ return i0 > i1;
+ }
+
+ public boolean lteq(int i0, int i1) {
+ return i0 <= i1;
+ }
+
+ public boolean gteq(int i0, int i1) {
+ return i0 >= i1;
+ }
+
+ public boolean lt(long i0, long i1) {
+ return i0 < i1;
+ }
+
+ public boolean gt(long i0, long i1) {
+ return i0 > i1;
+ }
+
+ public boolean lteq(long i0, long i1) {
+ return i0 <= i1;
+ }
+
+ public boolean gteq(long i0, long i1) {
+ return i0 >= i1;
+ }
+
+ public int plus(int i0, int i1) {
+ return i0 + i1;
+ }
+
+ public int minus(int i0, int i1) {
+ return i0 - i1;
+ }
+
+ public int multiply(int i0, int i1) {
+ return i0 * i1;
+ }
+
+ public int divide(int i0, int i1) {
+ return i0 / i1;
+ }
+
+ public int mod(int i0, int i1) {
+ return i0 % i1;
+ }
+
+ public long plus(long i0, long i1) {
+ return i0 + i1;
+ }
+
+ public long minus(long i0, long i1) {
+ return i0 - i1;
+ }
+
+ public long multiply(long i0, long i1) {
+ return i0 * i1;
+ }
+
+ public long divide(long i0, long i1) {
+ return i0 / i1;
+ }
+
+ public long mod(long i0, long i1) {
+ return i0 % i1;
+ }
+
+ /**
+ * @param collection An object that a CollectionDataInstance is mapped to.
+ */
+ public int size(Data, Collection>> collection) {
+ return collection.getValue().size();
+ }
+
+}
diff --git a/plugins/org.etsi.mts.tdl.execution.java/runtime-src/org/etsi/mts/tdl/execution/java/tri/Procedure.java b/plugins/org.etsi.mts.tdl.execution.java/runtime-src/org/etsi/mts/tdl/execution/java/tri/Procedure.java
new file mode 100644
index 0000000000000000000000000000000000000000..22c086b50f501f7f3e2a1091541d6c5d790bbebd
--- /dev/null
+++ b/plugins/org.etsi.mts.tdl.execution.java/runtime-src/org/etsi/mts/tdl/execution/java/tri/Procedure.java
@@ -0,0 +1,20 @@
+package org.etsi.mts.tdl.execution.java.tri;
+
+import java.util.function.Consumer;
+
+/**
+ * Encapsulation of procedure signature as specified in TDL model that may
+ * optionally be mapped to a method that implements the calling of the
+ * procedure.
+ */
+public class Procedure extends NamedElement {
+ /**
+ * Optional function that implements this procedure call.
+ *
+ * The function parameters must match the order and types of parameters of the
+ * procedure call. That is, for each parameter of a procedure call, a method
+ * parameter must exist such that the procedure call parameter type is mapped to
+ * the method parameter type (or class).
+ */
+ public Consumer