AssignmentAsExpression.c 32 KB

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