A fully working version of the scheduling language with added examples
This commit is contained in:
parent
ec42f74960
commit
ebfd85a666
126 changed files with 7235 additions and 981 deletions
22
transformation/schedule/Tests/models/m_petrinet.od
Normal file
22
transformation/schedule/Tests/models/m_petrinet.od
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
p0:PNPlace
|
||||
p1:PNPlace
|
||||
|
||||
t0:PNTransition
|
||||
:arc (p0 -> t0)
|
||||
:arc (t0 -> p1)
|
||||
|
||||
t1:PNTransition
|
||||
:arc (p1 -> t1)
|
||||
:arc (t1 -> p0)
|
||||
|
||||
p0s:PNPlaceState {
|
||||
numTokens = 1;
|
||||
}
|
||||
|
||||
:pn_of (p0s -> p0)
|
||||
|
||||
p1s:PNPlaceState {
|
||||
numTokens = 0;
|
||||
}
|
||||
|
||||
:pn_of (p1s -> p1)
|
||||
31
transformation/schedule/Tests/models/mm_petrinet.od
Normal file
31
transformation/schedule/Tests/models/mm_petrinet.od
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
# Places, transitions, arcs (and only one kind of arc)
|
||||
|
||||
PNConnectable:Class { abstract = True; }
|
||||
|
||||
arc:Association (PNConnectable -> PNConnectable)
|
||||
|
||||
PNPlace:Class
|
||||
PNTransition:Class
|
||||
|
||||
# inhibitor arc
|
||||
inh_arc:Association (PNPlace -> PNTransition)
|
||||
|
||||
:Inheritance (PNPlace -> PNConnectable)
|
||||
:Inheritance (PNTransition -> PNConnectable)
|
||||
|
||||
# A place has a number of tokens, and that's it.
|
||||
|
||||
PNPlaceState:Class
|
||||
PNPlaceState_numTokens:AttributeLink (PNPlaceState -> Integer) {
|
||||
name = "numTokens";
|
||||
optional = False;
|
||||
constraint = `"numTokens cannot be negative" if get_value(get_target(this)) < 0 else None`;
|
||||
}
|
||||
|
||||
pn_of:Association (PNPlaceState -> PNPlace) {
|
||||
# one-to-one
|
||||
source_lower_cardinality = 1;
|
||||
source_upper_cardinality = 1;
|
||||
target_lower_cardinality = 1;
|
||||
target_upper_cardinality = 1;
|
||||
}
|
||||
13
transformation/schedule/Tests/models/rules/transitions.od
Normal file
13
transformation/schedule/Tests/models/rules/transitions.od
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# A place with no tokens:
|
||||
|
||||
p:RAM_PNPlace
|
||||
ps:RAM_PNPlaceState {
|
||||
RAM_numTokens = `True`;
|
||||
}
|
||||
:RAM_pn_of (ps -> p)
|
||||
|
||||
# An incoming arc from that place to our transition:
|
||||
|
||||
t:RAM_PNTransition
|
||||
|
||||
:RAM_arc (p -> t)
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
start:Start {
|
||||
ports_data_out = `["1", "2", "3"]`;
|
||||
}
|
||||
|
||||
m:Match{
|
||||
file="rules/transition.od";
|
||||
}
|
||||
m2:Match{
|
||||
file="rules/transition.od";
|
||||
}
|
||||
m3:Match{
|
||||
file="rules/transition.od";
|
||||
}
|
||||
|
||||
a_void:Action{
|
||||
ports_data_in = `["in1", "in2"]`;
|
||||
ports_data_out = `["out1", "out2"]`;
|
||||
action=`print("hello foo1")`;
|
||||
}
|
||||
|
||||
a_foo1:Action{
|
||||
ports_data_in = `["in1", "in2"]`;
|
||||
ports_data_out = `["out1", "out2"]`;
|
||||
action=`print("hello foo1")`;
|
||||
}
|
||||
|
||||
a_foo2:Action{
|
||||
ports_exec_in = `["in2"]`;
|
||||
ports_exec_out = `["out2", "out3"]`;
|
||||
action=`print("hello foo2")`;
|
||||
}
|
||||
|
||||
end:End {
|
||||
ports_data_in = `["1", "2", "3"]`;
|
||||
}
|
||||
|
||||
:Conn_exec (start -> m) {from="out";to="in";}
|
||||
:Conn_exec (m -> m2) {from="fail";to="in";}
|
||||
:Conn_exec (m -> m3) {from="success";to="in";}
|
||||
|
||||
:Conn_exec (m2 -> a_foo1) {from="success";to="in";}
|
||||
:Conn_exec (m2 -> a_foo1) {from="fail";to="in";}
|
||||
:Conn_exec (m3 -> a_foo1) {from="success";to="foo_in";}
|
||||
:Conn_exec (m3 -> a_foo2) {from="fail";to="in2";}
|
||||
|
||||
:Conn_exec (a_foo1 -> a_foo2) {from="out";to="in";}
|
||||
:Conn_exec (a_foo1 -> a_foo2) {from="out";to="in2";}
|
||||
:Conn_exec (a_foo1 -> a_foo2) {from="foo";to="in2";}
|
||||
:Conn_exec (a_foo2 -> end) {from="out";to="in";}
|
||||
:Conn_exec (a_foo2 -> end) {from="out2";to="in";}
|
||||
:Conn_exec (a_foo2 -> end) {from="out3";to="in";}
|
||||
:Conn_exec (a_foo2 -> end) {from="out3";to="in";}
|
||||
|
||||
:Conn_data (start -> a_foo2) {from="1";to="in";}
|
||||
:Conn_data (a_foo2-> m2) {from="out";to="in";}
|
||||
|
||||
:Conn_data (start -> a_foo1) {from="1";to="in1";}
|
||||
:Conn_data (start -> a_foo1) {from="2";to="in1";}
|
||||
:Conn_data (start -> a_foo1) {from="3";to="in2";}
|
||||
:Conn_data (a_foo1 -> end) {from="out1";to="1";}
|
||||
:Conn_data (a_foo1 -> end) {from="out1";to="2";}
|
||||
:Conn_data (a_foo1 -> end) {from="out2";to="3";}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
start:Start
|
||||
|
||||
m:Match{
|
||||
file="rules/transition.od";
|
||||
}
|
||||
m2:Match{
|
||||
file="rules/transition.od";
|
||||
}
|
||||
m3:Match{
|
||||
file="rules/transition.od";
|
||||
}
|
||||
end:End {
|
||||
ports_exec_in = `["out", "in"]`;
|
||||
ports_data_in = `["out", "in"]`;
|
||||
}
|
||||
|
||||
:Conn_exec (start -> m) {from="out";to="in";}
|
||||
:Conn_exec (m -> m2) {from="fail";to="in";}
|
||||
:Conn_exec (m -> m3) {from="success";to="in";}
|
||||
|
||||
:Conn_exec (m2 -> end) {from="success";to="in";}
|
||||
:Conn_exec (m2 -> end) {from="fail";to="out";}
|
||||
:Conn_exec (m3 -> end) {from="success";to="out";}
|
||||
:Conn_exec (m3 -> end) {from="fail";to="foo_in";}
|
||||
:Conn_exec (end -> m) {from="foo_out";to="in";}
|
||||
|
||||
:Conn_data (m -> end) {from="out";to="in";}
|
||||
:Conn_data (m2 -> end) {from="out";to="in";}
|
||||
:Conn_data (m3 -> end) {from="out";to="out";}
|
||||
:Conn_data (m3 -> end) {from="out";to="out2";}
|
||||
:Conn_data (end -> m) {from="out";to="in";}
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
start:Start {
|
||||
ports_data_out = `["1", "2", "3"]`;
|
||||
}
|
||||
|
||||
m:Match{
|
||||
file="rules/transition.od";
|
||||
}
|
||||
m2:Match{
|
||||
file="rules/transition.od";
|
||||
}
|
||||
m3:Match{
|
||||
file="rules/transition.od";
|
||||
}
|
||||
|
||||
l:Loop
|
||||
l_foo:Loop
|
||||
l_void:Loop
|
||||
|
||||
end:End {
|
||||
ports_data_in = `["1", "2", "3"]`;
|
||||
}
|
||||
|
||||
:Conn_exec (start -> m) {from="out";to="in";}
|
||||
:Conn_exec (m -> m2) {from="fail";to="in";}
|
||||
:Conn_exec (m -> m3) {from="success";to="in";}
|
||||
|
||||
:Conn_exec (m2 -> l_foo) {from="success";to="in";}
|
||||
:Conn_exec (m2 -> l_foo) {from="fail";to="in";}
|
||||
:Conn_exec (m3 -> l_foo) {from="success";to="foo_in";}
|
||||
|
||||
:Conn_exec (l_foo -> l_foo) {from="out";to="in";}
|
||||
:Conn_exec (l_foo -> end) {from="out";to="in";}
|
||||
:Conn_exec (l_foo -> end) {from="it";to="in";}
|
||||
:Conn_exec (l_foo -> end) {from="foo";to="in";}
|
||||
|
||||
:Conn_data (start -> l) {from="1";to="in";}
|
||||
:Conn_data (l -> m2) {from="out";to="in";}
|
||||
|
||||
:Conn_data (start -> l_foo) {from="1";to="in";}
|
||||
:Conn_data (start -> l_foo) {from="2";to="in";}
|
||||
:Conn_data (start -> l_foo) {from="3";to="foo_in";}
|
||||
:Conn_data (l_foo -> end) {from="out";to="1";}
|
||||
:Conn_data (l_foo -> end) {from="out";to="2";}
|
||||
:Conn_data (l_foo -> end) {from="foo_out";to="3";}
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
start:Start {
|
||||
ports_data_out = `["1", "2", "3"]`;
|
||||
}
|
||||
|
||||
m:Match{
|
||||
file="rules/transition.od";
|
||||
}
|
||||
m2:Match{
|
||||
file="rules/transition.od";
|
||||
}
|
||||
m3:Match{
|
||||
file="rules/transition.od";
|
||||
}
|
||||
|
||||
m_foo:Match{
|
||||
file="rules/transition.od";
|
||||
}
|
||||
|
||||
m_void:Match{
|
||||
file="rules/transition.od";
|
||||
}
|
||||
|
||||
end:End {
|
||||
ports_data_in = `["1", "2", "3"]`;
|
||||
}
|
||||
|
||||
:Conn_exec (start -> m) {from="out";to="in";}
|
||||
:Conn_exec (m -> m2) {from="fail";to="in";}
|
||||
:Conn_exec (m -> m3) {from="success";to="in";}
|
||||
|
||||
:Conn_exec (m2 -> m_foo) {from="success";to="in";}
|
||||
:Conn_exec (m2 -> m_foo) {from="fail";to="in";}
|
||||
:Conn_exec (m3 -> m_foo) {from="success";to="foo_in";}
|
||||
:Conn_exec (m3 -> m_foo) {from="fail";to="in";}
|
||||
|
||||
:Conn_exec (m_foo -> end) {from="fail";to="in";}
|
||||
:Conn_exec (m_foo -> end) {from="success";to="in";}
|
||||
:Conn_exec (m_foo -> end) {from="fail";to="in";}
|
||||
:Conn_exec (m_foo -> end) {from="foo";to="in";}
|
||||
|
||||
:Conn_data (start -> m) {from="1";to="in";}
|
||||
:Conn_data (m -> m2) {from="out";to="in";}
|
||||
|
||||
:Conn_data (start -> m_foo) {from="1";to="in";}
|
||||
:Conn_data (start -> m_foo) {from="2";to="in";}
|
||||
:Conn_data (start -> m_foo) {from="3";to="foo_in";}
|
||||
:Conn_data (m_foo -> end) {from="out";to="1";}
|
||||
:Conn_data (m_foo -> end) {from="out";to="2";}
|
||||
:Conn_data (m_foo -> end) {from="foo_out";to="3";}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
start:Start {
|
||||
ports_data_out = `["1", "2", "3"]`;
|
||||
}
|
||||
|
||||
m:Match{
|
||||
file="rules/transition.od";
|
||||
}
|
||||
m2:Match{
|
||||
file="rules/transition.od";
|
||||
}
|
||||
m3:Match{
|
||||
file="rules/transition.od";
|
||||
}
|
||||
|
||||
m_foo:Merge {
|
||||
ports_data_in = `["in1", "in2"]`;
|
||||
}
|
||||
|
||||
m_void:Merge {
|
||||
ports_data_in = `["in1", "in2"]`;
|
||||
}
|
||||
|
||||
end:End {
|
||||
ports_data_in = `["1", "2", "3"]`;
|
||||
}
|
||||
|
||||
:Conn_exec (start -> m) {from="out";to="in";}
|
||||
:Conn_exec (m -> m2) {from="fail";to="in";}
|
||||
:Conn_exec (m -> m3) {from="success";to="in";}
|
||||
|
||||
:Conn_exec (m2 -> m_foo) {from="success";to="in";}
|
||||
:Conn_exec (m2 -> m_foo) {from="fail";to="in";}
|
||||
|
||||
:Conn_exec (m_foo -> end) {from="out";to="in";}
|
||||
|
||||
:Conn_data (start -> m_foo) {from="1";to="in1";}
|
||||
:Conn_data (start -> m_foo) {from="1";to="in2";}
|
||||
:Conn_data (start -> m_foo) {from="2";to="in2";}
|
||||
:Conn_data (start -> m_foo) {from="3";to="foo_in";}
|
||||
:Conn_data (m_foo -> end) {from="out";to="1";}
|
||||
:Conn_data (m_foo -> end) {from="out";to="2";}
|
||||
:Conn_data (m_foo -> end) {from="foo_out";to="3";}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
start:Start {
|
||||
ports_data_out = `["1", "2", "3"]`;
|
||||
}
|
||||
|
||||
m:Match{
|
||||
file="rules/transition.od";
|
||||
}
|
||||
m2:Match{
|
||||
file="rules/transition.od";
|
||||
}
|
||||
m3:Match{
|
||||
file="rules/transition.od";
|
||||
}
|
||||
|
||||
m_foo:Modify
|
||||
m_void:Modify
|
||||
|
||||
mo:Modify
|
||||
|
||||
end:End {
|
||||
ports_data_in = `["1", "2", "3"]`;
|
||||
}
|
||||
|
||||
:Conn_exec (start -> m) {from="out";to="in";}
|
||||
:Conn_exec (m -> m2) {from="fail";to="in";}
|
||||
:Conn_exec (m -> m3) {from="success";to="in";}
|
||||
|
||||
:Conn_exec (m2 -> m_foo) {from="success";to="in";}
|
||||
:Conn_exec (m2 -> m_foo) {from="fail";to="in";}
|
||||
|
||||
:Conn_exec (m_foo -> end) {from="out";to="in";}
|
||||
|
||||
:Conn_data (start -> mo) {from="1";to="in";}
|
||||
:Conn_data (mo -> m2) {from="out";to="in";}
|
||||
|
||||
:Conn_data (start -> m_foo) {from="1";to="in";}
|
||||
:Conn_data (start -> m_foo) {from="2";to="in";}
|
||||
:Conn_data (start -> m_foo) {from="3";to="foo_in";}
|
||||
:Conn_data (m_foo -> end) {from="out";to="1";}
|
||||
:Conn_data (m_foo -> end) {from="out";to="2";}
|
||||
:Conn_data (m_foo -> end) {from="foo_out";to="3";}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
start:Start {
|
||||
ports_data_out = `["1", "2", "3"]`;
|
||||
}
|
||||
|
||||
m:Match{
|
||||
file="rules/transition.od";
|
||||
}
|
||||
m2:Match{
|
||||
file="rules/transition.od";
|
||||
}
|
||||
m3:Match{
|
||||
file="rules/transition.od";
|
||||
}
|
||||
|
||||
p_foo:Print
|
||||
p_void:Print
|
||||
|
||||
p:Print
|
||||
|
||||
end:End
|
||||
|
||||
:Conn_exec (start -> m) {from="out";to="in";}
|
||||
:Conn_exec (m -> m2) {from="fail";to="in";}
|
||||
:Conn_exec (m -> m3) {from="success";to="in";}
|
||||
|
||||
:Conn_exec (m2 -> p_foo) {from="success";to="in";}
|
||||
:Conn_exec (m2 -> p_foo) {from="fail";to="in";}
|
||||
:Conn_exec (m3 -> p_foo) {from="success";to="foo_in";}
|
||||
:Conn_exec (m3 -> p) {from="fail";to="in";}
|
||||
:Conn_exec (p -> end) {from="out";to="in";}
|
||||
|
||||
:Conn_exec (p_foo -> p_foo) {from="out";to="in";}
|
||||
:Conn_exec (p_foo -> end) {from="out";to="in";}
|
||||
:Conn_exec (p_foo -> end) {from="foo";to="in";}
|
||||
|
||||
:Conn_data (start -> p) {from="1";to="in";}
|
||||
|
||||
:Conn_data (start -> p_foo) {from="1";to="in";}
|
||||
:Conn_data (start -> p_foo) {from="2";to="in";}
|
||||
:Conn_data (start -> p_foo) {from="3";to="foo_in";}
|
||||
:Conn_data (p_foo -> m2) {from="out";to="in";}
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
start:Start {
|
||||
ports_data_out = `["1", "2", "3"]`;
|
||||
}
|
||||
m:Match{
|
||||
file="rules/transition.od";
|
||||
}
|
||||
m2:Match{
|
||||
file="rules/transition.od";
|
||||
}
|
||||
m3:Match{
|
||||
file="rules/transition.od";
|
||||
}
|
||||
|
||||
r_foo1:Rewrite{
|
||||
file="rules/transition.od";
|
||||
}
|
||||
|
||||
r_foo2:Rewrite{
|
||||
file="rules/transition.od";
|
||||
}
|
||||
r_void:Rewrite{
|
||||
file="rules/transition.od";
|
||||
}
|
||||
|
||||
end:End {
|
||||
ports_data_in = `["1", "2", "3"]`;
|
||||
}
|
||||
|
||||
|
||||
:Conn_exec (start -> m) {from="out";to="in";}
|
||||
:Conn_exec (m -> m2) {from="fail";to="in";}
|
||||
:Conn_exec (m -> m3) {from="success";to="in";}
|
||||
|
||||
:Conn_exec (m2 -> r_foo1) {from="success";to="in";}
|
||||
:Conn_exec (m2 -> r_foo1) {from="fail";to="in";}
|
||||
:Conn_exec (m3 -> r_foo1) {from="success";to="foo_in";}
|
||||
:Conn_exec (m3 -> r_foo1) {from="fail";to="in";}
|
||||
|
||||
:Conn_exec (r_foo1 -> r_foo2) {from="out";to="in";}
|
||||
:Conn_exec (r_foo1 -> end) {from="foo";to="in";}
|
||||
:Conn_exec (r_foo2 -> end) {from="out";to="in";}
|
||||
:Conn_exec (r_foo2 -> end) {from="out";to="in";}
|
||||
|
||||
:Conn_data (start -> r_foo1) {from="1";to="in";}
|
||||
:Conn_data (r_foo1-> m2) {from="out";to="in";}
|
||||
|
||||
:Conn_data (start -> r_foo2) {from="1";to="in";}
|
||||
:Conn_data (start -> r_foo2) {from="2";to="in";}
|
||||
:Conn_data (start -> r_foo2) {from="3";to="foo_in";}
|
||||
:Conn_data (r_foo2 -> end) {from="out";to="1";}
|
||||
:Conn_data (r_foo2 -> end) {from="out";to="2";}
|
||||
:Conn_data (r_foo2 -> end) {from="foo_out";to="3";}
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
start:Start {
|
||||
ports_data_out = `["1", "2", "3"]`;
|
||||
}
|
||||
|
||||
m:Match{
|
||||
file="rules/transition.od";
|
||||
}
|
||||
m2:Match{
|
||||
file="rules/transition.od";
|
||||
}
|
||||
m3:Match{
|
||||
file="rules/transition.od";
|
||||
}
|
||||
|
||||
s_foo:Schedule{
|
||||
file="hello.od";
|
||||
}
|
||||
|
||||
s_void:Schedule{
|
||||
file="hello.od";
|
||||
}
|
||||
|
||||
end:End {
|
||||
ports_data_in = `["1", "2", "3"]`;
|
||||
}
|
||||
|
||||
:Conn_exec (start -> m) {from="out";to="in";}
|
||||
:Conn_exec (m -> m2) {from="fail";to="in";}
|
||||
:Conn_exec (m -> m3) {from="success";to="in";}
|
||||
|
||||
:Conn_exec (m2 -> s_foo) {from="success";to="in";}
|
||||
:Conn_exec (m2 -> s_foo) {from="fail";to="in";}
|
||||
:Conn_exec (m3 -> s_foo) {from="success";to="foo";}
|
||||
:Conn_exec (m3 -> s_foo) {from="fail";to="foo2";}
|
||||
|
||||
:Conn_exec (s_foo -> s_foo) {from="out";to="in";}
|
||||
:Conn_exec (s_foo -> s_foo) {from="out";to="in2";}
|
||||
:Conn_exec (s_foo -> s_foo) {from="foo";to="foo3";}
|
||||
:Conn_exec (s_foo -> end) {from="out4";to="in";}
|
||||
:Conn_exec (s_foo -> end) {from="out2";to="in";}
|
||||
:Conn_exec (s_foo -> end) {from="out5";to="in";}
|
||||
:Conn_exec (s_foo -> end) {from="out3";to="in";}
|
||||
|
||||
:Conn_data (start -> s_foo) {from="1";to="in1";}
|
||||
:Conn_data (start -> s_foo) {from="1";to="in2";}
|
||||
:Conn_data (start -> s_foo) {from="2";to="in2";}
|
||||
:Conn_data (start -> s_foo) {from="3";to="foo_in";}
|
||||
:Conn_data (s_foo -> end) {from="out";to="1";}
|
||||
:Conn_data (s_foo -> end) {from="out";to="2";}
|
||||
:Conn_data (s_foo -> end) {from="foo_out";to="3";}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
start:Start {
|
||||
ports_exec_out = `["out", "in"]`;
|
||||
ports_data_out = `["out", "in"]`;
|
||||
}
|
||||
|
||||
m:Match{
|
||||
file="rules/transition.od";
|
||||
}
|
||||
m2:Match{
|
||||
file="rules/transition.od";
|
||||
}
|
||||
m3:Match{
|
||||
file="rules/transition.od";
|
||||
}
|
||||
end:End
|
||||
|
||||
:Conn_exec (start -> m) {from="out";to="in";}
|
||||
:Conn_exec (start -> m) {from="out";to="in";}
|
||||
:Conn_exec (start -> m) {from="in";to="in";}
|
||||
:Conn_exec (start -> m) {from="foo_out";to="in";}
|
||||
:Conn_exec (m -> start) {from="fail";to="foo_in";}
|
||||
:Conn_exec (m -> end) {from="success";to="in";}
|
||||
|
||||
:Conn_data (start -> m) {from="out";to="in";}
|
||||
:Conn_data (start -> m2) {from="out";to="in";}
|
||||
:Conn_data (start -> m3) {from="in";to="in";}
|
||||
:Conn_data (m -> start) {from="out";to="in";}
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
start:Start {
|
||||
ports_data_out = `["1", "2", "3"]`;
|
||||
}
|
||||
|
||||
m:Match{
|
||||
file="rules/transition.od";
|
||||
}
|
||||
m2:Match{
|
||||
file="rules/transition.od";
|
||||
}
|
||||
m3:Match{
|
||||
file="rules/transition.od";
|
||||
}
|
||||
|
||||
s_foo:Store {
|
||||
ports = `["1", "2", "3"]`;
|
||||
}
|
||||
|
||||
s_void:Store {
|
||||
ports = `["1", "2", "3"]`;
|
||||
}
|
||||
|
||||
end:End {
|
||||
ports_data_in = `["1", "2", "3"]`;
|
||||
}
|
||||
|
||||
:Conn_exec (start -> m) {from="out";to="in";}
|
||||
:Conn_exec (m -> m2) {from="fail";to="in";}
|
||||
:Conn_exec (m -> m3) {from="success";to="in";}
|
||||
|
||||
:Conn_exec (m2 -> s_foo) {from="success";to="in";}
|
||||
:Conn_exec (m2 -> s_foo) {from="fail";to="in";}
|
||||
:Conn_exec (m3 -> s_foo) {from="success";to="1";}
|
||||
:Conn_exec (m3 -> s_foo) {from="fail";to="foo";}
|
||||
|
||||
:Conn_exec (s_foo -> end) {from="out";to="in";}
|
||||
:Conn_exec (s_foo -> s_foo) {from="1";to="2";}
|
||||
:Conn_exec (s_foo -> end) {from="out";to="in";}
|
||||
:Conn_exec (s_foo -> s_foo) {from="foo";to="2";}
|
||||
|
||||
:Conn_data (start -> s_foo) {from="1";to="1";}
|
||||
:Conn_data (start -> s_foo) {from="1";to="2";}
|
||||
:Conn_data (start -> s_foo) {from="2";to="2";}
|
||||
:Conn_data (start -> s_foo) {from="3";to="foo_in";}
|
||||
:Conn_data (s_foo -> end) {from="out";to="1";}
|
||||
:Conn_data (s_foo -> end) {from="out";to="2";}
|
||||
:Conn_data (s_foo -> end) {from="foo_out";to="3";}
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
string:Action {
|
||||
ports_exec_in = `'["out", "in"]'`;
|
||||
ports_exec_out = `'["out", "in"]'`;
|
||||
ports_data_in = `'["out", "in"]'`;
|
||||
ports_data_out = `'["out", "in"]'`;
|
||||
action = `'["out", "in"]'`;
|
||||
}
|
||||
|
||||
int:Action {
|
||||
ports_exec_in = `123`;
|
||||
ports_exec_out = `123`;
|
||||
ports_data_in = `123`;
|
||||
ports_data_out = `123`;
|
||||
action = `123`;
|
||||
}
|
||||
|
||||
list:Action {
|
||||
ports_exec_out = `["out", "in"]`;
|
||||
ports_exec_in = `["out", "in"]`;
|
||||
ports_data_out = `["out", "in"]`;
|
||||
ports_data_in = `["out", "in"]`;
|
||||
action = `["out", "in"]`;
|
||||
}
|
||||
set:Action {
|
||||
ports_exec_in = `{"out", "in"}`;
|
||||
ports_exec_out = `{"out", "in"}`;
|
||||
ports_data_in = `{"out", "in"}`;
|
||||
ports_data_out = `{"out", "in"}`;
|
||||
action = `{"out", "in"}`;
|
||||
}
|
||||
|
||||
tuple:Action {
|
||||
ports_exec_in = `("out", "in")`;
|
||||
ports_exec_out = `("out", "in")`;
|
||||
ports_data_in = `("out", "in")`;
|
||||
ports_data_out = `("out", "in")`;
|
||||
action = `("out", "in")`;
|
||||
}
|
||||
|
||||
dict:Action {
|
||||
ports_exec_in = `{"out": "in"}`;
|
||||
ports_exec_out = `{"out": "in"}`;
|
||||
ports_data_in = `{"out": "in"}`;
|
||||
ports_data_out = `{"out": "in"}`;
|
||||
action = `{"out": "in"}`;
|
||||
}
|
||||
|
||||
none:Action {
|
||||
ports_exec_in = `None`;
|
||||
ports_exec_out = `None`;
|
||||
ports_data_in = `None`;
|
||||
ports_data_out = `None`;
|
||||
action = `None`;
|
||||
}
|
||||
|
||||
invalid:Action {
|
||||
ports_exec_in = `[{a(0)['qkja("fyvka`;
|
||||
ports_exec_out = `[{a(0)['qkja("fyvka`;
|
||||
ports_data_in = `["", [{]]`;
|
||||
ports_data_out = `["", [{]]`;
|
||||
action = `hu(ja&{]8}]`;
|
||||
}
|
||||
|
||||
subtype:Action {
|
||||
ports_exec_in = `[1, 2]`;
|
||||
ports_exec_out = `[1, 2]`;
|
||||
ports_data_in = `[1, 2]`;
|
||||
ports_data_out = `[1, 2]`;
|
||||
action = `[1, 2]`;
|
||||
}
|
||||
|
||||
code:Action {
|
||||
ports_exec_in = `print("hello world")`;
|
||||
ports_exec_out = `print("hello world")`;
|
||||
ports_data_in = `print("hello world")`;
|
||||
ports_data_out = `print("hello world")`;
|
||||
action = `print("hello world")`;
|
||||
}
|
||||
|
||||
no:Action
|
||||
|
||||
start:Start
|
||||
end:End
|
||||
52
transformation/schedule/Tests/models/schedule/fields_end.od
Normal file
52
transformation/schedule/Tests/models/schedule/fields_end.od
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
start:Start
|
||||
|
||||
string:End {
|
||||
ports_exec_in = `'["out", "in"]'`;
|
||||
ports_data_in = `'["out", "in"]'`;
|
||||
}
|
||||
|
||||
int:End {
|
||||
ports_exec_in = `123`;
|
||||
ports_data_in = `123`;
|
||||
}
|
||||
|
||||
list:End {
|
||||
ports_exec_in = `["out", "in"]`;
|
||||
ports_data_in = `["out", "in"]`;
|
||||
}
|
||||
set:End {
|
||||
ports_exec_in = `{"out", "in"}`;
|
||||
ports_data_in = `{"out", "in"}`;
|
||||
}
|
||||
|
||||
tuple:End {
|
||||
ports_exec_in = `("out", "in")`;
|
||||
ports_data_in = `("out", "in")`;
|
||||
}
|
||||
|
||||
dict:End {
|
||||
ports_exec_in = `{"out": "in"}`;
|
||||
ports_data_in = `{"out": "in"}`;
|
||||
}
|
||||
|
||||
none:End {
|
||||
ports_exec_in = `None`;
|
||||
ports_data_in = `None`;
|
||||
}
|
||||
|
||||
invalid:End {
|
||||
ports_exec_in = `[{a(0)['qkja("fyvka`;
|
||||
ports_data_in = `["", [{]]`;
|
||||
}
|
||||
|
||||
subtype:End {
|
||||
ports_exec_in = `[1, 2]`;
|
||||
ports_data_in = `[1, 2]`;
|
||||
}
|
||||
|
||||
code:End {
|
||||
ports_exec_in = `print("hello world")`;
|
||||
ports_data_in = `print("hello world")`;
|
||||
}
|
||||
|
||||
no:End
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
string:Merge {
|
||||
ports_data_in = `'["out", "in"]'`;
|
||||
}
|
||||
|
||||
list:Merge {
|
||||
ports_data_in = `["out", "in"]`;
|
||||
}
|
||||
set:Merge {
|
||||
ports_data_in = `{"out", "in"}`;
|
||||
}
|
||||
|
||||
tuple:Merge {
|
||||
ports_data_in = `("out", "in")`;
|
||||
}
|
||||
|
||||
dict:Merge {
|
||||
ports_data_in = `{"out": "in"}`;
|
||||
}
|
||||
|
||||
none:Merge {
|
||||
ports_data_in = `None`;
|
||||
}
|
||||
|
||||
invalid:Merge {
|
||||
ports_data_in = `["", [{]]`;
|
||||
}
|
||||
|
||||
subtype:Merge {
|
||||
ports_data_in = `[1, 2]`;
|
||||
}
|
||||
|
||||
code:Merge {
|
||||
ports_data_in = `print("hello world")`;
|
||||
}
|
||||
|
||||
no:Merge
|
||||
|
||||
start:Start
|
||||
end:End
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
string:Modify {
|
||||
rename = `'["out", "in"]'`;
|
||||
delete = `'["out", "in"]'`;
|
||||
}
|
||||
|
||||
list:Modify {
|
||||
rename = `["out", "in"]`;
|
||||
delete = `["out", "in"]`;
|
||||
}
|
||||
set:Modify {
|
||||
rename = `{"out", "in"}`;
|
||||
delete = `{"out", "in"}`;
|
||||
}
|
||||
|
||||
tuple:Modify {
|
||||
rename = `("out", "in")`;
|
||||
delete = `("out", "in")`;
|
||||
}
|
||||
|
||||
dict:Modify {
|
||||
rename = `{"out": "in"}`;
|
||||
delete = `{"out": "in"}`;
|
||||
}
|
||||
|
||||
none:Modify {
|
||||
rename = `None`;
|
||||
delete = `None`;
|
||||
}
|
||||
|
||||
invalid:Modify {
|
||||
rename = `[{a(0)['qkja("fyvka`;
|
||||
delete = `["", [{]]`;
|
||||
}
|
||||
|
||||
subtype:Modify {
|
||||
rename = `{1: 2}`;
|
||||
delete = `[1, 2]`;
|
||||
}
|
||||
|
||||
code:Modify {
|
||||
rename = `print("hello world")`;
|
||||
delete = `print("hello world")`;
|
||||
}
|
||||
|
||||
joined:Modify {
|
||||
rename = `{"a":"1", "b":"2", "c":"3"}`;
|
||||
delete = `{"a", "d"}`;
|
||||
}
|
||||
|
||||
start:Start
|
||||
end:End
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
string:Print {
|
||||
custom = `'["port_out", "port_in"]'`;
|
||||
}
|
||||
|
||||
list:Print {
|
||||
custom = `["port_out", "port_in"]`;
|
||||
}
|
||||
set:Print {
|
||||
custom = `{"port_out", "port_in"}`;
|
||||
}
|
||||
|
||||
tuple:Print {
|
||||
custom = `("port_out", "port_in")`;
|
||||
}
|
||||
|
||||
dict:Print {
|
||||
custom = `{"port_out": "port_in"}`;
|
||||
}
|
||||
|
||||
none:Print {
|
||||
custom = `None`;
|
||||
}
|
||||
|
||||
invalid:Print {
|
||||
custom = `["", [{]]`;
|
||||
}
|
||||
|
||||
subtype:Print {
|
||||
custom = `[1, 2]`;
|
||||
}
|
||||
|
||||
code:Print {
|
||||
custom = `print("hello world")`;
|
||||
}
|
||||
|
||||
no:Print
|
||||
|
||||
start:Start
|
||||
end:End
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
string:Start {
|
||||
ports_exec_out = `'["out", "in"]'`;
|
||||
ports_data_out = `'["out", "in"]'`;
|
||||
}
|
||||
|
||||
int:Start {
|
||||
ports_exec_out = `123`;
|
||||
ports_data_out = `123`;
|
||||
}
|
||||
|
||||
list:Start {
|
||||
ports_exec_out = `["out", "in"]`;
|
||||
ports_data_out = `["out", "in"]`;
|
||||
}
|
||||
set:Start {
|
||||
ports_exec_out = `{"out", "in"}`;
|
||||
ports_data_out = `{"out", "in"}`;
|
||||
}
|
||||
|
||||
tuple:Start {
|
||||
ports_exec_out = `("out", "in")`;
|
||||
ports_data_out = `("out", "in")`;
|
||||
}
|
||||
|
||||
dict:Start {
|
||||
ports_exec_out = `{"out": "in"}`;
|
||||
ports_data_out = `{"out": "in"}`;
|
||||
}
|
||||
|
||||
none:Start {
|
||||
ports_exec_out = `None`;
|
||||
ports_data_out = `None`;
|
||||
}
|
||||
|
||||
invalid:Start {
|
||||
ports_exec_out = `[{a(0)['qkja("fyvka`;
|
||||
ports_data_out = `["", [{]]`;
|
||||
}
|
||||
|
||||
subtype:Start {
|
||||
ports_exec_out = `[1, 2]`;
|
||||
ports_data_out = `[1, 2]`;
|
||||
}
|
||||
|
||||
code:Start {
|
||||
ports_exec_out = `print("hello world")`;
|
||||
ports_data_out = `print("hello world")`;
|
||||
}
|
||||
|
||||
no:Start
|
||||
|
||||
end:End
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
string:Store {
|
||||
ports = `'["port_out", "port_in"]'`;
|
||||
}
|
||||
|
||||
list:Store {
|
||||
ports = `["port_out", "port_in"]`;
|
||||
}
|
||||
set:Store {
|
||||
ports = `{"port_out", "port_in"}`;
|
||||
}
|
||||
|
||||
tuple:Store {
|
||||
ports = `("port_out", "port_in")`;
|
||||
}
|
||||
|
||||
dict:Store {
|
||||
ports = `{"port_out": "port_in"}`;
|
||||
}
|
||||
|
||||
none:Store {
|
||||
ports = `None`;
|
||||
}
|
||||
|
||||
invalid:Store {
|
||||
ports = `["", [{]]`;
|
||||
}
|
||||
|
||||
subtype:Store {
|
||||
ports = `[1, 2]`;
|
||||
}
|
||||
|
||||
code:Store {
|
||||
ports = `print("hello world")`;
|
||||
}
|
||||
|
||||
no:Store
|
||||
|
||||
start:Start
|
||||
end:End
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
start:Start
|
||||
end:End
|
||||
end2:End
|
||||
|
||||
:Conn_exec (start -> end) {from="out";to="in";}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
start:Start
|
||||
start2:Start
|
||||
end:End
|
||||
|
||||
:Conn_exec (start -> end) {from="out";to="in";}
|
||||
1
transformation/schedule/Tests/models/schedule/no_end.od
Normal file
1
transformation/schedule/Tests/models/schedule/no_end.od
Normal file
|
|
@ -0,0 +1 @@
|
|||
start:Start
|
||||
|
|
@ -0,0 +1 @@
|
|||
end:End
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
start:Start
|
||||
end:End
|
||||
:Conn_exec (start -> end) {from="out";to="in";}
|
||||
Loading…
Add table
Add a link
Reference in a new issue