AssignmentAsExpression.c 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894
  1. #include <stdlib.h>
  2. #include <string.h>
  3. #include "sc_types.h"
  4. #include "AssignmentAsExpression.h"
  5. /*! \file Implementation of the state machine 'AssignmentAsExpression'
  6. */
  7. /* prototypes of all internal functions */
  8. static sc_boolean assignmentAsExpression_check_main_region_Add_tr0_tr0(const AssignmentAsExpression* handle);
  9. static sc_boolean assignmentAsExpression_check_main_region_Multiply_tr0_tr0(const AssignmentAsExpression* handle);
  10. static sc_boolean assignmentAsExpression_check_main_region_Divide_tr0_tr0(const AssignmentAsExpression* handle);
  11. static sc_boolean assignmentAsExpression_check_main_region_Modulo_tr0_tr0(const AssignmentAsExpression* handle);
  12. static sc_boolean assignmentAsExpression_check_main_region_Shift_tr0_tr0(const AssignmentAsExpression* handle);
  13. static sc_boolean assignmentAsExpression_check_main_region_boolean_And_tr0_tr0(const AssignmentAsExpression* handle);
  14. static sc_boolean assignmentAsExpression_check_main_region_boolean_Or_tr0_tr0(const AssignmentAsExpression* handle);
  15. static sc_boolean assignmentAsExpression_check_main_region_Subtract_tr0_tr0(const AssignmentAsExpression* handle);
  16. static void assignmentAsExpression_effect_main_region_Add_tr0(AssignmentAsExpression* handle);
  17. static void assignmentAsExpression_effect_main_region_Multiply_tr0(AssignmentAsExpression* handle);
  18. static void assignmentAsExpression_effect_main_region_Divide_tr0(AssignmentAsExpression* handle);
  19. static void assignmentAsExpression_effect_main_region_Modulo_tr0(AssignmentAsExpression* handle);
  20. static void assignmentAsExpression_effect_main_region_Shift_tr0(AssignmentAsExpression* handle);
  21. static void assignmentAsExpression_effect_main_region_boolean_And_tr0(AssignmentAsExpression* handle);
  22. static void assignmentAsExpression_effect_main_region_boolean_Or_tr0(AssignmentAsExpression* handle);
  23. static void assignmentAsExpression_effect_main_region_Subtract_tr0(AssignmentAsExpression* handle);
  24. static void assignmentAsExpression_enact_main_region_Add(AssignmentAsExpression* handle);
  25. static void assignmentAsExpression_enact_main_region_Multiply(AssignmentAsExpression* handle);
  26. static void assignmentAsExpression_enact_main_region_Divide(AssignmentAsExpression* handle);
  27. static void assignmentAsExpression_enact_main_region_Modulo(AssignmentAsExpression* handle);
  28. static void assignmentAsExpression_enact_main_region_Shift(AssignmentAsExpression* handle);
  29. static void assignmentAsExpression_enact_main_region_boolean_And(AssignmentAsExpression* handle);
  30. static void assignmentAsExpression_enact_main_region_boolean_Or(AssignmentAsExpression* handle);
  31. static void assignmentAsExpression_enact_main_region_boolean_Xor(AssignmentAsExpression* handle);
  32. static void assignmentAsExpression_enact_main_region_Subtract(AssignmentAsExpression* handle);
  33. static void assignmentAsExpression_enseq_main_region_Add_default(AssignmentAsExpression* handle);
  34. static void assignmentAsExpression_enseq_main_region_Multiply_default(AssignmentAsExpression* handle);
  35. static void assignmentAsExpression_enseq_main_region_Divide_default(AssignmentAsExpression* handle);
  36. static void assignmentAsExpression_enseq_main_region_Modulo_default(AssignmentAsExpression* handle);
  37. static void assignmentAsExpression_enseq_main_region_Shift_default(AssignmentAsExpression* handle);
  38. static void assignmentAsExpression_enseq_main_region_boolean_And_default(AssignmentAsExpression* handle);
  39. static void assignmentAsExpression_enseq_main_region_boolean_Or_default(AssignmentAsExpression* handle);
  40. static void assignmentAsExpression_enseq_main_region_boolean_Xor_default(AssignmentAsExpression* handle);
  41. static void assignmentAsExpression_enseq_main_region_Subtract_default(AssignmentAsExpression* handle);
  42. static void assignmentAsExpression_enseq_main_region_default(AssignmentAsExpression* handle);
  43. static void assignmentAsExpression_exseq_main_region_Add(AssignmentAsExpression* handle);
  44. static void assignmentAsExpression_exseq_main_region_Multiply(AssignmentAsExpression* handle);
  45. static void assignmentAsExpression_exseq_main_region_Divide(AssignmentAsExpression* handle);
  46. static void assignmentAsExpression_exseq_main_region_Modulo(AssignmentAsExpression* handle);
  47. static void assignmentAsExpression_exseq_main_region_Shift(AssignmentAsExpression* handle);
  48. static void assignmentAsExpression_exseq_main_region_boolean_And(AssignmentAsExpression* handle);
  49. static void assignmentAsExpression_exseq_main_region_boolean_Or(AssignmentAsExpression* handle);
  50. static void assignmentAsExpression_exseq_main_region_boolean_Xor(AssignmentAsExpression* handle);
  51. static void assignmentAsExpression_exseq_main_region_Subtract(AssignmentAsExpression* handle);
  52. static void assignmentAsExpression_exseq_main_region(AssignmentAsExpression* handle);
  53. static void assignmentAsExpression_react_main_region_Add(AssignmentAsExpression* handle);
  54. static void assignmentAsExpression_react_main_region_Multiply(AssignmentAsExpression* handle);
  55. static void assignmentAsExpression_react_main_region_Divide(AssignmentAsExpression* handle);
  56. static void assignmentAsExpression_react_main_region_Modulo(AssignmentAsExpression* handle);
  57. static void assignmentAsExpression_react_main_region_Shift(AssignmentAsExpression* handle);
  58. static void assignmentAsExpression_react_main_region_boolean_And(AssignmentAsExpression* handle);
  59. static void assignmentAsExpression_react_main_region_boolean_Or(AssignmentAsExpression* handle);
  60. static void assignmentAsExpression_react_main_region_boolean_Xor(AssignmentAsExpression* handle);
  61. static void assignmentAsExpression_react_main_region_Subtract(AssignmentAsExpression* handle);
  62. static void assignmentAsExpression_react_main_region__entry_Default(AssignmentAsExpression* handle);
  63. static void assignmentAsExpression_clearInEvents(AssignmentAsExpression* handle);
  64. static void assignmentAsExpression_clearOutEvents(AssignmentAsExpression* handle);
  65. void assignmentAsExpression_init(AssignmentAsExpression* handle)
  66. {
  67. sc_integer i;
  68. for (i = 0; i < ASSIGNMENTASEXPRESSION_MAX_ORTHOGONAL_STATES; ++i)
  69. {
  70. handle->stateConfVector[i] = AssignmentAsExpression_last_state;
  71. }
  72. handle->stateConfVectorPosition = 0;
  73. assignmentAsExpression_clearInEvents(handle);
  74. assignmentAsExpression_clearOutEvents(handle);
  75. /* Default init sequence for statechart AssignmentAsExpression */
  76. handle->iface.a = 0;
  77. handle->iface.b = 0;
  78. handle->iface.c = 0;
  79. handle->iface.d = 0;
  80. handle->iface.e = 1;
  81. handle->iface.f = 1;
  82. handle->iface.g = 4;
  83. handle->iface.h = 32;
  84. handle->iface.i = 7;
  85. handle->iface.i1 = 7;
  86. handle->iface.j = 8;
  87. handle->iface.j1 = 2;
  88. handle->iface.k = 8;
  89. handle->iface.k1 = 4;
  90. handle->iface.l = 3;
  91. handle->iface.m = 7;
  92. handle->iface.n = 5;
  93. handle->iface.p = 0;
  94. handle->iface.r = 7;
  95. handle->iface.t = 10;
  96. handle->iface.u = 6;
  97. handle->iface.v = 13;
  98. handle->iface.w = 7;
  99. }
  100. void assignmentAsExpression_enter(AssignmentAsExpression* handle)
  101. {
  102. /* Default enter sequence for statechart AssignmentAsExpression */
  103. assignmentAsExpression_enseq_main_region_default(handle);
  104. }
  105. void assignmentAsExpression_exit(AssignmentAsExpression* handle)
  106. {
  107. /* Default exit sequence for statechart AssignmentAsExpression */
  108. assignmentAsExpression_exseq_main_region(handle);
  109. }
  110. sc_boolean assignmentAsExpression_isActive(const AssignmentAsExpression* handle)
  111. {
  112. sc_boolean result;
  113. if (handle->stateConfVector[0] != AssignmentAsExpression_last_state)
  114. {
  115. result = bool_true;
  116. }
  117. else
  118. {
  119. result = bool_false;
  120. }
  121. return result;
  122. }
  123. /*
  124. * Always returns 'false' since this state machine can never become final.
  125. */
  126. sc_boolean assignmentAsExpression_isFinal(const AssignmentAsExpression* handle)
  127. {
  128. return bool_false;
  129. }
  130. static void assignmentAsExpression_clearInEvents(AssignmentAsExpression* handle)
  131. {
  132. }
  133. static void assignmentAsExpression_clearOutEvents(AssignmentAsExpression* handle)
  134. {
  135. }
  136. void assignmentAsExpression_runCycle(AssignmentAsExpression* handle)
  137. {
  138. assignmentAsExpression_clearOutEvents(handle);
  139. for (handle->stateConfVectorPosition = 0;
  140. handle->stateConfVectorPosition < ASSIGNMENTASEXPRESSION_MAX_ORTHOGONAL_STATES;
  141. handle->stateConfVectorPosition++)
  142. {
  143. switch (handle->stateConfVector[handle->stateConfVectorPosition])
  144. {
  145. case AssignmentAsExpression_main_region_Add :
  146. {
  147. assignmentAsExpression_react_main_region_Add(handle);
  148. break;
  149. }
  150. case AssignmentAsExpression_main_region_Multiply :
  151. {
  152. assignmentAsExpression_react_main_region_Multiply(handle);
  153. break;
  154. }
  155. case AssignmentAsExpression_main_region_Divide :
  156. {
  157. assignmentAsExpression_react_main_region_Divide(handle);
  158. break;
  159. }
  160. case AssignmentAsExpression_main_region_Modulo :
  161. {
  162. assignmentAsExpression_react_main_region_Modulo(handle);
  163. break;
  164. }
  165. case AssignmentAsExpression_main_region_Shift :
  166. {
  167. assignmentAsExpression_react_main_region_Shift(handle);
  168. break;
  169. }
  170. case AssignmentAsExpression_main_region_boolean_And :
  171. {
  172. assignmentAsExpression_react_main_region_boolean_And(handle);
  173. break;
  174. }
  175. case AssignmentAsExpression_main_region_boolean_Or :
  176. {
  177. assignmentAsExpression_react_main_region_boolean_Or(handle);
  178. break;
  179. }
  180. case AssignmentAsExpression_main_region_boolean_Xor :
  181. {
  182. assignmentAsExpression_react_main_region_boolean_Xor(handle);
  183. break;
  184. }
  185. case AssignmentAsExpression_main_region_Subtract :
  186. {
  187. assignmentAsExpression_react_main_region_Subtract(handle);
  188. break;
  189. }
  190. default:
  191. break;
  192. }
  193. }
  194. assignmentAsExpression_clearInEvents(handle);
  195. }
  196. sc_boolean assignmentAsExpression_isStateActive(const AssignmentAsExpression* handle, AssignmentAsExpressionStates state)
  197. {
  198. sc_boolean result = bool_false;
  199. switch (state)
  200. {
  201. case AssignmentAsExpression_main_region_Add :
  202. result = (sc_boolean) (handle->stateConfVector[0] == AssignmentAsExpression_main_region_Add
  203. );
  204. break;
  205. case AssignmentAsExpression_main_region_Multiply :
  206. result = (sc_boolean) (handle->stateConfVector[0] == AssignmentAsExpression_main_region_Multiply
  207. );
  208. break;
  209. case AssignmentAsExpression_main_region_Divide :
  210. result = (sc_boolean) (handle->stateConfVector[0] == AssignmentAsExpression_main_region_Divide
  211. );
  212. break;
  213. case AssignmentAsExpression_main_region_Modulo :
  214. result = (sc_boolean) (handle->stateConfVector[0] == AssignmentAsExpression_main_region_Modulo
  215. );
  216. break;
  217. case AssignmentAsExpression_main_region_Shift :
  218. result = (sc_boolean) (handle->stateConfVector[0] == AssignmentAsExpression_main_region_Shift
  219. );
  220. break;
  221. case AssignmentAsExpression_main_region_boolean_And :
  222. result = (sc_boolean) (handle->stateConfVector[0] == AssignmentAsExpression_main_region_boolean_And
  223. );
  224. break;
  225. case AssignmentAsExpression_main_region_boolean_Or :
  226. result = (sc_boolean) (handle->stateConfVector[0] == AssignmentAsExpression_main_region_boolean_Or
  227. );
  228. break;
  229. case AssignmentAsExpression_main_region_boolean_Xor :
  230. result = (sc_boolean) (handle->stateConfVector[0] == AssignmentAsExpression_main_region_boolean_Xor
  231. );
  232. break;
  233. case AssignmentAsExpression_main_region_Subtract :
  234. result = (sc_boolean) (handle->stateConfVector[0] == AssignmentAsExpression_main_region_Subtract
  235. );
  236. break;
  237. default:
  238. result = bool_false;
  239. break;
  240. }
  241. return result;
  242. }
  243. sc_integer assignmentAsExpressionIface_get_a(const AssignmentAsExpression* handle)
  244. {
  245. return handle->iface.a;
  246. }
  247. void assignmentAsExpressionIface_set_a(AssignmentAsExpression* handle, sc_integer value)
  248. {
  249. handle->iface.a = value;
  250. }
  251. sc_integer assignmentAsExpressionIface_get_b(const AssignmentAsExpression* handle)
  252. {
  253. return handle->iface.b;
  254. }
  255. void assignmentAsExpressionIface_set_b(AssignmentAsExpression* handle, sc_integer value)
  256. {
  257. handle->iface.b = value;
  258. }
  259. sc_integer assignmentAsExpressionIface_get_c(const AssignmentAsExpression* handle)
  260. {
  261. return handle->iface.c;
  262. }
  263. void assignmentAsExpressionIface_set_c(AssignmentAsExpression* handle, sc_integer value)
  264. {
  265. handle->iface.c = value;
  266. }
  267. sc_integer assignmentAsExpressionIface_get_d(const AssignmentAsExpression* handle)
  268. {
  269. return handle->iface.d;
  270. }
  271. void assignmentAsExpressionIface_set_d(AssignmentAsExpression* handle, sc_integer value)
  272. {
  273. handle->iface.d = value;
  274. }
  275. sc_integer assignmentAsExpressionIface_get_e(const AssignmentAsExpression* handle)
  276. {
  277. return handle->iface.e;
  278. }
  279. void assignmentAsExpressionIface_set_e(AssignmentAsExpression* handle, sc_integer value)
  280. {
  281. handle->iface.e = value;
  282. }
  283. sc_integer assignmentAsExpressionIface_get_f(const AssignmentAsExpression* handle)
  284. {
  285. return handle->iface.f;
  286. }
  287. void assignmentAsExpressionIface_set_f(AssignmentAsExpression* handle, sc_integer value)
  288. {
  289. handle->iface.f = value;
  290. }
  291. sc_integer assignmentAsExpressionIface_get_g(const AssignmentAsExpression* handle)
  292. {
  293. return handle->iface.g;
  294. }
  295. void assignmentAsExpressionIface_set_g(AssignmentAsExpression* handle, sc_integer value)
  296. {
  297. handle->iface.g = value;
  298. }
  299. sc_integer assignmentAsExpressionIface_get_h(const AssignmentAsExpression* handle)
  300. {
  301. return handle->iface.h;
  302. }
  303. void assignmentAsExpressionIface_set_h(AssignmentAsExpression* handle, sc_integer value)
  304. {
  305. handle->iface.h = value;
  306. }
  307. sc_integer assignmentAsExpressionIface_get_i(const AssignmentAsExpression* handle)
  308. {
  309. return handle->iface.i;
  310. }
  311. void assignmentAsExpressionIface_set_i(AssignmentAsExpression* handle, sc_integer value)
  312. {
  313. handle->iface.i = value;
  314. }
  315. sc_integer assignmentAsExpressionIface_get_i1(const AssignmentAsExpression* handle)
  316. {
  317. return handle->iface.i1;
  318. }
  319. void assignmentAsExpressionIface_set_i1(AssignmentAsExpression* handle, sc_integer value)
  320. {
  321. handle->iface.i1 = value;
  322. }
  323. sc_integer assignmentAsExpressionIface_get_j(const AssignmentAsExpression* handle)
  324. {
  325. return handle->iface.j;
  326. }
  327. void assignmentAsExpressionIface_set_j(AssignmentAsExpression* handle, sc_integer value)
  328. {
  329. handle->iface.j = value;
  330. }
  331. sc_integer assignmentAsExpressionIface_get_j1(const AssignmentAsExpression* handle)
  332. {
  333. return handle->iface.j1;
  334. }
  335. void assignmentAsExpressionIface_set_j1(AssignmentAsExpression* handle, sc_integer value)
  336. {
  337. handle->iface.j1 = value;
  338. }
  339. sc_integer assignmentAsExpressionIface_get_k(const AssignmentAsExpression* handle)
  340. {
  341. return handle->iface.k;
  342. }
  343. void assignmentAsExpressionIface_set_k(AssignmentAsExpression* handle, sc_integer value)
  344. {
  345. handle->iface.k = value;
  346. }
  347. sc_integer assignmentAsExpressionIface_get_k1(const AssignmentAsExpression* handle)
  348. {
  349. return handle->iface.k1;
  350. }
  351. void assignmentAsExpressionIface_set_k1(AssignmentAsExpression* handle, sc_integer value)
  352. {
  353. handle->iface.k1 = value;
  354. }
  355. sc_integer assignmentAsExpressionIface_get_l(const AssignmentAsExpression* handle)
  356. {
  357. return handle->iface.l;
  358. }
  359. void assignmentAsExpressionIface_set_l(AssignmentAsExpression* handle, sc_integer value)
  360. {
  361. handle->iface.l = value;
  362. }
  363. sc_integer assignmentAsExpressionIface_get_m(const AssignmentAsExpression* handle)
  364. {
  365. return handle->iface.m;
  366. }
  367. void assignmentAsExpressionIface_set_m(AssignmentAsExpression* handle, sc_integer value)
  368. {
  369. handle->iface.m = value;
  370. }
  371. sc_integer assignmentAsExpressionIface_get_n(const AssignmentAsExpression* handle)
  372. {
  373. return handle->iface.n;
  374. }
  375. void assignmentAsExpressionIface_set_n(AssignmentAsExpression* handle, sc_integer value)
  376. {
  377. handle->iface.n = value;
  378. }
  379. sc_integer assignmentAsExpressionIface_get_p(const AssignmentAsExpression* handle)
  380. {
  381. return handle->iface.p;
  382. }
  383. void assignmentAsExpressionIface_set_p(AssignmentAsExpression* handle, sc_integer value)
  384. {
  385. handle->iface.p = value;
  386. }
  387. sc_integer assignmentAsExpressionIface_get_r(const AssignmentAsExpression* handle)
  388. {
  389. return handle->iface.r;
  390. }
  391. void assignmentAsExpressionIface_set_r(AssignmentAsExpression* handle, sc_integer value)
  392. {
  393. handle->iface.r = value;
  394. }
  395. sc_integer assignmentAsExpressionIface_get_t(const AssignmentAsExpression* handle)
  396. {
  397. return handle->iface.t;
  398. }
  399. void assignmentAsExpressionIface_set_t(AssignmentAsExpression* handle, sc_integer value)
  400. {
  401. handle->iface.t = value;
  402. }
  403. sc_integer assignmentAsExpressionIface_get_u(const AssignmentAsExpression* handle)
  404. {
  405. return handle->iface.u;
  406. }
  407. void assignmentAsExpressionIface_set_u(AssignmentAsExpression* handle, sc_integer value)
  408. {
  409. handle->iface.u = value;
  410. }
  411. sc_integer assignmentAsExpressionIface_get_v(const AssignmentAsExpression* handle)
  412. {
  413. return handle->iface.v;
  414. }
  415. void assignmentAsExpressionIface_set_v(AssignmentAsExpression* handle, sc_integer value)
  416. {
  417. handle->iface.v = value;
  418. }
  419. sc_integer assignmentAsExpressionIface_get_w(const AssignmentAsExpression* handle)
  420. {
  421. return handle->iface.w;
  422. }
  423. void assignmentAsExpressionIface_set_w(AssignmentAsExpression* handle, sc_integer value)
  424. {
  425. handle->iface.w = value;
  426. }
  427. /* implementations of all internal functions */
  428. static sc_boolean assignmentAsExpression_check_main_region_Add_tr0_tr0(const AssignmentAsExpression* handle)
  429. {
  430. return bool_true;
  431. }
  432. static sc_boolean assignmentAsExpression_check_main_region_Multiply_tr0_tr0(const AssignmentAsExpression* handle)
  433. {
  434. return bool_true;
  435. }
  436. static sc_boolean assignmentAsExpression_check_main_region_Divide_tr0_tr0(const AssignmentAsExpression* handle)
  437. {
  438. return bool_true;
  439. }
  440. static sc_boolean assignmentAsExpression_check_main_region_Modulo_tr0_tr0(const AssignmentAsExpression* handle)
  441. {
  442. return bool_true;
  443. }
  444. static sc_boolean assignmentAsExpression_check_main_region_Shift_tr0_tr0(const AssignmentAsExpression* handle)
  445. {
  446. return bool_true;
  447. }
  448. static sc_boolean assignmentAsExpression_check_main_region_boolean_And_tr0_tr0(const AssignmentAsExpression* handle)
  449. {
  450. return bool_true;
  451. }
  452. static sc_boolean assignmentAsExpression_check_main_region_boolean_Or_tr0_tr0(const AssignmentAsExpression* handle)
  453. {
  454. return bool_true;
  455. }
  456. static sc_boolean assignmentAsExpression_check_main_region_Subtract_tr0_tr0(const AssignmentAsExpression* handle)
  457. {
  458. return bool_true;
  459. }
  460. static void assignmentAsExpression_effect_main_region_Add_tr0(AssignmentAsExpression* handle)
  461. {
  462. assignmentAsExpression_exseq_main_region_Add(handle);
  463. assignmentAsExpression_enseq_main_region_Subtract_default(handle);
  464. }
  465. static void assignmentAsExpression_effect_main_region_Multiply_tr0(AssignmentAsExpression* handle)
  466. {
  467. assignmentAsExpression_exseq_main_region_Multiply(handle);
  468. assignmentAsExpression_enseq_main_region_Divide_default(handle);
  469. }
  470. static void assignmentAsExpression_effect_main_region_Divide_tr0(AssignmentAsExpression* handle)
  471. {
  472. assignmentAsExpression_exseq_main_region_Divide(handle);
  473. assignmentAsExpression_enseq_main_region_Modulo_default(handle);
  474. }
  475. static void assignmentAsExpression_effect_main_region_Modulo_tr0(AssignmentAsExpression* handle)
  476. {
  477. assignmentAsExpression_exseq_main_region_Modulo(handle);
  478. assignmentAsExpression_enseq_main_region_Shift_default(handle);
  479. }
  480. static void assignmentAsExpression_effect_main_region_Shift_tr0(AssignmentAsExpression* handle)
  481. {
  482. assignmentAsExpression_exseq_main_region_Shift(handle);
  483. assignmentAsExpression_enseq_main_region_boolean_And_default(handle);
  484. }
  485. static void assignmentAsExpression_effect_main_region_boolean_And_tr0(AssignmentAsExpression* handle)
  486. {
  487. assignmentAsExpression_exseq_main_region_boolean_And(handle);
  488. assignmentAsExpression_enseq_main_region_boolean_Or_default(handle);
  489. }
  490. static void assignmentAsExpression_effect_main_region_boolean_Or_tr0(AssignmentAsExpression* handle)
  491. {
  492. assignmentAsExpression_exseq_main_region_boolean_Or(handle);
  493. assignmentAsExpression_enseq_main_region_boolean_Xor_default(handle);
  494. }
  495. static void assignmentAsExpression_effect_main_region_Subtract_tr0(AssignmentAsExpression* handle)
  496. {
  497. assignmentAsExpression_exseq_main_region_Subtract(handle);
  498. assignmentAsExpression_enseq_main_region_Multiply_default(handle);
  499. }
  500. /* Entry action for state 'Add'. */
  501. static void assignmentAsExpression_enact_main_region_Add(AssignmentAsExpression* handle)
  502. {
  503. /* Entry action for state 'Add'. */
  504. handle->iface.a = (handle->iface.b = 5) + 4;
  505. }
  506. /* Entry action for state 'Multiply'. */
  507. static void assignmentAsExpression_enact_main_region_Multiply(AssignmentAsExpression* handle)
  508. {
  509. /* Entry action for state 'Multiply'. */
  510. handle->iface.e *= (handle->iface.f *= 5) * 3;
  511. }
  512. /* Entry action for state 'Divide'. */
  513. static void assignmentAsExpression_enact_main_region_Divide(AssignmentAsExpression* handle)
  514. {
  515. /* Entry action for state 'Divide'. */
  516. handle->iface.g /= (handle->iface.h /= 2) / 4;
  517. }
  518. /* Entry action for state 'Modulo'. */
  519. static void assignmentAsExpression_enact_main_region_Modulo(AssignmentAsExpression* handle)
  520. {
  521. /* Entry action for state 'Modulo'. */
  522. handle->iface.i %= (handle->iface.i1 %= 4) % 4;
  523. }
  524. /* Entry action for state 'Shift'. */
  525. static void assignmentAsExpression_enact_main_region_Shift(AssignmentAsExpression* handle)
  526. {
  527. /* Entry action for state 'Shift'. */
  528. handle->iface.j <<= (handle->iface.j1 >>= 1);
  529. handle->iface.k >>= (handle->iface.k1 >>= 2);
  530. }
  531. /* Entry action for state 'boolean And'. */
  532. static void assignmentAsExpression_enact_main_region_boolean_And(AssignmentAsExpression* handle)
  533. {
  534. /* Entry action for state 'boolean And'. */
  535. handle->iface.l &= (handle->iface.n &= handle->iface.m);
  536. }
  537. /* Entry action for state 'boolean Or'. */
  538. static void assignmentAsExpression_enact_main_region_boolean_Or(AssignmentAsExpression* handle)
  539. {
  540. /* Entry action for state 'boolean Or'. */
  541. handle->iface.p |= (handle->iface.r |= handle->iface.t);
  542. }
  543. /* Entry action for state 'boolean Xor'. */
  544. static void assignmentAsExpression_enact_main_region_boolean_Xor(AssignmentAsExpression* handle)
  545. {
  546. /* Entry action for state 'boolean Xor'. */
  547. handle->iface.u ^= (handle->iface.v ^= handle->iface.w);
  548. }
  549. /* Entry action for state 'Subtract'. */
  550. static void assignmentAsExpression_enact_main_region_Subtract(AssignmentAsExpression* handle)
  551. {
  552. /* Entry action for state 'Subtract'. */
  553. handle->iface.d -= (handle->iface.c -= 5) - 1;
  554. }
  555. /* 'default' enter sequence for state Add */
  556. static void assignmentAsExpression_enseq_main_region_Add_default(AssignmentAsExpression* handle)
  557. {
  558. /* 'default' enter sequence for state Add */
  559. assignmentAsExpression_enact_main_region_Add(handle);
  560. handle->stateConfVector[0] = AssignmentAsExpression_main_region_Add;
  561. handle->stateConfVectorPosition = 0;
  562. }
  563. /* 'default' enter sequence for state Multiply */
  564. static void assignmentAsExpression_enseq_main_region_Multiply_default(AssignmentAsExpression* handle)
  565. {
  566. /* 'default' enter sequence for state Multiply */
  567. assignmentAsExpression_enact_main_region_Multiply(handle);
  568. handle->stateConfVector[0] = AssignmentAsExpression_main_region_Multiply;
  569. handle->stateConfVectorPosition = 0;
  570. }
  571. /* 'default' enter sequence for state Divide */
  572. static void assignmentAsExpression_enseq_main_region_Divide_default(AssignmentAsExpression* handle)
  573. {
  574. /* 'default' enter sequence for state Divide */
  575. assignmentAsExpression_enact_main_region_Divide(handle);
  576. handle->stateConfVector[0] = AssignmentAsExpression_main_region_Divide;
  577. handle->stateConfVectorPosition = 0;
  578. }
  579. /* 'default' enter sequence for state Modulo */
  580. static void assignmentAsExpression_enseq_main_region_Modulo_default(AssignmentAsExpression* handle)
  581. {
  582. /* 'default' enter sequence for state Modulo */
  583. assignmentAsExpression_enact_main_region_Modulo(handle);
  584. handle->stateConfVector[0] = AssignmentAsExpression_main_region_Modulo;
  585. handle->stateConfVectorPosition = 0;
  586. }
  587. /* 'default' enter sequence for state Shift */
  588. static void assignmentAsExpression_enseq_main_region_Shift_default(AssignmentAsExpression* handle)
  589. {
  590. /* 'default' enter sequence for state Shift */
  591. assignmentAsExpression_enact_main_region_Shift(handle);
  592. handle->stateConfVector[0] = AssignmentAsExpression_main_region_Shift;
  593. handle->stateConfVectorPosition = 0;
  594. }
  595. /* 'default' enter sequence for state boolean And */
  596. static void assignmentAsExpression_enseq_main_region_boolean_And_default(AssignmentAsExpression* handle)
  597. {
  598. /* 'default' enter sequence for state boolean And */
  599. assignmentAsExpression_enact_main_region_boolean_And(handle);
  600. handle->stateConfVector[0] = AssignmentAsExpression_main_region_boolean_And;
  601. handle->stateConfVectorPosition = 0;
  602. }
  603. /* 'default' enter sequence for state boolean Or */
  604. static void assignmentAsExpression_enseq_main_region_boolean_Or_default(AssignmentAsExpression* handle)
  605. {
  606. /* 'default' enter sequence for state boolean Or */
  607. assignmentAsExpression_enact_main_region_boolean_Or(handle);
  608. handle->stateConfVector[0] = AssignmentAsExpression_main_region_boolean_Or;
  609. handle->stateConfVectorPosition = 0;
  610. }
  611. /* 'default' enter sequence for state boolean Xor */
  612. static void assignmentAsExpression_enseq_main_region_boolean_Xor_default(AssignmentAsExpression* handle)
  613. {
  614. /* 'default' enter sequence for state boolean Xor */
  615. assignmentAsExpression_enact_main_region_boolean_Xor(handle);
  616. handle->stateConfVector[0] = AssignmentAsExpression_main_region_boolean_Xor;
  617. handle->stateConfVectorPosition = 0;
  618. }
  619. /* 'default' enter sequence for state Subtract */
  620. static void assignmentAsExpression_enseq_main_region_Subtract_default(AssignmentAsExpression* handle)
  621. {
  622. /* 'default' enter sequence for state Subtract */
  623. assignmentAsExpression_enact_main_region_Subtract(handle);
  624. handle->stateConfVector[0] = AssignmentAsExpression_main_region_Subtract;
  625. handle->stateConfVectorPosition = 0;
  626. }
  627. /* 'default' enter sequence for region main region */
  628. static void assignmentAsExpression_enseq_main_region_default(AssignmentAsExpression* handle)
  629. {
  630. /* 'default' enter sequence for region main region */
  631. assignmentAsExpression_react_main_region__entry_Default(handle);
  632. }
  633. /* Default exit sequence for state Add */
  634. static void assignmentAsExpression_exseq_main_region_Add(AssignmentAsExpression* handle)
  635. {
  636. /* Default exit sequence for state Add */
  637. handle->stateConfVector[0] = AssignmentAsExpression_last_state;
  638. handle->stateConfVectorPosition = 0;
  639. }
  640. /* Default exit sequence for state Multiply */
  641. static void assignmentAsExpression_exseq_main_region_Multiply(AssignmentAsExpression* handle)
  642. {
  643. /* Default exit sequence for state Multiply */
  644. handle->stateConfVector[0] = AssignmentAsExpression_last_state;
  645. handle->stateConfVectorPosition = 0;
  646. }
  647. /* Default exit sequence for state Divide */
  648. static void assignmentAsExpression_exseq_main_region_Divide(AssignmentAsExpression* handle)
  649. {
  650. /* Default exit sequence for state Divide */
  651. handle->stateConfVector[0] = AssignmentAsExpression_last_state;
  652. handle->stateConfVectorPosition = 0;
  653. }
  654. /* Default exit sequence for state Modulo */
  655. static void assignmentAsExpression_exseq_main_region_Modulo(AssignmentAsExpression* handle)
  656. {
  657. /* Default exit sequence for state Modulo */
  658. handle->stateConfVector[0] = AssignmentAsExpression_last_state;
  659. handle->stateConfVectorPosition = 0;
  660. }
  661. /* Default exit sequence for state Shift */
  662. static void assignmentAsExpression_exseq_main_region_Shift(AssignmentAsExpression* handle)
  663. {
  664. /* Default exit sequence for state Shift */
  665. handle->stateConfVector[0] = AssignmentAsExpression_last_state;
  666. handle->stateConfVectorPosition = 0;
  667. }
  668. /* Default exit sequence for state boolean And */
  669. static void assignmentAsExpression_exseq_main_region_boolean_And(AssignmentAsExpression* handle)
  670. {
  671. /* Default exit sequence for state boolean And */
  672. handle->stateConfVector[0] = AssignmentAsExpression_last_state;
  673. handle->stateConfVectorPosition = 0;
  674. }
  675. /* Default exit sequence for state boolean Or */
  676. static void assignmentAsExpression_exseq_main_region_boolean_Or(AssignmentAsExpression* handle)
  677. {
  678. /* Default exit sequence for state boolean Or */
  679. handle->stateConfVector[0] = AssignmentAsExpression_last_state;
  680. handle->stateConfVectorPosition = 0;
  681. }
  682. /* Default exit sequence for state boolean Xor */
  683. static void assignmentAsExpression_exseq_main_region_boolean_Xor(AssignmentAsExpression* handle)
  684. {
  685. /* Default exit sequence for state boolean Xor */
  686. handle->stateConfVector[0] = AssignmentAsExpression_last_state;
  687. handle->stateConfVectorPosition = 0;
  688. }
  689. /* Default exit sequence for state Subtract */
  690. static void assignmentAsExpression_exseq_main_region_Subtract(AssignmentAsExpression* handle)
  691. {
  692. /* Default exit sequence for state Subtract */
  693. handle->stateConfVector[0] = AssignmentAsExpression_last_state;
  694. handle->stateConfVectorPosition = 0;
  695. }
  696. /* Default exit sequence for region main region */
  697. static void assignmentAsExpression_exseq_main_region(AssignmentAsExpression* handle)
  698. {
  699. /* Default exit sequence for region main region */
  700. /* Handle exit of all possible states (of AssignmentAsExpression.main_region) at position 0... */
  701. switch(handle->stateConfVector[ 0 ])
  702. {
  703. case AssignmentAsExpression_main_region_Add :
  704. {
  705. assignmentAsExpression_exseq_main_region_Add(handle);
  706. break;
  707. }
  708. case AssignmentAsExpression_main_region_Multiply :
  709. {
  710. assignmentAsExpression_exseq_main_region_Multiply(handle);
  711. break;
  712. }
  713. case AssignmentAsExpression_main_region_Divide :
  714. {
  715. assignmentAsExpression_exseq_main_region_Divide(handle);
  716. break;
  717. }
  718. case AssignmentAsExpression_main_region_Modulo :
  719. {
  720. assignmentAsExpression_exseq_main_region_Modulo(handle);
  721. break;
  722. }
  723. case AssignmentAsExpression_main_region_Shift :
  724. {
  725. assignmentAsExpression_exseq_main_region_Shift(handle);
  726. break;
  727. }
  728. case AssignmentAsExpression_main_region_boolean_And :
  729. {
  730. assignmentAsExpression_exseq_main_region_boolean_And(handle);
  731. break;
  732. }
  733. case AssignmentAsExpression_main_region_boolean_Or :
  734. {
  735. assignmentAsExpression_exseq_main_region_boolean_Or(handle);
  736. break;
  737. }
  738. case AssignmentAsExpression_main_region_boolean_Xor :
  739. {
  740. assignmentAsExpression_exseq_main_region_boolean_Xor(handle);
  741. break;
  742. }
  743. case AssignmentAsExpression_main_region_Subtract :
  744. {
  745. assignmentAsExpression_exseq_main_region_Subtract(handle);
  746. break;
  747. }
  748. default: break;
  749. }
  750. }
  751. /* The reactions of state Add. */
  752. static void assignmentAsExpression_react_main_region_Add(AssignmentAsExpression* handle)
  753. {
  754. /* The reactions of state Add. */
  755. assignmentAsExpression_effect_main_region_Add_tr0(handle);
  756. }
  757. /* The reactions of state Multiply. */
  758. static void assignmentAsExpression_react_main_region_Multiply(AssignmentAsExpression* handle)
  759. {
  760. /* The reactions of state Multiply. */
  761. assignmentAsExpression_effect_main_region_Multiply_tr0(handle);
  762. }
  763. /* The reactions of state Divide. */
  764. static void assignmentAsExpression_react_main_region_Divide(AssignmentAsExpression* handle)
  765. {
  766. /* The reactions of state Divide. */
  767. assignmentAsExpression_effect_main_region_Divide_tr0(handle);
  768. }
  769. /* The reactions of state Modulo. */
  770. static void assignmentAsExpression_react_main_region_Modulo(AssignmentAsExpression* handle)
  771. {
  772. /* The reactions of state Modulo. */
  773. assignmentAsExpression_effect_main_region_Modulo_tr0(handle);
  774. }
  775. /* The reactions of state Shift. */
  776. static void assignmentAsExpression_react_main_region_Shift(AssignmentAsExpression* handle)
  777. {
  778. /* The reactions of state Shift. */
  779. assignmentAsExpression_effect_main_region_Shift_tr0(handle);
  780. }
  781. /* The reactions of state boolean And. */
  782. static void assignmentAsExpression_react_main_region_boolean_And(AssignmentAsExpression* handle)
  783. {
  784. /* The reactions of state boolean And. */
  785. assignmentAsExpression_effect_main_region_boolean_And_tr0(handle);
  786. }
  787. /* The reactions of state boolean Or. */
  788. static void assignmentAsExpression_react_main_region_boolean_Or(AssignmentAsExpression* handle)
  789. {
  790. /* The reactions of state boolean Or. */
  791. assignmentAsExpression_effect_main_region_boolean_Or_tr0(handle);
  792. }
  793. /* The reactions of state boolean Xor. */
  794. static void assignmentAsExpression_react_main_region_boolean_Xor(AssignmentAsExpression* handle)
  795. {
  796. /* The reactions of state boolean Xor. */
  797. }
  798. /* The reactions of state Subtract. */
  799. static void assignmentAsExpression_react_main_region_Subtract(AssignmentAsExpression* handle)
  800. {
  801. /* The reactions of state Subtract. */
  802. assignmentAsExpression_effect_main_region_Subtract_tr0(handle);
  803. }
  804. /* Default react sequence for initial entry */
  805. static void assignmentAsExpression_react_main_region__entry_Default(AssignmentAsExpression* handle)
  806. {
  807. /* Default react sequence for initial entry */
  808. assignmentAsExpression_enseq_main_region_Add_default(handle);
  809. }