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.

358 lines
5.9 KiB

  1. {
  2. "jani-version": 1,
  3. "name": "die.jani",
  4. "type": "dtmc",
  5. "features": [ "derived-operators" ],
  6. "variables": [
  7. {
  8. "name": "s",
  9. "type": {
  10. "base": "int",
  11. "kind": "bounded",
  12. "lower-bound": 0,
  13. "upper-bound": 7
  14. },
  15. "initial-value": 0
  16. },
  17. {
  18. "name": "d",
  19. "type": {
  20. "base": "int",
  21. "kind": "bounded",
  22. "lower-bound": 0,
  23. "upper-bound": 6
  24. },
  25. "initial-value": 0
  26. }
  27. ],
  28. "properties": [
  29. {
  30. "name": "Probability to throw a six",
  31. "expression": {
  32. "op": "filter",
  33. "fun": "max",
  34. "states": { "op": "initial" },
  35. "values": {
  36. "op": "Pmin",
  37. "exp": {
  38. "op": "U",
  39. "left": true,
  40. "right": {
  41. "op": "∧",
  42. "left": {
  43. "op": "=",
  44. "left": "s",
  45. "right": 7
  46. },
  47. "right": {
  48. "op": "=",
  49. "left": "d",
  50. "right": 6
  51. }
  52. }
  53. }
  54. }
  55. }
  56. },
  57. {
  58. "name": "Expected number of coin flips",
  59. "expression": {
  60. "op": "filter",
  61. "fun": "max",
  62. "states": { "op": "initial" },
  63. "values": {
  64. "op": "Emin",
  65. "accumulate": [ "steps" ],
  66. "exp": 1,
  67. "reach": {
  68. "op": "=",
  69. "left": "s",
  70. "right": 7
  71. }
  72. }
  73. }
  74. }
  75. ],
  76. "automata": [
  77. {
  78. "name": "die",
  79. "locations": [{ "name": "l" }],
  80. "initial-locations": ["l"],
  81. "edges": [
  82. {
  83. "location": "l",
  84. "guard": {
  85. "exp": {
  86. "op": "=",
  87. "left": "s",
  88. "right": 0
  89. }
  90. },
  91. "destinations": [
  92. {
  93. "location": "l",
  94. "probability": { "exp": 0.5 },
  95. "assignments": [
  96. {
  97. "ref": "s",
  98. "value": 1
  99. }
  100. ]
  101. },
  102. {
  103. "location": "l",
  104. "probability": { "exp": 0.5 },
  105. "assignments": [
  106. {
  107. "ref": "s",
  108. "value": 2
  109. }
  110. ]
  111. }
  112. ]
  113. },
  114. {
  115. "location": "l",
  116. "guard": {
  117. "exp": {
  118. "left": "s",
  119. "op": "=",
  120. "right": 1
  121. }
  122. },
  123. "destinations": [
  124. {
  125. "location": "l",
  126. "probability": { "exp": 0.5 },
  127. "assignments": [
  128. {
  129. "ref": "s",
  130. "value": 3
  131. }
  132. ]
  133. },
  134. {
  135. "location": "l",
  136. "probability": { "exp": 0.5 },
  137. "assignments": [
  138. {
  139. "ref": "s",
  140. "value": 4
  141. }
  142. ]
  143. }
  144. ]
  145. },
  146. {
  147. "location": "l",
  148. "guard": {
  149. "exp": {
  150. "left": "s",
  151. "op": "=",
  152. "right": 2
  153. }
  154. },
  155. "destinations": [
  156. {
  157. "location": "l",
  158. "probability": { "exp": 0.5 },
  159. "assignments": [
  160. {
  161. "ref": "s",
  162. "value": 5
  163. }
  164. ]
  165. },
  166. {
  167. "location": "l",
  168. "probability": { "exp": 0.5 },
  169. "assignments": [
  170. {
  171. "ref": "s",
  172. "value": 6
  173. }
  174. ]
  175. }
  176. ]
  177. },
  178. {
  179. "location": "l",
  180. "guard": {
  181. "exp": {
  182. "left": "s",
  183. "op": "=",
  184. "right": 3
  185. }
  186. },
  187. "destinations": [
  188. {
  189. "location": "l",
  190. "probability": { "exp": 0.5 },
  191. "assignments": [
  192. {
  193. "ref": "s",
  194. "value": 1
  195. }
  196. ]
  197. },
  198. {
  199. "location": "l",
  200. "probability": { "exp": 0.5 },
  201. "assignments": [
  202. {
  203. "ref": "s",
  204. "value": 7
  205. },
  206. {
  207. "ref": "d",
  208. "value": 1
  209. }
  210. ]
  211. }
  212. ]
  213. },
  214. {
  215. "location": "l",
  216. "guard": {
  217. "exp": {
  218. "left": "s",
  219. "op": "=",
  220. "right": 4
  221. }
  222. },
  223. "destinations": [
  224. {
  225. "location": "l",
  226. "probability": { "exp": 0.5 },
  227. "assignments": [
  228. {
  229. "ref": "s",
  230. "value": 7
  231. },
  232. {
  233. "ref": "d",
  234. "value": 2
  235. }
  236. ]
  237. },
  238. {
  239. "location": "l",
  240. "probability": { "exp": 0.5 },
  241. "assignments": [
  242. {
  243. "ref": "s",
  244. "value": 7
  245. },
  246. {
  247. "ref": "d",
  248. "value": 3
  249. }
  250. ]
  251. }
  252. ]
  253. },
  254. {
  255. "location": "l",
  256. "guard": {
  257. "exp": {
  258. "left": "s",
  259. "op": "=",
  260. "right": 5
  261. }
  262. },
  263. "destinations": [
  264. {
  265. "location": "l",
  266. "probability": { "exp": 0.5 },
  267. "assignments": [
  268. {
  269. "ref": "s",
  270. "value": 7
  271. },
  272. {
  273. "ref": "d",
  274. "value": 4
  275. }
  276. ]
  277. },
  278. {
  279. "location": "l",
  280. "probability": { "exp": 0.5 },
  281. "assignments": [
  282. {
  283. "ref": "s",
  284. "value": 7
  285. },
  286. {
  287. "ref": "d",
  288. "value": 5
  289. }
  290. ]
  291. }
  292. ]
  293. },
  294. {
  295. "location": "l",
  296. "guard": {
  297. "exp": {
  298. "left": "s",
  299. "op": "=",
  300. "right": 6
  301. }
  302. },
  303. "destinations": [
  304. {
  305. "location": "l",
  306. "probability": { "exp": 0.5 },
  307. "assignments": [
  308. {
  309. "ref": "s",
  310. "value": 2
  311. }
  312. ]
  313. },
  314. {
  315. "location": "l",
  316. "probability": { "exp": 0.5 },
  317. "assignments": [
  318. {
  319. "ref": "s",
  320. "value": 7
  321. },
  322. {
  323. "ref": "d",
  324. "value": 6
  325. }
  326. ]
  327. }
  328. ]
  329. },
  330. {
  331. "location": "l",
  332. "guard": {
  333. "exp": {
  334. "left": "s",
  335. "op": "=",
  336. "right": 7
  337. }
  338. },
  339. "destinations": [
  340. {
  341. "location": "l",
  342. "assignments": [
  343. {
  344. "ref": "s",
  345. "value": 7
  346. }
  347. ]
  348. }
  349. ]
  350. }
  351. ]
  352. }
  353. ],
  354. "system": {
  355. "elements": [ { "automaton": "die" } ]
  356. }
  357. }