y_nelson 2.3.0 → 2.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ACKNOWLEDGMENT.txt +6 -0
- data/Introduction_to_Ruby_for_YNelson_Users.lyx +136 -100
- data/Introduction_to_Ruby_for_YNelson_Users.pdf +0 -0
- data/Introduction_to_YNelson.lyx +168 -206
- data/Introduction_to_YNelson.pdf +0 -0
- data/Object_model_of_YNelson_and_YPetri.lyx +55 -16
- data/Object_model_of_YNelson_and_YPetri.pdf +0 -0
- data/lib/y_nelson/place.rb +20 -4
- data/lib/y_nelson/version.rb +1 -1
- data/lib/y_nelson.rb +148 -28
- data/test/issues.rb +68 -0
- data/test/y_nelson_test.rb +1 -1
- data/y_nelson.gemspec +4 -2
- metadata +41 -17
data/Introduction_to_YNelson.pdf
CHANGED
Binary file
|
@@ -153,8 +153,15 @@ YPetri
|
|
153
153
|
\end_layout
|
154
154
|
|
155
155
|
\begin_layout Standard
|
156
|
-
|
157
|
-
|
156
|
+
For the beginners, there is tutorial available for
|
157
|
+
\family typewriter
|
158
|
+
YPetri
|
159
|
+
\family default
|
160
|
+
/
|
161
|
+
\family typewriter
|
162
|
+
YNelson
|
163
|
+
\family default
|
164
|
+
, and the classes are more or less fully documented, the internal workings
|
158
165
|
and the design intent might not be immediately obvious.
|
159
166
|
The purpose of is document is to make the reader faster achieve their understan
|
160
167
|
ding.
|
@@ -705,17 +712,45 @@ Transition
|
|
705
712
|
\family typewriter
|
706
713
|
YPetri::Transition
|
707
714
|
\family default
|
708
|
-
class represents
|
709
|
-
|
715
|
+
class represents Petri net transitions.
|
716
|
+
They are
|
717
|
+
\begin_inset Quotes eld
|
718
|
+
\end_inset
|
719
|
+
|
720
|
+
functional
|
721
|
+
\begin_inset Quotes erd
|
722
|
+
\end_inset
|
723
|
+
|
724
|
+
in the sense that they may have mathematical functions attached to them,
|
725
|
+
that govern their firing according to the current marking of the Petri
|
726
|
+
net places.
|
727
|
+
(Term
|
728
|
+
\begin_inset Quotes eld
|
729
|
+
\end_inset
|
730
|
+
|
731
|
+
functional
|
732
|
+
\begin_inset Quotes erd
|
733
|
+
\end_inset
|
734
|
+
|
735
|
+
has also been used in other meanings in conjunction with Petri nets.)
|
736
|
+
\family typewriter
|
737
|
+
YPetri::Transition
|
738
|
+
\family default
|
739
|
+
class utilizes
|
710
740
|
\family typewriter
|
711
741
|
NameMagic
|
712
742
|
\family default
|
713
|
-
|
743
|
+
mixin.
|
744
|
+
|
745
|
+
\family typewriter
|
746
|
+
YPetri::Transition
|
747
|
+
\family default
|
748
|
+
class is normally used as a parametrized subclass (PS) depending on
|
714
749
|
\family typewriter
|
715
750
|
YPetri::World
|
716
751
|
\family default
|
717
752
|
.
|
718
|
-
The
|
753
|
+
The most prominent attribute of a
|
719
754
|
\family typewriter
|
720
755
|
Transition
|
721
756
|
\family default
|
@@ -806,7 +841,7 @@ NameMagic
|
|
806
841
|
YPetri::World
|
807
842
|
\family default
|
808
843
|
.
|
809
|
-
It is basically a specialized collection of
|
844
|
+
It is basically a specialized collection of
|
810
845
|
\family typewriter
|
811
846
|
Place
|
812
847
|
\family default
|
@@ -1525,10 +1560,6 @@ run( upto: ...
|
|
1525
1560
|
|
1526
1561
|
\family typewriter
|
1527
1562
|
#dup
|
1528
|
-
\family default
|
1529
|
-
, alias
|
1530
|
-
\family typewriter
|
1531
|
-
#at
|
1532
1563
|
\family default
|
1533
1564
|
– duplicate of the receiver simulation, with the possibility to change
|
1534
1565
|
time and/or other simulation settings.
|
@@ -2412,8 +2443,8 @@ Core
|
|
2412
2443
|
\family typewriter
|
2413
2444
|
Simulation
|
2414
2445
|
\family default
|
2415
|
-
for the purpose of facilitating
|
2416
|
-
simulation.
|
2446
|
+
for the purpose of facilitating future use of different machines to run
|
2447
|
+
the simulation.
|
2417
2448
|
At the moment, plain Ruby is used to compute the simulation steps.
|
2418
2449
|
|
2419
2450
|
\family typewriter
|
@@ -3101,7 +3132,7 @@ DataSet
|
|
3101
3132
|
\family default
|
3102
3133
|
|
3103
3134
|
\emph on
|
3104
|
-
|
3135
|
+
doubly parametrized
|
3105
3136
|
\emph default
|
3106
3137
|
by the instance.
|
3107
3138
|
Therefore, also instance methods include:
|
@@ -3116,7 +3147,11 @@ double parametrized
|
|
3116
3147
|
\family typewriter
|
3117
3148
|
Features.Record
|
3118
3149
|
\family default
|
3119
|
-
PS
|
3150
|
+
PS parametrized by the
|
3151
|
+
\family typewriter
|
3152
|
+
Features
|
3153
|
+
\family default
|
3154
|
+
instance.
|
3120
3155
|
\end_layout
|
3121
3156
|
|
3122
3157
|
\begin_layout Itemize
|
@@ -3128,7 +3163,11 @@ Features.Record
|
|
3128
3163
|
\family typewriter
|
3129
3164
|
Features.DataSet
|
3130
3165
|
\family default
|
3131
|
-
|
3166
|
+
PS parametrized by the
|
3167
|
+
\family typewriter
|
3168
|
+
Features
|
3169
|
+
\family default
|
3170
|
+
instance.
|
3132
3171
|
\end_layout
|
3133
3172
|
|
3134
3173
|
\begin_layout Standard
|
Binary file
|
data/lib/y_nelson/place.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# YNelson::Place is analogical to a spreadsheet cell. It is based on
|
2
|
-
# YPetri::Place
|
2
|
+
# YPetri::Place, which is made into a ZZ object using Yzz mixin.
|
3
3
|
#
|
4
4
|
class YNelson::Place < YPetri::Place
|
5
5
|
include YNelson::Yzz
|
@@ -18,13 +18,29 @@ class YNelson::Place < YPetri::Place
|
|
18
18
|
|
19
19
|
end
|
20
20
|
|
21
|
-
#
|
21
|
+
# FIXME: Because Yzz::SidePair actually parametrizes ::Yzz::PoswardSide
|
22
|
+
# and ::Yzz::NegwardSide, the following two class definitions will probably
|
23
|
+
# be ignored. I'm too tired to look into this now, this is for later
|
24
|
+
# user comfort development of YNelson.
|
25
|
+
#
|
26
|
+
# Subclass of Yzz::PoswardSide.
|
22
27
|
#
|
23
|
-
class
|
28
|
+
class PoswardSide < Yzz::PoswardSide
|
24
29
|
# "Budding": creation of new cells from the cell sides.
|
25
30
|
#
|
26
31
|
def bud( value: L!, f: nil )
|
27
|
-
# FIXME
|
32
|
+
# FIXME -- budding from posward side
|
33
|
+
end
|
34
|
+
alias :>> :bud
|
35
|
+
end
|
36
|
+
|
37
|
+
# Subclass of Yzz::NegwardSide.
|
38
|
+
#
|
39
|
+
class NegwardSide < Yzz::NegwardSide
|
40
|
+
# "Budding": creation of new cells from the cell sides.
|
41
|
+
#
|
42
|
+
def bud( value: L!, f: nil )
|
43
|
+
# FIXME -- budding from negward side
|
28
44
|
end
|
29
45
|
alias :>> :bud
|
30
46
|
end
|
data/lib/y_nelson/version.rb
CHANGED
data/lib/y_nelson.rb
CHANGED
@@ -17,37 +17,34 @@ require_relative 'y_nelson/dimension_point'
|
|
17
17
|
require_relative 'y_nelson/agent'
|
18
18
|
require_relative 'y_nelson/dsl'
|
19
19
|
|
20
|
-
# YNelson is an implementation of a cross between Ted Nelson's Zz structure,
|
21
|
-
#
|
22
|
-
#
|
23
|
-
#
|
20
|
+
# YNelson is an implementation of a cross between Ted Nelson's Zz structure,
|
21
|
+
# and a specific type of universal Petri net (PN), to whose creation I put
|
22
|
+
# particularly large amount of design considerations. The resulting data
|
23
|
+
# structure, combining the qualities of the said PN with those of a relational
|
24
|
+
# database, I refer to as Nelson net.
|
24
25
|
#
|
25
|
-
# A Nelson net
|
26
|
-
#
|
27
|
-
#
|
28
|
-
#
|
29
|
-
#
|
30
|
-
# transitions.
|
26
|
+
# A Nelson net can be viewed as a genralization of a spreadsheet. Ted Nelson
|
27
|
+
# does note similarities between zz structures and spreadsheets and makes wide
|
28
|
+
# use of spreadsheet metaphors in his terminology: cells, rows, columns, ranks,
|
29
|
+
# cursors, selections... Nelson net arises by adding spreadsheet "formulas" to
|
30
|
+
# the mixture, which are nothing else than PN transitions.
|
31
31
|
#
|
32
|
-
#
|
33
|
-
#
|
34
|
-
#
|
35
|
-
#
|
36
|
-
#
|
37
|
-
#
|
32
|
+
# From spreadsheet software implementations, we are used to various constraints
|
33
|
+
# regarding the available PN transitions. In Nelson nets, these constraints are
|
34
|
+
# removed by the Nelson nets being based on the said formally defined universal
|
35
|
+
# PN. Also, the plain globally orthogonal structure of rows/columns/sheets
|
36
|
+
# typical for spreadsheet implementations is generalized to the locally
|
37
|
+
# orthogonal zz structure with unlimited number of dimensions. The generalization
|
38
|
+
# is as follows:
|
39
|
+
#
|
40
|
+
# 1. Both places and transitions of the PN are zz objects.
|
41
|
+
# 2. The way the spreadsheet is based on PNs is properly formalized.
|
38
42
|
#
|
39
|
-
#
|
40
|
-
#
|
41
|
-
#
|
42
|
-
#
|
43
|
-
#
|
44
|
-
# As for functional Petri nets, their power in computing is well recognized (eg.
|
45
|
-
# Funnel, Odersky 2000). FPNs are sometimes just called functional nets, because
|
46
|
-
# Petri originally described his nets as timeless and functionless. However, in
|
47
|
-
# special-purpose applications, such as biochemical applications, to which I
|
48
|
-
# incline, it is appropriate to honor Petri, who designed his nets specifically
|
49
|
-
# with chemical modeling in mind. In biochemistry, it is common to call
|
50
|
-
# functional nets Petri nets (Miyano, 200?).
|
43
|
+
# Luckily, Ted Nelson and his crowd already put energy into explaining the ins
|
44
|
+
# and outs of zz structures. There is a growing body of literature on this,
|
45
|
+
# including zz structure applications in bioinformatics. And I add to this my
|
46
|
+
# explanation of the extended PN type that I designed and implemented in YPetri
|
47
|
+
# gem (gem install YPetri), which is a dependency of YNelson.
|
51
48
|
#
|
52
49
|
module YNelson
|
53
50
|
# Singleton class of YNelson is a partial descendant of YPetri::World. It
|
@@ -100,3 +97,126 @@ module YNelson
|
|
100
97
|
end
|
101
98
|
|
102
99
|
puts "YNelson: Nelson net domain model and simulator. ⓒ 2013 Boris Stitnicky"
|
100
|
+
|
101
|
+
|
102
|
+
# ===========================================================================
|
103
|
+
# !!! TODO !!!
|
104
|
+
#
|
105
|
+
# Refactoring plans
|
106
|
+
#
|
107
|
+
# When 'y_petri' is required, class Module will gain the capacity to respond
|
108
|
+
# to y_petri DSL commands (#Place, #Transition etc.).
|
109
|
+
#
|
110
|
+
# This will allow syntax such as:
|
111
|
+
#
|
112
|
+
# # syntax 1
|
113
|
+
#
|
114
|
+
# module Foo
|
115
|
+
# P1 = Place()
|
116
|
+
# P2 = Place()
|
117
|
+
# P3 = Place()
|
118
|
+
# end
|
119
|
+
#
|
120
|
+
# module Bar
|
121
|
+
# T1 = Transition s: { P1: -1, P2: 1 }
|
122
|
+
# end
|
123
|
+
#
|
124
|
+
# module Baz
|
125
|
+
# T2 = Transition s: { P2: -1, P3: 1 }
|
126
|
+
# end
|
127
|
+
#
|
128
|
+
# In this syntax, there are two questions:
|
129
|
+
# 1. Which world will the defined nodes belong to?
|
130
|
+
# 2. Which net(s) will they be automatically included in?
|
131
|
+
#
|
132
|
+
# The goal here is to be able to construct things like:
|
133
|
+
#
|
134
|
+
# class Foobar
|
135
|
+
# include Foo
|
136
|
+
# include Bar
|
137
|
+
# end
|
138
|
+
#
|
139
|
+
# object = Foobar.new # Object with state defined by a net consisting
|
140
|
+
# # of Foo and Bar modules
|
141
|
+
#
|
142
|
+
# object.net # YPetri net
|
143
|
+
# object.state # state of the object's net
|
144
|
+
#
|
145
|
+
# A different possibility would be to use the block syntax:
|
146
|
+
#
|
147
|
+
# # syntax 2
|
148
|
+
#
|
149
|
+
# quux = net do
|
150
|
+
# include "Foo"
|
151
|
+
# Place "A", marking: 42
|
152
|
+
# end
|
153
|
+
#
|
154
|
+
# (Since net do A = Place( m: 42 ) end does not work -- constant gets
|
155
|
+
# defined in the callers scope.)
|
156
|
+
#
|
157
|
+
# The question is, which world will the nodes defined by syntax 1 go to?
|
158
|
+
# I think that the world should be defined either:
|
159
|
+
#
|
160
|
+
# 1. explicitly
|
161
|
+
#
|
162
|
+
# module Foo
|
163
|
+
# self.y_petri_world = Bar
|
164
|
+
# end
|
165
|
+
#
|
166
|
+
# 2. implicitly
|
167
|
+
#
|
168
|
+
# module Foo
|
169
|
+
# A = Place() # will automatically connect Foo with the default world
|
170
|
+
# end
|
171
|
+
#
|
172
|
+
# module Foo::Bar
|
173
|
+
# A = Place() # will search nesting and connect Foo::Bar with the world of Foo
|
174
|
+
# end
|
175
|
+
#
|
176
|
+
# As for +YPetri::Net+ block constructor, the block should be module-evalled in
|
177
|
+
# the nascent instance (whose class descends from Module), but +include+ in it
|
178
|
+
# should be peppered so as to admit also Place and Transition arguments and to
|
179
|
+
# make the first include decide implicitly the world of this net.
|
180
|
+
#
|
181
|
+
# X = net do
|
182
|
+
# include Foo::A
|
183
|
+
# include Foo::Bar
|
184
|
+
# end
|
185
|
+
#
|
186
|
+
# Other than that, the world would have to be either defined explicitly
|
187
|
+
#
|
188
|
+
# X = foo_world.net do
|
189
|
+
# # ...
|
190
|
+
# end
|
191
|
+
#
|
192
|
+
# or implicitly by Module#net, taking the module's world as the net's
|
193
|
+
# world, as in module definition.
|
194
|
+
#
|
195
|
+
# So Module#net would go somehow like:
|
196
|
+
#
|
197
|
+
# class Module
|
198
|
+
# def net &block
|
199
|
+
# x = Net.new
|
200
|
+
# x.y_petri_world = y_petri_world # of the receiver
|
201
|
+
# x.module_exec &block
|
202
|
+
# return x
|
203
|
+
# end
|
204
|
+
# end
|
205
|
+
#
|
206
|
+
# Object.y_petri_world is automatically created. World is not a module class.
|
207
|
+
#
|
208
|
+
# #net called outside a module should create a Net belonging to the
|
209
|
+
# Object.y_petri_world.
|
210
|
+
#
|
211
|
+
# ===========================================================================
|
212
|
+
|
213
|
+
|
214
|
+
# ===========================================================================
|
215
|
+
# !!! TODO !!!
|
216
|
+
#
|
217
|
+
# Refactoring plans: Modules themselves should be ZZ objects, but not
|
218
|
+
# before yzz is refactored so as to allow to give the zz properties to
|
219
|
+
# already existing objects.
|
220
|
+
#
|
221
|
+
# It is a question whether all the objects should be zz objects, and the
|
222
|
+
# probable answer is actually yes.
|
data/test/issues.rb
ADDED
@@ -0,0 +1,68 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'sy'; require 'y_nelson' and include YNelson
|
4
|
+
|
5
|
+
# =============================================================================
|
6
|
+
# FOUND ISSUES
|
7
|
+
|
8
|
+
# With
|
9
|
+
M = Place m!: 1
|
10
|
+
|
11
|
+
# This works as expected:
|
12
|
+
G = Transition domain: M, s: { M: 1 }, rate: proc { |m| m * 0.1 }
|
13
|
+
# This works too:
|
14
|
+
G = Transition domain: M, s: { M: 1 }, rate: -> m { m * 0.1 }
|
15
|
+
|
16
|
+
# This doesn't work:
|
17
|
+
G = TS M: 0, M: 1 # domain of the transition shown as empty, should be [ M ]
|
18
|
+
|
19
|
+
# This
|
20
|
+
G = TS domain: M, s: { M: 1 }, rate: -> m { m * 0.1 }
|
21
|
+
# gives confusing error message: Supplied codomain member s does not specify a valid place!
|
22
|
+
# The user is seemingly ignorant of correct #TS syntax and tries #Transition syntax on it
|
23
|
+
# with arguments :domain, :s. TS syntax takes ordered arguments to denote domain, while
|
24
|
+
# named arguments denote codomain and its stoichiometry. TS takes care of the :domain argument,
|
25
|
+
# but does not expect a codomain given in :s alias :stoichiometry named argument, and attempts
|
26
|
+
# to convert symbol :s into a place. This error is confusing
|
27
|
+
|
28
|
+
# This
|
29
|
+
G = TS domain: M, M: 1, rate: proc do |m| m * 0.1 end
|
30
|
+
# does not work, but the cause seems to be related to Ruby syntax itself.
|
31
|
+
# This already works (replacing do / end by { / })
|
32
|
+
G = TS domain: M, M: 1, rate: proc { |m| m * 0.1 }
|
33
|
+
|
34
|
+
# This still works as expected
|
35
|
+
G = TS M, M: 1, rate: proc { |m| m * 0.1 }
|
36
|
+
|
37
|
+
# And this works, too
|
38
|
+
G = TS M, M: 1 do |m| m * 0.1 end
|
39
|
+
|
40
|
+
# This simple Boolean place definition causes problems, because the construction of a new
|
41
|
+
# simulation, when constructing a marking vecto, in #zero class method uses multplication by
|
42
|
+
# zero to get zero marking. In the future, the simulation has to admit that not all the places
|
43
|
+
# markings must support mathematical oprations.
|
44
|
+
Ck_license = Place m!: false
|
45
|
+
|
46
|
+
# Issue: NaN and surely also positive and negative float infinity will be a problem.
|
47
|
+
|
48
|
+
# Issue: constructor such as this one
|
49
|
+
T = TS A: 0, B: -1
|
50
|
+
# considers A to be a part of the codomain, when the user actually means domain.
|
51
|
+
# For now, the users will have to avoid constructs with zero stoichiometry coefficient.
|
52
|
+
# In the future, this should be corrected.
|
53
|
+
|
54
|
+
# Issue: A bit unrelated, but annoying
|
55
|
+
@w = YPetri::World.new
|
56
|
+
@net = @w.Net.send :new
|
57
|
+
@net << @w.Place.send( :new, ɴ: :A )
|
58
|
+
@net << @w.Place.send( :new, ɴ: :B )
|
59
|
+
# TS transitions A2B, A_plus
|
60
|
+
@net << @w.Transition.send( :new, ɴ: :A2B, s: { A: -1, B: 1 }, rate: 0.01 )
|
61
|
+
@net << @w.Transition.send( :new, ɴ: :A_plus, s: { A: 1 }, rate: 0.001 )
|
62
|
+
|
63
|
+
# Now this is a common mistake that the people will make. They will write:
|
64
|
+
@net.State.Feature.Marking( [ :A, :B ] )
|
65
|
+
# instead of:
|
66
|
+
@net.State.Features.Marking( [ :A, :B ] )
|
67
|
+
# The problem is that the error message of the first form is not sufficiently informative:
|
68
|
+
# No instance [:A, :B] in #<Class:0xb87c366c>
|
data/test/y_nelson_test.rb
CHANGED
@@ -25,7 +25,7 @@ describe YNelson do
|
|
25
25
|
describe "new transition form correct zz connections with places" do
|
26
26
|
it "should work as expected" do
|
27
27
|
assert_equal [], @p.neighbors
|
28
|
-
assert_equal [], @p.
|
28
|
+
assert_equal [], @p.connections # 'connectivity' now exclusively a zz keyword
|
29
29
|
t = @m.Transition codomain: @p, assignment: -> { 0.1 }
|
30
30
|
assert_equal [ @p ], t.neighbors
|
31
31
|
dim = @m.Dimension( t, :codomain, 0 )
|
data/y_nelson.gemspec
CHANGED
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.version = YNelson::VERSION
|
9
9
|
spec.authors = ["boris"]
|
10
10
|
spec.email = ["\"boris@iis.sinica.edu.tw\""]
|
11
|
-
spec.summary = %q{A fusion of functional Petri net with a zz structure.}
|
12
|
-
spec.description = %q{
|
11
|
+
spec.summary = %q{A fusion of functional Petri net with a zz structure that formalizes and generalizes spreadsheet.}
|
12
|
+
spec.description = %q{Zz structures are an interesting way of representing relations invented by Ted Nelson. I captured the basic zz structure formalism in a gem Yzz. In this gem, YNelson, I combine zz structures with universal Petri nets (provided by another gem of mine, YPetri) to obtain a hybrid data structure that formalizes and generelizes spreadsheet. Because let us note that most practical spreadsheet implementation allow to model a Petri net with the cell functions – if the cell functions are regarded as transitions and cells and places, then a spreadsheet is a kind of a Petri net. At the same time, spreadsheet files are orthogonal structures with at least 3 dimensions: x (horizontal), y (vertical) and z (the dimension of sheets stacked upon each other). In addition, there is the "dimension" of files, the "dimension" of precedents and dependents (seen in formula auditing). If zz structures are used to represent relations as dimensions, this can be generalized, and the globally orthogonal nature of spreadsheets is generalized to the locally orthogonal nature of zz structures. The sum of this makes for a nice generalization of a spreadsheet, which YNelson attempts to be. In addition, YNelson attempts to provide convenience at least at the level similar to the actual existing spreadsheet software by providing certain commands that allow creation of more than one Petri net place or transition at the same time. This aspect of YNelson is still under development. See the user guide and the documentation for the details. YNelson documentation is available online, but due to formatting issues, you may prefer to generate the documentation on your own by running rdoc in the gem directory.}
|
13
13
|
spec.homepage = ""
|
14
14
|
spec.license = "GPLv3"
|
15
15
|
|
@@ -23,4 +23,6 @@ Gem::Specification.new do |spec|
|
|
23
23
|
|
24
24
|
spec.add_development_dependency "bundler", "~> 1.6"
|
25
25
|
spec.add_development_dependency "rake"
|
26
|
+
|
27
|
+
spec.required_ruby_version = '>= 2.0'
|
26
28
|
end
|
metadata
CHANGED
@@ -1,79 +1,100 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: y_nelson
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- boris
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-12-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: yzz
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: y_petri
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - ~>
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '1.6'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - ~>
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '1.6'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
-
description:
|
69
|
+
description: 'Zz structures are an interesting way of representing relations invented
|
70
|
+
by Ted Nelson. I captured the basic zz structure formalism in a gem Yzz. In this
|
71
|
+
gem, YNelson, I combine zz structures with universal Petri nets (provided by another
|
72
|
+
gem of mine, YPetri) to obtain a hybrid data structure that formalizes and generelizes
|
73
|
+
spreadsheet. Because let us note that most practical spreadsheet implementation
|
74
|
+
allow to model a Petri net with the cell functions – if the cell functions are regarded
|
75
|
+
as transitions and cells and places, then a spreadsheet is a kind of a Petri net.
|
76
|
+
At the same time, spreadsheet files are orthogonal structures with at least 3 dimensions:
|
77
|
+
x (horizontal), y (vertical) and z (the dimension of sheets stacked upon each other).
|
78
|
+
In addition, there is the "dimension" of files, the "dimension" of precedents and
|
79
|
+
dependents (seen in formula auditing). If zz structures are used to represent relations
|
80
|
+
as dimensions, this can be generalized, and the globally orthogonal nature of spreadsheets
|
81
|
+
is generalized to the locally orthogonal nature of zz structures. The sum of this
|
82
|
+
makes for a nice generalization of a spreadsheet, which YNelson attempts to be.
|
83
|
+
In addition, YNelson attempts to provide convenience at least at the level similar
|
84
|
+
to the actual existing spreadsheet software by providing certain commands that allow
|
85
|
+
creation of more than one Petri net place or transition at the same time. This aspect
|
86
|
+
of YNelson is still under development. See the user guide and the documentation
|
87
|
+
for the details. YNelson documentation is available online, but due to formatting
|
88
|
+
issues, you may prefer to generate the documentation on your own by running rdoc
|
89
|
+
in the gem directory.'
|
70
90
|
email:
|
71
91
|
- '"boris@iis.sinica.edu.tw"'
|
72
92
|
executables: []
|
73
93
|
extensions: []
|
74
94
|
extra_rdoc_files: []
|
75
95
|
files:
|
76
|
-
- .gitignore
|
96
|
+
- ".gitignore"
|
97
|
+
- ACKNOWLEDGMENT.txt
|
77
98
|
- Gemfile
|
78
99
|
- Introduction_to_Ruby_for_YNelson_Users.lyx
|
79
100
|
- Introduction_to_Ruby_for_YNelson_Users.pdf
|
@@ -95,6 +116,7 @@ files:
|
|
95
116
|
- lib/y_nelson/version.rb
|
96
117
|
- lib/y_nelson/yzz.rb
|
97
118
|
- lib/y_nelson/zz_point.rb
|
119
|
+
- test/issues.rb
|
98
120
|
- test/mongoid_example.rb
|
99
121
|
- test/y_nelson_test.rb
|
100
122
|
- y_nelson.gemspec
|
@@ -108,20 +130,22 @@ require_paths:
|
|
108
130
|
- lib
|
109
131
|
required_ruby_version: !ruby/object:Gem::Requirement
|
110
132
|
requirements:
|
111
|
-
- -
|
133
|
+
- - ">="
|
112
134
|
- !ruby/object:Gem::Version
|
113
|
-
version: '0'
|
135
|
+
version: '2.0'
|
114
136
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
115
137
|
requirements:
|
116
|
-
- -
|
138
|
+
- - ">="
|
117
139
|
- !ruby/object:Gem::Version
|
118
140
|
version: '0'
|
119
141
|
requirements: []
|
120
142
|
rubyforge_project:
|
121
|
-
rubygems_version: 2.
|
143
|
+
rubygems_version: 2.2.2
|
122
144
|
signing_key:
|
123
145
|
specification_version: 4
|
124
|
-
summary: A fusion of functional Petri net with a zz structure
|
146
|
+
summary: A fusion of functional Petri net with a zz structure that formalizes and
|
147
|
+
generalizes spreadsheet.
|
125
148
|
test_files:
|
149
|
+
- test/issues.rb
|
126
150
|
- test/mongoid_example.rb
|
127
151
|
- test/y_nelson_test.rb
|