redshift 1.3.24 → 1.3.30

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +49 -0
  3. data/RELEASE-NOTES +34 -3
  4. data/Rakefile +81 -0
  5. data/bench/bench +1 -1
  6. data/bench/formula.rb +2 -3
  7. data/examples/pid.rb +6 -6
  8. data/examples/robots/lib/shell-world.rb +1 -1
  9. data/examples/scheduler.rb +6 -1
  10. data/ext/redshift/dvector-float/dvector-float.c +184 -0
  11. data/ext/redshift/dvector-float/dvector-float.h +36 -0
  12. data/ext/redshift/dvector-float/dvector-float.rb +33 -0
  13. data/ext/redshift/dvector-float/extconf.rb +2 -0
  14. data/lib/redshift/redshift.rb +5 -5
  15. data/lib/redshift/target/c/component-gen.rb +1 -1
  16. data/lib/redshift/target/c/flow-gen.rb +1 -1
  17. data/lib/redshift/target/c/flow/delay.rb +1 -1
  18. data/lib/redshift/target/c/world-gen.rb +101 -101
  19. data/lib/redshift/util/isaac.rb +2 -2
  20. data/lib/redshift/util/tkar-driver.rb +1 -1
  21. data/test/test.rb +1 -1
  22. data/test/test_buffer.rb +2 -2
  23. data/test/test_connect.rb +2 -2
  24. data/test/test_connect_parallel.rb +2 -2
  25. data/test/test_connect_strict.rb +4 -5
  26. data/test/test_constant.rb +2 -4
  27. data/test/test_delay.rb +2 -2
  28. data/test/test_derivative.rb +2 -2
  29. data/test/test_discrete.rb +2 -4
  30. data/test/test_discrete_isolated.rb +2 -4
  31. data/test/test_dvector-float.rb +110 -0
  32. data/test/test_dvector.rb +15 -17
  33. data/test/test_exit.rb +2 -4
  34. data/test/test_flow.rb +2 -4
  35. data/test/test_flow_link.rb +2 -4
  36. data/test/test_flow_sub.rb +2 -4
  37. data/test/test_flow_trans.rb +23 -25
  38. data/test/test_inherit.rb +2 -4
  39. data/test/test_inherit_event.rb +2 -4
  40. data/test/test_inherit_flow.rb +2 -4
  41. data/test/test_inherit_link.rb +2 -4
  42. data/test/test_inherit_setup.rb +2 -4
  43. data/test/test_inherit_state.rb +2 -4
  44. data/test/test_inherit_transition.rb +2 -4
  45. data/test/test_numerics.rb +2 -4
  46. data/test/test_queue.rb +3 -3
  47. data/test/test_queue_alone.rb +2 -2
  48. data/test/test_reset.rb +2 -4
  49. data/test/test_setup.rb +2 -4
  50. data/test/test_strict_continuity.rb +2 -4
  51. data/test/test_strict_reset_error.rb +2 -4
  52. data/test/test_strictness_error.rb +2 -4
  53. data/test/test_sync.rb +2 -2
  54. data/test/test_world.rb +2 -4
  55. metadata +80 -106
  56. data/.bnsignore +0 -27
  57. data/.gitignore +0 -9
  58. data/README +0 -25
  59. data/TODO +0 -431
  60. data/bench/aug17-ruby19.bench +0 -86
  61. data/bench/aug17.bench +0 -86
  62. data/bench/aug7.bench +0 -86
  63. data/bench/prof.html +0 -0
  64. data/examples/robots/README +0 -49
  65. data/ext/redshift/util/isaac/extconf.rb +0 -2
  66. data/ext/redshift/util/isaac/isaac.c +0 -129
  67. data/ext/redshift/util/isaac/rand.c +0 -140
  68. data/ext/redshift/util/isaac/rand.h +0 -61
  69. data/rakefile +0 -50
data/test/test_inherit.rb CHANGED
@@ -1,5 +1,3 @@
1
- #!/usr/bin/env ruby
2
-
3
1
  require 'redshift'
4
2
 
5
3
  include RedShift
@@ -89,9 +87,9 @@ class Z < Component
89
87
  end
90
88
 
91
89
 
92
- require 'test/unit'
90
+ require 'minitest/autorun'
93
91
 
