## lustrec-tests / regression_tests / lustre_files / success / Simulink / src_many_files / CompareTo3_PP.LUSTREC.lus @ cd1faebc

History | View | Annotate | Download (8.83 KB)

1 | 4748b215 | hbourbou | -- This file has been generated by CoCoSim2. |
---|---|---|---|

2 | |||

3 | -- Compiler: Lustre compiler 2 (ToLustre.m) |
||

4 | -- Time: 03-Dec-2018 22:01:44 |
||

5 | node bool_to_int(x : bool;) |
||

6 | returns(y : int;); |
||

7 | let |
||

8 | y = if x then |
||

9 | 1 |
||

10 | else 0; |
||

11 | tel |
||

12 | |||

13 | (* |
||

14 | Original block name: CompareTo3_PP/CompareToZero |
||

15 | *) |
||

16 | node CompareToZero_166_002(u_1 : real; |
||

17 | __time_step : real; |
||

18 | __nb_step : int;) |
||

19 | returns(y_1 : bool;); |
||

20 | var Compare_1 : bool; |
||

21 | Constant_1 : real; |
||

22 | let |
||

23 | Compare_1 = (u_1 <= Constant_1); |
||

24 | Constant_1 = 0.000000000000000; |
||

25 | y_1 = Compare_1; |
||

26 | tel |
||

27 | |||

28 | (* |
||

29 | Original block name: CompareTo3_PP/CompareToZero1 |
||

30 | *) |
||

31 | node CompareToZero1_167_002(u_1 : int; |
||

32 | __time_step : real; |
||

33 | __nb_step : int;) |
||

34 | returns(y_1 : bool;); |
||

35 | var Compare_1 : bool; |
||

36 | Constant_1 : int; |
||

37 | let |
||

38 | Compare_1 = (u_1 <= Constant_1); |
||

39 | Constant_1 = 0; |
||

40 | y_1 = Compare_1; |
||

41 | tel |
||

42 | |||

43 | (* |
||

44 | Original block name: CompareTo3_PP/CompareToZero2 |
||

45 | *) |
||

46 | node CompareToZero2_168_002(u_1 : bool; |
||

47 | __time_step : real; |
||

48 | __nb_step : int;) |
||

49 | returns(y_1 : bool;); |
||

50 | var Compare_1 : bool; |
||

51 | Constant_1 : bool; |
||

52 | let |
||

53 | Compare_1 = (bool_to_int(u_1) <= bool_to_int(Constant_1)); |
||

54 | Constant_1 = false; |
||

55 | y_1 = Compare_1; |
||

56 | tel |
||

57 | |||

58 | (* |
||

59 | Original block name: CompareTo3_PP/CompareToZero3 |
||

60 | *) |
||

61 | node CompareToZero3_169_003(u_1 : real; |
||

62 | u_2 : real; |
||

63 | u_3 : real; |
||

64 | __time_step : real; |
||

65 | __nb_step : int;) |
||

66 | returns(y_1 : bool; |
||

67 | y_2 : bool; |
||

68 | y_3 : bool;); |
||

69 | var Compare_1 : bool; |
||

70 | Compare_2 : bool; |
||

71 | Compare_3 : bool; |
||

72 | Constant_1 : real; |
||

73 | let |
||

74 | Compare_1 = (u_1 <= Constant_1); |
||

75 | Compare_2 = (u_2 <= Constant_1); |
||

76 | Compare_3 = (u_3 <= Constant_1); |
||

77 | Constant_1 = 0.000000000000000; |
||

78 | y_1 = Compare_1; |
||

79 | y_2 = Compare_2; |
||

80 | y_3 = Compare_3; |
||

81 | tel |
||

82 | |||

83 | (* |
||

84 | Original block name: CompareTo3_PP/CompareToZero4 |
||

85 | *) |
||

86 | node CompareToZero4_170_002(u_1 : int; |
||

87 | u_2 : int; |
||

88 | u_3 : int; |
||

89 | __time_step : real; |
||

90 | __nb_step : int;) |
||

