pione 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +3 -2
- data/History.txt +6 -0
- data/Rakefile +1 -1
- data/bin/pione-broker +1 -1
- data/bin/pione-clean +1 -1
- data/bin/pione-client +1 -1
- data/bin/pione-log +1 -1
- data/bin/pione-relay +1 -1
- data/bin/pione-relay-account-db +1 -1
- data/bin/pione-relay-client-db +1 -1
- data/bin/pione-syntax-checker +1 -1
- data/bin/pione-task-worker +1 -1
- data/bin/pione-tuple-space-provider +1 -1
- data/bin/pione-tuple-space-receiver +1 -1
- data/bin/pione-tuple-space-viewer +1 -1
- data/bin/pione-val +1 -1
- data/example/CTFCorrection/CTFCorrection.pione +78 -0
- data/example/CTFCorrection/package.yml +1 -0
- data/example/HelloWorld/scenario/output/message.txt +1 -0
- data/example/LoopByTouch/LoopByTouch.pione +10 -18
- data/example/LoopByTouch/PairLoop.pione +18 -0
- data/example/LoopByTouch/SingleLoop.pione +5 -0
- data/example/LoopByTouch/TripletLoop.pione +24 -0
- data/example/MakePair/scenario/output/comb-1-2.pair +0 -0
- data/example/MakePair/scenario/output/comb-1-3.pair +0 -0
- data/example/MakePair/scenario/output/comb-1-4.pair +0 -0
- data/example/MakePair/scenario/output/comb-1-5.pair +0 -0
- data/example/MakePair/scenario/output/comb-2-3.pair +0 -0
- data/example/MakePair/scenario/output/comb-2-4.pair +0 -0
- data/example/MakePair/scenario/output/comb-2-5.pair +0 -0
- data/example/MakePair/scenario/output/comb-3-4.pair +0 -0
- data/example/MakePair/scenario/output/comb-3-5.pair +0 -0
- data/example/MakePair/scenario/output/comb-4-5.pair +0 -0
- data/example/MakePair/scenario/output/perm-1-2.pair +0 -0
- data/example/MakePair/scenario/output/perm-1-3.pair +0 -0
- data/example/MakePair/scenario/output/perm-1-4.pair +0 -0
- data/example/MakePair/scenario/output/perm-1-5.pair +0 -0
- data/example/MakePair/scenario/output/perm-2-1.pair +0 -0
- data/example/MakePair/scenario/output/perm-2-3.pair +0 -0
- data/example/MakePair/scenario/output/perm-2-4.pair +0 -0
- data/example/MakePair/scenario/output/perm-2-5.pair +0 -0
- data/example/MakePair/scenario/output/perm-3-1.pair +0 -0
- data/example/MakePair/scenario/output/perm-3-2.pair +0 -0
- data/example/MakePair/scenario/output/perm-3-4.pair +0 -0
- data/example/MakePair/scenario/output/perm-3-5.pair +0 -0
- data/example/MakePair/scenario/output/perm-4-1.pair +0 -0
- data/example/MakePair/scenario/output/perm-4-2.pair +0 -0
- data/example/MakePair/scenario/output/perm-4-3.pair +0 -0
- data/example/MakePair/scenario/output/perm-4-5.pair +0 -0
- data/example/MakePair/scenario/output/perm-5-1.pair +0 -0
- data/example/MakePair/scenario/output/perm-5-2.pair +0 -0
- data/example/MakePair/scenario/output/perm-5-3.pair +0 -0
- data/example/MakePair/scenario/output/perm-5-4.pair +0 -0
- data/example/MakePair/scenario/output/succ-1-2.pair +0 -0
- data/example/MakePair/scenario/output/succ-2-3.pair +0 -0
- data/example/MakePair/scenario/output/succ-3-4.pair +0 -0
- data/example/MakePair/scenario/output/succ-4-5.pair +0 -0
- data/example/SyntaxError/output_line_error.pione +6 -0
- data/example/WorkflowPatterns/38_GeneralSynchronizingMerge/GeneralSynchronizingMerge.pione +94 -0
- data/lib/pione.rb +1 -10
- data/lib/pione/agent/process-manager.rb +6 -5
- data/lib/pione/agent/rule-provider.rb +7 -9
- data/lib/pione/agent/task-worker.rb +1 -1
- data/lib/pione/command.rb +1 -0
- data/lib/pione/command/basic-command.rb +12 -77
- data/lib/pione/command/child-process.rb +19 -13
- data/lib/pione/command/daemon-process.rb +0 -9
- data/lib/pione/command/front-owner-command.rb +0 -6
- data/lib/pione/command/option.rb +243 -0
- data/lib/pione/command/pione-broker.rb +10 -5
- data/lib/pione/command/pione-clean.rb +4 -0
- data/lib/pione/command/pione-client.rb +257 -210
- data/lib/pione/command/pione-log.rb +38 -19
- data/lib/pione/command/pione-relay-account-db.rb +42 -17
- data/lib/pione/command/pione-relay-client-db.rb +35 -14
- data/lib/pione/command/pione-relay.rb +16 -8
- data/lib/pione/command/pione-syntax-checker.rb +33 -13
- data/lib/pione/command/pione-task-worker.rb +26 -23
- data/lib/pione/command/pione-tuple-space-provider.rb +8 -17
- data/lib/pione/command/pione-tuple-space-receiver.rb +13 -3
- data/lib/pione/command/pione-tuple-space-viewer.rb +42 -23
- data/lib/pione/command/pione-val.rb +15 -7
- data/lib/pione/component/document.rb +49 -70
- data/lib/pione/component/package.rb +125 -83
- data/lib/pione/location/basic-location.rb +1 -0
- data/lib/pione/model/assignment.rb +11 -0
- data/lib/pione/model/parameters.rb +10 -0
- data/lib/pione/model/variable.rb +14 -0
- data/lib/pione/parser/common-parser.rb +4 -0
- data/lib/pione/parser/document-parser.rb +4 -3
- data/lib/pione/parser/rule-definition-parser.rb +2 -1
- data/lib/pione/patch/rinda-patch.rb +1 -1
- data/lib/pione/rule-handler/action-handler.rb +6 -1
- data/lib/pione/rule-handler/basic-handler.rb +0 -6
- data/lib/pione/rule-handler/flow-handler.rb +14 -9
- data/lib/pione/system/global.rb +3 -0
- data/lib/pione/system/package-cache.rb +18 -0
- data/lib/pione/transformer/document-transformer.rb +26 -3
- data/lib/pione/transformer/rule-definition-transformer.rb +10 -2
- data/lib/pione/tuple-space/presence-notifier.rb +4 -3
- data/lib/pione/uri-scheme.rb +11 -0
- data/lib/pione/uri-scheme/git-scheme.rb +12 -0
- data/lib/pione/util.rb +2 -0
- data/lib/pione/util/package-parameters-list.rb +32 -0
- data/lib/pione/util/process-info.rb +21 -0
- data/lib/pione/version.rb +1 -1
- data/pione.gemspec +1 -1
- data/test/agent/spec_rule-provider.rb +57 -44
- data/test/command/command-behavior.rb +15 -0
- data/test/command/spec_pione-client.rb +56 -0
- data/test/command/spec_pione-val.domain.dump +0 -0
- data/test/command/spec_pione-val.rb +22 -0
- data/test/component/spec_document.pione +51 -0
- data/test/component/spec_document.rb +41 -70
- data/test/component/spec_package.rb +18 -3
- data/test/parser/spec_document-parser.yml +15 -0
- data/test/parser/spec_rule-definition-parser.yml +7 -2
- data/test/rule-handler/spec_action-handler.rb +6 -6
- data/test/rule-handler/spec_flow-handler.pione +25 -0
- data/test/rule-handler/spec_flow-handler.rb +35 -95
- data/test/rule-handler/spec_update-criteria.rb +2 -2
- data/test/test-util.rb +68 -4
- data/test/transformer/spec_block-transformer.rb +1 -1
- data/test/transformer/spec_document-transformer.rb +50 -0
- data/test/transformer/spec_expr-transformer.rb +1 -1
- data/test/transformer/spec_flow-element-transformer.rb +13 -13
- data/test/transformer/spec_literal-transformer.rb +1 -1
- data/test/transformer/spec_rule-definition-transformer.rb +31 -19
- data/test/uri-scheme/spec_git-scheme.rb +20 -0
- data/test/util/spec_id.rb +6 -6
- data/test/util/spec_package-parameters-list.rb +59 -0
- data/test/util/spec_package-parameters-list_1.pione +17 -0
- data/test/util/spec_package-parameters-list_2.pione +13 -0
- data/test/util/spec_package-parameters-list_3.pione +12 -0
- data/test/util/spec_package-parameters-list_4.pione +6 -0
- data/test/util/spec_process-info.rb +56 -0
- metadata +79 -16
- data/lib/pione/option.rb +0 -13
- data/lib/pione/option/child-process-option.rb +0 -19
- data/lib/pione/option/common-option.rb +0 -31
- data/lib/pione/option/option-interface.rb +0 -73
- data/lib/pione/option/presence-notifier-option.rb +0 -16
- data/lib/pione/option/task-worker-owner-option.rb +0 -24
- data/lib/pione/option/tuple-space-provider-option.rb +0 -28
- data/lib/pione/option/tuple-space-provider-owner-option.rb +0 -18
- data/lib/pione/option/tuple-space-receiver-option.rb +0 -8
data/.gitignore
CHANGED
data/History.txt
CHANGED
data/Rakefile
CHANGED
@@ -82,7 +82,7 @@ end
|
|
82
82
|
|
83
83
|
desc 'execute basic tests'
|
84
84
|
task 'test' do
|
85
|
-
sh "bundle exec bacon -I lib -rsimplecov test/parser/spec_*.rb test/transformer/spec_*.rb test/model/spec_*.rb test/log/spec_*.rb test/location/spec_*.rb test/component/spec_*.rb test/util/spec_*.rb test/tuple/spec_*.rb test/uri-scheme/spec_*.rb test/agent/spec_logger.rb test/agent/spec_messenger.rb test/rule-handler/spec_action-handler.rb test/rule-handler/spec_update-criteria.rb test/tuple-space/spec_data-finder.rb test/system/spec_*.rb"
|
85
|
+
sh "bundle exec bacon -I lib -rsimplecov test/parser/spec_*.rb test/transformer/spec_*.rb test/model/spec_*.rb test/log/spec_*.rb test/location/spec_*.rb test/component/spec_*.rb test/util/spec_*.rb test/tuple/spec_*.rb test/uri-scheme/spec_*.rb test/agent/spec_logger.rb test/agent/spec_messenger.rb test/agent/spec_rule-provider.rb test/rule-handler/spec_action-handler.rb test/rule-handler/spec_flow-handler.rb test/rule-handler/spec_update-criteria.rb test/tuple-space/spec_data-finder.rb test/system/spec_*.rb test/command/spec_*.rb"
|
86
86
|
end
|
87
87
|
|
88
88
|
desc 'parser test'
|
data/bin/pione-broker
CHANGED
data/bin/pione-clean
CHANGED
data/bin/pione-client
CHANGED
data/bin/pione-log
CHANGED
data/bin/pione-relay
CHANGED
data/bin/pione-relay-account-db
CHANGED
data/bin/pione-relay-client-db
CHANGED
data/bin/pione-syntax-checker
CHANGED
data/bin/pione-task-worker
CHANGED
data/bin/pione-val
CHANGED
@@ -0,0 +1,78 @@
|
|
1
|
+
Basic Param
|
2
|
+
$RESOLUTION := 3.80 # tiff2mrc -r
|
3
|
+
$CTF_DETERMINE_Cc := 0.7 # ctfDetermine -Cc
|
4
|
+
$CTF_DETERMINE_Cs := 2.1 # ctfDetermine -Cs
|
5
|
+
End
|
6
|
+
|
7
|
+
Advanced Param
|
8
|
+
$TIFF2MRC_m := 0
|
9
|
+
$TIFF2MRC_Offset := 0.0
|
10
|
+
$MRC_IMAGE_CENTER_Nx := 1000 # FIXME
|
11
|
+
$MRC_IMAGE_CENTER_Ny := 1000 # FIXME
|
12
|
+
$MRC_IMAGE_ABNORMAL_VALUE_REMOVE_u_MAX := 65535
|
13
|
+
$MRC_IMAGE_ABNORMAL_VALUE_REMOVE_u_HALF := 16384
|
14
|
+
$MRC_IMAGE_ABNORMAL_VALUE_REMOVE_m := 1
|
15
|
+
$MRC_DETERMINE_D := 50000
|
16
|
+
$MRC_DETERMINE_m := 128
|
17
|
+
$MRC_DETERMINE_CutLow := 0.025
|
18
|
+
$MRC_DETERMINE_CutHigh := 0.15
|
19
|
+
$MRC_DETERMINE_d := 3
|
20
|
+
$MRC_IMAGE_CTF_COMPENSATION_m := 1
|
21
|
+
End
|
22
|
+
|
23
|
+
Rule Main
|
24
|
+
input ('*.tif' or '*.mrc').all
|
25
|
+
output '*.ctf'.all
|
26
|
+
Flow
|
27
|
+
rule Tiff2Mrc
|
28
|
+
rule Mrc2Cen
|
29
|
+
rule Cen2Nor
|
30
|
+
rule Nor2Fft
|
31
|
+
rule Fft2Ctfinfo
|
32
|
+
rule Ctfinfo2Ctf
|
33
|
+
End
|
34
|
+
|
35
|
+
Rule Tiff2Mrc
|
36
|
+
input '*.tif'
|
37
|
+
output '{$*}.mrc'
|
38
|
+
Action
|
39
|
+
tiff2mrc -i {$I[1]} -o {$O[1]}.mrc -r {$RESOLUTION} -m {$TIFF2MRC_m} -Offset {$TIFF2MRC_Offset}
|
40
|
+
End
|
41
|
+
|
42
|
+
Rule Mrc2Cen
|
43
|
+
input '*.mrc'
|
44
|
+
output '{$*}.cen'
|
45
|
+
Action
|
46
|
+
mrcImageCenterGet -i {$I[1]} -o {$O[1]} -Nx {$MRC_IMAGE_CENTER_Nx} -Ny {$MRC_IMAGE_CENTER_Ny}
|
47
|
+
End
|
48
|
+
|
49
|
+
Rule Cen2Nor
|
50
|
+
input '*.cen'
|
51
|
+
output '{$*}.nor'
|
52
|
+
Action
|
53
|
+
mrcImageAbnormalValueRemove -i {$I[1]} -o {$O[1]} -u {$MRC_IMAGE_ABNORMAL_VALUE_REMOVE_u_MAX} {$MRC_IMAGE_ABNORMAL_VALUE_REMOVE_u_HALF} -m {$MRC_IMAGE_ABNORMAL_VALUE_REMOVE_m}
|
54
|
+
End
|
55
|
+
|
56
|
+
Rule Nor2Fft
|
57
|
+
input '*.nor'
|
58
|
+
output '{$*}.fft'
|
59
|
+
Action
|
60
|
+
mrcImageFFT -i {$I[1]} -o {$O[1]}
|
61
|
+
End
|
62
|
+
|
63
|
+
Rule Fft2Ctfinfo
|
64
|
+
input '*.fft'
|
65
|
+
output '{$*}.ctfinfo'
|
66
|
+
Action
|
67
|
+
ctfDetermine -i {$I[1]} -o {$O[1]} -D {$MRC_DETERMINE_D} -m {$MRC_DETERMINE_m} -CutLow {$MRC_DETERMINE_CutLow} -CutHigh {$MRC_DETERMINE_CutHigh} -d {$MRC_DETERMINE_d} -Cc {$CTF_DETERMINE_Cc} -Cs {$CTF_DETERMINE_Cs}
|
68
|
+
End
|
69
|
+
|
70
|
+
Rule Ctfinfo2Ctf
|
71
|
+
input '*.fft'
|
72
|
+
input '{$*}.ctfinfo'
|
73
|
+
output '{$*}.ctf'
|
74
|
+
Action
|
75
|
+
mv {$I[2]} {$I[2]}.tmp2
|
76
|
+
grep .: {$I[2]}.tmp2 > {$I[2]}
|
77
|
+
mrcImageCTFCompensation -i {$I[1]} -info2 {$I[2]} -o {$O[1]} -m {$MRC_IMAGE_CTF_COMPENSATION_m}
|
78
|
+
End
|
@@ -0,0 +1 @@
|
|
1
|
+
PackageName: CTFCorrection
|
@@ -0,0 +1 @@
|
|
1
|
+
Hello, world!
|
@@ -1,28 +1,20 @@
|
|
1
|
+
param $N := 3
|
2
|
+
|
1
3
|
Rule Main
|
2
4
|
output '1' or '2' or '3'
|
3
5
|
Flow
|
4
6
|
rule Init
|
5
|
-
|
6
|
-
|
7
|
-
|
7
|
+
case $N
|
8
|
+
when 1
|
9
|
+
rule SingleLoop
|
10
|
+
when 2
|
11
|
+
rule PairLoop
|
12
|
+
when 3
|
13
|
+
rule TripletLoop
|
14
|
+
end
|
8
15
|
End
|
9
16
|
|
10
17
|
Rule Init
|
11
18
|
output '1'.touch
|
12
19
|
End
|
13
20
|
|
14
|
-
Rule A
|
15
|
-
input '1'
|
16
|
-
output '2'.touch
|
17
|
-
End
|
18
|
-
|
19
|
-
Rule B
|
20
|
-
input '2'
|
21
|
-
output '3'.touch
|
22
|
-
End
|
23
|
-
|
24
|
-
Rule C
|
25
|
-
input '3'
|
26
|
-
output '1'.touch
|
27
|
-
End
|
28
|
-
|
@@ -0,0 +1,24 @@
|
|
1
|
+
Rule TripletLoop
|
2
|
+
input '1'
|
3
|
+
output '2' or '3'
|
4
|
+
Flow
|
5
|
+
rule TripletA
|
6
|
+
rule TripletB
|
7
|
+
rule TripletC
|
8
|
+
End
|
9
|
+
|
10
|
+
Rule TripletA
|
11
|
+
input '1'
|
12
|
+
output '2'.touch
|
13
|
+
End
|
14
|
+
|
15
|
+
Rule TripletB
|
16
|
+
input '2'
|
17
|
+
output '3'.touch
|
18
|
+
End
|
19
|
+
|
20
|
+
Rule TripletC
|
21
|
+
input '3'
|
22
|
+
output '1'.touch
|
23
|
+
End
|
24
|
+
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,94 @@
|
|
1
|
+
param $COND1 := true
|
2
|
+
param $COND2 := not :: $COND1
|
3
|
+
param $COND3 := true # processing is endless if $COND3 is true
|
4
|
+
|
5
|
+
Rule Main
|
6
|
+
output 'o1'
|
7
|
+
output 'o2' or null
|
8
|
+
Flow
|
9
|
+
rule Init
|
10
|
+
rule A
|
11
|
+
rule B
|
12
|
+
rule C
|
13
|
+
rule D
|
14
|
+
rule E
|
15
|
+
rule F
|
16
|
+
End
|
17
|
+
|
18
|
+
Rule Init
|
19
|
+
output 'i1'.touch
|
20
|
+
End
|
21
|
+
|
22
|
+
Rule A
|
23
|
+
input 'i1'
|
24
|
+
output 'p1' or 'p2'
|
25
|
+
Flow
|
26
|
+
rule A1
|
27
|
+
rule A2
|
28
|
+
End
|
29
|
+
|
30
|
+
Rule A1
|
31
|
+
output 'p1'.touch
|
32
|
+
constraint $COND1
|
33
|
+
End
|
34
|
+
|
35
|
+
Rule A2
|
36
|
+
output 'p2'.touch
|
37
|
+
constraint $COND2
|
38
|
+
End
|
39
|
+
|
40
|
+
Rule B
|
41
|
+
input 'p1'
|
42
|
+
output 'p3'.touch
|
43
|
+
End
|
44
|
+
|
45
|
+
Rule C
|
46
|
+
input 'p2'
|
47
|
+
output 'p5'.touch
|
48
|
+
End
|
49
|
+
|
50
|
+
Rule D
|
51
|
+
input 'p3'
|
52
|
+
output 'p4'.touch
|
53
|
+
End
|
54
|
+
|
55
|
+
Rule E
|
56
|
+
input 'p4' or 'p5'
|
57
|
+
output 'o1'.touch
|
58
|
+
End
|
59
|
+
|
60
|
+
Rule F
|
61
|
+
input 'p1'
|
62
|
+
input 'p4'
|
63
|
+
output 'p1' or 'o2'
|
64
|
+
Flow
|
65
|
+
rule Once
|
66
|
+
rule F1
|
67
|
+
rule F2
|
68
|
+
End
|
69
|
+
|
70
|
+
Rule Once
|
71
|
+
output 'once'.touch
|
72
|
+
End
|
73
|
+
|
74
|
+
Rule F1
|
75
|
+
input 'p1'
|
76
|
+
input 'once'
|
77
|
+
output 'p1'
|
78
|
+
constraint $COND3
|
79
|
+
Flow
|
80
|
+
rule F1Touch
|
81
|
+
End
|
82
|
+
|
83
|
+
Rule F1Touch
|
84
|
+
input 'p1'
|
85
|
+
input 'once'
|
86
|
+
output 'p1'.touch
|
87
|
+
output 'once'.remove
|
88
|
+
End
|
89
|
+
|
90
|
+
Rule F2
|
91
|
+
output 'o2'.touch
|
92
|
+
constraint not :: $COND3
|
93
|
+
End
|
94
|
+
|