94
- class TestInherit < Test::Unit::TestCase
92
+ class TestInherit < Minitest::Test
95
93
 
96
94
  def setup
97
95
  @world = World.new
@@ -1,5 +1,3 @@
1
- #!/usr/bin/env ruby
2
-
3
1
  require 'redshift'
4
2
 
5
3
  include RedShift
@@ -44,9 +42,9 @@ end
44
42
 
45
43
  #-----#
46
44
 
47
- require 'test/unit'
45
+ require 'minitest/autorun'
48
46
 
49
- class TestInheritEvent < Test::Unit::TestCase
47
+ class TestInheritEvent < Minitest::Test
50
48
  def setup
51
49
  @world = World.new
52
50
  @world.time_step = 0.1
@@ -1,5 +1,3 @@
1
- #!/usr/bin/env ruby
2
-
3
1
  require 'redshift'
4
2
 
5
3
  include RedShift
@@ -110,9 +108,9 @@ end
110
108
 
111
109
  #-----#
112
110
 
113
- require 'test/unit'
111
+ require 'minitest/autorun'
114
112
 
115
- class TestInheritFlow < Test::Unit::TestCase
113
+ class TestInheritFlow < Minitest::Test
116
114
 
117
115
  def setup
118
116
  @world = World.new
@@ -1,5 +1,3 @@
1
- #!/usr/bin/env ruby
2
-
3
1
  require 'redshift'
4
2
 
5
3
  include RedShift
@@ -36,9 +34,9 @@ end
36
34
 
37
35
  #-----#
38
36
 
39
- require 'test/unit'
37
+ require 'minitest/autorun'
40
38
 
41
- class TestInheritLink < Test::Unit::TestCase
39
+ class TestInheritLink < Minitest::Test
42
40
 
43
41
  def setup
44
42
  @world = World.new
@@ -1,5 +1,3 @@
1
- #!/usr/bin/env ruby
2
-
3
1
  require 'redshift'
4
2
 
5
3
  include RedShift
@@ -34,9 +32,9 @@ end
34
32
 
35
33
  #-----#
36
34
 
37
- require 'test/unit'
35
+ require 'minitest/autorun'
38
36
 
39
- class TestInheritSetup < Test::Unit::TestCase
37
+ class TestInheritSetup < Minitest::Test
40
38
 
41
39
  def setup
42
40
  @world = World.new
@@ -1,5 +1,3 @@
1
- #!/usr/bin/env ruby
2
-
3
1
  require 'redshift'
4
2
 
5
3
  include RedShift
@@ -35,9 +33,9 @@ end
35
33
 
36
34
  #-----#
37
35
 
38
- require 'test/unit'
36
+ require 'minitest/autorun'
39
37
 
40
- class TestInheritState < Test::Unit::TestCase
38
+ class TestInheritState < Minitest::Test
41
39
 
42
40
  def setup
43
41
  @world = World.new
@@ -1,5 +1,3 @@
1
- #!/usr/bin/env ruby
2
-
3
1
  require 'redshift'
4
2
 
5
3
  include RedShift
@@ -131,9 +129,9 @@ end
131
129
 
132
130
  #-----#
133
131
 
134
- require 'test/unit'
132
+ require 'minitest/autorun'
135
133
 
136
- class TestInheritTrans < Test::Unit::TestCase
134
+ class TestInheritTrans < Minitest::Test
137
135
 
138
136
  def setup
139
137
  @world = World.new
@@ -1,8 +1,6 @@
1
- #!/usr/bin/env ruby
2
-
3
1
  require 'mathn' # Use rationals for 1/2 etc.
4
2
 
5
- require 'test/unit'
3
+ require 'minitest/autorun'
6
4
 
7
5
  require 'redshift'
8
6
 
@@ -13,7 +11,7 @@ class Timer < Component
13
11
  flow { diff " x' = 1 " }
14
12
  end
15
13
 
16
- class TestNumerics < Test::Unit::TestCase
14
+ class TestNumerics < Minitest::Test
17
15
 
18
16
  def setup
19
17
  @world = World.new
data/test/test_queue.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  require 'redshift'
2
- require 'test/unit'
2
+ require 'minitest/autorun'
3
3
 
