orchestrator.pr 2.2 KB
Newer Older
1
/* CIF PROCESS (295, 57), (150, 75) */
2
PROCESS orchestrator
3
/* CIF COMMENT (405, 193), (71, 35) */
4
5
COMMENT 'Hello';
    /* CIF TEXT (39, 94), (293, 263) */
6
    dcl fixed FixedString := 'Helo';
7
8

dcl variable variableString := 'Hop';
9
10

dcl seqof seqbool;
11
12
13
    /* CIF ENDTEXT */
    /* CIF START (456, 110), (70, 35) */
    START;
Maxime Perrotin's avatar
Maxime Perrotin committed
14
15
        /* CIF TASK (372, 160), (235, 35) */
        TASK seqof := {true} // {false} // {false};
16
17
18
19
20
21
22
        /* CIF TASK (409, 210), (163, 53) */
        TASK for each in seqof:
    call writeln(each);
endfor;
        /* CIF PROCEDURECALL (368, 278), (244, 35) */
        CALL writeln('(1) -> ', seqof(0), seqof(1));
        /* CIF TASK (388, 328), (205, 33) */
Maxime Perrotin's avatar
Maxime Perrotin committed
23
        TASK seqof := seqof // {true};
24
        /* CIF PROCEDURECALL (368, 376), (244, 35) */
Maxime Perrotin's avatar
Maxime Perrotin committed
25
        CALL writeln('(2) -> ', seqof(0), seqof(3));
26
27
28
29
30
        /* CIF TASK (409, 426), (163, 53) */
        TASK 'for each in seqof:
    call writeln(each);
endfor';
        /* CIF PROCEDURECALL (357, 494), (267, 35) */
31
        CALL writeln(fixed(0,2)//fixed(2,3)// ' word');
32
        /* CIF PROCEDURECALL (410, 544), (162, 35) */
33
        CALL writeln(variable);
34
        /* CIF TASK (397, 594), (188, 35) */
35
        TASK variable := variable // '!!';
36
        /* CIF PROCEDURECALL (410, 644), (162, 35) */
37
        CALL writeln(variable);
38
        /* CIF PROCEDURECALL (406, 694), (170, 35) */
39
        CALL writeln(variable//':-)');
Maxime Perrotin's avatar
Maxime Perrotin committed
40
41
42
43
        /* CIF TASK (401, 744), (180, 35) */
        TASK variable := variable(0,2);
        /* CIF PROCEDURECALL (361, 794), (259, 35) */
        CALL writeln(variable(0, 2));
44
45
46
47
48
49
50
51
52
53
54
55
        /* CIF DECISION (380, 844), (221, 50) */
        DECISION variable // variable = 'HopHop';
                /* CIF ANSWER (371, 914), (70, 23) */
                (true):
                    /* CIF PROCEDURECALL (347, 952), (117, 35) */
                    CALL writeln('OK');
                /* CIF ANSWER (543, 914), (70, 23) */
                (false):
                    /* CIF PROCEDURECALL (474, 952), (207, 35) */
                    CALL writeln(variable // variable);
        ENDDECISION;
        /* CIF NEXTSTATE (455, 1002), (70, 35) */
56
        NEXTSTATE wait;
57
    /* CIF STATE (272, 359), (70, 35) */
58
59
60
    STATE wait;
    ENDSTATE;
ENDPROCESS orchestrator;