91 | returns(y_1 : bool; |
||

92 | y_2 : bool; |
||

93 | y_3 : bool;); |
||

94 | var Compare_1 : bool; |
||

95 | Compare_2 : bool; |
||

96 | Compare_3 : bool; |
||

97 | Constant_1 : int; |
||

98 | let |
||

99 | Compare_1 = (u_1 <= Constant_1); |
||

100 | Compare_2 = (u_2 <= Constant_1); |
||

101 | Compare_3 = (u_3 <= Constant_1); |
||

102 | Constant_1 = 0; |
||

103 | y_1 = Compare_1; |
||

104 | y_2 = Compare_2; |
||

105 | y_3 = Compare_3; |
||

106 | tel |
||

107 | |||

108 | (* |
||

109 | Original block name: CompareTo3_PP/CompareToZero5 |
||

110 | *) |
||

111 | node CompareToZero5_171_002(u_1 : bool; |
||

112 | u_2 : bool; |
||

113 | u_3 : bool; |
||

114 | __time_step : real; |
||

115 | __nb_step : int;) |
||

116 | returns(y_1 : bool; |
||

117 | y_2 : bool; |
||

118 | y_3 : bool;); |
||

119 | var Compare_1 : bool; |
||

120 | Compare_2 : bool; |
||

121 | Compare_3 : bool; |
||

122 | Constant_1 : bool; |
||

123 | let |
||

124 | Compare_1 = (bool_to_int(u_1) <= bool_to_int(Constant_1)); |
||

125 | Compare_2 = (bool_to_int(u_2) <= bool_to_int(Constant_1)); |
||

126 | Compare_3 = (bool_to_int(u_3) <= bool_to_int(Constant_1)); |
||

127 | Constant_1 = false; |
||

128 | y_1 = Compare_1; |
||

129 | y_2 = Compare_2; |
||

130 | y_3 = Compare_3; |
||

131 | tel |
||

132 | |||

133 | (* |
||

134 | Original block name: CompareTo3_PP/CompareToZero6 |
||

135 | *) |
||

136 | node CompareToZero6_172_002(u_1 : real; |
||

137 | u_2 : real; |
||

138 | u_3 : real; |
||

139 | u_4 : real; |
||

140 | u_5 : real; |
||

141 | u_6 : real; |
||

142 | __time_step : real; |
||

143 | __nb_step : int;) |
||

144 | returns(y_1 : bool; |
||

145 | y_2 : bool; |
||

146 | y_3 : bool; |
||

147 | y_4 : bool; |
||

148 | y_5 : bool; |
||

149 | y_6 : bool;); |
||

150 | var Compare_1 : bool; |
||

151 | Compare_2 : bool; |
||

152 | Compare_3 : bool; |
||

153 | Compare_4 : bool; |
||

154 | Compare_5 : bool; |
||

155 | Compare_6 : bool; |
||

156 | Constant_1 : real; |
||

157 | let |
||

158 | Compare_1 = (u_1 <= Constant_1); |
||

159 | Compare_2 = (u_2 <= Constant_1); |
||

160 | Compare_3 = (u_3 <= Constant_1); |
||

161 | Compare_4 = (u_4 <= Constant_1); |
||

162 | Compare_5 = (u_5 <= Constant_1); |
||

163 | Compare_6 = (u_6 <= Constant_1); |
||

164 | Constant_1 = 0.000000000000000; |
||

165 | y_1 = Compare_1; |
||

166 | y_2 = Compare_2; |
||

167 | y_3 = Compare_3; |
||

168 | y_4 = Compare_4; |
||

169 | y_5 = Compare_5; |
||

170 | y_6 = Compare_6; |
||

171 | tel |
||

172 | |||

173 | (* |
||

174 | Original block name: CompareTo3_PP/CompareToZero7 |
||

175 | *) |
||