4
- class TestQueue < Test::Unit::TestCase
4
+ class TestQueue < Minitest::Test
5
5
  class Receiver < RedShift::Component
6
6
  queue :q
7
7
  transition Enter => Exit do
@@ -37,7 +37,7 @@ class TestQueue < Test::Unit::TestCase
37
37
  end
38
38
  end
39
39
 
40
- class TestQueueAndStrict < Test::Unit::TestCase
40
+ class TestQueueAndStrict < Minitest::Test
41
41
  class Receiver < RedShift::Component
42
42
  queue :q
43
43
  strictly_continuous :x
@@ -1,9 +1,9 @@
1
1
  require 'redshift/queue'
2
- require 'test/unit'
2
+ require 'minitest/autorun'
3
3
 
4
4
  # Test queue class outside of simulation using mocked World and
5
5
  # Component classes.
6
- class TestQueueAlone < Test::Unit::TestCase
6
+ class TestQueueAlone < Minitest::Test
7
7
  class World
8
8
  attr_accessor :step_count, :discrete_step
9
9
  end
data/test/test_reset.rb CHANGED
@@ -1,5 +1,3 @@
1
- #!/usr/bin/env ruby
2
-
3
1
  require 'redshift'
4
2
 
5
3
  include RedShift
@@ -111,9 +109,9 @@ class Receiver < Component
111
109
  end
112
110
  end
113
111
 
114
- require 'test/unit'
112
+ require 'minitest/autorun'
115
113
 
116
- class TestReset < Test::Unit::TestCase
114
+ class TestReset < Minitest::Test
117
115
 
118
116
  def setup
119
117
  @world = World.new
data/test/test_setup.rb CHANGED
@@ -1,5 +1,3 @@
1
- #!/usr/bin/env ruby
2
-
3
1
  require 'redshift'
4
2
 
5
3
  include RedShift
@@ -90,9 +88,9 @@ end
90
88
 
91
89
  #-----#
92
90
 
93
- require 'test/unit'
91
+ require 'minitest/autorun'
94
92
 
95
- class TestSetup < Test::Unit::TestCase
93
+ class TestSetup < Minitest::Test
96
94
 
97
95
  def setup
98
96
  @world = World.new
@@ -1,5 +1,3 @@
1
- #!/usr/bin/env ruby
2
-
3
1
  require 'redshift'
4
2
 
5
3
  include RedShift
@@ -347,9 +345,9 @@ end
347
345
 
348
346
  #-----#
349
347
 
350
- require 'test/unit'
348
+ require 'minitest/autorun'
351
349
 
352
- class TestStrictContinuity < Test::Unit::TestCase
350
+ class TestStrictContinuity < Minitest::Test
353
351
 
354
352
  def setup
355
353
  @world = SCWorld.new
@@ -1,14 +1,12 @@
1
- #!/usr/bin/env ruby
2
-
3
1
  require 'redshift'
4
2
 
5
3
  include RedShift
6
4
 
7
- require 'test/unit'
5
+ require 'minitest/autorun'
8
6
 
9
7
  # See also test_strict_continuity.rb.
10
8
 
11
- class TestStrictnessError < Test::Unit::TestCase
9
+ class TestStrictnessError < Minitest::Test
12
10
 
13
11
  class T < Component
14
12
 
@@ -1,14 +1,12 @@
1
- #!/usr/bin/env ruby
2
-
3
1
  require 'redshift'
4
2
 
5
3
  include RedShift
6
4
 
7
- require 'test/unit'
5
+ require 'minitest/autorun'
8
6
 
9
7
  # See also test_strict_continuity.rb.
10
8
 
11
- class TestStrictnessError < Test::Unit::TestCase
9
+ class TestStrictnessError < Minitest::Test
12
10
 
13
11
  class T < Component
14
12
 
data/test/test_sync.rb CHANGED
@@ -4,7 +4,7 @@
4
4
  # test chains of symmetric sync
5
5
 
6
6
  require 'redshift'
7
- require 'test/unit'
7
+ require 'minitest/autorun'
8
8
 
9
9
  class DebugSyncWorld #< RedShift::World
10
10
  def hook_begin
@@ -25,7 +25,7 @@ class DebugSyncWorld #< RedShift::World
25
25
  end
