pione 0.4.2 → 0.5.0.alpha.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (306) hide show
  1. checksums.yaml +8 -8
  2. data/.travis.yml +1 -1
  3. data/History.txt +6 -0
  4. data/example/ActionError/ActionError.action.md +11 -0
  5. data/example/ActionError/ActionError.pione +6 -3
  6. data/example/ActionError/ActionError.pnml +86 -0
  7. data/example/ActionError/Package.pione +2 -0
  8. data/example/ActionError/pione-package.json +5 -1
  9. data/example/CTFCorrection/CTFCorrection.action.md +46 -0
  10. data/example/CTFCorrection/CTFCorrection.pione +19 -41
  11. data/example/CTFCorrection/CTFCorrection.pnml +839 -0
  12. data/example/CTFCorrection/Package.pione +1 -0
  13. data/example/CTFCorrection/Params.pione +21 -0
  14. data/example/CTFCorrection/pione-package.json +20 -0
  15. data/example/ChildPackage/ChildPackage.pione +8 -0
  16. data/example/ChildPackage/pione-package.json +20 -0
  17. data/example/CountChar/CountChar.pione +31 -0
  18. data/example/CountChar/CountChar.pnml +239 -0
  19. data/example/CountChar/Main.pione +6 -26
  20. data/example/CountChar/Main.pnml +32 -100
  21. data/example/CountChar/Package.pione +1 -0
  22. data/example/CountChar/pione-package.json +3 -1
  23. data/example/DeferredChoice/DeferredChoice.action.md +46 -0
  24. data/example/DeferredChoice/DeferredChoice.pione +2 -7
  25. data/example/DeferredChoice/DeferredChoice.pnml +371 -0
  26. data/example/DeferredChoice/Package.pione +4 -0
  27. data/example/DeferredChoice/pione-package.json +7 -3
  28. data/example/DeferredChoiceWithPage/DeferredChoiceWithPage.action.md +34 -0
  29. data/example/DeferredChoiceWithPage/DefferredChoiceWithPage.pnml +371 -0
  30. data/example/DeferredChoiceWithPage/Package.pione +2 -0
  31. data/example/FeatureExample/FeatureExample.action.md +7 -0
  32. data/example/FeatureExample/FeatureExample.pione +7 -4
  33. data/example/FeatureExample/FeatureExample.pnml +86 -0
  34. data/example/FeatureExample/Package.pione +1 -0
  35. data/example/FeatureExample/pione-package.json +4 -0
  36. data/example/Fib/Fib.action.md +33 -0
  37. data/example/Fib/Fib.pnml +208 -0
  38. data/example/Fib/FibN.pnml +807 -0
  39. data/example/Fib/Package.pione +6 -0
  40. data/example/HelloWorld/HelloWorld.action.md +7 -0
  41. data/example/HelloWorld/HelloWorld.pione +6 -2
  42. data/example/HelloWorld/HelloWorld.pnml +86 -0
  43. data/example/HelloWorld/Package.pione +2 -0
  44. data/example/HelloWorld/pione-package.json +5 -1
  45. data/example/Interaction/Interaction.action.md +21 -0
  46. data/example/Interaction/Interaction.pnml +89 -0
  47. data/example/Interaction/Package.pione +2 -0
  48. data/example/LoopByTouch/LoopByTouch.pione +32 -12
  49. data/example/LoopByTouch/LoopByTouch.pnml +575 -0
  50. data/example/LoopByTouch/Package.pione +3 -0
  51. data/example/LoopByTouch/PairLoop.pione +6 -7
  52. data/example/LoopByTouch/PairLoop.pnml +188 -0
  53. data/example/LoopByTouch/SingleLoop.pione +6 -0
  54. data/example/LoopByTouch/SingleLoop.pnml +86 -0
  55. data/example/LoopByTouch/TripletLoop.pione +12 -13
  56. data/example/LoopByTouch/TripletLoop.pnml +239 -0
  57. data/example/LoopByTouch/pione-package.json +7 -3
  58. data/example/LucasNumber/LucasNumber.action.md +25 -0
  59. data/example/LucasNumber/LucasNumber.pnml +244 -0
  60. data/example/LucasNumber/LucasNumberN.pnml +1719 -0
  61. data/example/LucasNumber/Package.pione +2 -0
  62. data/example/MakePair/MakePair.pione +8 -10
  63. data/example/MakePair/MakePair.pnml +1141 -0
  64. data/example/MakePair/Package.pione +2 -0
  65. data/example/MakePair/pione-package.json +7 -3
  66. data/example/MakePair/scenario/case1/pione-scenario.json +30 -30
  67. data/example/MakePair/scenario/case2/pione-scenario.json +10 -10
  68. data/example/MakePair/scenario/case3/pione-scenario.json +28 -28
  69. data/example/OddSelector/OddSelector.pione +8 -8
  70. data/example/OddSelector/OddSelector.pnml +401 -0
  71. data/example/OddSelector/Package.pione +2 -0
  72. data/example/OddSelector/pione-package.json +4 -0
  73. data/example/OddSelector/scenario/pione-scenario.json +8 -8
  74. data/example/ParentPackage/ParentPackage.pione +13 -0
  75. data/example/ParentPackage/pione-package.json +18 -0
  76. data/example/PegasusWMS/Merge/Package.pione +2 -0
  77. data/example/PegasusWMS/Merge/PegasusWMSMerge.action.md +17 -0
  78. data/example/PegasusWMS/Merge/{Merge.pione → PegasusWMSMerge.pione} +9 -10
  79. data/example/PegasusWMS/Merge/PegasusWMSMerge.pnml +217 -0
  80. data/example/PegasusWMS/Merge/pione-package.json +6 -2
  81. data/example/PegasusWMS/Pipeline/Package.pione +2 -0
  82. data/example/PegasusWMS/Pipeline/PegasusWMSPipeline.action.md +17 -0
  83. data/example/PegasusWMS/Pipeline/{Pipeline.pione → PegasusWMSPipeline.pione} +7 -9
  84. data/example/PegasusWMS/Pipeline/PegasusWMSPipeline.pnml +137 -0
  85. data/example/PegasusWMS/Pipeline/pione-package.json +6 -2
  86. data/example/PegasusWMS/Split/Package.pione +2 -0
  87. data/example/PegasusWMS/Split/PegasusWMSSplit.action.md +19 -0
  88. data/example/PegasusWMS/Split/{Split.pione → PegasusWMSSplit.pione} +9 -10
  89. data/example/PegasusWMS/Split/PegasusWMSSplit.pnml +293 -0
  90. data/example/PegasusWMS/Split/pione-package.json +6 -2
  91. data/example/ScoreAggregation/Package.pione +2 -0
  92. data/example/ScoreAggregation/ScoreAggregation.action.md +56 -0
  93. data/example/ScoreAggregation/ScoreAggregation.pione +37 -76
  94. data/example/ScoreAggregation/ScoreAggregation.pnml +1221 -0
  95. data/example/ScoreAggregation/pione-package.json +6 -2
  96. data/example/ScoreAggregation/scenario/case1/pione-scenario.json +21 -21
  97. data/example/SelectRuleByParam/Package.pione +2 -0
  98. data/example/SelectRuleByParam/SelectRuleByParam.action.md +19 -0
  99. data/example/SelectRuleByParam/SelectRuleByParam.pnml +388 -0
  100. data/example/SequentialParameter/Package.pione +2 -0
  101. data/example/SequentialParameter/SequentialParameter.pione +9 -3
  102. data/example/SequentialParameter/SequentialParameter.pnml +140 -0
  103. data/example/SequentialParameter/pione-package.json +19 -0
  104. data/example/SerialProcessing/A.pione +25 -0
  105. data/example/SerialProcessing/A.pnml +395 -0
  106. data/example/SerialProcessing/B.pione +25 -0
  107. data/example/SerialProcessing/B.pnml +395 -0
  108. data/example/SerialProcessing/Package.pione +2 -0
  109. data/example/SerialProcessing/SerialProcessing.pione +9 -60
  110. data/example/SerialProcessing/SerialProcessing.pnml +160 -0
  111. data/example/SerialProcessing/pione-package.json +7 -1
  112. data/example/SieveOfEratosthenes/CreateUndeterminedNumbers.pnml +157 -0
  113. data/example/SieveOfEratosthenes/Package.pione +4 -0
  114. data/example/SieveOfEratosthenes/Sieve.pnml +1493 -0
  115. data/example/SieveOfEratosthenes/SieveOfEratosthenes.pnml +174 -0
  116. data/example/SingleParticlesWithRef/Create3dinfo.pnml +342 -0
  117. data/example/SingleParticlesWithRef/Package.pione +42 -0
  118. data/example/SingleParticlesWithRef/SingleParticlesWithRef.action.md +34 -0
  119. data/example/SingleParticlesWithRef/SingleParticlesWithRef.pnml +404 -0
  120. data/example/SingleParticlesWithRef/{Makefile → misc/Makefile} +0 -0
  121. data/example/SingleParticlesWithRef/{SingleParticlesWithRef.Display2.pione → misc/SingleParticlesWithRef.Display2.pione} +0 -0
  122. data/example/SingleParticlesWithRef/{SingleParticlesWithRef.Makefile → misc/SingleParticlesWithRef.Makefile} +0 -0
  123. data/example/SingleParticlesWithRef/{SingleParticlesWithRefFull.pione → misc/SingleParticlesWithRefFull.pione} +0 -0
  124. data/example/Sum/CalcEachLine.pione +30 -0
  125. data/example/Sum/CalcEachLine.pnml +327 -0
  126. data/example/Sum/Package.pione +2 -0
  127. data/example/Sum/Sum.action.md +35 -0
  128. data/example/Sum/Sum.pione +9 -35
  129. data/example/Sum/Sum.pnml +191 -0
  130. data/example/Sum/pione-package.json +5 -0
  131. data/example/Touch/Package.pione +2 -0
  132. data/example/Touch/Touch.pione +8 -2
  133. data/example/Touch/Touch.pnml +89 -0
  134. data/example/Touch/pione-package.json +4 -0
  135. data/example/WorkflowPatterns/01_Sequence/Package.pione +2 -0
  136. data/example/WorkflowPatterns/01_Sequence/Sequence.pione +9 -9
  137. data/example/WorkflowPatterns/01_Sequence/Sequence.pnml +191 -0
  138. data/example/WorkflowPatterns/01_Sequence/pione-package.json +19 -0
  139. data/example/WorkflowPatterns/02_PrallelSplit/Package.pione +2 -0
  140. data/example/WorkflowPatterns/02_PrallelSplit/ParallelSplit.pione +12 -12
  141. data/example/WorkflowPatterns/02_PrallelSplit/ParallelSplit.pnml +265 -0
  142. data/example/WorkflowPatterns/02_PrallelSplit/pione-package.json +19 -0
  143. data/example/WorkflowPatterns/03_Synchronization/Package.pione +2 -0
  144. data/example/WorkflowPatterns/03_Synchronization/Synchronization.pione +12 -13
  145. data/example/WorkflowPatterns/03_Synchronization/Synchronization.pnml +273 -0
  146. data/example/WorkflowPatterns/03_Synchronization/pione-package.json +19 -0
  147. data/example/WorkflowPatterns/04_ExclusiveChoice/ExclusiveChoice.pione +15 -22
  148. data/example/WorkflowPatterns/04_ExclusiveChoice/ExclusiveChoice.pnml +533 -0
  149. data/example/WorkflowPatterns/04_ExclusiveChoice/Package.pione +4 -0
  150. data/example/WorkflowPatterns/04_ExclusiveChoice/pione-package.json +19 -0
  151. data/example/WorkflowPatterns/05_SimpleMerge/Package.pione +4 -0
  152. data/example/WorkflowPatterns/05_SimpleMerge/SimpleMerge.pione +10 -18
  153. data/example/WorkflowPatterns/05_SimpleMerge/SimpleMerge.pnml +431 -0
  154. data/example/WorkflowPatterns/05_SimpleMerge/pione-package.json +19 -0
  155. data/example/WorkflowPatterns/06_MultiChoice/MultiChoice.pione +20 -28
  156. data/example/WorkflowPatterns/06_MultiChoice/MultiChoice.pnml +797 -0
  157. data/example/WorkflowPatterns/06_MultiChoice/Package.pione +5 -0
  158. data/example/WorkflowPatterns/06_MultiChoice/pione-package.json +19 -0
  159. data/example/WorkflowPatterns/07_StructuredSynchronizingMerge/Package.pione +5 -0
  160. data/example/WorkflowPatterns/07_StructuredSynchronizingMerge/StructuredSynchronizingMerge.pnml +668 -0
  161. data/example/WorkflowPatterns/08_MultiMerge/MultiMerge.pione +9 -20
  162. data/example/WorkflowPatterns/08_MultiMerge/MultiMerge.pnml +551 -0
  163. data/example/WorkflowPatterns/08_MultiMerge/Package.pione +4 -0
  164. data/example/WorkflowPatterns/08_MultiMerge/pione-package.json +19 -0
  165. data/example/WorkflowPatterns/11_ImplicitTermination/ImplicitTermination.pione +9 -17
  166. data/example/WorkflowPatterns/11_ImplicitTermination/ImplicitTermination.pnml +188 -0
  167. data/example/WorkflowPatterns/11_ImplicitTermination/Package.pione +2 -0
  168. data/example/WorkflowPatterns/11_ImplicitTermination/pione-package.json +19 -0
  169. data/example/WorkflowPatterns/12_MultipleInstancesWithoutSynchronization/MultipleInstancesWithoutSynchronization.pione +11 -11
  170. data/example/WorkflowPatterns/12_MultipleInstancesWithoutSynchronization/MultipleInstancesWithoutSynchronization.pnml +319 -0
  171. data/example/WorkflowPatterns/12_MultipleInstancesWithoutSynchronization/Package.pione +4 -0
  172. data/example/WorkflowPatterns/12_MultipleInstancesWithoutSynchronization/pione-package.json +19 -0
  173. data/example/WorkflowPatterns/13_MultipleInstancesWithDesignTimeKnowledge/MultipleInstancesWithDesignTimeKnowledge.pione +11 -11
  174. data/example/WorkflowPatterns/13_MultipleInstancesWithDesignTimeKnowledge/MultipleInstancesWithDesignTimeKnowledge.pnml +319 -0
  175. data/example/WorkflowPatterns/13_MultipleInstancesWithDesignTimeKnowledge/Package.pione +2 -0
  176. data/example/WorkflowPatterns/13_MultipleInstancesWithDesignTimeKnowledge/pione-package.json +19 -0
  177. data/example/WorkflowPatterns/14_MultipleInstancesWithRunTimeKnowledge/MultipleInstancesWithRunTimeKnowledge.pione +14 -17
  178. data/example/WorkflowPatterns/14_MultipleInstancesWithRunTimeKnowledge/MultipleInstancesWithRunTimeKnowledge.pnml +355 -0
  179. data/example/WorkflowPatterns/14_MultipleInstancesWithRunTimeKnowledge/Package.pione +4 -0
  180. data/example/WorkflowPatterns/14_MultipleInstancesWithRunTimeKnowledge/pione-package.json +19 -0
  181. data/example/WorkflowPatterns/33_GeneralizedANDJoin/GeneralizedANDJoin.pione +9 -10
  182. data/example/WorkflowPatterns/33_GeneralizedANDJoin/GeneralizedANDJoin.pnml +409 -0
  183. data/example/WorkflowPatterns/33_GeneralizedANDJoin/Package.pione +2 -0
  184. data/example/WorkflowPatterns/33_GeneralizedANDJoin/pione-package.json +19 -0
  185. data/example/WorkflowPatterns/37_LocalSynchronizingMerge/A.pione +34 -0
  186. data/example/WorkflowPatterns/37_LocalSynchronizingMerge/A.pnml +570 -0
  187. data/example/WorkflowPatterns/37_LocalSynchronizingMerge/LocalSynchronizingMerge.pione +36 -70
  188. data/example/WorkflowPatterns/37_LocalSynchronizingMerge/LocalSynchronizingMerge.pnml +854 -0
  189. data/example/WorkflowPatterns/37_LocalSynchronizingMerge/Package.pione +5 -0
  190. data/example/WorkflowPatterns/37_LocalSynchronizingMerge/pione-package.json +20 -0
  191. data/example/WorkflowPatterns/38_GeneralSynchronizingMerge/GeneralSynchronizingMerge.pnml +1003 -0
  192. data/example/WorkflowPatterns/38_GeneralSynchronizingMerge/Package.pione +6 -0
  193. data/example/WorkflowPatterns/41_ThreadMerge/A.pnml +429 -0
  194. data/example/WorkflowPatterns/41_ThreadMerge/A1.pnml +141 -0
  195. data/example/WorkflowPatterns/41_ThreadMerge/Package.pione +2 -0
  196. data/example/WorkflowPatterns/41_ThreadMerge/ThreadMerge.pnml +205 -0
  197. data/example/WorkflowPatterns/42_ThreadSplit/Package.pione +2 -0
  198. data/example/WorkflowPatterns/42_ThreadSplit/ThreadSplit.pnml +217 -0
  199. data/lib/pione/agent/job-manager.rb +4 -3
  200. data/lib/pione/agent/task-worker.rb +2 -7
  201. data/lib/pione/command.rb +1 -0
  202. data/lib/pione/command/basic-command.rb +3 -1
  203. data/lib/pione/command/command-exception.rb +14 -0
  204. data/lib/pione/command/pione-action-exec.rb +4 -1
  205. data/lib/pione/command/pione-clean.rb +13 -6
  206. data/lib/pione/command/pione-client.rb +5 -5
  207. data/lib/pione/command/pione-compile.rb +1 -1
  208. data/lib/pione/command/pione-log-format.rb +1 -1
  209. data/lib/pione/command/pione-package-add.rb +1 -1
  210. data/lib/pione/command/pione-package-build.rb +87 -32
  211. data/lib/pione/command/pione-package-remove.rb +117 -0
  212. data/lib/pione/command/pione-package.rb +1 -0
  213. data/lib/pione/command/spawner.rb +12 -3
  214. data/lib/pione/lang/boolean.rb +1 -1
  215. data/lib/pione/lang/common-parser.rb +5 -3
  216. data/lib/pione/lang/context-parser.rb +8 -2
  217. data/lib/pione/lang/context-transformer.rb +13 -3
  218. data/lib/pione/lang/context.rb +20 -2
  219. data/lib/pione/lang/data-expr.rb +1 -1
  220. data/lib/pione/lang/declaration-parser.rb +18 -4
  221. data/lib/pione/lang/declaration-transformer.rb +1 -1
  222. data/lib/pione/lang/declaration.rb +5 -3
  223. data/lib/pione/lang/definition.rb +1 -0
  224. data/lib/pione/lang/environment.rb +37 -2
  225. data/lib/pione/lang/expr.rb +10 -12
  226. data/lib/pione/lang/feature-expr.rb +1 -1
  227. data/lib/pione/lang/float.rb +1 -1
  228. data/lib/pione/lang/integer.rb +1 -1
  229. data/lib/pione/lang/keyed-sequence.rb +5 -5
  230. data/lib/pione/lang/lang-exception.rb +9 -5
  231. data/lib/pione/lang/literal-parser.rb +2 -2
  232. data/lib/pione/lang/literal-transformer.rb +3 -0
  233. data/lib/pione/lang/message.rb +3 -3
  234. data/lib/pione/lang/ordinal-sequence.rb +1 -1
  235. data/lib/pione/lang/package-expr.rb +1 -1
  236. data/lib/pione/lang/parameters.rb +1 -1
  237. data/lib/pione/lang/pione-method.rb +16 -16
  238. data/lib/pione/lang/rule-expr.rb +6 -1
  239. data/lib/pione/lang/sequence.rb +8 -3
  240. data/lib/pione/lang/string.rb +1 -1
  241. data/lib/pione/lang/ticket-expr.rb +1 -1
  242. data/lib/pione/lang/type.rb +17 -8
  243. data/lib/pione/lang/variable.rb +4 -1
  244. data/lib/pione/literate-action.rb +1 -2
  245. data/lib/pione/literate-action/document.rb +1 -1
  246. data/lib/pione/literate-action/handler.rb +22 -7
  247. data/lib/pione/literate-action/{parser.rb → markdown-parser.rb} +2 -1
  248. data/lib/pione/log/domain-log.rb +1 -1
  249. data/lib/pione/model/task-worker-broker-model.rb +1 -1
  250. data/lib/pione/package/package-database.rb +16 -2
  251. data/lib/pione/package/package-exception.rb +1 -1
  252. data/lib/pione/package/package-handler.rb +11 -7
  253. data/lib/pione/package/package-info.rb +13 -7
  254. data/lib/pione/package/package-scanner.rb +1 -1
  255. data/lib/pione/package/scenario-info.rb +2 -2
  256. data/lib/pione/pnml.rb +6 -0
  257. data/lib/pione/pnml/compiler.rb +329 -95
  258. data/lib/pione/pnml/declaration-extractor.rb +90 -0
  259. data/lib/pione/pnml/input-merge-complement.rb +17 -11
  260. data/lib/pione/pnml/input-parallelization-complement.rb +10 -6
  261. data/lib/pione/pnml/input-reduction.rb +5 -5
  262. data/lib/pione/pnml/invalid-arc-elimination.rb +2 -2
  263. data/lib/pione/pnml/io-expansion.rb +9 -5
  264. data/lib/pione/pnml/isolated-element-elimination.rb +2 -2
  265. data/lib/pione/pnml/label-extractor.rb +258 -0
  266. data/lib/pione/pnml/net-rewriter.rb +6 -4
  267. data/lib/pione/pnml/output-decomposition-complement.rb +12 -7
  268. data/lib/pione/pnml/output-reduction.rb +11 -5
  269. data/lib/pione/pnml/output-synchronization-complement.rb +11 -7
  270. data/lib/pione/pnml/parser.rb +106 -0
  271. data/lib/pione/pnml/pione-model.rb +685 -230
  272. data/lib/pione/pnml/pnml-model.rb +73 -41
  273. data/lib/pione/pnml/ticket-instantiation.rb +42 -0
  274. data/lib/pione/rule-engine/action-handler.rb +212 -135
  275. data/lib/pione/rule-engine/basic-handler.rb +29 -3
  276. data/lib/pione/rule-engine/engine-exception.rb +10 -6
  277. data/lib/pione/system/status.rb +12 -6
  278. data/lib/pione/version.rb +1 -1
  279. data/lib/rootage/help.md.erb +45 -0
  280. data/lib/rootage/help.rb +1 -0
  281. data/lib/rootage/scenario.rb +20 -2
  282. data/misc/pione-completion.bash +15 -5
  283. data/misc/pione-completion.zsh +16 -6
  284. data/test/command/spec_pione-client.rb +60 -60
  285. data/test/lang/data/context-parser.yml +12 -1
  286. data/test/lang/spec_pione-method.rb +7 -6
  287. data/test/literate-action/spec_handler.rb +19 -13
  288. data/test/literate-action/{spec_parser.rb → spec_markdown-parser.rb} +3 -3
  289. data/test/log/spec_message-log-receiver.rb +1 -1
  290. data/test/package/spec_package-info.rb +1 -1
  291. data/test/pnml/spec_input-merge-complement.rb +4 -2
  292. data/test/pnml/spec_input-parallelization-complement.rb +4 -2
  293. data/test/pnml/spec_input-reduction.rb +8 -4
  294. data/test/pnml/spec_invalid-arc-elimination.rb +2 -1
  295. data/test/pnml/spec_io-expansion.rb +4 -2
  296. data/test/pnml/spec_isolated-element-elimination.rb +2 -1
  297. data/test/pnml/spec_label-extractor.rb +100 -0
  298. data/test/pnml/spec_output-decomposition-complement.rb +4 -2
  299. data/test/pnml/spec_output-reduction.rb +8 -4
  300. data/test/pnml/spec_output-synchronization-complement.rb +4 -2
  301. data/test/pnml/spec_pione-element.rb +116 -37
  302. data/test/pnml/spec_pnml-element.rb +32 -8
  303. data/test/rule-engine/spec_action-handler.rb +12 -20
  304. metadata +159 -16
  305. data/example/CTFCorrection/package.yml +0 -1
  306. data/example/DeferredChoice/bin/ui.xml +0 -28
