stamina-induction 0.5.4 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +8 -0
- data/lib/stamina-induction/stamina/reg_lang/canonical_info.rb +11 -7
- metadata +11 -9
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
# 0.6.0 / 2012-09-12
|
2
|
+
|
3
|
+
* Added Markable#marks and Markable#raw_data
|
4
|
+
* State#initial!, #accepting! and error! now accept an optional truth value parameter.
|
5
|
+
* Generalized the decoration algorithm to work backwards as well as forwards as well as
|
6
|
+
accepting an output Hash-like object, defaulting to true state decorations.
|
7
|
+
* Generalized the DFA equivalence algorithm under TransitionSystem::Equivalence.
|
8
|
+
|
1
9
|
# O.5.4 / 2012-03-06
|
2
10
|
|
3
11
|
* InputString and Sample have been moved from stamina-induction to stamina-core as ADL
|
@@ -2,19 +2,23 @@ module Stamina
|
|
2
2
|
class RegLang
|
3
3
|
class CanonicalInfo
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
algo.set_suppremum do |d0,d1|
|
5
|
+
class ShortPrefixes < Utils::Decorate
|
6
|
+
def suppremum(d0, d1)
|
8
7
|
if (d0.nil? || d1.nil?)
|
9
8
|
(d0 || d1)
|
10
9
|
else
|
11
|
-
d0.size <= d1.size ? d0 : d1
|
10
|
+
(d0.size <= d1.size) ? d0 : d1
|
12
11
|
end
|
13
12
|
end
|
14
|
-
|
13
|
+
def propagate(deco, edge)
|
15
14
|
deco.dup << edge.symbol
|
16
15
|
end
|
17
|
-
|
16
|
+
def init_deco(s)
|
17
|
+
s.initial? ? [] : nil
|
18
|
+
end
|
19
|
+
def take_at_start?(s)
|
20
|
+
s.initial?
|
21
|
+
end
|
18
22
|
end
|
19
23
|
|
20
24
|
attr_reader :cdfa
|
@@ -105,7 +109,7 @@ module Stamina
|
|
105
109
|
# Ensures that short prefixes of states are recognized
|
106
110
|
def prefixes!
|
107
111
|
unless defined?(@prefixes)
|
108
|
-
|
112
|
+
ShortPrefixes.new.call(cdfa, :short_prefix)
|
109
113
|
@prefixes = true
|
110
114
|
end
|
111
115
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stamina-induction
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,22 +9,22 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-09-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: stamina-core
|
16
|
-
requirement: &
|
16
|
+
requirement: &70191885053800 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - =
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 0.
|
21
|
+
version: 0.6.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70191885053800
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: citrus
|
27
|
-
requirement: &
|
27
|
+
requirement: &70191885052900 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: '2.4'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70191885052900
|
36
36
|
description: Stamina-induction plugs induction algorithm to the stamina toolkit.
|
37
37
|
email:
|
38
38
|
- blambeau@gmail.com
|
@@ -88,6 +88,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
88
88
|
- - ! '>='
|
89
89
|
- !ruby/object:Gem::Version
|
90
90
|
version: '0'
|
91
|
+
segments:
|
92
|
+
- 0
|
93
|
+
hash: -2532014107484486532
|
91
94
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
92
95
|
none: false
|
93
96
|
requirements:
|
@@ -96,9 +99,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
96
99
|
version: '0'
|
97
100
|
requirements: []
|
98
101
|
rubyforge_project:
|
99
|
-
rubygems_version: 1.8.
|
102
|
+
rubygems_version: 1.8.15
|
100
103
|
signing_key:
|
101
104
|
specification_version: 3
|
102
105
|
summary: Induction algorithms for the Stamina toolkit
|
103
106
|
test_files: []
|
104
|
-
has_rdoc:
|