Commit acb18a68 authored by dbarbera's avatar dbarbera
Browse files

Remove test15

parent cfd959c1
all: test-ada test-llvm
test-parse:
../../../opengeode.py controlflow.pr system_structure.pr --check
test-ada:
../../../opengeode.py controlflow.pr system_structure.pr --check --toAda
asn1.exe -Ada dataview-uniq.asn -typePrefix asn1Scc -equal
gnatmake -c *.adb
gcc -c test_ada.c
gnatbind -n controlflow.ali
gnatlink test_ada.o controlflow.ali -lgnat -lm -o testcase
./testcase | diff expected -
test-llvm:
../../../opengeode.py controlflow.pr system_structure.pr --check --llvm
llc controlflow.ll
gcc -c controlflow.s
gcc -c test_llvm.c
gcc controlflow.o test_llvm.o -o testcase
./testcase | diff expected -
clean:
rm -rf *.adb *.ads *.pyc runSpark.sh spark.idx *.o *.ali gnat.cfg examiner \
bin *.wrn *.gpr testcase *.ll *.s
/* CIF PROCESS (153, 148), (150, 75) */
PROCESS controlflow;
/* CIF TEXT (373, 97), (303, 168) */
-- Declare your variables
-- Syntax: DCL <variable name> <type name>;
DCL n Int32;
DCL b Bool;
DCL l1 IntList;
DCL l2 PointList;
DCL varlist VarIntList;
/* CIF ENDTEXT */
/* CIF START (0, 0), (70, 35) */
START;
/* CIF TASK (0, 50), (70, 35) */
TASK n := 0;
/* CIF TASK (-13, 100), (97, 35) */
TASK l1 := {1, 2};
/* CIF TASK (-55, 150), (181, 35) */
TASK l2 := {{x 1, y 2}, {x 3, y 4}};
/* CIF TASK (-146, 200), (362, 35) */
TASK varlist := {1, 2, 3, 4, 5, 6, 7};
/* CIF NEXTSTATE (0, 250), (70, 35) */
NEXTSTATE Wait;
/* CIF LABEL (490, 793), (75, 35) */
CONNECTION label2:
/* CIF PROCEDURECALL (459, 843), (136, 35) */
CALL writeln('label2');
/* CIF LABEL (490, 893), (75, 35) */
label3:
/* CIF PROCEDURECALL (459, 943), (136, 35) */
CALL writeln('label3');
/* CIF NEXTSTATE (493, 993), (70, 35) */
NEXTSTATE wait;
/* CIF End Label */
ENDCONNECTION;
/* CIF LABEL (470, 571), (78, 35) */
CONNECTION label1:
/* CIF PROCEDURECALL (438, 621), (141, 35) */
CALL writeln('label1');
/* CIF JOIN (491, 671), (35, 35) */
JOIN label2;
/* CIF End Label */
ENDCONNECTION;
/* CIF STATE (0, 250), (70, 35) */
STATE Wait;
/* CIF INPUT (0, 305), (70, 35) */
INPUT run;
/* CIF DECISION (0, 355), (70, 50) */
DECISION b;
/* CIF ANSWER (-73, 425), (73, 24) */
(true):
/* CIF PROCEDURECALL (-107, 464), (142, 35) */
CALL writeln('ERROR');
/* CIF ANSWER (77, 425), (78, 24) */
(false):
/* CIF PROCEDURECALL (45, 464), (142, 35) */
CALL writeln('OK');
ENDDECISION;
/* CIF DECISION (0, 514), (70, 50) */
DECISION n;
/* CIF ANSWER (-11, 449), (70, 24) */
(2):
/* CIF PROCEDURECALL (-47, 488), (142, 35) */
CALL writeln('ERROR');
/* CIF ANSWER (-163, 450), (70, 24) */
(1):
/* CIF PROCEDURECALL (-199, 489), (142, 35) */
CALL writeln('ERROR');
/* CIF ANSWER (132, 449), (70, 24) */
else:
/* CIF PROCEDURECALL (105, 488), (124, 35) */
CALL writeln('OK');
ENDDECISION;
/* CIF TASK (0, 539), (70, 35) */
TASK n := 7;
/* CIF DECISION (0, 589), (70, 50) */
DECISION n;
/* CIF ANSWER (-159, 579), (70, 24) */
(2):
/* CIF PROCEDURECALL (-197, 618), (147, 35) */
CALL writeln('ERROR');
/* CIF ANSWER (-14, 579), (70, 24) */
(<10):
/* CIF PROCEDURECALL (-40, 618), (123, 35) */
CALL writeln('OK');
/* CIF ANSWER (128, 589), (70, 24) */
else:
/* CIF PROCEDURECALL (91, 628), (142, 35) */
CALL writeln('ERROR');
ENDDECISION;
/* CIF TASK (-48, 678), (167, 56) */
TASK for x in range(3):
call writeln(x);
endfor;
/* CIF TASK (0, 749), (70, 35) */
TASK n := 0;
/* CIF TASK (-55, 799), (181, 56) */
TASK for x in range(2, 10, 2):
n := (n + x) mod 255
endfor;
/* CIF PROCEDURECALL (-15, 870), (100, 34) */
CALL writeln(n)
/* CIF COMMENT (105, 749), (70, 35) */
COMMENT '20';
/* CIF TASK (-36, 919), (142, 56) */
TASK for x in l1:
call writeln(x);
endfor;
/* CIF TASK (-38, 990), (146, 56) */
TASK for p in l2:
call writeln(p!x);
endfor;
/* CIF TASK (-36, 1061), (142, 56) */
TASK for x in varlist:
call writeln(x);
endfor;
/* CIF TASK (-26, 1132), (123, 35) */
TASK varlist := {7, 8};
/* CIF TASK (-36, 1182), (142, 56) */
TASK for x in varlist:
call writeln(x);
endfor;
/* CIF PROCEDURECALL (-38, 1253), (146, 35) */
CALL writeln(varlist(0));
/* CIF PROCEDURECALL (-38, 1303), (146, 35) */
CALL writeln(varlist(1));
/* CIF PROCEDURECALL (-46, 1353), (162, 35) */
CALL writeln(99 in varlist);
/* CIF PROCEDURECALL (-42, 1403), (154, 35) */
CALL writeln(8 in varlist);
/* CIF TASK (0, 1453), (70, 35) */
TASK n := 1;
/* CIF PROCEDURECALL (-79, 1503), (228, 35) */
CALL writeln(if n = 0 then 2 else 4 fi)
/* CIF COMMENT (169, 1498), (70, 35) */
COMMENT '4';
/* CIF JOIN (17, 1553), (35, 35) */
JOIN label1;
ENDSTATE;
ENDPROCESS controlflow;
\ No newline at end of file
TASTE-Dataview DEFINITIONS ::=
BEGIN
Int32 ::= INTEGER (-2147483648 .. 2147483647)
Bool ::= BOOLEAN
Point ::= SEQUENCE {
x Int32,
y Int32
}
IntList ::= SEQUENCE (SIZE (2)) OF Int32
VarIntList ::= SEQUENCE (SIZE (1..32)) OF Int32
PointList ::= SEQUENCE (SIZE(2)) OF Point
END
OK
OK
OK
0
1
2
20
1
2
1
3
1
2
3
4
5
6
7
7
8
7
8
FALSE
TRUE
4
label1
label2
label3
/* CIF Keep Specific Geode ASNFilename 'dataview-uniq.asn' */
USE Datamodel;
SYSTEM controlflow;
SIGNAL run;
CHANNEL c
FROM ENV TO controlflow WITH run;
ENDCHANNEL;
BLOCK basic;
SIGNALROUTE r
FROM ENV TO controlflow WITH run;
CONNECT c and r;
PROCESS controlflow REFERENCED;
ENDBLOCK;
ENDSYSTEM;
extern void adainit();
extern void controlflow_run();
int main() {
adainit();
controlflow_run();
return 0;
}
extern void controlflow_startup();
extern void controlflow_run();
int main() {
controlflow_startup();
controlflow_run();
return 0;
}
......@@ -19,7 +19,6 @@ paths = [
'regression/test10',
'regression/test11',
'regression/test12',
'regression/test15',
'regression/test-substrings',
'regression/test-expressions',
]
......
Supports Markdown
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