ambit 0.11 → 0.12
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +7 -3
- data/LICENSE.txt +1 -1
- data/README.rdoc +2 -3
- data/README.txt +2 -3
- data/lib/ambit.rb +3 -1
- data/test/test_ambit.rb +3 -3
- metadata +43 -64
data/History.txt
CHANGED
@@ -1,4 +1,8 @@
|
|
1
|
-
=== 0.
|
1
|
+
=== 0.12 / 2012-01-30
|
2
|
+
|
3
|
+
* Support Ruby 1.9
|
4
|
+
|
5
|
+
=== 0.11 / 2012-01-12
|
2
6
|
|
3
7
|
* Additional documentation on side effects and rewinding.
|
4
8
|
|
@@ -7,11 +11,11 @@
|
|
7
11
|
generator-by-generator, but buys the ability to trace operation of the
|
8
12
|
anonymous generator used by Ambit::choose.
|
9
13
|
|
10
|
-
=== 0.10.1 / 2012-
|
14
|
+
=== 0.10.1 / 2012-01-10
|
11
15
|
|
12
16
|
* Updated repo path -- no functional change.
|
13
17
|
|
14
|
-
=== 0.10 / 2011-
|
18
|
+
=== 0.10 / 2011-09-22
|
15
19
|
|
16
20
|
* Add Ambit::unmark! and Ambit::unmark_all!, which can be used to undo the
|
17
21
|
effects of the Ambit::mark operation -- see "Marking and Cutting" in
|
data/LICENSE.txt
CHANGED
data/README.rdoc
CHANGED
@@ -13,9 +13,8 @@ branch cut.
|
|
13
13
|
|
14
14
|
== REQUIREMENTS:
|
15
15
|
|
16
|
-
<b>This code will not work in JRuby or MacRuby (no callcc). It
|
17
|
-
in Ruby 1.
|
18
|
-
stdlib).</b>
|
16
|
+
<b>This code will not work in JRuby or MacRuby (no callcc). It is tested
|
17
|
+
(and should work fine) in Ruby 1.8.7 and 1.9.3.</b>
|
19
18
|
|
20
19
|
== INSTALL:
|
21
20
|
|
data/README.txt
CHANGED
@@ -13,9 +13,8 @@ branch cut.
|
|
13
13
|
|
14
14
|
== REQUIREMENTS:
|
15
15
|
|
16
|
-
<b>This code will not work in JRuby or MacRuby (no callcc). It
|
17
|
-
in Ruby 1.
|
18
|
-
stdlib).</b>
|
16
|
+
<b>This code will not work in JRuby or MacRuby (no callcc). It is tested
|
17
|
+
(and should work fine) in Ruby 1.8.7 and 1.9.3.</b>
|
19
18
|
|
20
19
|
== INSTALL:
|
21
20
|
|
data/lib/ambit.rb
CHANGED
@@ -5,9 +5,11 @@
|
|
5
5
|
# Copyright:: Copyright (c) 2011 Jim Wise
|
6
6
|
# License:: 2-clause BSD-Style (see LICENSE[link:files/LICENSE.html])
|
7
7
|
|
8
|
+
require 'continuation' if RUBY_VERSION !~ /^1.8/
|
9
|
+
|
8
10
|
module Ambit
|
9
11
|
|
10
|
-
VERSION = '0.
|
12
|
+
VERSION = '0.12'
|
11
13
|
|
12
14
|
# A ChoicesExhausted exception is raised if the outermost choose invocation of
|
13
15
|
# a Generator has run out of choices, indicating that no (more) solutions are possible.
|
data/test/test_ambit.rb
CHANGED
@@ -55,7 +55,7 @@ class TestAmbit < Test::Unit::TestCase
|
|
55
55
|
def test_mark_cut
|
56
56
|
nd = Ambit::Generator.new
|
57
57
|
i = 0;
|
58
|
-
|
58
|
+
nd.choose(1..3) # just to have an earlier choice
|
59
59
|
nd.mark
|
60
60
|
b = nd.choose([1, 2, 3])
|
61
61
|
c = nd.choose([1, 2, 3])
|
@@ -69,7 +69,7 @@ class TestAmbit < Test::Unit::TestCase
|
|
69
69
|
end
|
70
70
|
|
71
71
|
def test_unmark_all
|
72
|
-
|
72
|
+
Ambit::choose(1..3) # just to have an earlier choice
|
73
73
|
Ambit::mark
|
74
74
|
b = Ambit::choose(1..3)
|
75
75
|
Ambit::unmark_all!
|
@@ -81,7 +81,7 @@ class TestAmbit < Test::Unit::TestCase
|
|
81
81
|
end
|
82
82
|
|
83
83
|
def test_unmark
|
84
|
-
|
84
|
+
Ambit::choose(1..3) # just to have an earlier choice
|
85
85
|
Ambit::mark
|
86
86
|
Ambit::unmark!
|
87
87
|
# if we hadn't unmarked here, a cut would leave us choices
|
metadata
CHANGED
@@ -1,66 +1,52 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: ambit
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: '0.12'
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 11
|
9
|
-
version: "0.11"
|
10
6
|
platform: ruby
|
11
|
-
authors:
|
7
|
+
authors:
|
12
8
|
- Jim Wise
|
13
9
|
autorequire:
|
14
10
|
bindir: bin
|
15
11
|
cert_chain: []
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2012-01-30 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
20
15
|
name: rdoc
|
21
|
-
|
22
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: &69351180 !ruby/object:Gem::Requirement
|
23
17
|
none: false
|
24
|
-
requirements:
|
18
|
+
requirements:
|
25
19
|
- - ~>
|
26
|
-
- !ruby/object:Gem::Version
|
27
|
-
|
28
|
-
segments:
|
29
|
-
- 3
|
30
|
-
- 10
|
31
|
-
version: "3.10"
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '3.10'
|
32
22
|
type: :development
|
33
|
-
version_requirements: *id001
|
34
|
-
- !ruby/object:Gem::Dependency
|
35
|
-
name: hoe
|
36
23
|
prerelease: false
|
37
|
-
|
24
|
+
version_requirements: *69351180
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: hoe
|
27
|
+
requirement: &69350830 !ruby/object:Gem::Requirement
|
38
28
|
none: false
|
39
|
-
requirements:
|
29
|
+
requirements:
|
40
30
|
- - ~>
|
41
|
-
- !ruby/object:Gem::Version
|
42
|
-
|
43
|
-
segments:
|
44
|
-
- 2
|
45
|
-
- 12
|
46
|
-
version: "2.12"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '2.13'
|
47
33
|
type: :development
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *69350830
|
36
|
+
description: ! 'Ambit is a ruby non-deterministic programming system with backtracking
|
37
|
+
and
|
38
|
+
|
39
|
+
branch cut.'
|
40
|
+
email:
|
53
41
|
- jwise@draga.com
|
54
42
|
executables: []
|
55
|
-
|
56
43
|
extensions: []
|
57
|
-
|
58
|
-
extra_rdoc_files:
|
44
|
+
extra_rdoc_files:
|
59
45
|
- History.txt
|
60
46
|
- LICENSE.txt
|
61
47
|
- Manifest.txt
|
62
48
|
- README.txt
|
63
|
-
files:
|
49
|
+
files:
|
64
50
|
- .autotest
|
65
51
|
- History.txt
|
66
52
|
- LICENSE.txt
|
@@ -76,37 +62,30 @@ files:
|
|
76
62
|
- .gemtest
|
77
63
|
homepage: https://github.com/jimwise/ambit
|
78
64
|
licenses: []
|
79
|
-
|
80
65
|
post_install_message:
|
81
|
-
rdoc_options:
|
66
|
+
rdoc_options:
|
82
67
|
- --main
|
83
68
|
- README.txt
|
84
|
-
require_paths:
|
69
|
+
require_paths:
|
85
70
|
- lib
|
86
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
71
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
87
72
|
none: false
|
88
|
-
requirements:
|
89
|
-
- -
|
90
|
-
- !ruby/object:Gem::Version
|
91
|
-
|
92
|
-
|
93
|
-
- 0
|
94
|
-
version: "0"
|
95
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - ! '>='
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0'
|
77
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
96
78
|
none: false
|
97
|
-
requirements:
|
98
|
-
- -
|
99
|
-
- !ruby/object:Gem::Version
|
100
|
-
|
101
|
-
segments:
|
102
|
-
- 0
|
103
|
-
version: "0"
|
79
|
+
requirements:
|
80
|
+
- - ! '>='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
104
83
|
requirements: []
|
105
|
-
|
106
84
|
rubyforge_project: ambit
|
107
|
-
rubygems_version: 1.8.
|
85
|
+
rubygems_version: 1.8.15
|
108
86
|
signing_key:
|
109
87
|
specification_version: 3
|
110
|
-
summary: Ambit is a ruby non-deterministic programming system with backtracking and
|
111
|
-
|
88
|
+
summary: Ambit is a ruby non-deterministic programming system with backtracking and
|
89
|
+
branch cut.
|
90
|
+
test_files:
|
112
91
|
- test/test_ambit.rb
|