@@ -35,7 +35,7 @@ module Pione
35
35
  @package_id = param[:package_id]
36
36
  @rule_name = param[:rule_name]
37
37
  @rule_definition = param[:rule_definition]
38
- @rule_condition = @rule_definition.rule_condition_context.eval(@env)
38
+ @rule_condition = eval_rule_condition()
39
39
  @inputs = param[:inputs]
40
40
  @outputs = []
41
41
  @param_set = param[:param_set]
@@ -51,6 +51,9 @@ module Pione
51
51
  end
52
52
 
53
53
  # Handle the rule and return the outputs.
54
+ #
55
+ # @return [Boolean]
56
+ # true if rule execution has succeeded, or false
54
57
  def handle
55
58
  # make rule and task process log
56
59
  process_log(make_task_process_record.merge(transition: "start"))
@@ -65,7 +68,7 @@ module Pione
65
68
  Log::DomainLog.new(self).save
66
69
 
67
70
  # save a domain dump file
68
- domain_dump_location = @working_directory ? @working_directory :@domain_location
71
+ domain_dump_location = @working_directory ? @working_directory.location : @domain_location
69
72
  System::DomainDump.new(env.dumpable).write(domain_dump_location)
70
73
  end
71
74
 
@@ -87,6 +90,14 @@ module Pione
87
90
  # put rule and task process log
