cayuga 0.0.0 → 0.0.2
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 +5 -5
- data/.gitignore +11 -11
- data/.idea/.rakeTasks +7 -0
- data/.idea/dictionaries/patrick.xml +12 -0
- data/.idea/inspectionProfiles/Project_Default.xml +6 -0
- data/.idea/misc.xml +5 -5
- data/.idea/modules.xml +7 -7
- data/.idea/vcs.xml +6 -0
- data/.idea/workspace.xml +1348 -358
- data/.rspec +3 -3
- data/.rubocop.yml +31 -0
- data/.travis.yml +5 -5
- data/Gemfile +6 -6
- data/README.md +35 -35
- data/Rakefile +6 -6
- data/bin/console +14 -14
- data/bin/setup +8 -8
- data/cayuga.gemspec +39 -37
- data/cayuga.iml +34 -16
- data/lib/cayuga/object/constants.rb +34 -0
- data/lib/cayuga/object/factory.rb +136 -0
- data/lib/cayuga/object/logger.rb +68 -0
- data/lib/cayuga/object/named_object_class.rb +64 -0
- data/lib/cayuga/object/object.rb +19 -0
- data/lib/cayuga/object/singleton.rb +16 -0
- data/lib/cayuga/tools/class.rb +30 -0
- data/lib/cayuga/tools/loggable.rb +21 -0
- data/lib/cayuga/tools/string.rb +40 -0
- data/lib/cayuga/tools/symbol.rb +32 -0
- data/lib/cayuga/version.rb +3 -3
- data/lib/cayuga.rb +5 -5
- data/load_categories_810.json +39 -0
- data/load_patrick_810.json +21 -0
- data/load_relations_810.json +28 -0
- data/load_time_and_locations_810.json +43 -0
- data/load_universe_810.json +45 -0
- data/reports.txt +77 -0
- data/system_category_reports_2018.json +149 -0
- data/system_relation_reports_2018.json +175 -0
- data/system_test.json +8 -0
- data/system_things_reports_2018.json +77 -0
- data/test_script.rb +87 -0
- metadata +89 -9
@@ -0,0 +1,30 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (c) 2018 Patrick Thomas. All rights reserved.
|
3
|
+
#
|
4
|
+
|
5
|
+
module Cayuga
|
6
|
+
module Tools
|
7
|
+
# Cayuga Tools Class
|
8
|
+
module Class
|
9
|
+
def stringify
|
10
|
+
name
|
11
|
+
end
|
12
|
+
|
13
|
+
def symbolize
|
14
|
+
name.to_sym
|
15
|
+
end
|
16
|
+
|
17
|
+
def classify
|
18
|
+
self
|
19
|
+
end
|
20
|
+
|
21
|
+
def filenamify(extension=nil)
|
22
|
+
stringify.filenamify(extension)
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
Class.include(Cayuga::Tools::Class)
|
30
|
+
|
@@ -0,0 +1,21 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (c) 2018 Patrick Thomas. All rights reserved.
|
3
|
+
#
|
4
|
+
require 'semantic_logger'
|
5
|
+
|
6
|
+
module Cayuga
|
7
|
+
module Tools
|
8
|
+
# Cayuga Tools Loggable
|
9
|
+
module Loggable
|
10
|
+
def self.included(base)
|
11
|
+
SemanticLogger::Loggable.included(base)
|
12
|
+
base.class_eval do
|
13
|
+
class << self
|
14
|
+
alias_method :log, :logger
|
15
|
+
end
|
16
|
+
alias_method :log, :logger
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (c) 2018 Patrick Thomas. All rights reserved.
|
3
|
+
#
|
4
|
+
# noinspection RubyResolve
|
5
|
+
require 'facets/string/pathize'
|
6
|
+
|
7
|
+
require 'file-tail'
|
8
|
+
|
9
|
+
module Cayuga
|
10
|
+
module Tools
|
11
|
+
# Cayuga Tools String
|
12
|
+
module String
|
13
|
+
def stringify
|
14
|
+
self
|
15
|
+
end
|
16
|
+
|
17
|
+
def symbolize
|
18
|
+
to_sym
|
19
|
+
end
|
20
|
+
|
21
|
+
def classify
|
22
|
+
symbolize.classify
|
23
|
+
end
|
24
|
+
|
25
|
+
def filenamify(extension = nil)
|
26
|
+
# noinspection RubyResolve
|
27
|
+
result = pathize.gsub('/', '#')
|
28
|
+
unless extension.nil? || extension.empty?
|
29
|
+
result += extension[0] == '.' ? '' : '.'
|
30
|
+
result += extension.stringify
|
31
|
+
end
|
32
|
+
result
|
33
|
+
end
|
34
|
+
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
String.include(Cayuga::Tools::String)
|
40
|
+
|
@@ -0,0 +1,32 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (c) 2018 Patrick Thomas. All rights reserved.
|
3
|
+
#
|
4
|
+
|
5
|
+
module Cayuga
|
6
|
+
module Tools
|
7
|
+
# Cayuga Tools Symbol
|
8
|
+
module Symbol
|
9
|
+
def stringify
|
10
|
+
to_s
|
11
|
+
end
|
12
|
+
|
13
|
+
def symbolize
|
14
|
+
self
|
15
|
+
end
|
16
|
+
|
17
|
+
def classify
|
18
|
+
klass = Object.const_get(self.to_s)
|
19
|
+
raise(NameError,"wrong class name '#{klass}'") unless klass.kind_of?(Class)
|
20
|
+
klass
|
21
|
+
end
|
22
|
+
|
23
|
+
def filenamify(extension=nil)
|
24
|
+
stringify.filenamify(extension)
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
Symbol.include(Cayuga::Tools::Symbol)
|
32
|
+
|
data/lib/cayuga/version.rb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
module Cayuga
|
2
|
-
VERSION = "0.0.
|
3
|
-
end
|
1
|
+
module Cayuga
|
2
|
+
VERSION = "0.0.2"
|
3
|
+
end
|
data/lib/cayuga.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
require "cayuga/version"
|
2
|
-
|
3
|
-
module Cayuga
|
4
|
-
# Your code goes here...
|
5
|
-
end
|
1
|
+
require "cayuga/version"
|
2
|
+
|
3
|
+
module Cayuga
|
4
|
+
# Your code goes here...
|
5
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
{
|
2
|
+
"system": "/us/cayuga/system/2018",
|
3
|
+
"namespace": "system",
|
4
|
+
"tag-language": "english",
|
5
|
+
"context": "system",
|
6
|
+
"document": "load",
|
7
|
+
"topics": [
|
8
|
+
"categories"
|
9
|
+
],
|
10
|
+
"title": "there are the essential categories in the system",
|
11
|
+
"reports": [
|
12
|
+
{
|
13
|
+
"things": [
|
14
|
+
"category::relation",
|
15
|
+
"category::category",
|
16
|
+
"category::thing",
|
17
|
+
"category::relationship",
|
18
|
+
"category::predicate",
|
19
|
+
"category::property",
|
20
|
+
"category::time",
|
21
|
+
"category::location",
|
22
|
+
"category::occurrence",
|
23
|
+
"category::owner",
|
24
|
+
"category::value",
|
25
|
+
"category::state",
|
26
|
+
"category::agent",
|
27
|
+
"category::event",
|
28
|
+
"category::report"
|
29
|
+
],
|
30
|
+
"relationships": [
|
31
|
+
"things said-to-be-made-to-be in universe universe",
|
32
|
+
"things said-to-be-made-to-be instance of category category"
|
33
|
+
],
|
34
|
+
"states": "relationships do occur at time always at location universe",
|
35
|
+
"events": "states do be made to occur by agent patrick at time 2018 at location earth",
|
36
|
+
"report": "events do be said to occur by agent patrick at time 2018 at location earth"
|
37
|
+
}
|
38
|
+
]
|
39
|
+
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
{
|
2
|
+
"system": "/us/cayuga/system/2018",
|
3
|
+
"namespace": "system",
|
4
|
+
"tag-language": "english",
|
5
|
+
"context": "system",
|
6
|
+
"document": "load",
|
7
|
+
"topics": ["agent patrick"],
|
8
|
+
"title": "agent patrick",
|
9
|
+
"reports": [
|
10
|
+
{
|
11
|
+
"thing": "agent::patrick",
|
12
|
+
"relationships": [
|
13
|
+
"thing said-to-be-made-to-be in universe universe",
|
14
|
+
"thing said-to-be-made-to-be instance of category source"
|
15
|
+
],
|
16
|
+
"states": "relationships do occur at time always at location universe",
|
17
|
+
"events": "states do be made to occur by agent patrick at time 2018 at location earth",
|
18
|
+
"report": "events do be said to occur by agent patrick at time 2018 at location earth"
|
19
|
+
}
|
20
|
+
]
|
21
|
+
}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
{
|
2
|
+
"system": "/us/cayuga/system/2018",
|
3
|
+
"namespace": "system",
|
4
|
+
"tag-language": "english",
|
5
|
+
"context": "system",
|
6
|
+
"document": "load",
|
7
|
+
"topics": [
|
8
|
+
"relations"
|
9
|
+
],
|
10
|
+
"title": "there are the essential relations in the system",
|
11
|
+
"reports": [
|
12
|
+
{
|
13
|
+
"things": [
|
14
|
+
"relation::universe#have#thing#thing",
|
15
|
+
"relation::category#have#instance#thing",
|
16
|
+
"relation::thing#be#thing#in#universe",
|
17
|
+
"relation::thing#be#instance#of#category"
|
18
|
+
],
|
19
|
+
"relationships": [
|
20
|
+
"things said-to-be-made-to-be thing in universe universe",
|
21
|
+
"things said-to-be-made-to-be instance of category relation"
|
22
|
+
],
|
23
|
+
"states": "relationships do occur at time always at location universe",
|
24
|
+
"events": "states do be made to occur by agent patrick at time 2018 at location earth",
|
25
|
+
"report": "events do be said to occur by agent patrick at time 2018 at location earth"
|
26
|
+
}
|
27
|
+
]
|
28
|
+
}
|
@@ -0,0 +1,43 @@
|
|
1
|
+
{
|
2
|
+
"system": "/us/cayuga/system/2018",
|
3
|
+
"namespace": "system",
|
4
|
+
"tag-language": "english",
|
5
|
+
"context": "system",
|
6
|
+
"document": "load",
|
7
|
+
"topics": [
|
8
|
+
"times",
|
9
|
+
"locations"
|
10
|
+
],
|
11
|
+
"title": "times and locations",
|
12
|
+
"reports": [
|
13
|
+
{
|
14
|
+
"things": [
|
15
|
+
"time::powers-on-high-made",
|
16
|
+
"time::universe-made",
|
17
|
+
"time::earth-made",
|
18
|
+
"time::always"
|
19
|
+
],
|
20
|
+
"relationship": [
|
21
|
+
"things said-to-be-made-to-be in universe universe",
|
22
|
+
"things said-to-be-made-to-be instance of category time"
|
23
|
+
],
|
24
|
+
"state": "relationship do occur at time always at location universe",
|
25
|
+
"event": "state do be made to occur by agent powers-on-high at time powers-on-high-made at location powers-on-high-when-made",
|
26
|
+
"report": "event do be said to occur by agent patrick at time 2018 at location earth"
|
27
|
+
},
|
28
|
+
{
|
29
|
+
"things": [
|
30
|
+
"location powers-on-high-when-made",
|
31
|
+
"location universe",
|
32
|
+
"location earth"
|
33
|
+
],
|
34
|
+
"relationship": [
|
35
|
+
"things said-to-be-made-to-be in universe universe",
|
36
|
+
"things said-to-be-made-to-be instance of category location"
|
37
|
+
],
|
38
|
+
"state": "relationship do occur at time always at location universe",
|
39
|
+
"event": "state do be made to occur by agent powers-on-high at time powers-on-high-made at location powers-on-high-when-made",
|
40
|
+
"report": "event do be said to occur by agent patrick at time 2018 at location earth"
|
41
|
+
}
|
42
|
+
]
|
43
|
+
}
|
@@ -0,0 +1,45 @@
|
|
1
|
+
{
|
2
|
+
"system": "/us/cayuga/system/2018",
|
3
|
+
"namespace": "system",
|
4
|
+
"tag-language": "english",
|
5
|
+
"context": "system",
|
6
|
+
"document": "load",
|
7
|
+
"topics": [
|
8
|
+
"thing universe",
|
9
|
+
"thing earth",
|
10
|
+
"agent powers-on-high"
|
11
|
+
],
|
12
|
+
"title": "universe, earth, power-on-high",
|
13
|
+
"reports": [
|
14
|
+
{
|
15
|
+
"thing": "universe::universe",
|
16
|
+
"relationship": [
|
17
|
+
"thing said-to-be-made-to-be in universe universe",
|
18
|
+
"thing said-to-be-made-to-be instance of category universe"
|
19
|
+
],
|
20
|
+
"state": "relationship do occur at time always at location universe",
|
21
|
+
"event": "state do be made to occur by agent powers-on-high at time universe-made at location universe",
|
22
|
+
"report": "event do be said to occur by agent patrick at time 2018 at location earth"
|
23
|
+
},
|
24
|
+
{
|
25
|
+
"thing": "earth",
|
26
|
+
"relationship": [
|
27
|
+
"thing said-to-be-made-to-be in universe universe",
|
28
|
+
"thing said-to-be-made-to-be instance of category thing"
|
29
|
+
],
|
30
|
+
"state": "relationship do occur at time always at location universe",
|
31
|
+
"event": "state do be made to occur by agent thing::universe at time earth-made at location universe",
|
32
|
+
"report": "event do be said to occur by agent patrick at time 2018 at location earth"
|
33
|
+
},
|
34
|
+
{
|
35
|
+
"thing": "agent::powers-on-high",
|
36
|
+
"relationship": [
|
37
|
+
"thing said-to-be-made-to-be in universe universe",
|
38
|
+
"thing said-to-be-made-to-be instance of category agent"
|
39
|
+
],
|
40
|
+
"state": "relationship do occur at time always at location universe",
|
41
|
+
"event": "state do be made to occur by agent powers-on-high at time powers-on-high-made at location powers-on-high-when-made",
|
42
|
+
"report": "event do be said to occur by agent patrick at time 2018 at location earth"
|
43
|
+
}
|
44
|
+
]
|
45
|
+
}
|
data/reports.txt
ADDED
@@ -0,0 +1,77 @@
|
|
1
|
+
REPORTS
|
2
|
+
thing category::relation
|
3
|
+
do be instance of category category at time always at location universe
|
4
|
+
made by agent patrick at time 2018 at location earth
|
5
|
+
said by source agent::patrick at time 2018 at location earth
|
6
|
+
|
7
|
+
thing category::category
|
8
|
+
do be instance of category category at time always at location universe
|
9
|
+
made by agent patrick at time 2018 at location earth
|
10
|
+
said by source agent::patrick at time 2018 at location earth
|
11
|
+
|
12
|
+
thing category::thing
|
13
|
+
do be instance of category category at time always at location universe
|
14
|
+
made by agent patrick at time 2018 at location earth
|
15
|
+
said by source agent::patrick at time 2018 at location earth
|
16
|
+
|
17
|
+
OCCURRENCES
|
18
|
+
category category do have instance thing category::relation at time always at location universe
|
19
|
+
source agent::Patrick do have reported ##### at time 2018 at location earth
|
20
|
+
agent Patrick do have made ##### at time 2018 at location earth
|
21
|
+
category category do have instance thing category::category at time always at location universe
|
22
|
+
source agent::Patrick do have reported ##### at time 2018 at location earth
|
23
|
+
agent Patrick do have made ##### at time 2018 at location earth
|
24
|
+
category category do have instance thing category::thing at time always at location universe
|
25
|
+
source agent::Patrick do have reported ##### at time 2018 at location earth
|
26
|
+
agent Patrick do have made ##### at time 2018 at location earth
|
27
|
+
|
28
|
+
NAMES
|
29
|
+
group::system::namespace
|
30
|
+
group::system::category
|
31
|
+
group::system::agent
|
32
|
+
group::system::time
|
33
|
+
group::system::location
|
34
|
+
category::system::namespace
|
35
|
+
category::system::relation
|
36
|
+
category::system::category
|
37
|
+
category::system::thing
|
38
|
+
category::system::agent
|
39
|
+
category::system::source
|
40
|
+
namespace::system::system
|
41
|
+
agent::system::patrick
|
42
|
+
time::system::always
|
43
|
+
location::system::earth
|
44
|
+
location::system::universe
|
45
|
+
|
46
|
+
TAGS (ENGLISH)
|
47
|
+
group
|
48
|
+
system
|
49
|
+
namespace
|
50
|
+
category
|
51
|
+
agent
|
52
|
+
time
|
53
|
+
location
|
54
|
+
relation
|
55
|
+
thing
|
56
|
+
source
|
57
|
+
patrick
|
58
|
+
always
|
59
|
+
earth
|
60
|
+
universe
|
61
|
+
do
|
62
|
+
be
|
63
|
+
of
|
64
|
+
by
|
65
|
+
at
|
66
|
+
|
67
|
+
RELATIONS
|
68
|
+
category#have#instance#thing / thing#be#instance#of#category
|
69
|
+
agent#have#made#state / state#be#made#by#agent
|
70
|
+
source#have#said#action / action#be#reported#by#source
|
71
|
+
|
72
|
+
SUGAR
|
73
|
+
do
|
74
|
+
be
|
75
|
+
of
|
76
|
+
by
|
77
|
+
at
|
@@ -0,0 +1,149 @@
|
|
1
|
+
{
|
2
|
+
"tag-language": "english",
|
3
|
+
"system": "/us/cayuga/system/2018",
|
4
|
+
"context": "system",
|
5
|
+
"topics": [
|
6
|
+
"category category"
|
7
|
+
],
|
8
|
+
"document": "reports",
|
9
|
+
"location": "earth",
|
10
|
+
"time": "2018",
|
11
|
+
"reports": "agent Patrick do report events at time now at location here",
|
12
|
+
"events": "agent Patrick do cause occurrences at time now at location here",
|
13
|
+
"occurrences": "relationships do occur at time always at location universe",
|
14
|
+
"relationships": [
|
15
|
+
{
|
16
|
+
"subject": "category category",
|
17
|
+
"predicates": {
|
18
|
+
"type type-of-category": "referential",
|
19
|
+
"mandatory predicates": [
|
20
|
+
"thing#be#instance#of#category thing"
|
21
|
+
],
|
22
|
+
"definitive relations": [
|
23
|
+
"category#have#type#type",
|
24
|
+
"category#have#definitive-relation",
|
25
|
+
"category#have#instance#thing"
|
26
|
+
]
|
27
|
+
}
|
28
|
+
},
|
29
|
+
{
|
30
|
+
"subject": "category descriptive-category",
|
31
|
+
"predicates": {
|
32
|
+
"type type-of-category": "referential",
|
33
|
+
"mandatory predicates": [
|
34
|
+
"thing#be#instance#of#category category",
|
35
|
+
"category#have#type#type descriptive"
|
36
|
+
],
|
37
|
+
"definitive relations": [
|
38
|
+
"descriptive-category#have#differentiator#relation"
|
39
|
+
]
|
40
|
+
}
|
41
|
+
},
|
42
|
+
{
|
43
|
+
"subject": "category referential-category",
|
44
|
+
"predicates": {
|
45
|
+
"type type-of-category": "referential",
|
46
|
+
"mandatory predicates": [
|
47
|
+
"thing#be#category#category",
|
48
|
+
"category#have#type#type#referential"
|
49
|
+
],
|
50
|
+
"definitive relations": [
|
51
|
+
]
|
52
|
+
}
|
53
|
+
},
|
54
|
+
{
|
55
|
+
"subject": "category inclusion-category",
|
56
|
+
"predicates": {
|
57
|
+
"type type-of-category": "descriptive",
|
58
|
+
"mandatory predicates": [
|
59
|
+
"thing#be#category#category category",
|
60
|
+
"category#have#type#type# inclusion"
|
61
|
+
],
|
62
|
+
"definitive relations": [
|
63
|
+
"inclusion#category#have#included#categories"
|
64
|
+
],
|
65
|
+
"differentiator relations": [
|
66
|
+
"inclusion#category#have#included#categories"
|
67
|
+
]
|
68
|
+
}
|
69
|
+
},
|
70
|
+
{
|
71
|
+
"subject": "category exclusion-category",
|
72
|
+
"predicates": {
|
73
|
+
"type type": "descriptive",
|
74
|
+
"mandatory predicates": [
|
75
|
+
"thing#be#category#category category",
|
76
|
+
"category#have#type#type exclusion"
|
77
|
+
],
|
78
|
+
"definitive relations": [
|
79
|
+
"exclusion#category#have#domain#category",
|
80
|
+
"exclusion#category#have#excluded#category"
|
81
|
+
],
|
82
|
+
"differentiator relations": [
|
83
|
+
"exclusion#category#have#excluded#categories"
|
84
|
+
]
|
85
|
+
}
|
86
|
+
},
|
87
|
+
{
|
88
|
+
"subject": "category restrictive-category",
|
89
|
+
"predicates": {
|
90
|
+
"type type-of-category": "descriptive",
|
91
|
+
"mandatory predicates": [
|
92
|
+
"thing#be#category#category category",
|
93
|
+
"category#have#type#type restrictive"
|
94
|
+
],
|
95
|
+
"definitive relations": [
|
96
|
+
"restrictive#category#have#mandatory#category"
|
97
|
+
]
|
98
|
+
}
|
99
|
+
},
|
100
|
+
{
|
101
|
+
"subject": "category relation",
|
102
|
+
"properties": {
|
103
|
+
"type type-of-category": "referential",
|
104
|
+
"mandatory properties": [
|
105
|
+
"thing#be#instance#of#category#thing"
|
106
|
+
],
|
107
|
+
"definitive relations": [
|
108
|
+
"relation#have#inverse#relation",
|
109
|
+
"relation#have#domain#category",
|
110
|
+
"relation#have#image#category",
|
111
|
+
"relation#have#singularity#singularity-of-relation",
|
112
|
+
"relation#have#completeness#completeness-of-relation",
|
113
|
+
"relation#have#co-domain#category",
|
114
|
+
"relation#have#co-image#category",
|
115
|
+
"relation#have#co-singularity#singularity-of-relation",
|
116
|
+
"relation#have#co-completeness#completeness-of-relation",
|
117
|
+
"relation#have#mutability#mutability-of-relation"
|
118
|
+
]
|
119
|
+
}
|
120
|
+
},
|
121
|
+
{
|
122
|
+
"subject": "category type-of-category",
|
123
|
+
"predicates": {
|
124
|
+
"type type-of-category": "referential",
|
125
|
+
"mandatory predicates": [
|
126
|
+
"thing#be#instance#of#category"
|
127
|
+
]
|
128
|
+
}
|
129
|
+
},
|
130
|
+
{
|
131
|
+
"subject": "category singularity-of-relation",
|
132
|
+
"predicates": {
|
133
|
+
"type type-of-category": "referential"
|
134
|
+
}
|
135
|
+
},
|
136
|
+
{
|
137
|
+
"subject": "category completeness-of-relation",
|
138
|
+
"predicates": {
|
139
|
+
"type type-of-category": "referential"
|
140
|
+
}
|
141
|
+
},
|
142
|
+
{
|
143
|
+
"subject": "category mutability-of-relation",
|
144
|
+
"predicates": {
|
145
|
+
"type type-of-category": "referential"
|
146
|
+
}
|
147
|
+
}
|
148
|
+
]
|
149
|
+
}
|