Project

General

Profile

Download (2.43 KB) Statistics
| Branch: | Tag: | Revision:
1
open Lustrec
2
open Datatype
3
open SF
4

    
5
let name = "medium"
6

    
7
let condition x = condition (Corelang.mkexpr Location.dummy_loc (Lustre_types.Expr_const (Corelang.const_of_bool true)))
8

    
9
let model : prog_t =
10
    let state_main = "main" in
11
    let state_a = "a" in
12
    let state_a1 = "a1" in
13
    let state_b = "b" in
14

    
15
    let actions_main = state_action (action "emain") (action "dmain") (action "xmain") in
16
    let actions_a = state_action (action "eA") (action "dA") (action "xA") in
17
    let actions_a1 = state_action (action "eA1") (action "dA1") (action "xA1") in
18
    let actions_b = state_action (action "eB") (action "dB") (action "xB") in
19

    
20
    let tA = {
21
      event = no_event;
22
      condition = condition "cond_tA";
23
      condition_act = action "condact_tA";
24
      transition_act = action "transact_tA";
25
      dest = DPath [state_main;state_a];
26
    }
27
    in
28
    let tJ = {
29
      event = no_event;
30
      condition = condition "cond_tJ";
31
      condition_act = action "condact_tJ";
32
      transition_act = action "transact_tJ";
33
      dest = DJunction "jmid";
34
    }
35
    in
36
    let tB = {
37
      event = no_event;
38
      condition = condition "cond_tB";
39
      condition_act = action "condact_tB";
40
      transition_act = action "transact_tB";
41
      dest = DPath [state_main;state_b];
42
    }
43
    in
44
    let tA1 = {
45
      event = no_event;
46
      condition = condition "cond_tA1";
47
      condition_act = action "condact_tA1";
48
      transition_act = action "transact_tA1";
49
      dest = DPath [state_main;state_a;state_a1];
50
    }
51
    in
52

    
53

    
54
    let def_a = {
55
      state_actions = actions_a;
56
      outer_trans = [tJ];
57
      inner_trans = [];
58
      internal_composition = Or ([tA1], [state_a1])
59
    }
60
    in
61
    let def_a1 = {
62
      state_actions = actions_a1;
63
      outer_trans = [tB];
64
      inner_trans = [];
65
      internal_composition = Or ([], [])
66
    }
67
    in
68
    let def_b = {
69
      state_actions = actions_b;
70
      outer_trans = [tA1];
71
      inner_trans = [];
72
      internal_composition = Or ([], [])
73
    }
74
    in
75
    let def_main = {
76
      state_actions = actions_main;
77
      outer_trans = [];
78
      inner_trans = [];
79
      internal_composition = Or ([tA], [state_a; state_b])
80
    }
81
    in
82
    let src = [State([state_main;state_a], def_a);
83
	       State([state_main;state_a;state_a1], def_a1);
84
	       State([state_main;state_b], def_b);
85
	       State([state_main], def_main);
86
	       Junction("jmid", [tB]);
87
	      ]
88
    in
89
    Program (state_main, src, [])
90

    
91
let traces : trace_t list = [[None; None]]
(2-2/4)