88
91
  process_log(make_rule_process_record.merge(transition: "complete"))
89
92
  process_log(make_task_process_record.merge(transition: "complete"))
93
+
94
+ return true
95
+
96
+ rescue Object => e
97
+ user_message("ERROR: " + e.message, 0, "info", :red)
98
+ status = System::Status.error(message: e.message, exception: e)
99
+ write(TupleSpace::CommandTuple.new(name: "terminate", args: [status]))
100
+ return false
90
101
  end
91
102
 
92
103
  # Executes the rule.
@@ -94,6 +105,21 @@ module Pione
94
105
  raise NotImplementError
95
106
  end
96
107
 
108
+ def eval_rule_condition()
109
+ rule_condition = @rule_definition.rule_condition_context.eval(@env)
110
+
111
+ # change to touch operation if the definition is empty rule
112
+ # if @rule_definition.kind_of?(Lang::EmptyRuleDefinition)
113
+ # rule_condition.outputs.each do |output|
114
+ # if output.operation == :write
115
+ # output.set(operation: :touch)
116
+ # end
117
+ # end
118
+ # end
119
+
120
+ return rule_condition
121
+ end
122
+
97
123
  # Make location by data name and the domain.
98
124
  #
99
125
  # @param name [String]
@@ -180,7 +206,7 @@ module Pione
180
206
  # Apply touch operation.
