Project

General

Profile

Revision b58cc410 regression_tests/lustre_files/success/Simulink/src_many_files/IF_with_EnabledSS_PP.LUSTREC.lus

View differences:

regression_tests/lustre_files/success/Simulink/src_many_files/IF_with_EnabledSS_PP.LUSTREC.lus
1 1
-- This file has been generated by CoCoSim2.
2 2

  
3
-- Compiler: Lustre compiler 2 (ToLustre.m)
4
-- Time: 03-Dec-2018 22:05:58
3
-- Compiler: Lustre compiler 2 (nasa_toLustre.ToLustre.m)
4
-- Time: 19-Mar-2019 21:16:39
5 5
(*
6 6
Original block name: IF_with_EnabledSS_PP/ActionSubsystem1
7 7
*)
8
node  ActionSubsystem1_50_010_automaton(In1_1 : real;
8
node  ActionSubsystem1_8_013_condExecSS(In1_1 : real;
9 9
	_isEnabled : bool;
10 10
	__time_step : real;
11 11
	__nb_step : int;)
12 12
returns(Out1_1 : real;);
13 13
var pre_Out1_1 : real;
14
	_isEnabled_clock : bool clock;
14 15
let
15 16
	pre_Out1_1 = if (__nb_step > 0) then
16 17
		(pre Out1_1)
17
	    else 0.000000000000000;
18
	automaton enabled_ActionSubsystem1_50_010
19
	state Active_ActionSubsystem1_50_010:
20
	unless (not _isEnabled) restart Inactive_ActionSubsystem1_50_010
21
	let
22
		Out1_1 = ActionSubsystem1_50_010(In1_1, __time_step, __nb_step);
23
	tel
24

  
25
	state Inactive_ActionSubsystem1_50_010:
26
	unless _isEnabled restart Active_ActionSubsystem1_50_010
27
	let
28
		Out1_1 = pre_Out1_1;
29
	tel
30

  
31

  
18
	    else 0.0;
19
	_isEnabled_clock = _isEnabled;
20
	Out1_1 = (merge _isEnabled_clock 
21
		(true -> (ActionSubsystem1_8_013((In1_1 when _isEnabled_clock), (__time_step when _isEnabled_clock), (__nb_step when _isEnabled_clock)) every (false -> (_isEnabled_clock and (not (pre _isEnabled_clock)))))) 
22
		(false -> (pre_Out1_1) when false(_isEnabled_clock)));
32 23
tel
33 24

  
34 25
(*
35 26
Original block name: IF_with_EnabledSS_PP/ActionSubsystem1
36 27
*)
37
node  ActionSubsystem1_50_010(In1_1 : real;
28
node  ActionSubsystem1_8_013(In1_1 : real;
38 29
	__time_step : real;
39 30
	__nb_step : int;)
40 31
returns(Out1_1 : real;);
41 32
var UnitDelay_1 : real;
42 33
let
43
	UnitDelay_1 = (0.000000000000000 -> (pre In1_1));
34
	UnitDelay_1 = (0.0 -> (pre In1_1));
44 35
	Out1_1 = UnitDelay_1;
45 36
tel
46 37

  
47 38
(*
48 39
Original block name: IF_with_EnabledSS_PP/ActionSubsystem2
49 40
*)
50
node  ActionSubsystem2_57_013_automaton(In1_1 : real;
41
node  ActionSubsystem2_15_018_condExecSS(In1_1 : real;
51 42
	_isEnabled : bool;
52 43
	__time_step : real;
53 44
	__nb_step : int;)
54 45
returns(Out1_1 : real;);
55 46
var pre_Out1_1 : real;
47
	_isEnabled_clock : bool clock;
56 48
let
57 49
	pre_Out1_1 = if (__nb_step > 0) then
58 50
		(pre Out1_1)
59
	    else 0.000000000000000;
60
	automaton enabled_ActionSubsystem2_57_013
61
	state Active_ActionSubsystem2_57_013:
62
	unless (not _isEnabled) restart Inactive_ActionSubsystem2_57_013
63
	let
64
		Out1_1 = ActionSubsystem2_57_013(In1_1, __time_step, __nb_step);
65
	tel
66

  
67
	state Inactive_ActionSubsystem2_57_013:
68
	unless _isEnabled resume Active_ActionSubsystem2_57_013
69
	let
70
		Out1_1 = pre_Out1_1;
71
	tel
72

  
73

  
51
	    else 0.0;
52
	_isEnabled_clock = _isEnabled;
53
	Out1_1 = (merge _isEnabled_clock 
54
		(true -> ActionSubsystem2_15_018((In1_1 when _isEnabled_clock), (__time_step when _isEnabled_clock), (__nb_step when _isEnabled_clock))) 
55
		(false -> (pre_Out1_1) when false(_isEnabled_clock)));
74 56
tel
75 57

  
76 58
(*
77 59
Original block name: IF_with_EnabledSS_PP/ActionSubsystem2
78 60
*)
79
node  ActionSubsystem2_57_013(In1_1 : real;
61
node  ActionSubsystem2_15_018(In1_1 : real;
80 62
	__time_step : real;
81 63
	__nb_step : int;)
82 64
returns(Out1_1 : real;);
83 65
var UnitDelay_1 : real;
84 66
let
85
	UnitDelay_1 = (0.000000000000000 -> (pre In1_1));
67
	UnitDelay_1 = (0.0 -> (pre In1_1));
86 68
	Out1_1 = UnitDelay_1;
87 69
tel
88 70

  
89 71
(*
90 72
Original block name: IF_with_EnabledSS_PP/ActionSubsystem3
91 73
*)
92
node  ActionSubsystem3_64_010_automaton(In1_1 : real;
74
node  ActionSubsystem3_22_022_condExecSS(In1_1 : real;
93 75
	_isEnabled : bool;
94 76
	__time_step : real;
95 77
	__nb_step : int;)
96 78
returns(Out1_1 : real;);
97 79
var pre_Out1_1 : real;
80
	_isEnabled_clock : bool clock;
98 81
let
99 82
	pre_Out1_1 = if (__nb_step > 0) then
100 83
		(pre Out1_1)
101
	    else 0.000000000000000;
102
	automaton enabled_ActionSubsystem3_64_010
103
	state Active_ActionSubsystem3_64_010:
104
	unless (not _isEnabled) restart Inactive_ActionSubsystem3_64_010
105
	let
106
		Out1_1 = ActionSubsystem3_64_010(In1_1, __time_step, __nb_step);
107
	tel
108

  
109
	state Inactive_ActionSubsystem3_64_010:
110
	unless _isEnabled resume Active_ActionSubsystem3_64_010
111
	let
112
		Out1_1 = pre_Out1_1;
113
	tel
114

  
115

  
84
	    else 0.0;
85
	_isEnabled_clock = _isEnabled;
86
	Out1_1 = (merge _isEnabled_clock 
87
		(true -> ActionSubsystem3_22_022((In1_1 when _isEnabled_clock), (__time_step when _isEnabled_clock), (__nb_step when _isEnabled_clock))) 
88
		(false -> (pre_Out1_1) when false(_isEnabled_clock)));
116 89
tel
117 90

  
118 91
(*
119 92
Original block name: IF_with_EnabledSS_PP/ActionSubsystem3
120 93
*)
121
node  ActionSubsystem3_64_010(In1_1 : real;
94
node  ActionSubsystem3_22_022(In1_1 : real;
122 95
	__time_step : real;
123 96
	__nb_step : int;)
124 97
returns(Out1_1 : real;);
125 98
var UnitDelay_1 : real;
126 99
let
127
	UnitDelay_1 = (0.000000000000000 -> (pre In1_1));
100
	UnitDelay_1 = (0.0 -> (pre In1_1));
128 101
	Out1_1 = UnitDelay_1;
129 102
tel
130 103

  
......
141 114
returns(Out1_1 : real;
142 115
	Out2_1 : real;
143 116
	Out3_1 : real;);
144
var ExecutionCond_of_ActionSubsystem1_50_010 : bool;
117
var ExecutionCond_of_ActionSubsystem1_8_013 : bool;
145 118
	ActionSubsystem1_1 : real;
146
	ExecutionCond_of_ActionSubsystem2_57_013 : bool;
119
	ExecutionCond_of_ActionSubsystem2_15_018 : bool;
147 120
	ActionSubsystem2_1 : real;
148
	ExecutionCond_of_ActionSubsystem3_64_010 : bool;
121
	ExecutionCond_of_ActionSubsystem3_22_022 : bool;
149 122
	ActionSubsystem3_1 : real;
150 123
	If2_1 : bool;
151 124
	If2_2 : bool;
......
153 126
	__time_step : real;
154 127
	__nb_step : int;
155 128
let
156
	ExecutionCond_of_ActionSubsystem1_50_010 = If2_1;
157
	ActionSubsystem1_1 = ActionSubsystem1_50_010_automaton(In2_1, ExecutionCond_of_ActionSubsystem1_50_010, __time_step, __nb_step);
158
	ExecutionCond_of_ActionSubsystem2_57_013 = If2_2;
159
	ActionSubsystem2_1 = ActionSubsystem2_57_013_automaton(In2_1, ExecutionCond_of_ActionSubsystem2_57_013, __time_step, __nb_step);
160
	ExecutionCond_of_ActionSubsystem3_64_010 = If2_3;
161
	ActionSubsystem3_1 = ActionSubsystem3_64_010_automaton(In2_1, ExecutionCond_of_ActionSubsystem3_64_010, __time_step, __nb_step);
129
	ExecutionCond_of_ActionSubsystem1_8_013 = If2_1;
130
	ActionSubsystem1_1 = ActionSubsystem1_8_013_condExecSS(In2_1, ExecutionCond_of_ActionSubsystem1_8_013, __time_step, __nb_step);
131
	ExecutionCond_of_ActionSubsystem2_15_018 = If2_2;
132
	ActionSubsystem2_1 = ActionSubsystem2_15_018_condExecSS(In2_1, ExecutionCond_of_ActionSubsystem2_15_018, __time_step, __nb_step);
133
	ExecutionCond_of_ActionSubsystem3_22_022 = If2_3;
134
	ActionSubsystem3_1 = ActionSubsystem3_22_022_condExecSS(In2_1, ExecutionCond_of_ActionSubsystem3_22_022, __time_step, __nb_step);
162 135
	(If2_1, If2_2, If2_3) = if In1_1 > 1 then
163 136
		(true, false, false)
164 137
	    else if In3_3 > 0 then
......
167 140
	Out1_1 = ActionSubsystem1_1;
168 141
	Out2_1 = ActionSubsystem2_1;
169 142
	Out3_1 = ActionSubsystem3_1;
170
	__time_step = (0.0 -> ((pre __time_step) + 0.020000000000000));
143
	__time_step = (0.0 -> ((pre __time_step) + 0.020));
171 144
	__nb_step = (0 -> ((pre __nb_step) + 1));
172 145
tel
173 146

  

Also available in: Unified diff