26
26
  end
27
27
 
28
- class TestSync < Test::Unit::TestCase
28
+ class TestSync < Minitest::Test
29
29
  class Relay < RedShift::Component
30
30
  link :next
31
31
 
data/test/test_world.rb CHANGED
@@ -1,5 +1,3 @@
1
- #!/usr/bin/env ruby
2
-
3
1
  require 'redshift'
4
2
 
5
3
  include RedShift
@@ -285,9 +283,9 @@ tests:
285
283
 
286
284
  #-----#
287
285
 
288
- require 'test/unit'
286
+ require 'minitest/autorun'
289
287
 
290
- class TestWorld < Test::Unit::TestCase
288
+ class TestWorld < Minitest::Test
291
289
 
292
290
  def test_world
293
291
  testers = []
metadata CHANGED
@@ -1,94 +1,75 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: redshift
3
- version: !ruby/object:Gem::Version
4
- hash: 43
5
- prerelease: false
6
- segments:
7
- - 1
8
- - 3
9
- - 24
10
- version: 1.3.24
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.3.30
11
5
  platform: ruby
12
- authors:
6
+ authors:
13
7
  - Joel VanderWerf
14
8
  autorequire:
15
9
  bindir: bin
16
10
  cert_chain: []
17
-
18
- date: 2010-08-17 00:00:00 -07:00
19
- default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
11
+ date: 2021-03-07 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
22
14
  name: cgen
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- hash: 79
30
- segments:
31
- - 0
32
- - 16
33
- - 8
34
- version: 0.16.8
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
35
20
  type: :runtime
36
- version_requirements: *id001
37
- - !ruby/object:Gem::Dependency
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
38
28
  name: tkar
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
39
35
  prerelease: false
40
- requirement: &id002 !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ">="
44
- - !ruby/object:Gem::Version
45
- hash: 117
46
- segments:
47
- - 0
48
- - 63
49
- version: "0.63"
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: prng-isaac
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
50
48
  type: :runtime
51
- version_requirements: *id002
52
- - !ruby/object:Gem::Dependency
53
- name: bones
54
49
  prerelease: false
55
- requirement: &id003 !ruby/object:Gem::Requirement
56
- none: false
57
- requirements:
58
- - - ">="
59
- - !ruby/object:Gem::Version
60
- hash: 25
61
- segments:
62
- - 3
63
- - 4
64
- - 7
65
- version: 3.4.7
66
- type: :development
67
- version_requirements: *id003
68
- description: |
69
- A framework for simulation of networks of hybrid automata, similar to SHIFT and Lambda-SHIFT. Includes ruby-based DSL for defining simulation components, and ruby/C code generation and runtime.
70
-
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ description: A framework for simulation of networks of hybrid automata, similar to
56
+ SHIFT and Lambda-SHIFT. Includes ruby-based DSL for defining simulation components,
57
+ and ruby/C code generation and runtime.
71
58
  email: vjoel@users.sourceforge.net
72
59
  executables: []
73
-
74
- extensions:
60
+ extensions:
75
61
  - ext/redshift/buffer/extconf.rb
76
62
  - ext/redshift/dvector/extconf.rb
77
- - ext/redshift/util/isaac/extconf.rb
78
- extra_rdoc_files:
79
- - README
63
+ - ext/redshift/dvector-float/extconf.rb
64
+ extra_rdoc_files:
65
+ - README.md
80
66
  - RELEASE-NOTES
81
- files:
82
- - .bnsignore
83
- - .gitignore
84
- - README
67
+ files:
68
+ - README.md
85
69
  - RELEASE-NOTES
86
- - TODO
70
+ - Rakefile
87
71
  - bench/alg-state.rb
88
72
  - bench/algebraic.rb
89
- - bench/aug17-ruby19.bench
90
- - bench/aug17.bench
91
- - bench/aug7.bench
92
73
  - bench/bench
93
74
  - bench/bench.rb
94
75
  - bench/connect.rb
@@ -100,7 +81,6 @@ files:
100
81
  - bench/half-strict.rb
101
82
  - bench/inertness.rb
102
83
  - bench/linked-flows.rb
103
- - bench/prof.html
104
84
  - bench/queues.rb
105
85
  - bench/run