181
207
  def apply_touch_operation(condition, tuples)
182
208
  _condition = condition.eval(@env)
183
- if _condition.operation == :touch
209
+ if _condition.operation == :touch or (self.kind_of?(EmptyHandler) and _condition.operation == :write)
184
210
  if tuples.empty?
185
211
  create_data_by_touch_operation(_condition)
186
212
  else
@@ -3,15 +3,19 @@ module Pione
3
3
  # Exception class for rule execution failure.
4
4
  class RuleExecutionError < StandardError
5
5
  def initialize(handler)
6
- @handler = handler
6
+ @rule_name = handler.rule_name
7
+ @inputs = handler.inputs
8
+ @outputs = handler.outputs
9
+ @params = handler.param_set
10
+ @package_id = handler.package_id
7
11
  end
8
12
 
9
13
  def message
10
14
  "Execution error when handling the rule '%s': inputs=%s, output=%s, param_set=%s" % [
11
- @handler.rule_name,
12
- @handler.inputs,
13
- @handler.outputs,
14
- @handler.param_set
15
+ @rule_name,
16
+ @inputs,
17
+ @outputs,
18
+ @param_set
15
19
  ]
16
20
  end
17
21
  end
@@ -35,7 +39,7 @@ module Pione
35
39
  end
36
40
 
