predicate 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +2 -0
- data/LICENSE.md +22 -0
- data/Rakefile +11 -0
- data/lib/predicate/factory.rb +107 -0
- data/lib/predicate/grammar.rb +33 -0
- data/lib/predicate/grammar.sexp.yml +58 -0
- data/lib/predicate/nodes/and.rb +23 -0
- data/lib/predicate/nodes/contradiction.rb +34 -0
- data/lib/predicate/nodes/dyadic_comp.rb +26 -0
- data/lib/predicate/nodes/eq.rb +15 -0
- data/lib/predicate/nodes/expr.rb +68 -0
- data/lib/predicate/nodes/gt.rb +10 -0
- data/lib/predicate/nodes/gte.rb +10 -0
- data/lib/predicate/nodes/identifier.rb +18 -0
- data/lib/predicate/nodes/in.rb +26 -0
- data/lib/predicate/nodes/literal.rb +18 -0
- data/lib/predicate/nodes/lt.rb +10 -0
- data/lib/predicate/nodes/lte.rb +10 -0
- data/lib/predicate/nodes/nadic_bool.rb +16 -0
- data/lib/predicate/nodes/native.rb +30 -0
- data/lib/predicate/nodes/neq.rb +10 -0
- data/lib/predicate/nodes/not.rb +22 -0
- data/lib/predicate/nodes/or.rb +10 -0
- data/lib/predicate/nodes/qualified_identifier.rb +22 -0
- data/lib/predicate/nodes/tautology.rb +30 -0
- data/lib/predicate/processors/qualifier.rb +23 -0
- data/lib/predicate/processors/renamer.rb +25 -0
- data/lib/predicate/processors/to_ruby_code.rb +71 -0
- data/lib/predicate/processors.rb +3 -0
- data/lib/predicate/version.rb +8 -0
- data/lib/predicate.rb +113 -0
- data/spec/expr/test_to_proc.rb +16 -0
- data/spec/expr/test_to_ruby_code.rb +152 -0
- data/spec/factory/shared/a_comparison_factory_method.rb +35 -0
- data/spec/factory/shared/a_predicate_ast_node.rb +20 -0
- data/spec/factory/test_and.rb +13 -0
- data/spec/factory/test_between.rb +12 -0
- data/spec/factory/test_comp.rb +35 -0
- data/spec/factory/test_contradiction.rb +11 -0
- data/spec/factory/test_eq.rb +9 -0
- data/spec/factory/test_factor_predicate.rb +50 -0
- data/spec/factory/test_gt.rb +9 -0
- data/spec/factory/test_gte.rb +9 -0
- data/spec/factory/test_identifier.rb +13 -0
- data/spec/factory/test_in.rb +12 -0
- data/spec/factory/test_literal.rb +13 -0
- data/spec/factory/test_lt.rb +9 -0
- data/spec/factory/test_lte.rb +9 -0
- data/spec/factory/test_native.rb +19 -0
- data/spec/factory/test_neq.rb +9 -0
- data/spec/factory/test_not.rb +13 -0
- data/spec/factory/test_or.rb +13 -0
- data/spec/factory/test_qualified_identifier.rb +15 -0
- data/spec/factory/test_tautology.rb +12 -0
- data/spec/grammar/test_match.rb +93 -0
- data/spec/grammar/test_sexpr.rb +103 -0
- data/spec/nodes/and/test_and_split.rb +66 -0
- data/spec/nodes/dyadic_comp/test_and_split.rb +45 -0
- data/spec/nodes/identifier/test_and_split.rb +23 -0
- data/spec/nodes/identifier/test_free_variables.rb +12 -0
- data/spec/nodes/identifier/test_name.rb +12 -0
- data/spec/nodes/nadic_bool/test_free_variables.rb +14 -0
- data/spec/nodes/qualified_identifier/test_and_split.rb +23 -0
- data/spec/nodes/qualified_identifier/test_free_variables.rb +12 -0
- data/spec/nodes/qualified_identifier/test_name.rb +12 -0
- data/spec/nodes/qualified_identifier/test_qualifier.rb +12 -0
- data/spec/predicate/test_and_split.rb +57 -0
- data/spec/predicate/test_bool_and.rb +34 -0
- data/spec/predicate/test_bool_not.rb +68 -0
- data/spec/predicate/test_bool_or.rb +34 -0
- data/spec/predicate/test_coerce.rb +75 -0
- data/spec/predicate/test_constant_variables.rb +52 -0
- data/spec/predicate/test_contradiction.rb +24 -0
- data/spec/predicate/test_evaluate.rb +66 -0
- data/spec/predicate/test_factory_methods.rb +77 -0
- data/spec/predicate/test_free_variables.rb +14 -0
- data/spec/predicate/test_hash_and_equal.rb +26 -0
- data/spec/predicate/test_qualify.rb +34 -0
- data/spec/predicate/test_rename.rb +76 -0
- data/spec/predicate/test_tautology.rb +24 -0
- data/spec/predicate/test_to_proc.rb +14 -0
- data/spec/predicate/test_to_ruby_code.rb +20 -0
- data/spec/spec_helper.rb +12 -0
- data/spec/test_predicate.rb +127 -0
- data/tasks/test.rake +11 -0
- metadata +186 -0
metadata
ADDED
@@ -0,0 +1,186 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: predicate
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Bernard Lambeau
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-07-19 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: sexpr
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.6.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.6.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: path
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '2.0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '2.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '10'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '10'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '3.6'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '3.6'
|
69
|
+
description: Predicate provides a simple class and processors to encode and manipulate
|
70
|
+
(tuple) predicates
|
71
|
+
email: blambeau@gmail.com
|
72
|
+
executables: []
|
73
|
+
extensions: []
|
74
|
+
extra_rdoc_files: []
|
75
|
+
files:
|
76
|
+
- Gemfile
|
77
|
+
- LICENSE.md
|
78
|
+
- Rakefile
|
79
|
+
- lib/predicate.rb
|
80
|
+
- lib/predicate/factory.rb
|
81
|
+
- lib/predicate/grammar.rb
|
82
|
+
- lib/predicate/grammar.sexp.yml
|
83
|
+
- lib/predicate/nodes/and.rb
|
84
|
+
- lib/predicate/nodes/contradiction.rb
|
85
|
+
- lib/predicate/nodes/dyadic_comp.rb
|
86
|
+
- lib/predicate/nodes/eq.rb
|
87
|
+
- lib/predicate/nodes/expr.rb
|
88
|
+
- lib/predicate/nodes/gt.rb
|
89
|
+
- lib/predicate/nodes/gte.rb
|
90
|
+
- lib/predicate/nodes/identifier.rb
|
91
|
+
- lib/predicate/nodes/in.rb
|
92
|
+
- lib/predicate/nodes/literal.rb
|
93
|
+
- lib/predicate/nodes/lt.rb
|
94
|
+
- lib/predicate/nodes/lte.rb
|
95
|
+
- lib/predicate/nodes/nadic_bool.rb
|
96
|
+
- lib/predicate/nodes/native.rb
|
97
|
+
- lib/predicate/nodes/neq.rb
|
98
|
+
- lib/predicate/nodes/not.rb
|
99
|
+
- lib/predicate/nodes/or.rb
|
100
|
+
- lib/predicate/nodes/qualified_identifier.rb
|
101
|
+
- lib/predicate/nodes/tautology.rb
|
102
|
+
- lib/predicate/processors.rb
|
103
|
+
- lib/predicate/processors/qualifier.rb
|
104
|
+
- lib/predicate/processors/renamer.rb
|
105
|
+
- lib/predicate/processors/to_ruby_code.rb
|
106
|
+
- lib/predicate/version.rb
|
107
|
+
- spec/expr/test_to_proc.rb
|
108
|
+
- spec/expr/test_to_ruby_code.rb
|
109
|
+
- spec/factory/shared/a_comparison_factory_method.rb
|
110
|
+
- spec/factory/shared/a_predicate_ast_node.rb
|
111
|
+
- spec/factory/test_and.rb
|
112
|
+
- spec/factory/test_between.rb
|
113
|
+
- spec/factory/test_comp.rb
|
114
|
+
- spec/factory/test_contradiction.rb
|
115
|
+
- spec/factory/test_eq.rb
|
116
|
+
- spec/factory/test_factor_predicate.rb
|
117
|
+
- spec/factory/test_gt.rb
|
118
|
+
- spec/factory/test_gte.rb
|
119
|
+
- spec/factory/test_identifier.rb
|
120
|
+
- spec/factory/test_in.rb
|
121
|
+
- spec/factory/test_literal.rb
|
122
|
+
- spec/factory/test_lt.rb
|
123
|
+
- spec/factory/test_lte.rb
|
124
|
+
- spec/factory/test_native.rb
|
125
|
+
- spec/factory/test_neq.rb
|
126
|
+
- spec/factory/test_not.rb
|
127
|
+
- spec/factory/test_or.rb
|
128
|
+
- spec/factory/test_qualified_identifier.rb
|
129
|
+
- spec/factory/test_tautology.rb
|
130
|
+
- spec/grammar/test_match.rb
|
131
|
+
- spec/grammar/test_sexpr.rb
|
132
|
+
- spec/nodes/and/test_and_split.rb
|
133
|
+
- spec/nodes/dyadic_comp/test_and_split.rb
|
134
|
+
- spec/nodes/identifier/test_and_split.rb
|
135
|
+
- spec/nodes/identifier/test_free_variables.rb
|
136
|
+
- spec/nodes/identifier/test_name.rb
|
137
|
+
- spec/nodes/nadic_bool/test_free_variables.rb
|
138
|
+
- spec/nodes/qualified_identifier/test_and_split.rb
|
139
|
+
- spec/nodes/qualified_identifier/test_free_variables.rb
|
140
|
+
- spec/nodes/qualified_identifier/test_name.rb
|
141
|
+
- spec/nodes/qualified_identifier/test_qualifier.rb
|
142
|
+
- spec/predicate/test_and_split.rb
|
143
|
+
- spec/predicate/test_bool_and.rb
|
144
|
+
- spec/predicate/test_bool_not.rb
|
145
|
+
- spec/predicate/test_bool_or.rb
|
146
|
+
- spec/predicate/test_coerce.rb
|
147
|
+
- spec/predicate/test_constant_variables.rb
|
148
|
+
- spec/predicate/test_contradiction.rb
|
149
|
+
- spec/predicate/test_evaluate.rb
|
150
|
+
- spec/predicate/test_factory_methods.rb
|
151
|
+
- spec/predicate/test_free_variables.rb
|
152
|
+
- spec/predicate/test_hash_and_equal.rb
|
153
|
+
- spec/predicate/test_qualify.rb
|
154
|
+
- spec/predicate/test_rename.rb
|
155
|
+
- spec/predicate/test_tautology.rb
|
156
|
+
- spec/predicate/test_to_proc.rb
|
157
|
+
- spec/predicate/test_to_ruby_code.rb
|
158
|
+
- spec/spec_helper.rb
|
159
|
+
- spec/test_predicate.rb
|
160
|
+
- tasks/test.rake
|
161
|
+
homepage: http://github.com/enspirit/predicate
|
162
|
+
licenses:
|
163
|
+
- MIT
|
164
|
+
metadata: {}
|
165
|
+
post_install_message:
|
166
|
+
rdoc_options: []
|
167
|
+
require_paths:
|
168
|
+
- lib
|
169
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - ">="
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0'
|
174
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
175
|
+
requirements:
|
176
|
+
- - ">="
|
177
|
+
- !ruby/object:Gem::Version
|
178
|
+
version: '0'
|
179
|
+
requirements: []
|
180
|
+
rubyforge_project:
|
181
|
+
rubygems_version: 2.5.2
|
182
|
+
signing_key:
|
183
|
+
specification_version: 4
|
184
|
+
summary: Predicate provides a simple class and processors to encode and manipulate
|
185
|
+
(tuple) predicates
|
186
|
+
test_files: []
|