unific 0.11 → 0.12

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0cffd941f46277c184647c88bea6f1f4109b19ff
4
- data.tar.gz: 3f92e05f3920f8d3c547de271f9556987984ece6
3
+ metadata.gz: c9d2f5ada87e333e2fbae9d1ccc77cd89b4bdd68
4
+ data.tar.gz: 2729759da770f081784fa1df255394b2aaa5db36
5
5
  SHA512:
6
- metadata.gz: 6ec0c948ea62147038eb0f1d15ba82c7c1ac701acb0553c7af222e9359d3957d214a1a423173a5b15fa721fed486b5fb0817ba6e1d03355338c5e13d913d5bc8
7
- data.tar.gz: 74d2195fe659a91cc25721684227e8ec75a8fa8550c17ed242ed0ca26c10edfd8945427dce0c665c64ed88f77e27677f0f63e6746b77a7cf8da15e36ed5d2677
6
+ metadata.gz: 9d4a13c4e3b1315e099804a0676f18cc34282c33c56f3fc2f168652ea97d10d2f255c0c7907673baff5cadaee49e6a79b09379a1986afda4180e3853b1e2849b
7
+ data.tar.gz: 417745d942f853b0a101c5dd7b7eb2d4b2de715898c47e04096bd05c7056a3b755ecd4ac436be549777fc1de1de36bb9d05a16e78bfb369a14cd0726831f8151
Binary file
Binary file
@@ -1,3 +1,9 @@
1
+ === 0.12 / 2015-02-05
2
+
3
+ * Two new helper methods, the first from github user bagohart:
4
+ - #variables -- flast list of variables in the traversal of an expression
5
+ - #bindings -- list variables bound in an env
6
+
1
7
  === 0.11 / 2013-03-30
2
8
 