37
41
  def message
38
- args = [@handler.rule_name, @handler.package_id, @outputs]
42
+ args = [@rule_name, @package_id, @outputs]
39
43
  "Outputs of rule '%s' in package &%s are invalid: %s" % args
40
44
  end
41
45
  end
@@ -6,16 +6,14 @@ module Pione
6
6
  new(:success)
7
7
  end
8
8
 
9
- def error(message)
10
- new(:error, message)
9
+ def error(property={})
10
+ new(:error, property)
11
11
  end
12
12
  end
13
13
 
14
- attr_reader :message
15
-
16
- def initialize(status, message=nil)
14
+ def initialize(status, property={})
17
15
  @status = status
18
- @message = message
16
+ @property = property
19
17
  end
20
18
 
21
19
  def success?
@@ -25,6 +23,14 @@ module Pione
25
23
  def error?
26
24
  @status == :error
27
25
  end
26
+
27
+ def message
28
+ @property[:message]
29
+ end
30
+
31
+ def exception
32
+ @property[:exception]
33
+ end
28
34
  end
29
35
  end
30
36
  end
data/lib/pione/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Pione
2
2
  # version of pione
3
- VERSION = "0.4.2"
3
+ VERSION = "0.5.0.alpha.1"
4
4
  end
@@ -0,0 +1,45 @@
1
+ # <%= cmd.name %>
2
+
3
+ <%= cmd.desc %>
4
+
5
+ ## Usage
6
+
7
+ <%- if cmd.has_subcommands? -%>
8
+ <%= cmd.name %> <command>
9
+ <%- else -%>
10
+ <%= cmd.name %> [options] <%= argument_list %>
11
+ <%- end -%>
12
+ <%- if not(cmd.has_subcommands?) and not(arguments.empty?) -%>
13
+
14
+ ## Arguments
15
+
16
+ <%- arguments.each do |arg| -%>
17
+ <%= arg.name %>
18
+ : <%= arg.desc %>
19
+ <%- end -%>
20
+
21
+ <%- end -%>
22
+ <%- if cmd.has_subcommands? -%>
23
+
24
+ ## Commands
25
+
26
+ <%- cmd.subcommand.each do |key, subcmd| -%>
27
+ <%= key %>
28
+ : <%= subcmd.desc %>
29
+ <%- end -%>
30
+
31
+ <%- end -%>
32
+ <%- if not(options.empty?) -%>
33
+
34
+ ## Options
35
+
36
+ <%- options.each do |opt| -%>
37
+ <%= option_heading(opt) %>
38
+ : <%= opt.desc %>
39
+
40
+ <%- end -%>
41
+ <%- end -%>
42
+
43
+ ## PIONE version
44
+
45
+ <%= Pione::VERSION %>
data/lib/rootage/help.rb CHANGED
@@ -134,6 +134,7 @@ module Rootage
134
134
  define(:help) do |item|
135
135
  item.type = :symbol_downcase
136
136
  item.range = [:txt, :md]
137
+ item.short = "-h"
137
138
  item.long = "--help"
138
139
  item.arg = "[FORMAT]"
139
140
  item.desc = "Show this help message"
@@ -309,11 +309,29 @@ module Rootage
309
309
 
310
310
  # Exit the running command and return failure status. Note that this
311
311
  # method enters termination phase before it exits.
312
- def abort(msg_or_exception, pos=caller(1).first)
313
- # setup abortion message
312
+ #
313
+ # @param msg_or_exception [String, Exception]
314
+ # a message or exception
315
+ # @param pos [String]
316
+ # error position
317
+ # @param option [Hash]
318
+ # @option option [String] :pos
319
+ # error position
320
+ # @option option [Exception] :exception
321
+ # caused exception
322
+ def abort(msg_or_exception, option={})
323
+ pos = option[:pos] || caller(1).first
324
+
325
+ # show abortion message
314
326
  msg = msg_or_exception.is_a?(Exception) ? msg_or_exception.message : msg_or_exception
315
327
  Log.fatal(msg, pos)
316
328
 
329
+ # show optional exception message
330
+ if option[:exception]
331
+ errs = [option[:exception].message] + option[:exception].backtrace
332
+ Log.fatal(errs.join("\n"), pos)
333
+ end
334
+
317
335
  # set exit status code
318
336
  @exit_status = false
319
337
 
@@ -14,6 +14,7 @@ then
14
14
  local name3="${COMP_WORDS[2]}"
15
15
 
16
16
  case $name2 in
17
+ val) _pione_val_options;;
17
18
  action)
18
19
  case $name3 in
19
20
  exec) _pione_action_exec_options;;
@@ -53,6 +54,7 @@ then
53
54
  build) _pione_package_build_options;;
54
55
  show) _pione_package_show_options;;
55
56
  update) _pione_package_update_options;;
57
+ remove) _pione_package_remove_options;;
56
58
  *) _pione_package_subcommands;;
57
59
  esac;;
58
60
  *) _pione_subcommands;;
@@ -60,7 +62,11 @@ then
60
62
  }
61
63
 
62
64
  _pione_subcommands() {
63
- COMPREPLY=($(compgen -W "action clean compile config diagnosis lang log package" -- "${COMP_WORDS[COMP_CWORD]}"));
65
+ COMPREPLY=($(compgen -W "val action clean compile config diagnosis lang log package" -- "${COMP_WORDS[COMP_CWORD]}"));
66
+ }
67
+
68
+ _pione_val_options() {
69
+ COMPREPLY=($(compgen -W "--debug --domain-dump" -- "${COMP_WORDS[COMP_CWORD]}"));
64
70
  }
65
71
 
66
72
  _pione_action_subcommands() {
@@ -84,7 +90,7 @@ then
84
90
  }
85
91
 
86
92
  _pione_compile_options() {
87
- COMPREPLY=($(compgen -W "--debug --editor --flow-name --package-name --tag" -- "${COMP_WORDS[COMP_CWORD]}"));
93
+ COMPREPLY=($(compgen -W "--action --debug --editor --flow-name --package-name --tag" -- "${COMP_WORDS[COMP_CWORD]}"));
88
94
  }
89
95
 
90
96
  _pione_config_subcommands() {
@@ -136,7 +142,7 @@ then
136
142
  }
137
143
 
138
144
  _pione_package_subcommands() {
139
- COMPREPLY=($(compgen -W "add build show update" -- "${COMP_WORDS[COMP_CWORD]}"));
145
+ COMPREPLY=($(compgen -W "add build show update remove" -- "${COMP_WORDS[COMP_CWORD]}"));
140
146
  }
141
147
 
142
148
  _pione_package_add_options() {
@@ -155,6 +161,10 @@ then
155
161
  COMPREPLY=($(compgen -W "--color --debug --force" -- "${COMP_WORDS[COMP_CWORD]}"));
156
162
  }
157
163
 