106
86
  - bench/simple.rb
@@ -124,7 +104,6 @@ files:
124
104
  - examples/queue.rb
125
105
  - examples/queue2.rb
126
106
  - examples/reset-with-event-val.rb
127
- - examples/robots/README
128
107
  - examples/robots/lib/base.rb
129
108
  - examples/robots/lib/explosion.rb
130
109
  - examples/robots/lib/missile.rb
@@ -152,14 +131,14 @@ files:
152
131
  - ext/redshift/buffer/buffer.h
153
132
  - ext/redshift/buffer/dir.rb
154
133
  - ext/redshift/buffer/extconf.rb
134
+ - ext/redshift/dvector-float/dvector-float.c
135
+ - ext/redshift/dvector-float/dvector-float.h
136
+ - ext/redshift/dvector-float/dvector-float.rb
137
+ - ext/redshift/dvector-float/extconf.rb
155
138
  - ext/redshift/dvector/dvector.c
156
139
  - ext/redshift/dvector/dvector.h
157
140
  - ext/redshift/dvector/dvector.rb
158
141
  - ext/redshift/dvector/extconf.rb
159
- - ext/redshift/util/isaac/extconf.rb
160
- - ext/redshift/util/isaac/isaac.c
161
- - ext/redshift/util/isaac/rand.c
162
- - ext/redshift/util/isaac/rand.h
163
142
  - lib/redshift.rb
164
143
  - lib/redshift/component.rb
165
144
  - lib/redshift/meta.rb
@@ -198,7 +177,6 @@ files:
198
177
  - lib/redshift/util/tracer/trace.rb
199
178
  - lib/redshift/util/tracer/var.rb
200
179
  - lib/redshift/world.rb
201
- - rakefile
202
180
  - test/test.rb
203
181
  - test/test_buffer.rb
204
182
  - test/test_connect.rb
@@ -209,6 +187,7 @@ files:
209
187
  - test/test_derivative.rb
210
188
  - test/test_discrete.rb
211
189
  - test/test_discrete_isolated.rb
190
+ - test/test_dvector-float.rb
212
191
  - test/test_dvector.rb
213
192
  - test/test_exit.rb
214
193
  - test/test_flow.rb
@@ -232,41 +211,36 @@ files:
232
211
  - test/test_strictness_error.rb
233
212
  - test/test_sync.rb
234
213
  - test/test_world.rb
235
- has_rdoc: true
236
- homepage: http://rubyforge.org/projects/redshift
214
+ homepage: https://github.com/vjoel/redshift
237
215
  licenses: []
238
-
216
+ metadata: {}
239
217
  post_install_message:
240
- rdoc_options:
241
- - --main
242
- - README
243
- require_paths:
218
+ rdoc_options:
219
+ - "--quiet"
220
+ - "--line-numbers"
221
+ - "--inline-source"
222
+ - "--title"
223
+ - RedShift
224
+ - "--main"
225
+ - README.md
226
+ - "--output"
227
+ - rdoc
228
+ require_paths:
244
229
  - lib
245
230
  - ext
246
- required_ruby_version: !ruby/object:Gem::Requirement
247
- none: false
248
- requirements:
231
+ required_ruby_version: !ruby/object:Gem::Requirement
232
+ requirements:
249
233
  - - ">="
250
- - !ruby/object:Gem::Version
251
- hash: 3
252
- segments:
253
- - 0
254
- version: "0"
255
- required_rubygems_version: !ruby/object:Gem::Requirement
256
- none: false
257
- requirements:
234
+ - !ruby/object:Gem::Version
235
+ version: '0'
236
+ required_rubygems_version: !ruby/object:Gem::Requirement
237
+ requirements:
258
238
  - - ">="
259
- - !ruby/object:Gem::Version
260
- hash: 3
261
- segments:
262
- - 0
263
- version: "0"
239
+ - !ruby/object:Gem::Version
240
+ version: '0'
264
241
  requirements: []
265
-
266
- rubyforge_project: redshift
267
- rubygems_version: 1.3.7
242
+ rubygems_version: 3.1.4
268
243
  signing_key:
269
- specification_version: 3
244
+ specification_version: 4
270
245
  summary: Simulation of hybrid automata
271
246
  test_files: []
272
-