3
9
  * Update database example to work with Ruby 1.9 (where hashes keep insertion
data/Rakefile CHANGED
@@ -16,8 +16,8 @@ require 'hoe'
16
16
 
17
17
  Hoe.spec 'unific' do
18
18
 
19
- developer('Jim Wise', 'jwise@draga.com')
20
-
19
+ developer 'Jim Wise', 'jwise@draga.com'
20
+ license '2-clause BSD-Style'
21
21
  end
22
22
 
23
23
  # vim: syntax=ruby
@@ -2,7 +2,7 @@ require 'singleton'
2
2
 
3
3
  module Unific
4
4
 
5
- VERSION = '0.11'
5
+ VERSION = '0.12'
6
6
 
7
7
  # An environment (set of variable bindings) resulting from unification
8
8
  class Env
@@ -138,6 +138,19 @@ module Unific
138
138
  end
139
139
  end
140
140
 
141
+ # Return just the variables from an expression, as a flat array
142
+ def variables s
143
+ res = []
144
+ _traverse s do |v|
145
+ res << v
146
+ end
147
+ res.uniq
148
+ end
149
+
150
+ def bindings
151
+ @theta.keys
152
+ end
153
+
141
154
  # forward definition, see comment below
142
155
  module ::Rulog #:nodoc:
143
156
  end
metadata CHANGED
@@ -1,43 +1,65 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unific
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.11'
4
+ version: '0.12'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jim Wise
8
8
  autorequire:
9
9
  bindir: bin
10
- cert_chain: []
11
- date: 2013-03-30 00:00:00.000000000 Z
10
+ cert_chain:
11
+ - |
12
+ -----BEGIN CERTIFICATE-----
13
+ MIIDZDCCAkygAwIBAgIBATANBgkqhkiG9w0BAQUFADA8MQ4wDAYDVQQDDAVqd2lz
14
+ ZTEVMBMGCgmSJomT8ixkARkWBWRyYWdhMRMwEQYKCZImiZPyLGQBGRYDY29tMB4X
15
+ DTE0MDQwMzIzMDg0OFoXDTE1MDQwMzIzMDg0OFowPDEOMAwGA1UEAwwFandpc2Ux
16
+ FTATBgoJkiaJk/IsZAEZFgVkcmFnYTETMBEGCgmSJomT8ixkARkWA2NvbTCCASIw
17
+ DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALfID041jcRKif+i4k7kUyoZogOP
18
+ AP1XfDojDzW4T6QahXUeZVl0/+EPsabY27j+ujrBhSK7GPQOM+QLBcLr3SyHsFuI
19
+ iPU06kFr+IxNAXEerNLjO6HNspBKZGmcTratSi3l8HQY0u291zX6xc373HkDLqjh
20
+ 3KtpdXAGE0zHx/zOfaxu56NoVx2Qw9UK+U+deHJ3NEtR9vIEJW6NdEkPdrhhM9Sx
21
+ 5LFqxVCVCyl8M90XeIllaUqdQdBNW1/pYq4/ivyGZeZ7pfHRgbKydgtlXPVOkIFh
22
+ LrNC9M6S5inMXNGKZBR3uAgHZhEN+LwSY++t2Gt1xh9hkmNHcnlKhQJGMhECAwEA
23
+ AaNxMG8wCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0OBBYEFE1Og5iwmHlH
24
+ cuJYbczTjrLw43v0MBoGA1UdEQQTMBGBD2p3aXNlQGRyYWdhLmNvbTAaBgNVHRIE
25
+ EzARgQ9qd2lzZUBkcmFnYS5jb20wDQYJKoZIhvcNAQEFBQADggEBABxedFNWgJS6
26
+ YKyRYGShdgRcUorWeMipYyybuoGKqDdUGON1keCWwOBIwSbiVkGM8yl1LeqwE0dX
27
+ 6q76iLR4nybhoVQrtKyTLWYtOeCrtgVMuN5q0UhhTk2Sb9GMsF6tT9uifMkB3hYj
28
+ Nv1ufWMnAcQOXhpU+IKveMfYq8gApfiWvEhKAI2c9E1kv5SOt2ine69RFjkkFTAl
29
+ 47ulScX2+tfEV0IzjwbvvZQR+t6WBkRowYVLJ5GvT6RO3/vr1xIq2PRWASL1U2G2
30
+ 44KZvQCKstteViXOMdYGQbNhfY2fWbVZ5G5Wxc48bEVUfVaB9aCh0PRMP2r5nf80
31
+ OTAFzawdf0k=
32
+ -----END CERTIFICATE-----
33
+ date: 2015-02-05 00:00:00.000000000 Z
12
34
  dependencies:
13
35
  - !ruby/object:Gem::Dependency
14
36
  name: rdoc
15
37
  requirement: !ruby/object:Gem::Requirement
16
38
  requirements:
17
- - - ~>
39
+ - - "~>"
18
40
  - !ruby/object:Gem::Version
19
- version: '3.10'
41
+ version: '4.0'
20
42
  type: :development
21
43
  prerelease: false
22
44
  version_requirements: !ruby/object:Gem::Requirement
23
45
  requirements:
24
- - - ~>
46
+ - - "~>"
25
47
  - !ruby/object:Gem::Version
26
- version: '3.10'
48
+ version: '4.0'
27
49
  - !ruby/object:Gem::Dependency
28
50
  name: hoe
29
51
  requirement: !ruby/object:Gem::Requirement
30
52
  requirements:
31
- - - ~>
53
+ - - "~>"
32
54
  - !ruby/object:Gem::Version
33
- version: '3.5'
55
+ version: '3.13'
34
56
  type: :development
35
57
  prerelease: false
36
58
  version_requirements: !ruby/object:Gem::Requirement
37
59
  requirements:
38
- - - ~>
60
+ - - "~>"
39
61
  - !ruby/object:Gem::Version
40
- version: '3.5'
62
+ version: '3.13'
41
63
  description: |-
42
64
  Unific is a ruby unification engine.
43
65
 
@@ -56,7 +78,8 @@ extra_rdoc_files:
56
78
  - README.rdoc
57
79
  - README.txt
58
80
  files:
59
- - .autotest
81
+ - ".autotest"
82
+ - ".gemtest"
60
83
  - History.txt
61
84
  - Manifest.txt
62
85
  - README.rdoc
@@ -65,31 +88,30 @@ files:
65
88
  - examples/database.rb
66
89
  - lib/unific.rb
67
90
  - test/test_unific.rb
68
- - .gemtest
69
91
  homepage: https://github.com/jimwise/unific
70
- licenses: []
92
+ licenses:
93
+ - 2-clause BSD-Style
71
94
  metadata: {}
72
95
  post_install_message:
73
96
  rdoc_options:
74
- - --main
97
+ - "--main"
75
98
  - README.rdoc
76
99
  require_paths:
77
100
  - lib
78
101
  required_ruby_version: !ruby/object:Gem::Requirement
79
102
  requirements:
80
- - - '>='
103
+ - - ">="
81
104
  - !ruby/object:Gem::Version
82
105
  version: '0'
83
106
  required_rubygems_version: !ruby/object:Gem::Requirement
84
107
  requirements:
85
- - - '>='
108
+ - - ">="
86
109
  - !ruby/object:Gem::Version
87
110
  version: '0'
88
111
  requirements: []
89
- rubyforge_project: unific
90
- rubygems_version: 2.0.0
112
+ rubyforge_project:
113
+ rubygems_version: 2.4.5
91
114
  signing_key:
92
115
  specification_version: 4
93
116
  summary: Unific is a ruby unification engine
94
- test_files:
95
- - test/test_unific.rb
117
+ test_files: []
Binary file