164
+ _pione_package_remove_options() {
165
+ COMPREPLY=($(compgen -W "--editor --tag" -- "${COMP_WORDS[COMP_CWORD]}"));
166
+ }
167
+
158
168
  #
159
169
  # `pione-client` command
160
170
  #
@@ -168,7 +178,7 @@ then
168
178
  }
169
179
 
170
180
  _pione-client_options() {
171
- COMPREPLY=($(compgen -W "--color --communication-address --debug --dry-run --features --file-cache-method --file-sliding --input --notification-receiver --notification-target --output --params="{Var:1,...}" --parent-front --rehearse --request-task-worker --stand-alone --stream --task-worker-size --timeout" -- "${COMP_WORDS[COMP_CWORD]}"));
181
+ COMPREPLY=($(compgen -W "--base --client-ui --color --communication-address --debug --dry-run --features --file-cache-method --file-sliding --input --notification-receiver --notification-target --params="{Var:1,...}" --parent-front --rehearse --request-from --request-task-worker --session-id --stand-alone --stream --task-worker-size --timeout" -- "${COMP_WORDS[COMP_CWORD]}"));
172
182
  }
173
183
 
174
184
  #
@@ -184,7 +194,7 @@ then
184
194
  }
185
195
 
186
196
  _pione-task-worker_options() {
187
- COMPREPLY=($(compgen -W "--color --communication-address --debug --features --file-cache-method --file-sliding --parent-front --tuple-space-id" -- "${COMP_WORDS[COMP_CWORD]}"));
197
+ COMPREPLY=($(compgen -W "--color --communication-address --debug --features --file-cache-method --file-sliding --parent-front --request-from --session-id --tuple-space-id" -- "${COMP_WORDS[COMP_CWORD]}"));
188
198
  }
189
199
 
190
200
  #
@@ -14,6 +14,7 @@ then
14
14
  local name3="${words[3]}"
15
15
 
16
16
  case $name2 in
17
+ val) _pione_val_options;;
17
18
  action)
18
19
  case $name3 in
19
20
  exec) _pione_action_exec_options;;
@@ -53,6 +54,7 @@ then
53
54
  build) _pione_package_build_options;;
54
55
  show) _pione_package_show_options;;
55
56
  update) _pione_package_update_options;;
57
+ remove) _pione_package_remove_options;;
56
58
  *) _pione_package_subcommands;;
57
59
  esac;;
58
60
  *) _pione_subcommands;;
@@ -60,7 +62,11 @@ then
60
62
  }
61
63
 
62
64
  _pione_subcommands() {
63
- list=(action:"execute an action in literate action document" clean:"Remove PIONE's temporary files, cache, and etc" compile:"translate from PNML to PIONE document" config:"Configure PIONE global variables" diagnosis:"PIONE diagnosis tools" lang:"PIONE language utilities" log:"Log utilities" package:"PIONE package utility") _describe -t common-commands 'common commands' list;
65
+ list=(val:"Get the value of the PIONE expression" action:"execute an action in literate action document" clean:"Remove PIONE's temporary files, cache, and etc" compile:"translate from PNML to PIONE document" config:"Configure PIONE global variables" diagnosis:"PIONE diagnosis tools" lang:"PIONE language utilities" log:"Log utilities" package:"PIONE package utility") _describe -t common-commands 'common commands' list;
66
+ }
67
+
68
+ _pione_val_options() {
69
+ _arguments -s -S "--debug[Turn on debug mode about the type]" "--domain-dump[Import the domain dump file]" '*:file:_files' && return 0;
64
70
  }
65
71
 
66
72
  _pione_action_subcommands() {
@@ -84,7 +90,7 @@ then
84
90
  }
85
91
 
86
92
  _pione_compile_options() {
87
- _arguments -s -S "--debug[Turn on debug mode about the type]" "--editor[Set package editor]" "--flow-name[Set flow name]" "--package-name[Set package name]" "--tag[Set package tag]" '*:file:_files' && return 0;
93
+ _arguments -s -S "--action[Set a literate action document]" "--debug[Turn on debug mode about the type]" "--editor[Set package editor]" "--flow-name[Set flow name]" "--package-name[Set package name]" "--tag[Set package tag]" '*:file:_files' && return 0;
88
94
  }
89
95
 
90
96
  _pione_config_subcommands() {
@@ -136,7 +142,7 @@ then
136
142
  }
137
143
 
138
144
  _pione_package_subcommands() {
139
- list=(add:"Add the package to package database" build:"Build PIONE archive package" show:"Show the package informations" update:"Update the package to package database") _describe -t common-commands 'common commands' list;
145
+ list=(add:"Add the package to package database" build:"Build PIONE archive package" show:"Show the package informations" update:"Update the package to package database" remove:"Remove the package from package database") _describe -t common-commands 'common commands' list;
140
146
  }
141
147
 
142
148
  _pione_package_add_options() {
@@ -152,7 +158,11 @@ then
152
158
  }
153
159
 
154
160
  _pione_package_update_options() {
155
- _arguments -s -S "--color[Turn on/off color mode]" "--debug[Turn on debug mode about the type]" "--force[update pacakge info files]" '*:file:_files' && return 0;
161
+ _arguments -s -S "--color[Turn on/off color mode]" "--debug[Turn on debug mode about the type]" "--force[Update pacakge information files]" '*:file:_files' && return 0;
162
+ }
163
+
164
+ _pione_package_remove_options() {
165
+ _arguments -s -S "--editor[Specify editor name]" "--tag[Specify tag name]" '*:file:_files' && return 0;
156
166
  }
157
167
 
158
168
  #
@@ -168,7 +178,7 @@ then
168
178
  }
169
179
 
170
180
  _pione-client_options() {
171
- _arguments -s -S "--color[Turn on/off color mode]" "--communication-address[Set the IP address for interprocess communication]" "--debug[Turn on debug mode about the type]" "--dry-run[Turn on dry run mode]" "--features[Set features]" "--file-cache-method[use NAME as a file cache method]" "--file-sliding[Enable/disable to slide files in file server]" "--input[Set input directory]" "--notification-receiver[Receiver address that notifications are received at]" "--notification-target[Target address that notifications are sent to]" "--output[Set output directory]" "--params="{Var:1,...}"[Set user parameters]" "--parent-front[set parent front URI]" "--rehearse[rehearse the scenario]" "--request-task-worker[Set request number of task workers]" "--stand-alone[Turn on stand alone mode]" "--stream[Turn on/off stream mode]" "--task-worker-size[Set task worker size that this process creates]" "--timeout[timeout processing after SEC]" '*:file:_files' && return 0;
181
+ _arguments -s -S "--base[Set process base location]" "--client-ui[Type of the client's user interface]" "--color[Turn on/off color mode]" "--communication-address[Set the IP address for interprocess communication]" "--debug[Turn on debug mode about the type]" "--dry-run[Turn on dry run mode]" "--features[Set features]" "--file-cache-method[use NAME as a file cache method]" "--file-sliding[Enable/disable to slide files in file server]" "--input[Set input directory]" "--notification-receiver[Receiver address that notifications are received at]" "--notification-target[Target address that notifications are sent to]" "--params="{Var:1,...}"[Set user parameters]" "--parent-front[set parent front URI]" "--rehearse[rehearse the scenario]" "--request-from[URI that the client requested the job from]" "--request-task-worker[Set request number of task workers]" "--session-id[Session id of the job]" "--stand-alone[Turn on stand alone mode]" "--stream[Turn on/off stream mode]" "--task-worker-size[Set task worker size that this process creates]" "--timeout[timeout processing after SEC]" '*:file:_files' && return 0;
172
182
  }
