sfp 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
- include "cloud-classes.sfp"
1
+ include "cloud-schemas.sfp"
2
2
 
3
- class Service {
3
+ schema Service {
4
4
  installed is false
5
5
  running is false
6
6
  on_machine isref Machine
@@ -46,7 +46,7 @@ class Service {
46
46
  }
47
47
  }
48
48
 
49
- class LoadBalancer extends Service {
49
+ schema LoadBalancer extends Service {
50
50
  webs isset WebService
51
51
 
52
52
  procedure start {
@@ -63,7 +63,7 @@ class LoadBalancer extends Service {
63
63
  }
64
64
  }
65
65
 
66
- class WebService extends Service {
66
+ schema WebService extends Service {
67
67
  depend_on isref AppService
68
68
 
69
69
  procedure redirect ( app isref AppService ) {
@@ -99,7 +99,7 @@ class WebService extends Service {
99
99
  }
100
100
  }
101
101
 
102
- class AppService extends Service {
102
+ schema AppService extends Service {
103
103
  depend_on isref DatabaseService
104
104
 
105
105
  procedure redirect ( db isref DatabaseService ) {
@@ -135,7 +135,7 @@ class AppService extends Service {
135
135
  }
136
136
  }
137
137
 
138
- class DatabaseService extends Service {
138
+ schema DatabaseService extends Service {
139
139
  procedure stop {
140
140
  conditions {
141
141
  this.installed is true
@@ -0,0 +1,20 @@
1
+ schema S {
2
+ foo is true
3
+ procedure change {
4
+ conditions {
5
+ }
6
+ effects {
7
+ this.foo is false
8
+ }
9
+ }
10
+ }
11
+
12
+ initial state {
13
+ a isa S
14
+ b isa S
15
+ }
16
+
17
+ goal constraint {
18
+ a.foo is false
19
+ b.foo is false
20
+ }
File without changes
@@ -1,12 +1,6 @@
1
- class S {
2
- foo is true
3
- procedure change {
4
- conditions { }
5
- effects {
6
- this.foo is false
7
- }
8
- }
9
- }
1
+ #!/usr/bin/env sfp
2
+
3
+ include "test1.inc"
10
4
 
11
5
  initial state {
12
6
  a isa S
@@ -1,17 +1,20 @@
1
- include "test2.inc"
1
+ schema S {
2
+ foo is true
3
+ procedure change {
4
+ conditions {
5
+ }
6
+ effects {
7
+ this.foo is false
8
+ }
9
+ }
10
+ }
2
11
 
3
- // generate all possible states with constraint solver
4
12
  initial state {
5
- s1 isa Service
6
- s2 isa Service
7
- s3 isa Service
13
+ a isa S
14
+ b isa S
8
15
  }
16
+
9
17
  goal constraint {
10
- s1.running
11
- s2.running
12
- s3.running
13
- }
14
- global constraint {
15
- if s1.running then s2.running
16
- if s2.running then s3.running
18
+ a.foo is false
19
+ b.foo is false
17
20
  }
File without changes
@@ -0,0 +1,17 @@
1
+ include "test3.inc"
2
+
3
+ // generate all possible states with constraint solver
4
+ initial state {
5
+ s1 isa Service
6
+ s2 isa Service
7
+ s3 isa Service
8
+ }
9
+ goal constraint {
10
+ s1.running
11
+ s2.running
12
+ s3.running
13
+ }
14
+ global constraint {
15
+ if s1.running then s2.running
16
+ if s2.running then s3.running
17
+ }
@@ -1,4 +1,4 @@
1
- class Service {
1
+ schema Service {
2
2
  running is false
3
3
  procedure start {
4
4
  conditions {
@@ -17,7 +17,7 @@ class Service {
17
17
  }
18
18
  }
19
19
  }
20
- class Client {
20
+ schema Client {
21
21
  refer isref Service
22
22
  procedure redirect(s isref Service) {
23
23
  conditions { }
@@ -1,4 +1,4 @@
1
- include "types.sfp"
1
+ include "test4.inc"
2
2
 
3
3
  initial state {
4
4
  a isa Service {
metadata CHANGED
@@ -1,58 +1,74 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: sfp
3
- version: !ruby/object:Gem::Version
4
- version: 0.1.1
5
- prerelease:
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 1
8
+ - 3
9
+ version: 0.1.3
6
10
  platform: ruby
7
- authors:
11
+ authors:
8
12
  - Herry
9
13
  autorequire:
10
14
  bindir: bin
11
15
  cert_chain: []
12
- date: 2013-04-20 00:00:00.000000000 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
16
+
17
+ date: 2013-05-06 00:00:00 +01:00
18
+ default_executable:
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
15
21
  name: json
16
- requirement: &8708440 !ruby/object:Gem::Requirement
17
- none: false
18
- requirements:
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ requirements:
19
25
  - - ~>
20
- - !ruby/object:Gem::Version
26
+ - !ruby/object:Gem::Version
27
+ segments:
28
+ - 1
29
+ - 7
30
+ - 5
21
31
  version: 1.7.5
22
32
  type: :runtime
23
- prerelease: false
24
- version_requirements: *8708440
25
- - !ruby/object:Gem::Dependency
33
+ version_requirements: *id001
34
+ - !ruby/object:Gem::Dependency
26
35
  name: antlr3
27
- requirement: &8707420 !ruby/object:Gem::Requirement
28
- none: false
29
- requirements:
36
+ prerelease: false
37
+ requirement: &id002 !ruby/object:Gem::Requirement
38
+ requirements:
30
39
  - - ~>
31
- - !ruby/object:Gem::Version
40
+ - !ruby/object:Gem::Version
41
+ segments:
42
+ - 1
43
+ - 8
44
+ - 12
32
45
  version: 1.8.12
33
46
  type: :runtime
34
- prerelease: false
35
- version_requirements: *8707420
36
- description: A Ruby gem that provides a Ruby API to SFP language parser and SFP planner.
37
- It also provides a planner sript to solve a planning problem written in SFP language.
47
+ version_requirements: *id002
48
+ description: A Ruby gem that provides a Ruby API to SFP language parser and SFP planner. It also provides a planner sript to solve a planning problem written in SFP language.
38
49
  email: herry13@gmail.com
39
- executables:
50
+ executables:
40
51
  - sfp
41
52
  extensions: []
53
+
42
54
  extra_rdoc_files: []
43
- files:
55
+
56
+ files:
44
57
  - .gitignore
45
58
  - LICENSE
46
59
  - README.md
47
60
  - bin/sfp
48
- - bin/solver/linux/downward
49
- - bin/solver/linux/preprocess
61
+ - bin/solver/linux-arm/downward
62
+ - bin/solver/linux-arm/preprocess
63
+ - bin/solver/linux-x86/downward
64
+ - bin/solver/linux-x86/preprocess
50
65
  - bin/solver/macos/downward
51
66
  - bin/solver/macos/preprocess
52
67
  - lib/sfp.rb
53
68
  - lib/sfp/SfpLangLexer.rb
54
69
  - lib/sfp/SfpLangParser.rb
55
70
  - lib/sfp/Sfplib.rb
71
+ - lib/sfp/executor.rb
56
72
  - lib/sfp/parser.rb
57
73
  - lib/sfp/planner.rb
58
74
  - lib/sfp/sas.rb
@@ -62,60 +78,72 @@ files:
62
78
  - sfp.gemspec
63
79
  - src/SfpLang.g
64
80
  - src/build.sh
65
- - test/cloud-classes.sfp
66
- - test/cloud1.sfp
67
- - test/cloud2.sfp
68
- - test/cloud3.sfp
81
+ - test/cloud-schemas.sfp
82
+ - test/future/test1.sfp
83
+ - test/nd-cloud1.sfp
84
+ - test/nd-cloud2.sfp
85
+ - test/nd-cloud3.sfp
86
+ - test/nd-service1.sfp
87
+ - test/nd-service2.sfp
88
+ - test/run.sh
69
89
  - test/s.sfp
70
- - test/service-classes.sfp
71
- - test/service1.sfp
72
- - test/service3.sfp
73
- - test/task.sfp
74
- - test/test.inc
75
- - test/test.sfp
90
+ - test/service-schemas.sfp
91
+ - test/test-module1-scripts.tgz
92
+ - test/test-module1.sfp
93
+ - test/test1.inc
76
94
  - test/test1.sfp
77
- - test/test2.inc
78
95
  - test/test2.sfp
79
- - test/types.sfp
80
- - test/v1.1.sfp
96
+ - test/test3.inc
97
+ - test/test3.sfp
98
+ - test/test4.inc
99
+ - test/test4.sfp
100
+ has_rdoc: true
81
101
  homepage: https://github.com/herry13/sfp-ruby
82
102
  licenses: []
103
+
83
104
  post_install_message:
84
105
  rdoc_options: []
85
- require_paths:
106
+
107
+ require_paths:
86
108
  - lib
87
- required_ruby_version: !ruby/object:Gem::Requirement
88
- none: false
89
- requirements:
90
- - - ! '>='
91
- - !ruby/object:Gem::Version
92
- version: '0'
93
- required_rubygems_version: !ruby/object:Gem::Requirement
94
- none: false
95
- requirements:
96
- - - ! '>='
97
- - !ruby/object:Gem::Version
98
- version: '0'
109
+ required_ruby_version: !ruby/object:Gem::Requirement
110
+ requirements:
111
+ - - ">="
112
+ - !ruby/object:Gem::Version
113
+ segments:
114
+ - 0
115
+ version: "0"
116
+ required_rubygems_version: !ruby/object:Gem::Requirement
117
+ requirements:
118
+ - - ">="
119
+ - !ruby/object:Gem::Version
120
+ segments:
121
+ - 0
122
+ version: "0"
99
123
  requirements: []
100
- rubyforge_project:
101
- rubygems_version: 1.8.11
124
+
125
+ rubyforge_project: sfp
126
+ rubygems_version: 1.3.6
102
127
  signing_key:
103
128
  specification_version: 3
104
129
  summary: SFP Parser and Planner
105
- test_files:
106
- - test/cloud-classes.sfp
107
- - test/cloud1.sfp
108
- - test/cloud2.sfp
109
- - test/cloud3.sfp
130
+ test_files:
131
+ - test/cloud-schemas.sfp
132
+ - test/future/test1.sfp
133
+ - test/nd-cloud1.sfp
134
+ - test/nd-cloud2.sfp
135
+ - test/nd-cloud3.sfp
136
+ - test/nd-service1.sfp
137
+ - test/nd-service2.sfp
138
+ - test/run.sh
110
139
  - test/s.sfp
111
- - test/service-classes.sfp
112
- - test/service1.sfp
113
- - test/service3.sfp
114
- - test/task.sfp
115
- - test/test.inc
116
- - test/test.sfp
140
+ - test/service-schemas.sfp
141
+ - test/test-module1-scripts.tgz
142
+ - test/test-module1.sfp
143
+ - test/test1.inc
117
144
  - test/test1.sfp
118
- - test/test2.inc
119
145
  - test/test2.sfp
120
- - test/types.sfp
121
- - test/v1.1.sfp
146
+ - test/test3.inc
147
+ - test/test3.sfp
148
+ - test/test4.inc
149
+ - test/test4.sfp
@@ -1,13 +0,0 @@
1
- #!/usr/bin/env sfp
2
-
3
- include "test.inc"
4
-
5
- initial state {
6
- a isa S
7
- b isa S
8
- }
9
-
10
- goal constraint {
11
- a.foo is false
12
- b.foo is false
13
- }