176 | node CompareToZero7_173_002(u_1 : int; |
||

177 | u_2 : int; |
||

178 | u_3 : int; |
||

179 | u_4 : int; |
||

180 | u_5 : int; |
||

181 | u_6 : int; |
||

182 | __time_step : real; |
||

183 | __nb_step : int;) |
||

184 | returns(y_1 : bool; |
||

185 | y_2 : bool; |
||

186 | y_3 : bool; |
||

187 | y_4 : bool; |
||

188 | y_5 : bool; |
||

189 | y_6 : bool;); |
||

190 | var Compare_1 : bool; |
||

191 | Compare_2 : bool; |
||

192 | Compare_3 : bool; |
||

193 | Compare_4 : bool; |
||

194 | Compare_5 : bool; |
||

195 | Compare_6 : bool; |
||

196 | Constant_1 : int; |
||

197 | let |
||

198 | Compare_1 = (u_1 <= Constant_1); |
||

199 | Compare_2 = (u_2 <= Constant_1); |
||

200 | Compare_3 = (u_3 <= Constant_1); |
||

201 | Compare_4 = (u_4 <= Constant_1); |
||

202 | Compare_5 = (u_5 <= Constant_1); |
||

203 | Compare_6 = (u_6 <= Constant_1); |
||

204 | Constant_1 = 0; |
||

205 | y_1 = Compare_1; |
||

206 | y_2 = Compare_2; |
||

207 | y_3 = Compare_3; |
||

208 | y_4 = Compare_4; |
||

209 | y_5 = Compare_5; |
||

210 | y_6 = Compare_6; |
||

211 | tel |
||

212 | |||

213 | (* |
||

214 | Original block name: CompareTo3_PP/CompareToZero8 |
||

215 | *) |
||

216 | node CompareToZero8_174_002(u_1 : bool; |
||

217 | u_2 : bool; |
||

218 | u_3 : bool; |
||

219 | u_4 : bool; |
||

220 | u_5 : bool; |
||

221 | u_6 : bool; |
||

222 | __time_step : real; |
||

223 | __nb_step : int;) |
||

224 | returns(y_1 : bool; |
||

225 | y_2 : bool; |
||

226 | y_3 : bool; |
||

227 | y_4 : bool; |
||

228 | y_5 : bool; |
||

229 | y_6 : bool;); |
||

230 | var Compare_1 : bool; |
||

231 | Compare_2 : bool; |
||

232 | Compare_3 : bool; |
||

233 | Compare_4 : bool; |
||

234 | Compare_5 : bool; |
||

235 | Compare_6 : bool; |
||

236 | Constant_1 : bool; |
||

237 | let |
||

238 | Compare_1 = (bool_to_int(u_1) <= bool_to_int(Constant_1)); |
||

239 | Compare_2 = (bool_to_int(u_2) <= bool_to_int(Constant_1)); |
||

240 | Compare_3 = (bool_to_int(u_3) <= bool_to_int(Constant_1)); |
||

241 | Compare_4 = (bool_to_int(u_4) <= bool_to_int(Constant_1)); |
||

242 | Compare_5 = (bool_to_int(u_5) <= bool_to_int(Constant_1)); |
||

243 | Compare_6 = (bool_to_int(u_6) <= bool_to_int(Constant_1)); |
||

244 | Constant_1 = false; |
||

245 | y_1 = Compare_1; |
||

246 | y_2 = Compare_2; |
||

247 | y_3 = Compare_3; |
||

248 | y_4 = Compare_4; |
||

249 | y_5 = Compare_5; |
||

250 | y_6 = Compare_6; |
||

251 | tel |
||

252 | |||

253 | (* |
||

254 | Original block name: CompareTo3_PP |
||

255 | *) |
||