173
183
 
174
184
  #
@@ -184,7 +194,7 @@ then
184
194
  }
185
195
 
186
196
  _pione-task-worker_options() {
187
- _arguments -s -S "--color[Turn on/off color mode]" "--communication-address[Set the IP address for interprocess communication]" "--debug[Turn on debug mode about the type]" "--features[Set features]" "--file-cache-method[use NAME as a file cache method]" "--file-sliding[Enable/disable to slide files in file server]" "--parent-front[set parent front URI]" "--tuple-space-id[Tuple space ID that the worker joins]" '*:file:_files' && return 0;
197
+ _arguments -s -S "--color[Turn on/off color mode]" "--communication-address[Set the IP address for interprocess communication]" "--debug[Turn on debug mode about the type]" "--features[Set features]" "--file-cache-method[use NAME as a file cache method]" "--file-sliding[Enable/disable to slide files in file server]" "--parent-front[set parent front URI]" "--request-from[URI that the client requested the job from]" "--session-id[Session id of the job]" "--tuple-space-id[Tuple space ID that the worker joins]" '*:file:_files' && return 0;
188
198
  }
189
199
 
190
200
  #
@@ -15,32 +15,32 @@ TestHelper.scope do |this|
15
15
  path = Temppath.create
16
16
  cmd = @cmd.new(["example/HelloWorld/HelloWorld.pione", "--base", path.to_s])
17
17
  res = Rootage::ScenarioTest.succeed(cmd)
18
- Location[path + "message.txt"].should.exist
19
- Location[path + "message.txt"].read.should.start_with "Hello, world!"
18
+ Location[path + "output" + "message.txt"].should.exist
19
+ Location[path + "output" + "message.txt"].read.should.start_with "Hello, world!"
20
20
  end
21
21
 
22
22
  it "should execute a PIONE document with stand alone mode" do
23
23
  path = Temppath.create
24
24
  cmd = @cmd.new(["example/HelloWorld/HelloWorld.pione", "--base", path.to_s, "--stand-alone"])
25
25
  Rootage::ScenarioTest.succeed(cmd)
26
- Location[path + "message.txt"].should.exist
27
- Location[path + "message.txt"].read.should.start_with "Hello, world!"
26
+ Location[path + "output" + "message.txt"].should.exist
27
+ Location[path + "output" + "message.txt"].read.should.start_with "Hello, world!"
28
28
  end
29
29
 
30
30
  it "should execute a PIONE package" do
31
31
  path = Temppath.create
32
- cmd = @cmd.new(["example/HelloWorld/", "-o", path.to_s])
32
+ cmd = @cmd.new(["example/HelloWorld/", "--base", path.to_s])
33
33
  Rootage::ScenarioTest.succeed(cmd)
34
- Location[path + "message.txt"].should.exist
35
- Location[path + "message.txt"].read.should.start_with "Hello, world!"
34
+ Location[path + "output" + "message.txt"].should.exist
35
+ Location[path + "output" + "message.txt"].read.should.start_with "Hello, world!"
36
36
  end
37
37
 
38
38
  it "should execute a PIONE package with stand alone mode" do
39
39
  path = Temppath.create
40
40
  cmd = @cmd.new(["example/HelloWorld/", "--base", path.to_s, "--stand-alone"])
41
41
  Rootage::ScenarioTest.succeed(cmd)
42
- Location[path + "message.txt"].should.exist
43
- Location[path + "message.txt"].read.should.start_with "Hello, world!"
42
+ Location[path + "output" + "message.txt"].should.exist
43
+ Location[path + "output" + "message.txt"].read.should.start_with "Hello, world!"
44
44
  end
45
45
 
46
46
  it "should fail with action error" do
@@ -55,8 +55,8 @@ TestHelper.scope do |this|
55
55
  runner.title = "should get a result with no parameters (default fib(3))"
56
56
  runner.args = ["example/Fib/Fib.pione", *runner.default_arguments]
57
57
  runner.run do |base|
58
- (base + "result.txt").should.exist
59
- (base + "result.txt").read.should.start_with "2"
58
+ (base + "output" + "result.txt").should.exist
59
+ (base + "output" + "result.txt").read.should.start_with "2"
60
60
  end
61
61
  end
62
62
 
@@ -78,8 +78,8 @@ TestHelper.scope do |this|
78
78
  runner.title = "should get a result of example/PegasusWMS/Merge"
79
79
  runner.args = ["example/PegasusWMS/Merge/", *runner.default_arguments]
80
80
  runner.run do |base|
81
- (base + "binaries.txt").should.exist
82
- (base + "binaries.txt").size.should > 0
81
+ (base + "output" + "binaries.txt").should.exist
82
+ (base + "output" + "binaries.txt").size.should > 0
83
83
  end
84
84
  end
85
85
  end
@@ -90,8 +90,8 @@ TestHelper.scope do |this|
90
90
  runner.title = "should get a result of example/PegasusWMS/Pipeline"
91
91
  runner.args = ["example/PegasusWMS/Pipeline/", *runner.default_arguments]
92
92
  runner.run do |base|
93
- (base + "count.txt").should.exist
94
- (base + "count.txt").size.should > 0
93
+ (base + "output" + "count.txt").should.exist
94
+ (base + "output" + "count.txt").size.should > 0
95
95
  end
96
96
  end
97
97
  else
@@ -105,14 +105,14 @@ TestHelper.scope do |this|
105
105
  runner.title = "should get a result of example/PegasusWMS/Split"
106
106
  runner.args = ["example/PegasusWMS/Split/", *runner.default_arguments]
107
107
  runner.run do |base|
108
- (base + "count.txt.a").should.exist
109
- (base + "count.txt.a").size.should > 0
110
- (base + "count.txt.b").should.exist
111
- (base + "count.txt.b").size.should > 0
112
- (base + "count.txt.c").should.exist
113
- (base + "count.txt.c").size.should > 0
114
- (base + "count.txt.d").should.exist
115
- (base + "count.txt.d").size.should > 0
108
+ (base + "output" + "count.txt.a").should.exist
109
+ (base + "output" + "count.txt.a").size.should > 0
110
+ (base + "output" + "count.txt.b").should.exist
111
+ (base + "output" + "count.txt.b").size.should > 0
112
+ (base + "output" + "count.txt.c").should.exist
113
+ (base + "output" + "count.txt.c").size.should > 0
114
+ (base + "output" + "count.txt.d").should.exist
115
+ (base + "output" + "count.txt.d").size.should > 0
116
116
  end
117
117
  end
118
118
  else
@@ -125,16 +125,16 @@ TestHelper.scope do |this|
125
125
  runner.title = "should get a result of example/OddSelector"
