mort666-wongi-engine 0.2.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +20 -0
- data/.hgignore +6 -0
- data/.hgtags +13 -0
- data/.ruby-gemset +1 -0
- data/.travis.yml +19 -0
- data/CHANGELOG.md +106 -0
- data/Gemfile +4 -0
- data/LICENSE +22 -0
- data/README.md +27 -0
- data/Rakefile +9 -0
- data/examples/ex01.rb +23 -0
- data/examples/ex02.rb +37 -0
- data/examples/graphviz.rb +16 -0
- data/examples/rdf.n3 +6 -0
- data/examples/rdf.rb +14 -0
- data/examples/timeline.rb +48 -0
- data/lib/wongi-engine.rb +36 -0
- data/lib/wongi-engine/alpha_memory.rb +60 -0
- data/lib/wongi-engine/beta.rb +11 -0
- data/lib/wongi-engine/beta/assignment_node.rb +40 -0
- data/lib/wongi-engine/beta/beta_memory.rb +49 -0
- data/lib/wongi-engine/beta/beta_node.rb +94 -0
- data/lib/wongi-engine/beta/filter_node.rb +48 -0
- data/lib/wongi-engine/beta/join_node.rb +140 -0
- data/lib/wongi-engine/beta/ncc_node.rb +67 -0
- data/lib/wongi-engine/beta/ncc_partner.rb +40 -0
- data/lib/wongi-engine/beta/neg_node.rb +115 -0
- data/lib/wongi-engine/beta/optional_node.rb +142 -0
- data/lib/wongi-engine/beta/or_node.rb +37 -0
- data/lib/wongi-engine/beta/production_node.rb +31 -0
- data/lib/wongi-engine/compiler.rb +115 -0
- data/lib/wongi-engine/core_ext.rb +63 -0
- data/lib/wongi-engine/data_overlay.rb +144 -0
- data/lib/wongi-engine/dsl.rb +132 -0
- data/lib/wongi-engine/dsl/action/base.rb +11 -0
- data/lib/wongi-engine/dsl/action/error_generator.rb +31 -0
- data/lib/wongi-engine/dsl/action/simple_action.rb +60 -0
- data/lib/wongi-engine/dsl/action/simple_collector.rb +52 -0
- data/lib/wongi-engine/dsl/action/statement_generator.rb +46 -0
- data/lib/wongi-engine/dsl/action/trace_action.rb +49 -0
- data/lib/wongi-engine/dsl/any_rule.rb +33 -0
- data/lib/wongi-engine/dsl/assuming.rb +31 -0
- data/lib/wongi-engine/dsl/builder.rb +44 -0
- data/lib/wongi-engine/dsl/clause/assign.rb +15 -0
- data/lib/wongi-engine/dsl/clause/fact.rb +71 -0
- data/lib/wongi-engine/dsl/clause/gen.rb +17 -0
- data/lib/wongi-engine/dsl/clause/generic.rb +38 -0
- data/lib/wongi-engine/dsl/generated.rb +43 -0
- data/lib/wongi-engine/dsl/ncc_subrule.rb +17 -0
- data/lib/wongi-engine/dsl/query.rb +24 -0
- data/lib/wongi-engine/dsl/rule.rb +84 -0
- data/lib/wongi-engine/enumerators.rb +21 -0
- data/lib/wongi-engine/error.rb +22 -0
- data/lib/wongi-engine/filter.rb +6 -0
- data/lib/wongi-engine/filter/asserting_test.rb +20 -0
- data/lib/wongi-engine/filter/equality_test.rb +36 -0
- data/lib/wongi-engine/filter/filter_test.rb +18 -0
- data/lib/wongi-engine/filter/greater_than_test.rb +36 -0
- data/lib/wongi-engine/filter/inequality_test.rb +36 -0
- data/lib/wongi-engine/filter/less_than_test.rb +36 -0
- data/lib/wongi-engine/graph.rb +73 -0
- data/lib/wongi-engine/network.rb +416 -0
- data/lib/wongi-engine/network/collectable.rb +42 -0
- data/lib/wongi-engine/network/debug.rb +85 -0
- data/lib/wongi-engine/ruleset.rb +74 -0
- data/lib/wongi-engine/template.rb +78 -0
- data/lib/wongi-engine/token.rb +114 -0
- data/lib/wongi-engine/version.rb +5 -0
- data/lib/wongi-engine/wme.rb +89 -0
- data/lib/wongi-engine/wme_match_data.rb +34 -0
- data/spec/beta_node_spec.rb +29 -0
- data/spec/bug_specs/issue_4_spec.rb +141 -0
- data/spec/dataset_spec.rb +27 -0
- data/spec/dsl_spec.rb +9 -0
- data/spec/filter_specs/assert_test_spec.rb +102 -0
- data/spec/filter_specs/less_test_spec.rb +41 -0
- data/spec/generation_spec.rb +116 -0
- data/spec/high_level_spec.rb +378 -0
- data/spec/network_spec.rb +182 -0
- data/spec/overlay_spec.rb +61 -0
- data/spec/rule_specs/any_rule_spec.rb +75 -0
- data/spec/rule_specs/assign_spec.rb +88 -0
- data/spec/rule_specs/assuming_spec.rb +66 -0
- data/spec/rule_specs/maybe_rule_spec.rb +101 -0
- data/spec/rule_specs/ncc_spec.rb +258 -0
- data/spec/rule_specs/negative_rule_spec.rb +105 -0
- data/spec/ruleset_spec.rb +54 -0
- data/spec/simple_action_spec.rb +40 -0
- data/spec/spec_helper.rb +3 -0
- data/spec/wme_spec.rb +83 -0
- data/wongi-engine.gemspec +40 -0
- metadata +212 -0
@@ -0,0 +1,105 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe "negative rule" do
|
4
|
+
|
5
|
+
before :each do
|
6
|
+
@engine = Wongi::Engine.create
|
7
|
+
end
|
8
|
+
|
9
|
+
def engine
|
10
|
+
@engine
|
11
|
+
end
|
12
|
+
|
13
|
+
it "should not introduce variables" do
|
14
|
+
|
15
|
+
proc = lambda {
|
16
|
+
|
17
|
+
engine << rule('one-option') {
|
18
|
+
forall {
|
19
|
+
neg :Foo, :bar, :_
|
20
|
+
}
|
21
|
+
make {
|
22
|
+
action { |tokens|
|
23
|
+
raise "This should never get executed #{tokens}"
|
24
|
+
}
|
25
|
+
}
|
26
|
+
}
|
27
|
+
|
28
|
+
}
|
29
|
+
|
30
|
+
expect( &proc ).to raise_error( Wongi::Engine::DefinitionError )
|
31
|
+
|
32
|
+
end
|
33
|
+
|
34
|
+
specify "variable example 1" do
|
35
|
+
|
36
|
+
prod = engine << rule {
|
37
|
+
forall {
|
38
|
+
has :x, :y, :Z
|
39
|
+
neg :a, :b, :Z
|
40
|
+
}
|
41
|
+
}
|
42
|
+
|
43
|
+
engine << [:x, :y, 1]
|
44
|
+
expect( prod ).to have(1).tokens
|
45
|
+
|
46
|
+
engine << [:a, :b, 1]
|
47
|
+
expect( prod ).to have(0).tokens
|
48
|
+
|
49
|
+
end
|
50
|
+
|
51
|
+
specify "variable example 1" do
|
52
|
+
|
53
|
+
prod = engine << rule {
|
54
|
+
forall {
|
55
|
+
has :x, :y, :Z
|
56
|
+
neg :a, :b, :Z
|
57
|
+
}
|
58
|
+
}
|
59
|
+
|
60
|
+
engine << [:a, :b, 1]
|
61
|
+
engine << [:x, :y, 1]
|
62
|
+
expect( prod ).to have(0).tokens
|
63
|
+
|
64
|
+
engine.retract [:a, :b, 1]
|
65
|
+
expect( prod ).to have(1).tokens
|
66
|
+
|
67
|
+
end
|
68
|
+
|
69
|
+
# it "should not create infinite feedback loops by default" do
|
70
|
+
|
71
|
+
# engine << rule('feedback') {
|
72
|
+
# forall {
|
73
|
+
# neg :a, :b, :_
|
74
|
+
# }
|
75
|
+
# make {
|
76
|
+
# gen :a, :b, :c
|
77
|
+
# }
|
78
|
+
# }
|
79
|
+
|
80
|
+
# engine.should have(1).facts
|
81
|
+
|
82
|
+
# end
|
83
|
+
|
84
|
+
it "should create infinite feedback loops with unsafe option" do
|
85
|
+
|
86
|
+
counter = 0
|
87
|
+
exception = Class.new( StandardError )
|
88
|
+
|
89
|
+
proc = lambda {
|
90
|
+
engine << rule('feedback') {
|
91
|
+
forall {
|
92
|
+
neg :a, :b, :_, unsafe: true
|
93
|
+
}
|
94
|
+
make {
|
95
|
+
action { counter += 1 ; if counter > 5 then raise exception.new end }
|
96
|
+
gen :a, :b, :c
|
97
|
+
}
|
98
|
+
}
|
99
|
+
}
|
100
|
+
|
101
|
+
expect( &proc ).to raise_error( exception )
|
102
|
+
|
103
|
+
end
|
104
|
+
|
105
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Wongi::Engine::Ruleset do
|
4
|
+
|
5
|
+
before :each do
|
6
|
+
Wongi::Engine::Ruleset.reset
|
7
|
+
end
|
8
|
+
|
9
|
+
context 'initially' do
|
10
|
+
|
11
|
+
it 'should have no rules' do
|
12
|
+
expect( Wongi::Engine::Ruleset.rulesets ).to be_empty
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
16
|
+
|
17
|
+
context 'when creating' do
|
18
|
+
|
19
|
+
it 'should not register itself when not given a name' do
|
20
|
+
ruleset = Wongi::Engine::Ruleset.new
|
21
|
+
expect( ruleset.name ).to be_nil
|
22
|
+
expect( Wongi::Engine::Ruleset.rulesets ).to be_empty
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'should have a name' do
|
26
|
+
ruleset = Wongi::Engine::Ruleset.new 'testing-ruleset'
|
27
|
+
expect( ruleset.name ).to be == 'testing-ruleset'
|
28
|
+
end
|
29
|
+
|
30
|
+
it 'should register itself when given a name' do
|
31
|
+
ruleset = Wongi::Engine::Ruleset.new 'testing-ruleset'
|
32
|
+
expect( Wongi::Engine::Ruleset.rulesets ).not_to be_empty
|
33
|
+
expect( Wongi::Engine::Ruleset[ruleset.name] ).to be == ruleset
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
37
|
+
|
38
|
+
it 'should be able to clear registered rulesets' do
|
39
|
+
ruleset = Wongi::Engine::Ruleset.new 'testing-ruleset'
|
40
|
+
Wongi::Engine::Ruleset.reset
|
41
|
+
expect( Wongi::Engine::Ruleset.rulesets ).to be_empty
|
42
|
+
end
|
43
|
+
|
44
|
+
it 'should install creating rules into a rete' do
|
45
|
+
rete = double 'rete'
|
46
|
+
|
47
|
+
ruleset = Wongi::Engine::Ruleset.new
|
48
|
+
rule = ruleset.rule( 'test-rule' ) { }
|
49
|
+
|
50
|
+
expect( rete ).to receive(:<<).with(rule).once
|
51
|
+
ruleset.install rete
|
52
|
+
end
|
53
|
+
|
54
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Wongi::Engine::DSL::Action::SimpleAction do
|
4
|
+
|
5
|
+
before :each do
|
6
|
+
@rete = Wongi::Engine::Network.new
|
7
|
+
end
|
8
|
+
|
9
|
+
def rete
|
10
|
+
@rete
|
11
|
+
end
|
12
|
+
|
13
|
+
it 'should work with blocks' do
|
14
|
+
|
15
|
+
count = 0
|
16
|
+
|
17
|
+
rete.rule do
|
18
|
+
forall {
|
19
|
+
has 1, 2, :X
|
20
|
+
}
|
21
|
+
make {
|
22
|
+
action {
|
23
|
+
count += 1
|
24
|
+
}
|
25
|
+
}
|
26
|
+
end
|
27
|
+
|
28
|
+
expect(count).to eq(0)
|
29
|
+
|
30
|
+
rete << [1, 2, 3]
|
31
|
+
|
32
|
+
expect(count).to eq(1)
|
33
|
+
|
34
|
+
rete << [1, 2, 4]
|
35
|
+
|
36
|
+
expect(count).to eq(2)
|
37
|
+
|
38
|
+
end
|
39
|
+
|
40
|
+
end
|
data/spec/spec_helper.rb
ADDED
data/spec/wme_spec.rb
ADDED
@@ -0,0 +1,83 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Wongi::Engine::WME do
|
4
|
+
|
5
|
+
# def capitalizing_rete
|
6
|
+
# rete = double 'rete'
|
7
|
+
# expect( rete ).to receive(:import).with("b").and_return("B")
|
8
|
+
# expect( rete ).to receive(:import).with("a").and_return("A")
|
9
|
+
# expect( rete ).to receive(:import).with("c").and_return("C")
|
10
|
+
# rete
|
11
|
+
# end
|
12
|
+
|
13
|
+
subject {
|
14
|
+
Wongi::Engine::WME.new "a", "b", "c"
|
15
|
+
}
|
16
|
+
|
17
|
+
context 'a new WME' do
|
18
|
+
|
19
|
+
it 'should initialize and expose members' do
|
20
|
+
expect( subject.subject ).to be == "a"
|
21
|
+
expect( subject.predicate ).to be == "b"
|
22
|
+
expect( subject.object ).to be == "c"
|
23
|
+
end
|
24
|
+
|
25
|
+
# it 'should use the rete to import members' do
|
26
|
+
|
27
|
+
# rete = capitalizing_rete
|
28
|
+
|
29
|
+
# wme = Wongi::Engine::WME.new "a", "b", "c", rete
|
30
|
+
|
31
|
+
# expect( wme.subject ).to be == "A"
|
32
|
+
# expect( wme.predicate ).to be == "B"
|
33
|
+
# expect( wme.object ).to be == "C"
|
34
|
+
|
35
|
+
# end
|
36
|
+
|
37
|
+
|
38
|
+
it {
|
39
|
+
should be_manual
|
40
|
+
}
|
41
|
+
|
42
|
+
it {
|
43
|
+
should_not be_generated
|
44
|
+
}
|
45
|
+
|
46
|
+
end
|
47
|
+
|
48
|
+
# it 'should be able to import into rete' do
|
49
|
+
|
50
|
+
# rete = capitalizing_rete
|
51
|
+
|
52
|
+
# imported = subject.import_into rete
|
53
|
+
|
54
|
+
# expect( imported.subject ).to be == "A"
|
55
|
+
# expect( imported.predicate ).to be == "B"
|
56
|
+
# expect( imported.object ).to be == "C"
|
57
|
+
|
58
|
+
# end
|
59
|
+
|
60
|
+
it 'should compare instances' do
|
61
|
+
|
62
|
+
wme1 = Wongi::Engine::WME.new "a", "b", "c"
|
63
|
+
wme2 = Wongi::Engine::WME.new "a", "b", "c"
|
64
|
+
wme3 = Wongi::Engine::WME.new "a", "b", "d"
|
65
|
+
|
66
|
+
expect( wme1 ).to be == wme2
|
67
|
+
expect( wme1 ).not_to be == wme3
|
68
|
+
|
69
|
+
end
|
70
|
+
|
71
|
+
it 'should not match against non-templates' do
|
72
|
+
expect { subject =~ [1, 2, 3] }.to raise_error( Wongi::Engine::Error )
|
73
|
+
end
|
74
|
+
|
75
|
+
it 'should match against templates' do
|
76
|
+
t1 = Wongi::Engine::Template.new "a", :_, :_
|
77
|
+
t2 = Wongi::Engine::Template.new "b", :_, :_
|
78
|
+
|
79
|
+
expect( subject ).to be =~ t1
|
80
|
+
expect( subject ).not_to be =~ t2
|
81
|
+
end
|
82
|
+
|
83
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
require File.expand_path('../lib/wongi-engine/version', __FILE__)
|
3
|
+
|
4
|
+
module GemHelper
|
5
|
+
def self.git?
|
6
|
+
File.exists?(".git")
|
7
|
+
end
|
8
|
+
|
9
|
+
def self.hg?
|
10
|
+
File.exists?(".hg")
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
Gem::Specification.new do |gem|
|
15
|
+
gem.authors = ["Valeri Sokolov"]
|
16
|
+
gem.email = ["ulfurinn@ulfurinn.net"]
|
17
|
+
gem.description = %q{A rule engine.}
|
18
|
+
gem.summary = %q{A forward-chaining rule engine in pure Ruby.}
|
19
|
+
gem.homepage = "https://github.com/ulfurinn/wongi-engine"
|
20
|
+
gem.licenses = %w(MIT)
|
21
|
+
|
22
|
+
if GemHelper.git?
|
23
|
+
gem.files = `git ls-files`.split($\)
|
24
|
+
elsif GemHelper.hg?
|
25
|
+
gem.files = `hg st -cn`.split($\)
|
26
|
+
else
|
27
|
+
raise "cannot enumerate files: not a git or hg repository"
|
28
|
+
end
|
29
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
30
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
31
|
+
gem.name = "mort666-wongi-engine"
|
32
|
+
gem.require_paths = ["lib"]
|
33
|
+
gem.version = Wongi::Engine::VERSION
|
34
|
+
|
35
|
+
gem.add_development_dependency 'rake', '~> 10.0'
|
36
|
+
gem.add_development_dependency 'pry', '~> 0.10'
|
37
|
+
# gem.add_development_dependency 'pry-byebug', '~> 2.0'
|
38
|
+
gem.add_development_dependency 'rspec', '~> 3.1'
|
39
|
+
gem.add_development_dependency 'rspec-collection_matchers', '~> 1.1'
|
40
|
+
end
|
metadata
ADDED
@@ -0,0 +1,212 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: mort666-wongi-engine
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.9
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Valeri Sokolov
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-01-18 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rake
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '10.0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '10.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: pry
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0.10'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0.10'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.1'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.1'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec-collection_matchers
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.1'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '1.1'
|
69
|
+
description: A rule engine.
|
70
|
+
email:
|
71
|
+
- ulfurinn@ulfurinn.net
|
72
|
+
executables: []
|
73
|
+
extensions: []
|
74
|
+
extra_rdoc_files: []
|
75
|
+
files:
|
76
|
+
- ".gitignore"
|
77
|
+
- ".hgignore"
|
78
|
+
- ".hgtags"
|
79
|
+
- ".ruby-gemset"
|
80
|
+
- ".travis.yml"
|
81
|
+
- CHANGELOG.md
|
82
|
+
- Gemfile
|
83
|
+
- LICENSE
|
84
|
+
- README.md
|
85
|
+
- Rakefile
|
86
|
+
- examples/ex01.rb
|
87
|
+
- examples/ex02.rb
|
88
|
+
- examples/graphviz.rb
|
89
|
+
- examples/rdf.n3
|
90
|
+
- examples/rdf.rb
|
91
|
+
- examples/timeline.rb
|
92
|
+
- lib/wongi-engine.rb
|
93
|
+
- lib/wongi-engine/alpha_memory.rb
|
94
|
+
- lib/wongi-engine/beta.rb
|
95
|
+
- lib/wongi-engine/beta/assignment_node.rb
|
96
|
+
- lib/wongi-engine/beta/beta_memory.rb
|
97
|
+
- lib/wongi-engine/beta/beta_node.rb
|
98
|
+
- lib/wongi-engine/beta/filter_node.rb
|
99
|
+
- lib/wongi-engine/beta/join_node.rb
|
100
|
+
- lib/wongi-engine/beta/ncc_node.rb
|
101
|
+
- lib/wongi-engine/beta/ncc_partner.rb
|
102
|
+
- lib/wongi-engine/beta/neg_node.rb
|
103
|
+
- lib/wongi-engine/beta/optional_node.rb
|
104
|
+
- lib/wongi-engine/beta/or_node.rb
|
105
|
+
- lib/wongi-engine/beta/production_node.rb
|
106
|
+
- lib/wongi-engine/compiler.rb
|
107
|
+
- lib/wongi-engine/core_ext.rb
|
108
|
+
- lib/wongi-engine/data_overlay.rb
|
109
|
+
- lib/wongi-engine/dsl.rb
|
110
|
+
- lib/wongi-engine/dsl/action/base.rb
|
111
|
+
- lib/wongi-engine/dsl/action/error_generator.rb
|
112
|
+
- lib/wongi-engine/dsl/action/simple_action.rb
|
113
|
+
- lib/wongi-engine/dsl/action/simple_collector.rb
|
114
|
+
- lib/wongi-engine/dsl/action/statement_generator.rb
|
115
|
+
- lib/wongi-engine/dsl/action/trace_action.rb
|
116
|
+
- lib/wongi-engine/dsl/any_rule.rb
|
117
|
+
- lib/wongi-engine/dsl/assuming.rb
|
118
|
+
- lib/wongi-engine/dsl/builder.rb
|
119
|
+
- lib/wongi-engine/dsl/clause/assign.rb
|
120
|
+
- lib/wongi-engine/dsl/clause/fact.rb
|
121
|
+
- lib/wongi-engine/dsl/clause/gen.rb
|
122
|
+
- lib/wongi-engine/dsl/clause/generic.rb
|
123
|
+
- lib/wongi-engine/dsl/generated.rb
|
124
|
+
- lib/wongi-engine/dsl/ncc_subrule.rb
|
125
|
+
- lib/wongi-engine/dsl/query.rb
|
126
|
+
- lib/wongi-engine/dsl/rule.rb
|
127
|
+
- lib/wongi-engine/enumerators.rb
|
128
|
+
- lib/wongi-engine/error.rb
|
129
|
+
- lib/wongi-engine/filter.rb
|
130
|
+
- lib/wongi-engine/filter/asserting_test.rb
|
131
|
+
- lib/wongi-engine/filter/equality_test.rb
|
132
|
+
- lib/wongi-engine/filter/filter_test.rb
|
133
|
+
- lib/wongi-engine/filter/greater_than_test.rb
|
134
|
+
- lib/wongi-engine/filter/inequality_test.rb
|
135
|
+
- lib/wongi-engine/filter/less_than_test.rb
|
136
|
+
- lib/wongi-engine/graph.rb
|
137
|
+
- lib/wongi-engine/network.rb
|
138
|
+
- lib/wongi-engine/network/collectable.rb
|
139
|
+
- lib/wongi-engine/network/debug.rb
|
140
|
+
- lib/wongi-engine/ruleset.rb
|
141
|
+
- lib/wongi-engine/template.rb
|
142
|
+
- lib/wongi-engine/token.rb
|
143
|
+
- lib/wongi-engine/version.rb
|
144
|
+
- lib/wongi-engine/wme.rb
|
145
|
+
- lib/wongi-engine/wme_match_data.rb
|
146
|
+
- spec/beta_node_spec.rb
|
147
|
+
- spec/bug_specs/issue_4_spec.rb
|
148
|
+
- spec/dataset_spec.rb
|
149
|
+
- spec/dsl_spec.rb
|
150
|
+
- spec/filter_specs/assert_test_spec.rb
|
151
|
+
- spec/filter_specs/less_test_spec.rb
|
152
|
+
- spec/generation_spec.rb
|
153
|
+
- spec/high_level_spec.rb
|
154
|
+
- spec/network_spec.rb
|
155
|
+
- spec/overlay_spec.rb
|
156
|
+
- spec/rule_specs/any_rule_spec.rb
|
157
|
+
- spec/rule_specs/assign_spec.rb
|
158
|
+
- spec/rule_specs/assuming_spec.rb
|
159
|
+
- spec/rule_specs/maybe_rule_spec.rb
|
160
|
+
- spec/rule_specs/ncc_spec.rb
|
161
|
+
- spec/rule_specs/negative_rule_spec.rb
|
162
|
+
- spec/ruleset_spec.rb
|
163
|
+
- spec/simple_action_spec.rb
|
164
|
+
- spec/spec_helper.rb
|
165
|
+
- spec/wme_spec.rb
|
166
|
+
- wongi-engine.gemspec
|
167
|
+
homepage: https://github.com/ulfurinn/wongi-engine
|
168
|
+
licenses:
|
169
|
+
- MIT
|
170
|
+
metadata: {}
|
171
|
+
post_install_message:
|
172
|
+
rdoc_options: []
|
173
|
+
require_paths:
|
174
|
+
- lib
|
175
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
176
|
+
requirements:
|
177
|
+
- - ">="
|
178
|
+
- !ruby/object:Gem::Version
|
179
|
+
version: '0'
|
180
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
181
|
+
requirements:
|
182
|
+
- - ">="
|
183
|
+
- !ruby/object:Gem::Version
|
184
|
+
version: '0'
|
185
|
+
requirements: []
|
186
|
+
rubyforge_project:
|
187
|
+
rubygems_version: 2.4.8
|
188
|
+
signing_key:
|
189
|
+
specification_version: 4
|
190
|
+
summary: A forward-chaining rule engine in pure Ruby.
|
191
|
+
test_files:
|
192
|
+
- spec/beta_node_spec.rb
|
193
|
+
- spec/bug_specs/issue_4_spec.rb
|
194
|
+
- spec/dataset_spec.rb
|
195
|
+
- spec/dsl_spec.rb
|
196
|
+
- spec/filter_specs/assert_test_spec.rb
|
197
|
+
- spec/filter_specs/less_test_spec.rb
|
198
|
+
- spec/generation_spec.rb
|
199
|
+
- spec/high_level_spec.rb
|
200
|
+
- spec/network_spec.rb
|
201
|
+
- spec/overlay_spec.rb
|
202
|
+
- spec/rule_specs/any_rule_spec.rb
|
203
|
+
- spec/rule_specs/assign_spec.rb
|
204
|
+
- spec/rule_specs/assuming_spec.rb
|
205
|
+
- spec/rule_specs/maybe_rule_spec.rb
|
206
|
+
- spec/rule_specs/ncc_spec.rb
|
207
|
+
- spec/rule_specs/negative_rule_spec.rb
|
208
|
+
- spec/ruleset_spec.rb
|
209
|
+
- spec/simple_action_spec.rb
|
210
|
+
- spec/spec_helper.rb
|
211
|
+
- spec/wme_spec.rb
|
212
|
+
has_rdoc:
|