256 | node CompareTo3_PP(In1_1 : real; |
||

257 | In2_1 : int; |
||

258 | In3_1 : bool; |
||

259 | In4_1 : real; |
||

260 | In4_2 : real; |
||

261 | In4_3 : real; |
||

262 | In5_1 : int; |
||

263 | In5_2 : int; |
||

264 | In5_3 : int; |
||

265 | In6_1 : bool; |
||

266 | In6_2 : bool; |
||

267 | In6_3 : bool; |
||

268 | In7_1 : real; |
||

269 | In7_2 : real; |
||

270 | In7_3 : real; |
||

271 | In7_4 : real; |
||

272 | In7_5 : real; |
||

273 | In7_6 : real; |
||

274 | In8_1 : int; |
||

275 | In8_2 : int; |
||

276 | In8_3 : int; |
||

277 | In8_4 : int; |
||

278 | In8_5 : int; |
||

279 | In8_6 : int; |
||

280 | In9_1 : bool; |
||

281 | In9_2 : bool; |
||

282 | In9_3 : bool; |
||

283 | In9_4 : bool; |
||

284 | In9_5 : bool; |
||

285 | In9_6 : bool;) |
||

286 | returns(Out1_1 : bool; |
||

287 | Out2_1 : bool; |
||

288 | Out3_1 : bool; |
||

289 | Out4_1 : bool; |
||

290 | Out4_2 : bool; |
||

291 | Out4_3 : bool; |
||

292 | Out5_1 : bool; |
||

293 | Out5_2 : bool; |
||

294 | Out5_3 : bool; |
||

295 | Out6_1 : bool; |
||

296 | Out6_2 : bool; |
||

297 | Out6_3 : bool; |
||

298 | Out7_1 : bool; |
||

299 | Out7_2 : bool; |
||

300 | Out7_3 : bool; |
||

301 | Out7_4 : bool; |
||

302 | Out7_5 : bool; |
||

303 | Out7_6 : bool; |
||

304 | Out8_1 : bool; |
||

305 | Out8_2 : bool; |
||

306 | Out8_3 : bool; |
||

307 | Out8_4 : bool; |
||

308 | Out8_5 : bool; |
||

309 | Out8_6 : bool; |
||

310 | Out9_1 : bool; |
||

311 | Out9_2 : bool; |
||

312 | Out9_3 : bool; |
||

313 | Out9_4 : bool; |
||

314 | Out9_5 : bool; |
||

315 | Out9_6 : bool;); |
||

316 | var CompareToZero_1 : bool; |
||

317 | CompareToZero1_1 : bool; |
||

318 | CompareToZero2_1 : bool; |
||

319 | CompareToZero3_1 : bool; |
||

320 | CompareToZero3_2 : bool; |
||

321 | CompareToZero3_3 : bool; |
||

322 | CompareToZero4_1 : bool; |
||

323 | CompareToZero4_2 : bool; |
||

324 | CompareToZero4_3 : bool; |
||

325 | CompareToZero5_1 : bool; |
||

326 | CompareToZero5_2 : bool; |
||

327 | CompareToZero5_3 : bool; |
||

328 | CompareToZero6_1 : bool; |
||

329 | CompareToZero6_2 : bool; |
||

330 | CompareToZero6_3 : bool; |
||

331 | CompareToZero6_4 : bool; |
||

332 | CompareToZero6_5 : bool; |
||

333 | CompareToZero6_6 : bool; |
||

334 | CompareToZero7_1 : bool; |
||

335 | CompareToZero7_2 : bool; |
||

336 | CompareToZero7_3 : bool; |
||

337 | CompareToZero7_4 : bool; |
||

338 | CompareToZero7_5 : bool; |
||

339 | CompareToZero7_6 : bool; |
||

340 | CompareToZero8_1 : bool; |
||

341 | CompareToZero8_2 : bool; |
||

342 | CompareToZero8_3 : bool; |
||

343 | CompareToZero8_4 : bool; |
||

344 | CompareToZero8_5 : bool; |
||

345 | CompareToZero8_6 : bool; |
||

346 | __time_step : real; |
||