126
126
  runner.args = ["example/OddSelector", "--rehearse", *runner.default_arguments]
127
127
  runner.run do |base|
128
- (base + "1.res").should.exist
129
- (base + "2.res").should.not.exist
130
- (base + "3.res").should.exist
131
- (base + "4.res").should.not.exist
132
- (base + "5.res").should.exist
133
- (base + "6.res").should.not.exist
134
- (base + "7.res").should.exist
135
- (base + "8.res").should.not.exist
136
- (base + "9.res").should.exist
137
- (base + "10.res").should.not.exist
128
+ (base + "output" + "1.res").should.exist
129
+ (base + "output" + "2.res").should.not.exist
130
+ (base + "output" + "3.res").should.exist
131
+ (base + "output" + "4.res").should.not.exist
132
+ (base + "output" + "5.res").should.exist
133
+ (base + "output" + "6.res").should.not.exist
134
+ (base + "output" + "7.res").should.exist
135
+ (base + "output" + "8.res").should.not.exist
136
+ (base + "output" + "9.res").should.exist
137
+ (base + "output" + "10.res").should.not.exist
138
138
  end
139
139
  end
140
140
  end
@@ -144,21 +144,21 @@ TestHelper.scope do |this|
144
144
  runner.title = "should get a result of example/SerialProcessing"
145
145
  runner.args = ["example/SerialProcessing", "--rehearse", *runner.default_arguments]
146
146
  runner.run do |base|
147
- (base + "1.a").should.exist
148
- (base + "2.a").should.exist
149
- (base + "3.a").should.exist
150
- (base + "4.a").should.exist
151
- (base + "1.b").should.exist
152
- (base + "2.b").should.exist
153
- (base + "3.b").should.exist
154
- (base + "4.b").should.exist
155
- (base + "1.a").mtime.should <= (base + "2.a").mtime
156
- (base + "2.a").mtime.should <= (base + "3.a").mtime
157
- (base + "3.a").mtime.should <= (base + "4.a").mtime
158
- (base + "4.a").mtime.should <= (base + "1.b").mtime
159
- (base + "1.b").mtime.should <= (base + "2.b").mtime
160
- (base + "2.b").mtime.should <= (base + "3.b").mtime
161
- (base + "3.b").mtime.should <= (base + "4.b").mtime
147
+ (base + "output" + "1.a").should.exist
148
+ (base + "output" + "2.a").should.exist
149
+ (base + "output" + "3.a").should.exist
150
+ (base + "output" + "4.a").should.exist
151
+ (base + "output" + "1.b").should.exist
152
+ (base + "output" + "2.b").should.exist
153
+ (base + "output" + "3.b").should.exist
154
+ (base + "output" + "4.b").should.exist
155
+ (base + "output" + "1.a").mtime.should <= (base + "output" + "2.a").mtime
156
+ (base + "output" + "2.a").mtime.should <= (base + "output" + "3.a").mtime
157
+ (base + "output" + "3.a").mtime.should <= (base + "output" + "4.a").mtime
158
+ (base + "output" + "4.a").mtime.should <= (base + "output" + "1.b").mtime
159
+ (base + "output" + "1.b").mtime.should <= (base + "output" + "2.b").mtime
160
+ (base + "output" + "2.b").mtime.should <= (base + "output" + "3.b").mtime
161
+ (base + "output" + "3.b").mtime.should <= (base + "output" + "4.b").mtime
162
162
  end
163
163
  end
164
164
  end
@@ -170,11 +170,11 @@ TestHelper.scope do |this|
170
170
  runner.run do |base|
171
171
  1.upto(5) do |i|
172
172
  1.upto(5) do |ii|
173
- comb = (base + "comb-%s-%s.pair" % [i, ii])
173
+ comb = (base + "output" + "comb-%s-%s.pair" % [i, ii])
174
174
  i < ii ? comb.should.exist : comb.should.not.exist
175
- perm = (base + "perm-%s-%s.pair" % [i, ii])
175
+ perm = (base + "output" + "perm-%s-%s.pair" % [i, ii])
176
176
  i != ii ? perm.should.exist : perm.should.not.exist
177
- succ = (base + "succ-%s-%s.pair" % [i, ii])
177
+ succ = (base + "output" + "succ-%s-%s.pair" % [i, ii])
178
178
  ii - i == 1 ? succ.should.exist : succ.should.not.exist
179
179
  end
180
180
  end
@@ -187,8 +187,8 @@ TestHelper.scope do |this|
187
187
  runner.title = "should get a result of scenario a of example/SelectRuleByParam"
188
188
  runner.args = ["example/SelectRuleByParam", "--rehearse", "Select A", *runner.default_arguments]
189
189
  runner.run do |base|
190
- (base + "message.txt").should.exist
191
- (base + "message.txt").read.chomp.should == "This is rule A."
190
+ (base + "output" + "message.txt").should.exist
191
+ (base + "output" + "message.txt").read.chomp.should == "This is rule A."
192
192
  end
193
193
  end
194
194
 
@@ -196,8 +196,8 @@ TestHelper.scope do |this|
196
196
  runner.title = "should get a result of scenario b of example/SelectRuleByParam"
197
197
  runner.args = ["example/SelectRuleByParam", "--rehearse", "Select B", *runner.default_arguments]
198
198
  runner.run do |base|
199
- (base + "message.txt").should.exist
200
- (base + "message.txt").read.chomp.should == "This is rule B."
199
+ (base + "output" + "message.txt").should.exist
200
+ (base + "output" + "message.txt").read.chomp.should == "This is rule B."
201
201
  end
202
202
  end
203
203
 
@@ -205,8 +205,8 @@ TestHelper.scope do |this|
205
205
  runner.title = "should get a result of scenario c of example/SelectRuleByParam"
206
206
  runner.args = ["example/SelectRuleByParam", "--rehearse", "Select C", *runner.default_arguments]
207
207
  runner.run do |base|
208
- (base + "message.txt").should.exist
209
- (base + "message.txt").read.chomp.should == "This is rule C."
208
+ (base + "output" + "message.txt").should.exist
209
+ (base + "output" + "message.txt").read.chomp.should == "This is rule C."
210
210
  end
211
211
  end
212
212
  end
@@ -216,8 +216,8 @@ TestHelper.scope do |this|
216
216
  runner.title = "should get a result of example/FeatureExample"
217
217
  runner.args = ["example/FeatureExample", "--feature", "^X", *runner.default_arguments]
218
218
  runner.run do |base|
219
- (base + "message.txt").should.exist
220
- (base + "message.txt").read.chomp.should == "I can take the task."
219
+ (base + "output" + "message.txt").should.exist
220
+ (base + "output" + "message.txt").read.chomp.should == "I can take the task."
221
221
  end
222
222
  end
223
223
 
@@ -233,7 +233,7 @@ TestHelper.scope do |this|
233
233
  runner.title = "should get a result of example/Sum"
234
234
  runner.args = ["example/Sum", "--rehearse", *runner.default_arguments]
235
235
  runner.run do |base|
236
- (base + "sum.txt").should.exist
236
+ (base + "output" + "sum.txt").should.exist
237
237
  end
238
238
  end
239
239
  end