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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/History.txt +6 -0
- data/Rakefile +2 -2
- data/lib/unific.rb +14 -1
- metadata +43 -21
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c9d2f5ada87e333e2fbae9d1ccc77cd89b4bdd68
|
4
|
+
data.tar.gz: 2729759da770f081784fa1df255394b2aaa5db36
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d4a13c4e3b1315e099804a0676f18cc34282c33c56f3fc2f168652ea97d10d2f255c0c7907673baff5cadaee49e6a79b09379a1986afda4180e3853b1e2849b
|
7
|
+
data.tar.gz: 417745d942f853b0a101c5dd7b7eb2d4b2de715898c47e04096bd05c7056a3b755ecd4ac436be549777fc1de1de36bb9d05a16e78bfb369a14cd0726831f8151
|
checksums.yaml.gz.sig
ADDED
Binary file
|
data.tar.gz.sig
ADDED
Binary file
|
data/History.txt
CHANGED
@@ -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
data/lib/unific.rb
CHANGED
@@ -2,7 +2,7 @@ require 'singleton'
|
|
2
2
|
|
3
3
|
module Unific
|
4
4
|
|
5
|
-
VERSION = '0.
|
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.
|
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
|
-
|
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: '
|
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: '
|
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.
|
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.
|
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:
|
90
|
-
rubygems_version: 2.
|
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: []
|
metadata.gz.sig
ADDED
Binary file
|