347 | __nb_step : int; |
||

348 | let |
||

349 | CompareToZero_1 = CompareToZero_166_002(In1_1, __time_step, __nb_step); |
||

350 | CompareToZero1_1 = CompareToZero1_167_002(In2_1, __time_step, __nb_step); |
||

351 | CompareToZero2_1 = CompareToZero2_168_002(In3_1, __time_step, __nb_step); |
||

352 | (CompareToZero3_1, CompareToZero3_2, CompareToZero3_3) = CompareToZero3_169_003(In4_1, In4_2, In4_3, __time_step, __nb_step); |
||

353 | (CompareToZero4_1, CompareToZero4_2, CompareToZero4_3) = CompareToZero4_170_002(In5_1, In5_2, In5_3, __time_step, __nb_step); |
||

354 | (CompareToZero5_1, CompareToZero5_2, CompareToZero5_3) = CompareToZero5_171_002(In6_1, In6_2, In6_3, __time_step, __nb_step); |
||

355 | (CompareToZero6_1, CompareToZero6_2, CompareToZero6_3, CompareToZero6_4, CompareToZero6_5, CompareToZero6_6) = CompareToZero6_172_002(In7_1, In7_2, In7_3, In7_4, In7_5, In7_6, __time_step, __nb_step); |
||

356 | (CompareToZero7_1, CompareToZero7_2, CompareToZero7_3, CompareToZero7_4, CompareToZero7_5, CompareToZero7_6) = CompareToZero7_173_002(In8_1, In8_2, In8_3, In8_4, In8_5, In8_6, __time_step, __nb_step); |
||

357 | (CompareToZero8_1, CompareToZero8_2, CompareToZero8_3, CompareToZero8_4, CompareToZero8_5, CompareToZero8_6) = CompareToZero8_174_002(In9_1, In9_2, In9_3, In9_4, In9_5, In9_6, __time_step, __nb_step); |
||

358 | Out1_1 = CompareToZero_1; |
||

359 | Out2_1 = CompareToZero1_1; |
||

360 | Out3_1 = CompareToZero2_1; |
||

361 | Out4_1 = CompareToZero3_1; |
||

362 | Out4_2 = CompareToZero3_2; |
||

363 | Out4_3 = CompareToZero3_3; |
||

364 | Out5_1 = CompareToZero4_1; |
||

365 | Out5_2 = CompareToZero4_2; |
||

366 | Out5_3 = CompareToZero4_3; |
||

367 | Out6_1 = CompareToZero5_1; |
||

368 | Out6_2 = CompareToZero5_2; |
||

369 | Out6_3 = CompareToZero5_3; |
||

370 | Out7_1 = CompareToZero6_1; |
||

371 | Out7_2 = CompareToZero6_2; |
||

372 | Out7_3 = CompareToZero6_3; |
||

373 | Out7_4 = CompareToZero6_4; |
||

374 | Out7_5 = CompareToZero6_5; |
||

375 | Out7_6 = CompareToZero6_6; |
||

376 | Out8_1 = CompareToZero7_1; |
||

377 | Out8_2 = CompareToZero7_2; |
||

378 | Out8_3 = CompareToZero7_3; |
||

379 | Out8_4 = CompareToZero7_4; |
||

380 | Out8_5 = CompareToZero7_5; |
||

381 | Out8_6 = CompareToZero7_6; |
||

382 | Out9_1 = CompareToZero8_1; |
||

383 | Out9_2 = CompareToZero8_2; |
||

384 | Out9_3 = CompareToZero8_3; |
||

385 | Out9_4 = CompareToZero8_4; |
||

386 | Out9_5 = CompareToZero8_5; |
||

387 | Out9_6 = CompareToZero8_6; |
||

388 | __time_step = (0.0 -> ((pre __time_step) + 0.200000000000000)); |
||

389 | __nb_step = (0 -> ((pre __nb_step) + 1)); |
||

390 | tel |