You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2091 lines
31 KiB

  1. {
  2. "jani-version": 1,
  3. "name": "modelName",
  4. "type": "mdp",
  5. "actions": [
  6. {
  7. "name": "put"
  8. },
  9. {
  10. "name": "get"
  11. },
  12. {
  13. "name": "put_k"
  14. },
  15. {
  16. "name": "get_k"
  17. },
  18. {
  19. "name": "put_l"
  20. },
  21. {
  22. "name": "get_l"
  23. },
  24. {
  25. "name": "new_file"
  26. },
  27. {
  28. "name": "s_ok"
  29. },
  30. {
  31. "name": "s_dk"
  32. },
  33. {
  34. "name": "s_nok"
  35. },
  36. {
  37. "name": "s_restart"
  38. },
  39. {
  40. "name": "r_ok"
  41. },
  42. {
  43. "name": "r_inc"
  44. },
  45. {
  46. "name": "r_fst"
  47. },
  48. {
  49. "name": "r_nok"
  50. },
  51. {
  52. "name": "r_timeout"
  53. },
  54. {
  55. "name": "error"
  56. },
  57. {
  58. "name": "tick"
  59. }
  60. ],
  61. "variables": [
  62. {
  63. "name": "ff",
  64. "type": "bool",
  65. "initial-value": false
  66. },
  67. {
  68. "name": "lf",
  69. "type": "bool",
  70. "initial-value": false
  71. },
  72. {
  73. "name": "ab",
  74. "type": "bool",
  75. "initial-value": false
  76. },
  77. {
  78. "name": "i",
  79. "type": {
  80. "kind": "bounded",
  81. "base": "int",
  82. "lower-bound": 0,
  83. "upper-bound": 16
  84. },
  85. "initial-value": 0
  86. },
  87. {
  88. "name": "inTransitK",
  89. "type": "bool",
  90. "initial-value": false
  91. },
  92. {
  93. "name": "inTransitL",
  94. "type": "bool",
  95. "initial-value": false
  96. },
  97. {
  98. "name": "first_file_done",
  99. "type": "bool",
  100. "initial-value": false
  101. },
  102. {
  103. "name": "get_k_seen",
  104. "type": "bool",
  105. "initial-value": false
  106. },
  107. {
  108. "name": "s_ok_seen",
  109. "type": "bool",
  110. "initial-value": false
  111. },
  112. {
  113. "name": "s_nok_seen",
  114. "type": "bool",
  115. "initial-value": false
  116. },
  117. {
  118. "name": "s_dk_seen",
  119. "type": "bool",
  120. "initial-value": false
  121. },
  122. {
  123. "name": "s_restart_seen",
  124. "type": "bool",
  125. "initial-value": false
  126. },
  127. {
  128. "name": "r_ok_seen",
  129. "type": "bool",
  130. "initial-value": false
  131. },
  132. {
  133. "name": "r_timeout_seen",
  134. "type": "bool",
  135. "initial-value": false
  136. },
  137. {
  138. "name": "premature_timeout",
  139. "type": "bool",
  140. "initial-value": false
  141. },
  142. {
  143. "name": "channel_k_overflow",
  144. "type": "bool",
  145. "initial-value": false
  146. },
  147. {
  148. "name": "channel_l_overflow",
  149. "type": "bool",
  150. "initial-value": false
  151. },
  152. {
  153. "name": "Sender_location",
  154. "type": "int",
  155. "initial-value": 0
  156. },
  157. {
  158. "name": "Receiver_location",
  159. "type": "int",
  160. "initial-value": 0
  161. },
  162. {
  163. "name": "ChannelK_location",
  164. "type": "int",
  165. "initial-value": 0
  166. },
  167. {
  168. "name": "ChannelL_location",
  169. "type": "int",
  170. "initial-value": 0
  171. },
  172. {
  173. "name": "Observer_location",
  174. "type": "int",
  175. "initial-value": 0
  176. }
  177. ],
  178. "properties": [
  179. {
  180. "name": "P_A",
  181. "reach": {
  182. "op": "∧",
  183. "args": [
  184. "s_nok_seen",
  185. "r_ok_seen"
  186. ]
  187. },
  188. "type": "probability-max-query"
  189. },
  190. {
  191. "name": "P_B",
  192. "reach": {
  193. "op": "∧",
  194. "args": [
  195. "s_ok_seen",
  196. {
  197. "op": "!",
  198. "args": [
  199. "r_ok_seen"
  200. ]
  201. }
  202. ]
  203. },
  204. "type": "probability-max-query"
  205. },
  206. {
  207. "name": "P_1",
  208. "reach": {
  209. "op": "∨",
  210. "args": [
  211. "s_nok_seen",
  212. "s_dk_seen"
  213. ]
  214. },
  215. "type": "probability-max-query"
  216. },
  217. {
  218. "name": "P_2",
  219. "reach": "s_dk_seen",
  220. "type": "probability-max-query"
  221. },
  222. {
  223. "name": "P_3",
  224. "reach": {
  225. "op": "∧",
  226. "args": [
  227. "s_nok_seen",
  228. {
  229. "op": ">",
  230. "args": [
  231. "i",
  232. 8
  233. ]
  234. }
  235. ]
  236. },
  237. "type": "probability-max-query"
  238. },
  239. {
  240. "name": "P_4",
  241. "reach": {
  242. "op": "∧",
  243. "args": [
  244. {
  245. "op": "∨",
  246. "args": [
  247. {
  248. "op": "∨",
  249. "args": [
  250. "s_ok_seen",
  251. "s_nok_seen"
  252. ]
  253. },
  254. "s_dk_seen"
  255. ]
  256. },
  257. {
  258. "op": "!",
  259. "args": [
  260. "get_k_seen"
  261. ]
  262. }
  263. ]
  264. },
  265. "type": "probability-max-query"
  266. }
  267. ],
  268. "automata": [
  269. {
  270. "name": "Sender",
  271. "variables": [
  272. {
  273. "name": "bit",
  274. "type": "bool",
  275. "initial-value": false
  276. },
  277. {
  278. "name": "rc",
  279. "type": {
  280. "kind": "bounded",
  281. "base": "int",
  282. "lower-bound": 0,
  283. "upper-bound": 2
  284. },
  285. "initial-value": 0
  286. },
  287. {
  288. "name": "c",
  289. "type": {
  290. "kind": "bounded",
  291. "base": "int",
  292. "lower-bound": 0,
  293. "upper-bound": 16
  294. },
  295. "initial-value": 0
  296. }
  297. ],
  298. "locations": [
  299. {
  300. "name": "l_0"
  301. },
  302. {
  303. "name": "l_1"
  304. },
  305. {
  306. "name": "l_2"
  307. },
  308. {
  309. "name": "l_3"
  310. },
  311. {
  312. "name": "l_4"
  313. },
  314. {
  315. "name": "l_5"
  316. },
  317. {
  318. "name": "l_6"
  319. },
  320. {
  321. "name": "l_7"
  322. }
  323. ],
  324. "initial-location": "l_0",
  325. "edges": [
  326. {
  327. "location": "l_0",
  328. "guard": {
  329. "op": "<",
  330. "args": [
  331. "i",
  332. 16
  333. ]
  334. },
  335. "destinations": [
  336. {
  337. "probability": 1,
  338. "location": "l_1",
  339. "assignments": [
  340. {
  341. "ref": "i",
  342. "value": {
  343. "op": "+",
  344. "args": [
  345. "i",
  346. 1
  347. ]
  348. }
  349. },
  350. {
  351. "ref": "Sender_location",
  352. "value": 1
  353. }
  354. ]
  355. }
  356. ]
  357. },
  358. {
  359. "location": "l_0",
  360. "action": "s_ok",
  361. "guard": {
  362. "op": "=",
  363. "args": [
  364. "i",
  365. 16
  366. ]
  367. },
  368. "destinations": [
  369. {
  370. "probability": 1,
  371. "location": "l_2",
  372. "assignments": [
  373. {
  374. "ref": "first_file_done",
  375. "value": true
  376. },
  377. {
  378. "ref": "Sender_location",
  379. "value": 2
  380. },
  381. {
  382. "ref": "c",
  383. "value": 0
  384. }
  385. ]
  386. }
  387. ]
  388. },
  389. {
  390. "location": "l_0",
  391. "action": "tick",
  392. "guard": {
  393. "op": "∧",
  394. "args": [
  395. {
  396. "op": "≥",
  397. "args": [
  398. "i",
  399. 16
  400. ]
  401. },
  402. {
  403. "op": "<",
  404. "args": [
  405. "c",
  406. 0
  407. ]
  408. }
  409. ]
  410. },
  411. "destinations": [
  412. {
  413. "probability": 1,
  414. "location": "l_0",
  415. "assignments": [
  416. {
  417. "ref": "c",
  418. "value": {
  419. "op": "min",
  420. "args": [
  421. {
  422. "op": "+",
  423. "args": [
  424. "c",
  425. 1
  426. ]
  427. },
  428. 16
  429. ]
  430. }
  431. }
  432. ]
  433. }
  434. ]
  435. },
  436. {
  437. "location": "l_1",
  438. "action": "put_k",
  439. "guard": true,
  440. "destinations": [
  441. {
  442. "probability": 1,
  443. "location": "l_3",
  444. "assignments": [
  445. {
  446. "ref": "ff",
  447. "value": {
  448. "op": "=",
  449. "args": [
  450. "i",
  451. 1
  452. ]
  453. }
  454. },
  455. {
  456. "ref": "lf",
  457. "value": {
  458. "op": "=",
  459. "args": [
  460. "i",
  461. 16
  462. ]
  463. }
  464. },
  465. {
  466. "ref": "ab",
  467. "value": "bit"
  468. },
  469. {
  470. "ref": "c",
  471. "value": 0
  472. },
  473. {
  474. "ref": "Sender_location",
  475. "value": 3
  476. }
  477. ]
  478. }
  479. ]
  480. },
  481. {
  482. "location": "l_1",
  483. "action": "tick",
  484. "guard": {
  485. "op": "<",
  486. "args": [
  487. "c",
  488. 0
  489. ]
  490. },
  491. "destinations": [
  492. {
  493. "probability": 1,
  494. "location": "l_1",
  495. "assignments": [
  496. {
  497. "ref": "c",
  498. "value": {
  499. "op": "min",
  500. "args": [
  501. {
  502. "op": "+",
  503. "args": [
  504. "c",
  505. 1
  506. ]
  507. },
  508. 16
  509. ]
  510. }
  511. }
  512. ]
  513. }
  514. ]
  515. },
  516. {
  517. "location": "l_2",
  518. "guard": true,
  519. "destinations": [
  520. {
  521. "probability": 1,
  522. "location": "l_4",
  523. "assignments": [
  524. {
  525. "ref": "Sender_location",
  526. "value": 4
  527. }
  528. ]
  529. }
  530. ]
  531. },
  532. {
  533. "location": "l_3",
  534. "action": "get_l",
  535. "guard": true,
  536. "destinations": [
  537. {
  538. "probability": 1,
  539. "location": "l_5",
  540. "assignments": [
  541. {
  542. "ref": "bit",
  543. "value": {
  544. "op": "!",
  545. "args": [
  546. "bit"
  547. ]
  548. }
  549. },
  550. {
  551. "ref": "rc",
  552. "value": 0
  553. },
  554. {
  555. "ref": "c",
  556. "value": 0
  557. },
  558. {
  559. "ref": "Sender_location",
  560. "value": 5
  561. }
  562. ]
  563. }
  564. ]
  565. },
  566. {
  567. "location": "l_3",
  568. "guard": {
  569. "op": "∧",
  570. "args": [
  571. {
  572. "op": "<",
  573. "args": [
  574. "rc",
  575. 2
  576. ]
  577. },
  578. {
  579. "op": "≥",
  580. "args": [
  581. "c",
  582. 3
  583. ]
  584. }
  585. ]
  586. },
  587. "destinations": [
  588. {
  589. "probability": 1,
  590. "location": "l_1",
  591. "assignments": [
  592. {
  593. "ref": "rc",
  594. "value": {
  595. "op": "+",
  596. "args": [
  597. "rc",
  598. 1
  599. ]
  600. }
  601. },
  602. {
  603. "ref": "c",
  604. "value": 0
  605. },
  606. {
  607. "ref": "Sender_location",
  608. "value": 1
  609. }
  610. ]
  611. }
  612. ]
  613. },
  614. {
  615. "location": "l_3",
  616. "action": "s_nok",
  617. "guard": {
  618. "op": "∧",
  619. "args": [
  620. {
  621. "op": "∧",
  622. "args": [
  623. {
  624. "op": "<",
  625. "args": [
  626. "i",
  627. 16
  628. ]
  629. },
  630. {
  631. "op": "≥",
  632. "args": [
  633. "rc",
  634. 2
  635. ]
  636. }
  637. ]
  638. },
  639. {
  640. "op": "≥",
  641. "args": [
  642. "c",
  643. 3
  644. ]
  645. }
  646. ]
  647. },
  648. "destinations": [
  649. {
  650. "probability": 1,
  651. "location": "l_6",
  652. "assignments": [
  653. {
  654. "ref": "rc",
  655. "value": 0
  656. },
  657. {
  658. "ref": "c",
  659. "value": 0
  660. },
  661. {
  662. "ref": "Sender_location",
  663. "value": 6
  664. }
  665. ]
  666. }
  667. ]
  668. },
  669. {
  670. "location": "l_3",
  671. "action": "s_dk",
  672. "guard": {
  673. "op": "∧",
  674. "args": [
  675. {
  676. "op": "∧",
  677. "args": [
  678. {
  679. "op": "≥",
  680. "args": [
  681. "i",
  682. 16
  683. ]
  684. },
  685. {
  686. "op": "≥",
  687. "args": [
  688. "rc",
  689. 2
  690. ]
  691. }
  692. ]
  693. },
  694. {
  695. "op": "≥",
  696. "args": [
  697. "c",
  698. 3
  699. ]
  700. }
  701. ]
  702. },
  703. "destinations": [
  704. {
  705. "probability": 1,
  706. "location": "l_6",
  707. "assignments": [
  708. {
  709. "ref": "rc",
  710. "value": 0
  711. },
  712. {
  713. "ref": "c",
  714. "value": 0
  715. },
  716. {
  717. "ref": "Sender_location",
  718. "value": 6
  719. }
  720. ]
  721. }
  722. ]
  723. },
  724. {
  725. "location": "l_3",
  726. "action": "tick",
  727. "guard": {
  728. "op": "<",
  729. "args": [
  730. "c",
  731. 3
  732. ]
  733. },
  734. "destinations": [
  735. {
  736. "probability": 1,
  737. "location": "l_3",
  738. "assignments": [
  739. {
  740. "ref": "c",
  741. "value": {
  742. "op": "min",
  743. "args": [
  744. {
  745. "op": "+",
  746. "args": [
  747. "c",
  748. 1
  749. ]
  750. },
  751. 16
  752. ]
  753. }
  754. }
  755. ]
  756. }
  757. ]
  758. },
  759. {
  760. "location": "l_4",
  761. "action": "tick",
  762. "guard": true,
  763. "destinations": [
  764. {
  765. "probability": 1,
  766. "location": "l_4"
  767. }
  768. ]
  769. },
  770. {
  771. "location": "l_5",
  772. "guard": true,
  773. "destinations": [
  774. {
  775. "probability": 1,
  776. "location": "l_0",
  777. "assignments": [
  778. {
  779. "ref": "Sender_location",
  780. "value": 7
  781. }
  782. ]
  783. }
  784. ]
  785. },
  786. {
  787. "location": "l_6",
  788. "guard": true,
  789. "destinations": [
  790. {
  791. "probability": 1,
  792. "location": "l_7",
  793. "assignments": [
  794. {
  795. "ref": "Sender_location",
  796. "value": 8
  797. }
  798. ]
  799. }
  800. ]
  801. },
  802. {
  803. "location": "l_7",
  804. "action": "s_restart",
  805. "guard": {
  806. "op": "≥",
  807. "args": [
  808. "c",
  809. 15
  810. ]
  811. },
  812. "destinations": [
  813. {
  814. "probability": 1,
  815. "location": "l_4",
  816. "assignments": [
  817. {
  818. "ref": "bit",
  819. "value": false
  820. },
  821. {
  822. "ref": "first_file_done",
  823. "value": true
  824. },
  825. {
  826. "ref": "Sender_location",
  827. "value": 4
  828. },
  829. {
  830. "ref": "c",
  831. "value": 0
  832. }
  833. ]
  834. }
  835. ]
  836. },
  837. {
  838. "location": "l_7",
  839. "action": "tick",
  840. "guard": {
  841. "op": "<",
  842. "args": [
  843. "c",
  844. 15
  845. ]
  846. },
  847. "destinations": [
  848. {
  849. "probability": 1,
  850. "location": "l_7",
  851. "assignments": [
  852. {
  853. "ref": "c",
  854. "value": {
  855. "op": "min",
  856. "args": [
  857. {
  858. "op": "+",
  859. "args": [
  860. "c",
  861. 1
  862. ]
  863. },
  864. 16
  865. ]
  866. }
  867. }
  868. ]
  869. }
  870. ]
  871. }
  872. ]
  873. },
  874. {
  875. "name": "Receiver",
  876. "variables": [
  877. {
  878. "name": "r_ff",
  879. "type": "bool",
  880. "initial-value": false
  881. },
  882. {
  883. "name": "r_lf",
  884. "type": "bool",
  885. "initial-value": false
  886. },
  887. {
  888. "name": "r_ab",
  889. "type": "bool",
  890. "initial-value": false
  891. },
  892. {
  893. "name": "bit",
  894. "type": "bool",
  895. "initial-value": false
  896. },
  897. {
  898. "name": "c",
  899. "type": {
  900. "kind": "bounded",
  901. "base": "int",
  902. "lower-bound": 0,
  903. "upper-bound": 16
  904. },
  905. "initial-value": 0
  906. }
  907. ],
  908. "locations": [
  909. {
  910. "name": "l_0"
  911. },
  912. {
  913. "name": "l_1"
  914. },
  915. {
  916. "name": "l_2"
  917. },
  918. {
  919. "name": "l_3"
  920. },
  921. {
  922. "name": "l_4"
  923. },
  924. {
  925. "name": "l_5"
  926. },
  927. {
  928. "name": "l_6"
  929. }
  930. ],
  931. "initial-location": "l_0",
  932. "edges": [
  933. {
  934. "location": "l_0",
  935. "action": "get_k",
  936. "guard": "ff",
  937. "destinations": [
  938. {
  939. "probability": 1,
  940. "location": "l_1",
  941. "assignments": [
  942. {
  943. "ref": "c",
  944. "value": 0
  945. },
  946. {
  947. "ref": "bit",
  948. "value": "ab"
  949. },
  950. {
  951. "ref": "r_ff",
  952. "value": "ff"
  953. },
  954. {
  955. "ref": "r_lf",
  956. "value": "lf"
  957. },
  958. {
  959. "ref": "r_ab",
  960. "value": "ab"
  961. },
  962. {
  963. "ref": "Receiver_location",
  964. "value": 1
  965. }
  966. ]
  967. }
  968. ]
  969. },
  970. {
  971. "location": "l_0",
  972. "action": "get_k",
  973. "guard": {
  974. "op": "!",
  975. "args": [
  976. "ff"
  977. ]
  978. },
  979. "destinations": [
  980. {
  981. "probability": 1,
  982. "location": "l_2",
  983. "assignments": [
  984. {
  985. "ref": "premature_timeout",
  986. "value": true
  987. },
  988. {
  989. "ref": "Receiver_location",
  990. "value": 2
  991. }
  992. ]
  993. }
  994. ]
  995. },
  996. {
  997. "location": "l_0",
  998. "action": "tick",
  999. "guard": true,
  1000. "destinations": [
  1001. {
  1002. "probability": 1,
  1003. "location": "l_0"
  1004. }
  1005. ]
  1006. },
  1007. {
  1008. "location": "l_1",
  1009. "action": "put_l",
  1010. "guard": {
  1011. "op": "≠",
  1012. "args": [
  1013. "r_ab",
  1014. "bit"
  1015. ]
  1016. },
  1017. "destinations": [
  1018. {
  1019. "probability": 1,
  1020. "location": "l_3",
  1021. "assignments": [
  1022. {
  1023. "ref": "Receiver_location",
  1024. "value": 3
  1025. }
  1026. ]
  1027. }
  1028. ]
  1029. },
  1030. {
  1031. "location": "l_1",
  1032. "action": "r_ok",
  1033. "guard": {
  1034. "op": "∧",
  1035. "args": [
  1036. "r_lf",
  1037. {
  1038. "op": "=",
  1039. "args": [
  1040. "r_ab",
  1041. "bit"
  1042. ]
  1043. }
  1044. ]
  1045. },
  1046. "destinations": [
  1047. {
  1048. "probability": 1,
  1049. "location": "l_4",
  1050. "assignments": [
  1051. {
  1052. "ref": "Receiver_location",
  1053. "value": 4
  1054. }
  1055. ]
  1056. }
  1057. ]
  1058. },
  1059. {
  1060. "location": "l_1",
  1061. "action": "r_fst",
  1062. "guard": {
  1063. "op": "∧",
  1064. "args": [
  1065. {
  1066. "op": "∧",
  1067. "args": [
  1068. "r_ff",
  1069. {
  1070. "op": "!",
  1071. "args": [
  1072. "r_lf"
  1073. ]
  1074. }
  1075. ]
  1076. },
  1077. {
  1078. "op": "=",
  1079. "args": [
  1080. "r_ab",
  1081. "bit"
  1082. ]
  1083. }
  1084. ]
  1085. },
  1086. "destinations": [
  1087. {
  1088. "probability": 1,
  1089. "location": "l_4",
  1090. "assignments": [
  1091. {
  1092. "ref": "Receiver_location",
  1093. "value": 4
  1094. }
  1095. ]
  1096. }
  1097. ]
  1098. },
  1099. {
  1100. "location": "l_1",
  1101. "action": "r_inc",
  1102. "guard": {
  1103. "op": "∧",
  1104. "args": [
  1105. {
  1106. "op": "∧",
  1107. "args": [
  1108. {
  1109. "op": "!",
  1110. "args": [
  1111. "r_ff"
  1112. ]
  1113. },
  1114. {
  1115. "op": "!",
  1116. "args": [
  1117. "r_lf"
  1118. ]
  1119. }
  1120. ]
  1121. },
  1122. {
  1123. "op": "=",
  1124. "args": [
  1125. "r_ab",
  1126. "bit"
  1127. ]
  1128. }
  1129. ]
  1130. },
  1131. "destinations": [
  1132. {
  1133. "probability": 1,
  1134. "location": "l_4",
  1135. "assignments": [
  1136. {
  1137. "ref": "Receiver_location",
  1138. "value": 4
  1139. }
  1140. ]
  1141. }
  1142. ]
  1143. },
  1144. {
  1145. "location": "l_1",
  1146. "action": "tick",
  1147. "guard": {
  1148. "op": "<",
  1149. "args": [
  1150. "c",
  1151. 0
  1152. ]
  1153. },
  1154. "destinations": [
  1155. {
  1156. "probability": 1,
  1157. "location": "l_1",
  1158. "assignments": [
  1159. {
  1160. "ref": "c",
  1161. "value": {
  1162. "op": "min",
  1163. "args": [
  1164. {
  1165. "op": "+",
  1166. "args": [
  1167. "c",
  1168. 1
  1169. ]
  1170. },
  1171. 16
  1172. ]
  1173. }
  1174. }
  1175. ]
  1176. }
  1177. ]
  1178. },
  1179. {
  1180. "location": "l_2",
  1181. "action": "tick",
  1182. "guard": true,
  1183. "destinations": [
  1184. {
  1185. "probability": 1,
  1186. "location": "l_2"
  1187. }
  1188. ]
  1189. },
  1190. {
  1191. "location": "l_3",
  1192. "action": "get_k",
  1193. "guard": true,
  1194. "destinations": [
  1195. {
  1196. "probability": 1,
  1197. "location": "l_1",
  1198. "assignments": [
  1199. {
  1200. "ref": "c",
  1201. "value": 0
  1202. },
  1203. {
  1204. "ref": "r_ff",
  1205. "value": "ff"
  1206. },
  1207. {
  1208. "ref": "r_lf",
  1209. "value": "lf"
  1210. },
  1211. {
  1212. "ref": "r_ab",
  1213. "value": "ab"
  1214. },
  1215. {
  1216. "ref": "Receiver_location",
  1217. "value": 1
  1218. }
  1219. ]
  1220. }
  1221. ]
  1222. },
  1223. {
  1224. "location": "l_3",
  1225. "action": "r_timeout",
  1226. "guard": {
  1227. "op": "∧",
  1228. "args": [
  1229. "r_lf",
  1230. {
  1231. "op": "=",
  1232. "args": [
  1233. "c",
  1234. 15
  1235. ]
  1236. }
  1237. ]
  1238. },
  1239. "destinations": [
  1240. {
  1241. "probability": 1,
  1242. "location": "l_5",
  1243. "assignments": [
  1244. {
  1245. "ref": "Receiver_location",
  1246. "value": 5
  1247. }
  1248. ]
  1249. }
  1250. ]
  1251. },
  1252. {
  1253. "location": "l_3",
  1254. "action": "r_nok",
  1255. "guard": {
  1256. "op": "∧",
  1257. "args": [
  1258. {
  1259. "op": "!",
  1260. "args": [
  1261. "r_lf"
  1262. ]
  1263. },
  1264. {
  1265. "op": "=",
  1266. "args": [
  1267. "c",
  1268. 15
  1269. ]
  1270. }
  1271. ]
  1272. },
  1273. "destinations": [
  1274. {
  1275. "probability": 1,
  1276. "location": "l_6",
  1277. "assignments": [
  1278. {
  1279. "ref": "Receiver_location",
  1280. "value": 6
  1281. }
  1282. ]
  1283. }
  1284. ]
  1285. },
  1286. {
  1287. "location": "l_3",
  1288. "action": "tick",
  1289. "guard": {
  1290. "op": "<",
  1291. "args": [
  1292. "c",
  1293. 15
  1294. ]
  1295. },
  1296. "destinations": [
  1297. {
  1298. "probability": 1,
  1299. "location": "l_3",
  1300. "assignments": [
  1301. {
  1302. "ref": "c",
  1303. "value": {
  1304. "op": "min",
  1305. "args": [
  1306. {
  1307. "op": "+",
  1308. "args": [
  1309. "c",
  1310. 1
  1311. ]
  1312. },
  1313. 16
  1314. ]
  1315. }
  1316. }
  1317. ]
  1318. }
  1319. ]
  1320. },
  1321. {
  1322. "location": "l_4",
  1323. "action": "put_l",
  1324. "guard": true,
  1325. "destinations": [
  1326. {
  1327. "probability": 1,
  1328. "location": "l_3",
  1329. "assignments": [
  1330. {
  1331. "ref": "bit",
  1332. "value": {
  1333. "op": "!",
  1334. "args": [
  1335. "bit"
  1336. ]
  1337. }
  1338. },
  1339. {
  1340. "ref": "Receiver_location",
  1341. "value": 3
  1342. }
  1343. ]
  1344. }
  1345. ]
  1346. },
  1347. {
  1348. "location": "l_4",
  1349. "action": "tick",
  1350. "guard": {
  1351. "op": "<",
  1352. "args": [
  1353. "c",
  1354. 0
  1355. ]
  1356. },
  1357. "destinations": [
  1358. {
  1359. "probability": 1,
  1360. "location": "l_4",
  1361. "assignments": [
  1362. {
  1363. "ref": "c",
  1364. "value": {
  1365. "op": "min",
  1366. "args": [
  1367. {
  1368. "op": "+",
  1369. "args": [
  1370. "c",
  1371. 1
  1372. ]
  1373. },
  1374. 16
  1375. ]
  1376. }
  1377. }
  1378. ]
  1379. }
  1380. ]
  1381. },
  1382. {
  1383. "location": "l_5",
  1384. "guard": true,
  1385. "destinations": [
  1386. {
  1387. "probability": 1,
  1388. "location": "l_0",
  1389. "assignments": [
  1390. {
  1391. "ref": "r_ff",
  1392. "value": false
  1393. },
  1394. {
  1395. "ref": "r_lf",
  1396. "value": false
  1397. },
  1398. {
  1399. "ref": "r_ab",
  1400. "value": false
  1401. },
  1402. {
  1403. "ref": "bit",
  1404. "value": false
  1405. },
  1406. {
  1407. "ref": "c",
  1408. "value": 0
  1409. },
  1410. {
  1411. "ref": "Receiver_location",
  1412. "value": 0
  1413. }
  1414. ]
  1415. }
  1416. ]
  1417. },
  1418. {
  1419. "location": "l_5",
  1420. "action": "tick",
  1421. "guard": {
  1422. "op": "<",
  1423. "args": [
  1424. "c",
  1425. 15
  1426. ]
  1427. },
  1428. "destinations": [
  1429. {
  1430. "probability": 1,
  1431. "location": "l_5",
  1432. "assignments": [
  1433. {
  1434. "ref": "c",
  1435. "value": {
  1436. "op": "min",
  1437. "args": [
  1438. {
  1439. "op": "+",
  1440. "args": [
  1441. "c",
  1442. 1
  1443. ]
  1444. },
  1445. 16
  1446. ]
  1447. }
  1448. }
  1449. ]
  1450. }
  1451. ]
  1452. },
  1453. {
  1454. "location": "l_6",
  1455. "action": "r_timeout",
  1456. "guard": true,
  1457. "destinations": [
  1458. {
  1459. "probability": 1,
  1460. "location": "l_5",
  1461. "assignments": [
  1462. {
  1463. "ref": "Receiver_location",
  1464. "value": 5
  1465. }
  1466. ]
  1467. }
  1468. ]
  1469. },
  1470. {
  1471. "location": "l_6",
  1472. "action": "tick",
  1473. "guard": {
  1474. "op": "<",
  1475. "args": [
  1476. "c",
  1477. 15
  1478. ]
  1479. },
  1480. "destinations": [
  1481. {
  1482. "probability": 1,
  1483. "location": "l_6",
  1484. "assignments": [
  1485. {
  1486. "ref": "c",
  1487. "value": {
  1488. "op": "min",
  1489. "args": [
  1490. {
  1491. "op": "+",
  1492. "args": [
  1493. "c",
  1494. 1
  1495. ]
  1496. },
  1497. 16
  1498. ]
  1499. }
  1500. }
  1501. ]
  1502. }
  1503. ]
  1504. }
  1505. ]
  1506. },
  1507. {
  1508. "name": "ChannelK",
  1509. "variables": [
  1510. {
  1511. "name": "c",
  1512. "type": {
  1513. "kind": "bounded",
  1514. "base": "int",
  1515. "lower-bound": 0,
  1516. "upper-bound": 2
  1517. },
  1518. "initial-value": 0
  1519. }
  1520. ],
  1521. "locations": [
  1522. {
  1523. "name": "l_0"
  1524. },
  1525. {
  1526. "name": "l_1"
  1527. },
  1528. {
  1529. "name": "l_2"
  1530. }
  1531. ],
  1532. "initial-location": "l_0",
  1533. "edges": [
  1534. {
  1535. "location": "l_0",
  1536. "action": "put_k",
  1537. "guard": true,
  1538. "destinations": [
  1539. {
  1540. "probability": {
  1541. "op": "/",
  1542. "args": [
  1543. 49,
  1544. 50
  1545. ]
  1546. },
  1547. "location": "l_1",
  1548. "assignments": [
  1549. {
  1550. "ref": "c",
  1551. "value": 0
  1552. },
  1553. {
  1554. "ref": "inTransitK",
  1555. "value": true
  1556. },
  1557. {
  1558. "ref": "ChannelK_location",
  1559. "value": 1
  1560. }
  1561. ]
  1562. },
  1563. {
  1564. "probability": {
  1565. "op": "/",
  1566. "args": [
  1567. 1,
  1568. 50
  1569. ]
  1570. },
  1571. "location": "l_0",
  1572. "assignments": [
  1573. {
  1574. "ref": "ChannelK_location",
  1575. "value": 0
  1576. }
  1577. ]
  1578. }
  1579. ]
  1580. },
  1581. {
  1582. "location": "l_0",
  1583. "action": "tick",
  1584. "guard": true,
  1585. "destinations": [
  1586. {
  1587. "probability": 1,
  1588. "location": "l_0"
  1589. }
  1590. ]
  1591. },
  1592. {
  1593. "location": "l_1",
  1594. "action": "get_k",
  1595. "guard": true,
  1596. "destinations": [
  1597. {
  1598. "probability": 1,
  1599. "location": "l_0",
  1600. "assignments": [
  1601. {
  1602. "ref": "inTransitK",
  1603. "value": false
  1604. },
  1605. {
  1606. "ref": "c",
  1607. "value": 0
  1608. },
  1609. {
  1610. "ref": "ChannelK_location",
  1611. "value": 0
  1612. }
  1613. ]
  1614. }
  1615. ]
  1616. },
  1617. {
  1618. "location": "l_1",
  1619. "action": "put_k",
  1620. "guard": true,
  1621. "destinations": [
  1622. {
  1623. "probability": 1,
  1624. "location": "l_2",
  1625. "assignments": [
  1626. {
  1627. "ref": "channel_k_overflow",
  1628. "value": true
  1629. },
  1630. {
  1631. "ref": "ChannelK_location",
  1632. "value": 2
  1633. },
  1634. {
  1635. "ref": "c",
  1636. "value": 0
  1637. }
  1638. ]
  1639. }
  1640. ]
  1641. },
  1642. {
  1643. "location": "l_1",
  1644. "action": "tick",
  1645. "guard": {
  1646. "op": "<",
  1647. "args": [
  1648. "c",
  1649. 1
  1650. ]
  1651. },
  1652. "destinations": [
  1653. {
  1654. "probability": 1,
  1655. "location": "l_1",
  1656. "assignments": [
  1657. {
  1658. "ref": "c",
  1659. "value": {
  1660. "op": "min",
  1661. "args": [
  1662. {
  1663. "op": "+",
  1664. "args": [
  1665. "c",
  1666. 1
  1667. ]
  1668. },
  1669. 2
  1670. ]
  1671. }
  1672. }
  1673. ]
  1674. }
  1675. ]
  1676. },
  1677. {
  1678. "location": "l_2",
  1679. "action": "tick",
  1680. "guard": true,
  1681. "destinations": [
  1682. {
  1683. "probability": 1,
  1684. "location": "l_2"
  1685. }
  1686. ]
  1687. }
  1688. ]
  1689. },
  1690. {
  1691. "name": "ChannelL",
  1692. "variables": [
  1693. {
  1694. "name": "c",
  1695. "type": {
  1696. "kind": "bounded",
  1697. "base": "int",
  1698. "lower-bound": 0,
  1699. "upper-bound": 2
  1700. },
  1701. "initial-value": 0
  1702. }
  1703. ],
  1704. "locations": [
  1705. {
  1706. "name": "l_0"
  1707. },
  1708. {
  1709. "name": "l_1"
  1710. },
  1711. {
  1712. "name": "l_2"
  1713. }
  1714. ],
  1715. "initial-location": "l_0",
  1716. "edges": [
  1717. {
  1718. "location": "l_0",
  1719. "action": "put_l",
  1720. "guard": true,
  1721. "destinations": [
  1722. {
  1723. "probability": {
  1724. "op": "/",
  1725. "args": [
  1726. 99,
  1727. 100
  1728. ]
  1729. },
  1730. "location": "l_1",
  1731. "assignments": [
  1732. {
  1733. "ref": "c",
  1734. "value": 0
  1735. },
  1736. {
  1737. "ref": "inTransitL",
  1738. "value": true
  1739. },
  1740. {
  1741. "ref": "ChannelL_location",
  1742. "value": 1
  1743. }
  1744. ]
  1745. },
  1746. {
  1747. "probability": {
  1748. "op": "/",
  1749. "args": [
  1750. 1,
  1751. 100
  1752. ]
  1753. },
  1754. "location": "l_0",
  1755. "assignments": [
  1756. {
  1757. "ref": "ChannelL_location",
  1758. "value": 0
  1759. }
  1760. ]
  1761. }
  1762. ]
  1763. },
  1764. {
  1765. "location": "l_0",
  1766. "action": "tick",
  1767. "guard": true,
  1768. "destinations": [
  1769. {
  1770. "probability": 1,
  1771. "location": "l_0"
  1772. }
  1773. ]
  1774. },
  1775. {
  1776. "location": "l_1",
  1777. "action": "get_l",
  1778. "guard": true,
  1779. "destinations": [
  1780. {
  1781. "probability": 1,
  1782. "location": "l_0",
  1783. "assignments": [
  1784. {
  1785. "ref": "inTransitL",
  1786. "value": false
  1787. },
  1788. {
  1789. "ref": "c",
  1790. "value": 0
  1791. },
  1792. {
  1793. "ref": "ChannelL_location",
  1794. "value": 0
  1795. }
  1796. ]
  1797. }
  1798. ]
  1799. },
  1800. {
  1801. "location": "l_1",
  1802. "action": "put_l",
  1803. "guard": true,
  1804. "destinations": [
  1805. {
  1806. "probability": 1,
  1807. "location": "l_2",
  1808. "assignments": [
  1809. {
  1810. "ref": "channel_l_overflow",
  1811. "value": true
  1812. },
  1813. {
  1814. "ref": "ChannelL_location",
  1815. "value": 2
  1816. },
  1817. {
  1818. "ref": "c",
  1819. "value": 0
  1820. }
  1821. ]
  1822. }
  1823. ]
  1824. },
  1825. {
  1826. "location": "l_1",
  1827. "action": "tick",
  1828. "guard": {
  1829. "op": "<",
  1830. "args": [
  1831. "c",
  1832. 1
  1833. ]
  1834. },
  1835. "destinations": [
  1836. {
  1837. "probability": 1,
  1838. "location": "l_1",
  1839. "assignments": [
  1840. {
  1841. "ref": "c",
  1842. "value": {
  1843. "op": "min",
  1844. "args": [
  1845. {
  1846. "op": "+",
  1847. "args": [
  1848. "c",
  1849. 1
  1850. ]
  1851. },
  1852. 2
  1853. ]
  1854. }
  1855. }
  1856. ]
  1857. }
  1858. ]
  1859. },
  1860. {
  1861. "location": "l_2",
  1862. "action": "tick",
  1863. "guard": true,
  1864. "destinations": [
  1865. {
  1866. "probability": 1,
  1867. "location": "l_2"
  1868. }
  1869. ]
  1870. }
  1871. ]
  1872. },
  1873. {
  1874. "name": "Observer",
  1875. "variables": [],
  1876. "locations": [
  1877. {
  1878. "name": "l_0"
  1879. }
  1880. ],
  1881. "initial-location": "l_0",
  1882. "edges": [
  1883. {
  1884. "location": "l_0",
  1885. "action": "get_k",
  1886. "guard": true,
  1887. "destinations": [
  1888. {
  1889. "probability": 1,
  1890. "location": "l_0",
  1891. "assignments": [
  1892. {
  1893. "ref": "get_k_seen",
  1894. "value": true
  1895. },
  1896. {
  1897. "ref": "Observer_location",
  1898. "value": 0
  1899. }
  1900. ]
  1901. }
  1902. ]
  1903. },
  1904. {
  1905. "location": "l_0",
  1906. "action": "s_ok",
  1907. "guard": true,
  1908. "destinations": [
  1909. {
  1910. "probability": 1,
  1911. "location": "l_0",
  1912. "assignments": [
  1913. {
  1914. "ref": "s_ok_seen",
  1915. "value": true
  1916. },
  1917. {
  1918. "ref": "Observer_location",
  1919. "value": 0
  1920. }
  1921. ]
  1922. }
  1923. ]
  1924. },
  1925. {
  1926. "location": "l_0",
  1927. "action": "s_nok",
  1928. "guard": true,
  1929. "destinations": [
  1930. {
  1931. "probability": 1,
  1932. "location": "l_0",
  1933. "assignments": [
  1934. {
  1935. "ref": "s_nok_seen",
  1936. "value": true
  1937. },
  1938. {
  1939. "ref": "Observer_location",
  1940. "value": 0
  1941. }
  1942. ]
  1943. }
  1944. ]
  1945. },
  1946. {
  1947. "location": "l_0",
  1948. "action": "s_dk",
  1949. "guard": true,
  1950. "destinations": [
  1951. {
  1952. "probability": 1,
  1953. "location": "l_0",
  1954. "assignments": [
  1955. {
  1956. "ref": "s_dk_seen",
  1957. "value": true
  1958. },
  1959. {
  1960. "ref": "Observer_location",
  1961. "value": 0
  1962. }
  1963. ]
  1964. }
  1965. ]
  1966. },
  1967. {
  1968. "location": "l_0",
  1969. "action": "s_restart",
  1970. "guard": true,
  1971. "destinations": [
  1972. {
  1973. "probability": 1,
  1974. "location": "l_0",
  1975. "assignments": [
  1976. {
  1977. "ref": "s_restart_seen",
  1978. "value": true
  1979. },
  1980. {
  1981. "ref": "Observer_location",
  1982. "value": 0
  1983. }
  1984. ]
  1985. }
  1986. ]
  1987. },
  1988. {
  1989. "location": "l_0",
  1990. "action": "r_ok",
  1991. "guard": true,
  1992. "destinations": [
  1993. {
  1994. "probability": 1,
  1995. "location": "l_0",
  1996. "assignments": [
  1997. {
  1998. "ref": "r_ok_seen",
  1999. "value": true
  2000. },
  2001. {
  2002. "ref": "Observer_location",
  2003. "value": 0
  2004. }
  2005. ]
  2006. }
  2007. ]
  2008. },
  2009. {
  2010. "location": "l_0",
  2011. "action": "r_timeout",
  2012. "guard": true,
  2013. "destinations": [
  2014. {
  2015. "probability": 1,
  2016. "location": "l_0",
  2017. "assignments": [
  2018. {
  2019. "ref": "r_timeout_seen",
  2020. "value": true
  2021. },
  2022. {
  2023. "ref": "Observer_location",
  2024. "value": 0
  2025. }
  2026. ]
  2027. }
  2028. ]
  2029. },
  2030. {
  2031. "location": "l_0",
  2032. "action": "tick",
  2033. "guard": true,
  2034. "destinations": [
  2035. {
  2036. "probability": 1,
  2037. "location": "l_0"
  2038. }
  2039. ]
  2040. }
  2041. ]
  2042. }
  2043. ],
  2044. "system": {
  2045. "composition": "parallel",
  2046. "elements": [
  2047. {
  2048. "composition": "parallel",
  2049. "elements": [
  2050. {
  2051. "composition": "parallel",
  2052. "elements": [
  2053. {
  2054. "composition": "parallel",
  2055. "elements": [
  2056. "Sender",
  2057. "Receiver"
  2058. ],
  2059. "alphabet": [
  2060. "tick"
  2061. ]
  2062. },
  2063. "ChannelK"
  2064. ],
  2065. "alphabet": [
  2066. "put_k",
  2067. "get_k",
  2068. "tick"
  2069. ]
  2070. },
  2071. "ChannelL"
  2072. ],
  2073. "alphabet": [
  2074. "get_l",
  2075. "put_l",
  2076. "tick"
  2077. ]
  2078. },
  2079. "Observer"
  2080. ],
  2081. "alphabet": [
  2082. "s_nok",
  2083. "s_dk",
  2084. "s_ok",
  2085. "s_restart",
  2086. "get_k",
  2087. "r_ok",
  2088. "r_timeout",
  2089. "tick"
  2090. ]
  2091. }
  2092. }