activefacts 0.8.6 → 0.8.8
Sign up to get free protection for your applications and to get access to all the features.
- data/Manifest.txt +33 -2
- data/README.rdoc +30 -36
- data/Rakefile +16 -20
- data/bin/afgen +17 -11
- data/bin/cql +313 -36
- data/download.html +43 -19
- data/examples/CQL/Address.cql +15 -15
- data/examples/CQL/Blog.cql +8 -8
- data/examples/CQL/CompanyDirectorEmployee.cql +6 -5
- data/examples/CQL/Death.cql +3 -3
- data/examples/CQL/Diplomacy.cql +48 -0
- data/examples/CQL/Genealogy.cql +41 -41
- data/examples/CQL/Insurance.cql +311 -0
- data/examples/CQL/JoinEquality.cql +35 -0
- data/examples/CQL/Marriage.cql +1 -1
- data/examples/CQL/Metamodel.cql +290 -185
- data/examples/CQL/MetamodelNext.cql +420 -0
- data/examples/CQL/Monogamy.cql +24 -0
- data/examples/CQL/MonthInSeason.cql +27 -0
- data/examples/CQL/Moon.cql +23 -0
- data/examples/CQL/MultiInheritance.cql +4 -4
- data/examples/CQL/NonRoleId.cql +14 -0
- data/examples/CQL/OddIdentifier.cql +18 -0
- data/examples/CQL/OilSupply.cql +24 -24
- data/examples/CQL/OneToOnes.cql +17 -0
- data/examples/CQL/Orienteering.cql +55 -55
- data/examples/CQL/OrienteeringER.cql +58 -0
- data/examples/CQL/PersonPlaysGame.cql +2 -2
- data/examples/CQL/RedundantDependency.cql +34 -0
- data/examples/CQL/SchoolActivities.cql +5 -5
- data/examples/CQL/SeparateSubtype.cql +28 -0
- data/examples/CQL/ServiceDirector.cql +283 -0
- data/examples/CQL/SimplestUnary.cql +2 -2
- data/examples/CQL/SubtypePI.cql +11 -11
- data/examples/CQL/Supervision.cql +38 -0
- data/examples/CQL/Tests.Test5.Load.cql +38 -0
- data/examples/CQL/WaiterTips.cql +33 -0
- data/examples/CQL/Warehousing.cql +55 -53
- data/examples/CQL/WindowInRoomInBldg.cql +9 -9
- data/examples/CQL/unit.cql +433 -544
- data/examples/index.html +314 -170
- data/examples/intro.html +6 -176
- data/examples/local.css +8 -4
- data/index.html +40 -25
- data/lib/activefacts/api/concept.rb +2 -2
- data/lib/activefacts/api/constellation.rb +4 -4
- data/lib/activefacts/api/instance.rb +2 -2
- data/lib/activefacts/api/instance_index.rb +4 -0
- data/lib/activefacts/api/numeric.rb +3 -1
- data/lib/activefacts/api/role.rb +1 -1
- data/lib/activefacts/api/standard_types.rb +23 -16
- data/lib/activefacts/api/support.rb +3 -1
- data/lib/activefacts/api/vocabulary.rb +4 -0
- data/lib/activefacts/cql/CQLParser.treetop +87 -39
- data/lib/activefacts/cql/Concepts.treetop +95 -69
- data/lib/activefacts/cql/Context.treetop +11 -2
- data/lib/activefacts/cql/Expressions.treetop +23 -59
- data/lib/activefacts/cql/FactTypes.treetop +141 -95
- data/lib/activefacts/cql/Language/English.treetop +33 -21
- data/lib/activefacts/cql/LexicalRules.treetop +6 -1
- data/lib/activefacts/cql/Terms.treetop +75 -26
- data/lib/activefacts/cql/ValueTypes.treetop +52 -54
- data/lib/activefacts/cql/compiler.rb +46 -1691
- data/lib/activefacts/cql/compiler/constraint.rb +602 -0
- data/lib/activefacts/cql/compiler/entity_type.rb +425 -0
- data/lib/activefacts/cql/compiler/fact.rb +300 -0
- data/lib/activefacts/cql/compiler/fact_type.rb +230 -0
- data/lib/activefacts/cql/compiler/reading.rb +832 -0
- data/lib/activefacts/cql/compiler/shared.rb +109 -0
- data/lib/activefacts/cql/compiler/value_type.rb +104 -0
- data/lib/activefacts/cql/parser.rb +132 -81
- data/lib/activefacts/generate/cql.rb +397 -274
- data/lib/activefacts/generate/oo.rb +13 -12
- data/lib/activefacts/generate/ordered.rb +107 -117
- data/lib/activefacts/generate/ruby.rb +34 -38
- data/lib/activefacts/generate/sql/mysql.rb +62 -45
- data/lib/activefacts/generate/sql/server.rb +59 -42
- data/lib/activefacts/input/cql.rb +6 -3
- data/lib/activefacts/input/orm.rb +991 -557
- data/lib/activefacts/persistence/columns.rb +16 -12
- data/lib/activefacts/persistence/foreignkey.rb +7 -4
- data/lib/activefacts/persistence/index.rb +3 -4
- data/lib/activefacts/persistence/reference.rb +5 -2
- data/lib/activefacts/support.rb +20 -14
- data/lib/activefacts/version.rb +1 -1
- data/lib/activefacts/vocabulary.rb +1 -0
- data/lib/activefacts/vocabulary/extensions.rb +328 -44
- data/lib/activefacts/vocabulary/metamodel.rb +145 -20
- data/lib/activefacts/vocabulary/verbaliser.rb +621 -0
- data/spec/absorption_spec.rb +4 -4
- data/spec/api/value_type.rb +1 -1
- data/spec/cql/context_spec.rb +45 -22
- data/spec/cql/deontic_spec.rb +88 -0
- data/spec/cql/matching_spec.rb +517 -0
- data/spec/cql/samples_spec.rb +88 -31
- data/spec/cql/unit_spec.rb +58 -37
- data/spec/cql_cql_spec.rb +12 -7
- data/spec/cql_mysql_spec.rb +3 -7
- data/spec/cql_parse_spec.rb +0 -4
- data/spec/cql_ruby_spec.rb +1 -4
- data/spec/cql_sql_spec.rb +5 -18
- data/spec/cql_symbol_tables_spec.rb +3 -0
- data/spec/cqldump_spec.rb +0 -2
- data/spec/helpers/array_matcher.rb +35 -0
- data/spec/helpers/ctrl_c_support.rb +52 -0
- data/spec/helpers/diff_matcher.rb +38 -0
- data/spec/helpers/file_matcher.rb +5 -3
- data/spec/helpers/string_matcher.rb +39 -0
- data/spec/helpers/test_parser.rb +13 -0
- data/spec/norma_cql_spec.rb +13 -5
- data/spec/norma_ruby_spec.rb +11 -3
- data/spec/{absorption_ruby_spec.rb → norma_ruby_sql_spec.rb} +37 -32
- data/spec/norma_sql_spec.rb +11 -5
- data/spec/norma_tables_spec.rb +33 -29
- data/spec/spec_helper.rb +4 -1
- data/status.html +92 -23
- metadata +102 -36
- data/lib/activefacts/generate/cql/html.rb +0 -403
data/spec/norma_sql_spec.rb
CHANGED
@@ -11,14 +11,14 @@ require 'activefacts/persistence'
|
|
11
11
|
require 'activefacts/input/orm'
|
12
12
|
require 'activefacts/generate/sql/server'
|
13
13
|
|
14
|
-
include ActiveFacts
|
15
|
-
include ActiveFacts::Metamodel
|
16
|
-
|
17
14
|
describe "NORMA Loader with SQL output" do
|
15
|
+
orm_failures = {
|
16
|
+
"SubtypePI" => "Has an illegal uniqueness join constraint",
|
17
|
+
}
|
18
18
|
# Generate and return the SQL for the given vocabulary
|
19
19
|
def sql(vocabulary)
|
20
20
|
output = StringIO.new
|
21
|
-
@dumper = ActiveFacts::Generate::SQL::SERVER.new(vocabulary.constellation
|
21
|
+
@dumper = ActiveFacts::Generate::SQL::SERVER.new(vocabulary.constellation)
|
22
22
|
@dumper.generate(output)
|
23
23
|
output.rewind
|
24
24
|
output.read
|
@@ -28,9 +28,15 @@ describe "NORMA Loader with SQL output" do
|
|
28
28
|
Dir["examples/norma/#{pattern}.orm"].each do |orm_file|
|
29
29
|
expected_file = orm_file.sub(%r{examples/norma/(.*).orm\Z}, 'examples/SQL/\1.sql')
|
30
30
|
actual_file = orm_file.sub(%r{examples/norma/(.*).orm\Z}, 'spec/actual/\1.sql')
|
31
|
+
base = File.basename(orm_file, ".orm")
|
31
32
|
|
32
33
|
it "should load #{orm_file} and dump SQL matching #{expected_file}" do
|
33
|
-
|
34
|
+
begin
|
35
|
+
vocabulary = ActiveFacts::Input::ORM.readfile(orm_file)
|
36
|
+
rescue => e
|
37
|
+
raise unless orm_failures.include?(base)
|
38
|
+
pending orm_failures[base]
|
39
|
+
end
|
34
40
|
|
35
41
|
# Build and save the actual file:
|
36
42
|
sql_text = sql(vocabulary)
|
data/spec/norma_tables_spec.rb
CHANGED
@@ -7,29 +7,28 @@
|
|
7
7
|
# Copyright (c) 2008 Clifford Heath. Read the LICENSE file.
|
8
8
|
#
|
9
9
|
|
10
|
+
require 'spec/spec_helper'
|
10
11
|
require 'stringio'
|
11
12
|
require 'activefacts/vocabulary'
|
12
13
|
require 'activefacts/persistence'
|
13
14
|
require 'activefacts/support'
|
14
15
|
require 'activefacts/input/orm'
|
15
16
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
Exceptions = {
|
20
|
-
"Blog" => ["Author", "Comment", "Paragraph", "Post", "Topic"],
|
21
|
-
"JoinEquality" => ["Event", "Seat", "Ticket", "Venue"],
|
22
|
-
"Metamodel" => ["AllowedRange", "Concept", "Constraint", "ContextAccordingTo", "ContextAgreedBy", "ContextNote", "Derivation", "Fact", "FactType", "Instance", "Join", "ParamValue", "Reading", "Role", "RoleRef", "RoleSequence", "RoleValue", "SetComparisonRoles", "Unit", "ValueRestriction" ],
|
23
|
-
"MetamodelNext" => ["AllowedRange", "Constraint", "ContextAccordingTo", "ContextAgreedBy", "ContextNote", "Derivation", "Fact", "FactType", "Instance", "Join", "ParamValue", "Reading", "Role", "RoleRef", "RoleSequence", "RoleValue", "SetComparisonRoles", "Term", "Unit", "ValueConstraint"],
|
24
|
-
"OilSupply" => ["AcceptableSubstitutes", "Month", "ProductionForecast", "RegionalDemand", "TransportRoute"],
|
25
|
-
"Orienteering" => ["Club", "Entry", "Event", "EventControl", "EventScoringMethod", "Map", "Person", "Punch", "PunchPlacement", "Series", "Visit"],
|
26
|
-
"SeparateSubtype" => ["Claim", "VehicleIncident"],
|
27
|
-
"Warehousing" => ["Bin", "DirectOrderMatch", "DispatchItem", "Party", "Product", "PurchaseOrder", "PurchaseOrderItem", "ReceivedItem", "SalesOrder", "SalesOrderItem", "TransferRequest", "Warehouse"],
|
28
|
-
"Portfolio" => ["AnnualDepreciation", "Attachment", "Collateral", "DepreciationSchedule", "Disposal", "Expenditure", "OwnedItem", "Revenue", "Transaction", "Valuation"],
|
29
|
-
"OrienteeringER" => ["Club", "Event", "EventControl", "EventCourse", "Map", "SeriesEvent"],
|
30
|
-
"RedundantDependency" => ["Address", "Politician", "StateOrProvince"],
|
17
|
+
# The exceptions table is keyed by the model name, and contains the added and removed table names vs NORMA
|
18
|
+
orm_failures = {
|
31
19
|
}
|
32
|
-
|
20
|
+
norma_table_exceptions = {
|
21
|
+
"Metamodel" => [[], %w{Agreement Enforcement}], # ActiveFacts absorbs Agreement into ContextNote, Enforcement into Constraint
|
22
|
+
"MetamodelNext" => [[], %w{Agreement Enforcement}],
|
23
|
+
"Orienteering" => [%w{Punch}, []], # NORMA doesn't make a table for the IDENTITY field
|
24
|
+
"OrienteeringER" => [%w{SeriesEvent}, []], # NORMA doesn't make a table for the IDENTITY field
|
25
|
+
"RedundantDependency" => [%w{Politician StateOrProvince}, %w{LegislativeDistrict}], # NORMA doesn't make a table for the 3 IDENTITY fields
|
26
|
+
"SeparateSubtype" => [%w{Claim}, %w{Incident}], # NORMA doesn't make a table for the IDENTITY field. Even when Claim is independent, it still doesn't absorb Incident either and I don't know why, must ask Matt.
|
27
|
+
"Warehousing" => [%w{Product Warehouse}, []], # NORMA doesn't make a table for the IDENTITY field
|
28
|
+
"ServiceDirector" => [%w{DataStoreService MonitorNotificationUser}, %w{DataStoreFileHostSystem }],
|
29
|
+
|
30
|
+
}
|
31
|
+
|
33
32
|
def extract_created_tables_from_sql sql_file
|
34
33
|
File.open(sql_file) do |f|
|
35
34
|
f.
|
@@ -47,28 +46,33 @@ end
|
|
47
46
|
describe "Relational Composition from NORMA" do
|
48
47
|
pattern = ENV["AFTESTS"] || "*"
|
49
48
|
Dir["examples/norma/#{pattern}.orm"].each do |orm_file|
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
end
|
49
|
+
exception = norma_table_exceptions[File.basename(orm_file, ".orm")]
|
50
|
+
sql_file_pattern = orm_file.sub(/\.orm\Z/, '.*sql')
|
51
|
+
sql_file = Dir[sql_file_pattern][0]
|
52
|
+
next unless sql_file
|
53
|
+
base = File.basename(orm_file, ".orm")
|
56
54
|
|
57
55
|
it "should load #{orm_file} and compute #{
|
58
|
-
|
59
|
-
"the expected list of tables" :
|
60
|
-
"a list of tables similar to those in #{sql_file}"
|
56
|
+
(exception ? "a modified" : "the same") + " list of tables similar to those in #{sql_file}"
|
61
57
|
}" do
|
62
58
|
|
63
59
|
# Read the ORM file:
|
64
|
-
|
60
|
+
begin
|
61
|
+
vocabulary = ActiveFacts::Input::ORM.readfile(orm_file)
|
62
|
+
rescue => e
|
63
|
+
raise unless orm_failures.include?(base)
|
64
|
+
pending orm_failures[base]
|
65
|
+
end
|
65
66
|
|
66
67
|
# Get the list of tables from NORMA's SQL:
|
67
|
-
expected_tables
|
68
|
+
expected_tables = extract_created_tables_from_sql(sql_file)
|
69
|
+
if exception
|
70
|
+
expected_tables = expected_tables + exception[0] - exception[1]
|
71
|
+
end
|
68
72
|
|
69
73
|
# Get the list of tables from our composition:
|
70
74
|
tables = vocabulary.tables
|
71
|
-
table_names = tables.map{|o| o.name
|
75
|
+
table_names = tables.map{|o| o.name.gsub(/\s/,'')}.sort
|
72
76
|
|
73
77
|
# Save the actual and expected composition to files
|
74
78
|
actual_tables_file = orm_file.sub(%r{examples/norma/(.*).orm\Z}, 'spec/actual/\1.tables')
|
@@ -77,7 +81,7 @@ describe "Relational Composition from NORMA" do
|
|
77
81
|
File.open(expected_tables_file, "w") { |f| f.puts expected_tables*"\n" }
|
78
82
|
|
79
83
|
# Check that the list matched:
|
80
|
-
table_names.
|
84
|
+
table_names.should_not differ_from(expected_tables)
|
81
85
|
|
82
86
|
# Calculate the columns and column names; REVISIT: check the results
|
83
87
|
tables.each do |table|
|
data/spec/spec_helper.rb
CHANGED
@@ -5,7 +5,10 @@
|
|
5
5
|
# actual_text.should_not differ_from(expected_text)
|
6
6
|
#
|
7
7
|
|
8
|
-
require 'spec/helpers/
|
8
|
+
require 'spec/helpers/diff_matcher'
|
9
|
+
require 'spec/helpers/array_matcher'
|
10
|
+
require 'spec/helpers/file_matcher'
|
11
|
+
require 'spec/helpers/string_matcher'
|
9
12
|
|
10
13
|
class String
|
11
14
|
def strip_comments()
|
data/status.html
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
<!--#include virtual="/header.html" -->
|
2
2
|
<!--#include virtual="navbar.html" -->
|
3
3
|
|
4
|
-
<link rel="stylesheet" href="css/offline.css" media="screen" type="text/css" />
|
4
|
+
<link rel="stylesheet" href="../css/offline.css" media="screen" type="text/css" />
|
5
5
|
<div id="sidebar"></div>
|
6
6
|
|
7
7
|
<div id="top" class="content">
|
@@ -11,52 +11,121 @@
|
|
11
11
|
ActiveFacts Project Status
|
12
12
|
</h2>
|
13
13
|
|
14
|
+
<h4>Constellation Query Language</h4>
|
15
|
+
|
14
16
|
<p>
|
15
|
-
The Constellation Query Language
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
17
|
+
The Constellation Query Language implementation available in
|
18
|
+
version 0.8.5 compiles all features of ORM2 implemented by NORMA
|
19
|
+
with only minuscule differences. Entity Types, Value Types, Fact
|
20
|
+
Types (including objectified), Reference Modes, and all types of
|
21
|
+
constraints - Value and Role Value Constraints, Presence
|
22
|
+
Constraints (which covers Mandatory, Uniqueness, and Frequency
|
23
|
+
constraints), Subset, Equality, Exclusion, Mandatory Exclusion,
|
24
|
+
and Ring constraints.
|
21
25
|
</p>
|
26
|
+
|
27
|
+
<p> At this version Terms (object type names) may not contain
|
28
|
+
spaces. Terms may not appear in readings (unless in lower-case)
|
29
|
+
and readings may only contain single adjectives (hyphen-binding).
|
30
|
+
Deontic constraints are recognised using the annotation (otherwise
|
31
|
+
<b>action</b>). Join Constraints may also be defined beyond those
|
32
|
+
available in NORMA. Example data may be declared. </p>
|
22
33
|
|
23
34
|
<p>
|
24
|
-
|
25
|
-
|
26
|
-
not yet possible to add a new reading to an existing fact type. It's also
|
27
|
-
only parsing query syntax, with no semantic analysis or SQL generation.
|
35
|
+
This version provides functionality not available in NORMA. Additions
|
36
|
+
include:
|
28
37
|
</p>
|
38
|
+
<ul>
|
39
|
+
<li> Business Context Notes, which are annotations indicating why a
|
40
|
+
particular modeling construct was used, and who approved that.
|
41
|
+
</li>
|
42
|
+
<li> Definition of Units using conversion formulae. A library of
|
43
|
+
500 standard unit conversions is provided. </li>
|
44
|
+
<li> Value Types may be defined to utilise those units. </li>
|
45
|
+
</ul>
|
29
46
|
|
30
47
|
<p>
|
31
|
-
|
32
|
-
any fact population to be constructed for a given vocabulary. There is
|
33
|
-
not yet any support within the API for database persistence, but that's
|
34
|
-
coming up for implementation soon.
|
48
|
+
New features are being developed for an upcoming 0.9.0 release:
|
35
49
|
</p>
|
50
|
+
<ul>
|
51
|
+
<li> Multi-word terms, and multiple adjectives.
|
52
|
+
<li> Improvements on the use of the hyphen to allow hyphenated words in readings.
|
53
|
+
<li> Term Synonyms
|
54
|
+
<li> Imported vocabularies (including multi-lingual versioning)
|
55
|
+
<li> Improved model validation
|
56
|
+
</ul>
|
36
57
|
|
37
58
|
<p>
|
38
|
-
|
39
|
-
|
40
|
-
to support a vocabulary that provides a translation of an existing
|
41
|
-
vocabulary, such as a Dutch or Japanese version of an English language
|
42
|
-
model.
|
59
|
+
Beyond that, the query syntax will be completed and queries will be generated
|
60
|
+
to SQL.
|
43
61
|
</p>
|
44
62
|
|
63
|
+
<h4>Constellation Query Language generators</h4>
|
64
|
+
|
65
|
+
<p>
|
66
|
+
The CQL generator allows conversion of NORMA files. At the present release,
|
67
|
+
deontic constraints and example fact populations are not emitted.
|
68
|
+
</p>
|
69
|
+
|
70
|
+
<p>
|
71
|
+
The Ruby generator is functional. Not all constraints are emitted to Ruby yet,
|
72
|
+
but any combination of facts allowed by the vocabulary may be represented.
|
73
|
+
</p>
|
74
|
+
|
45
75
|
<p>
|
76
|
+
The SQL generators are generating correct and useful SQL, using a relational
|
77
|
+
mapping algorithm that produces similar results to NORMA. This algorithm will
|
78
|
+
be extended to emit more constraints, and to provide more control over
|
79
|
+
the generation of object names, and to directly support Ruby on Rails.
|
80
|
+
Deontic constraints are still handled as Alethic.
|
81
|
+
</p>
|
82
|
+
|
83
|
+
<h4>The Constellation API</h4>
|
84
|
+
|
85
|
+
<p>
|
86
|
+
The Constellation API (in Ruby) supports the generated Ruby code, by
|
87
|
+
allowing any fact population to be asserted into a constellation for
|
88
|
+
a given vocabulary. The generated Ruby module for a vocabulary can be
|
89
|
+
told which object types are tables in the SQL, and can infer all the
|
90
|
+
column names and object mappings from that.
|
91
|
+
</p>
|
92
|
+
|
93
|
+
<p> Processing of the retract operation (which removes facts from a
|
94
|
+
constellation) does not yet propagate retraction through mandatory roles.
|
95
|
+
There is not yet a validate operation to verify that all verifible
|
96
|
+
constraints are met. Where a constellation is known to be
|
97
|
+
incomplete, that's not yet able to be recorded (this will be used
|
98
|
+
in determining which constraints can be checked)
|
99
|
+
There is not yet any support within the API for database persistence
|
100
|
+
(creating a constellation from query results, and creating, deleting or
|
101
|
+
updating database rows by saving a constellation).
|
102
|
+
</p>
|
103
|
+
|
104
|
+
<h4>The ORM2 Metamodel</h4>
|
105
|
+
|
106
|
+
<p>
|
107
|
+
The ORM2 Metamodel is generated to Ruby from CQL or ORM2 to support
|
108
|
+
the creation and manipulation of any semantic model. Some changes are
|
109
|
+
upcoming to support synonyms, including allowing a vocabulary to
|
110
|
+
provide a translation of an existing vocabulary, such as a Dutch or
|
111
|
+
Japanese version of an English language model.
|
112
|
+
</p>
|
113
|
+
|
114
|
+
<!--p>
|
46
115
|
ActiveFacts can currently read models from NORMA, which are in elementary
|
47
116
|
form, and it can reverse engineer the schemas of existing databases in SQL
|
48
117
|
Server, DB2, Oracle, and open-source databases not yet tested including
|
49
118
|
MySQL, PostgreSQL, etc. Reverse-engineered models are still in composite
|
50
119
|
form - the mapping to elementary form is incomplete. Reverse engineering
|
51
120
|
does not yet analyse actual data.
|
52
|
-
</p
|
121
|
+
</p-->
|
53
122
|
|
54
|
-
|
123
|
+
<!--p>
|
55
124
|
ActiveFacts has no database adapter infrastructure yet. The
|
56
125
|
previously-available reverse engineering tools used used the
|
57
126
|
infrastructure of ActiveRecord with DRYSql and Composite Primary Keys, but
|
58
127
|
future versions will probably just use the ActiveRecord adapters directly.
|
59
|
-
</p
|
128
|
+
</p-->
|
60
129
|
|
61
130
|
<!--p>
|
62
131
|
APRIMO allows the definition of vocabulary aspects as well as the addition
|
metadata
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activefacts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 47
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 8
|
9
|
+
- 8
|
10
|
+
version: 0.8.8
|
5
11
|
platform: ruby
|
6
12
|
authors:
|
7
13
|
- Clifford Heath
|
@@ -9,58 +15,80 @@ autorequire:
|
|
9
15
|
bindir: bin
|
10
16
|
cert_chain: []
|
11
17
|
|
12
|
-
date: 2010-
|
18
|
+
date: 2010-08-09 00:00:00 +10:00
|
13
19
|
default_executable:
|
14
20
|
dependencies:
|
15
21
|
- !ruby/object:Gem::Dependency
|
16
22
|
name: treetop
|
17
|
-
|
18
|
-
|
19
|
-
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
20
26
|
requirements:
|
21
27
|
- - ">="
|
22
28
|
- !ruby/object:Gem::Version
|
29
|
+
hash: 5
|
30
|
+
segments:
|
31
|
+
- 1
|
32
|
+
- 4
|
33
|
+
- 1
|
23
34
|
version: 1.4.1
|
24
|
-
|
35
|
+
type: :runtime
|
36
|
+
version_requirements: *id001
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: rake
|
39
|
+
prerelease: false
|
40
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ">="
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
hash: 49
|
46
|
+
segments:
|
47
|
+
- 0
|
48
|
+
- 8
|
49
|
+
- 7
|
50
|
+
version: 0.8.7
|
51
|
+
type: :runtime
|
52
|
+
version_requirements: *id002
|
25
53
|
- !ruby/object:Gem::Dependency
|
26
54
|
name: newgem
|
27
|
-
|
28
|
-
|
29
|
-
|
55
|
+
prerelease: false
|
56
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
30
58
|
requirements:
|
31
59
|
- - ">="
|
32
60
|
- !ruby/object:Gem::Version
|
61
|
+
hash: 7
|
62
|
+
segments:
|
63
|
+
- 1
|
64
|
+
- 5
|
65
|
+
- 2
|
33
66
|
version: 1.5.2
|
34
|
-
|
67
|
+
type: :development
|
68
|
+
version_requirements: *id003
|
35
69
|
- !ruby/object:Gem::Dependency
|
36
70
|
name: hoe
|
37
|
-
|
38
|
-
|
39
|
-
|
71
|
+
prerelease: false
|
72
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
40
74
|
requirements:
|
41
75
|
- - ">="
|
42
76
|
- !ruby/object:Gem::Version
|
77
|
+
hash: 5
|
78
|
+
segments:
|
79
|
+
- 2
|
80
|
+
- 3
|
81
|
+
- 3
|
43
82
|
version: 2.3.3
|
44
|
-
|
83
|
+
type: :development
|
84
|
+
version_requirements: *id004
|
45
85
|
description: |
|
46
86
|
|
47
|
-
ActiveFacts
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
Semantic modeling is a refinement of fact-based modeling techniques
|
53
|
-
that draw on natural language verbalisation and formal logic. Fact
|
54
|
-
based modeling is essentially the same as relational modeling in the
|
55
|
-
sixth normal form. The tools provided here automatically condense
|
56
|
-
that to third normal form for efficient storage. They also generate
|
57
|
-
object models as a Ruby module which has an effective mapping to
|
58
|
-
both the original semantic model and to the generated SQL.
|
59
|
-
|
60
|
-
The result is a formal language that reads like plain English, and
|
61
|
-
allows creation of relational and object models that are guaranteed
|
62
|
-
equivalent, and much more stable in the face of schema evolution than
|
63
|
-
SQL is.
|
87
|
+
ActiveFacts provides a semantic modeling language, the Constellation
|
88
|
+
Query Language (CQL). CQL combines natural language verbalisation and
|
89
|
+
formal logic, producing a formal language that reads like plain
|
90
|
+
English. ActiveFacts converts semantic models from CQL to relational
|
91
|
+
and object models in SQL, Ruby and other languages.
|
64
92
|
|
65
93
|
email:
|
66
94
|
- cjh@dataconstellation.org
|
@@ -90,16 +118,33 @@ files:
|
|
90
118
|
- examples/CQL/Blog.cql
|
91
119
|
- examples/CQL/CompanyDirectorEmployee.cql
|
92
120
|
- examples/CQL/Death.cql
|
121
|
+
- examples/CQL/Diplomacy.cql
|
93
122
|
- examples/CQL/Genealogy.cql
|
123
|
+
- examples/CQL/Insurance.cql
|
124
|
+
- examples/CQL/JoinEquality.cql
|
94
125
|
- examples/CQL/Marriage.cql
|
95
126
|
- examples/CQL/Metamodel.cql
|
127
|
+
- examples/CQL/MetamodelNext.cql
|
128
|
+
- examples/CQL/Monogamy.cql
|
129
|
+
- examples/CQL/MonthInSeason.cql
|
130
|
+
- examples/CQL/Moon.cql
|
96
131
|
- examples/CQL/MultiInheritance.cql
|
132
|
+
- examples/CQL/NonRoleId.cql
|
133
|
+
- examples/CQL/OddIdentifier.cql
|
97
134
|
- examples/CQL/OilSupply.cql
|
135
|
+
- examples/CQL/OneToOnes.cql
|
98
136
|
- examples/CQL/Orienteering.cql
|
137
|
+
- examples/CQL/OrienteeringER.cql
|
99
138
|
- examples/CQL/PersonPlaysGame.cql
|
139
|
+
- examples/CQL/RedundantDependency.cql
|
100
140
|
- examples/CQL/SchoolActivities.cql
|
141
|
+
- examples/CQL/SeparateSubtype.cql
|
142
|
+
- examples/CQL/ServiceDirector.cql
|
101
143
|
- examples/CQL/SimplestUnary.cql
|
102
144
|
- examples/CQL/SubtypePI.cql
|
145
|
+
- examples/CQL/Supervision.cql
|
146
|
+
- examples/CQL/Tests.Test5.Load.cql
|
147
|
+
- examples/CQL/WaiterTips.cql
|
103
148
|
- examples/CQL/Warehousing.cql
|
104
149
|
- examples/CQL/WindowInRoomInBldg.cql
|
105
150
|
- examples/CQL/unit.cql
|
@@ -134,10 +179,16 @@ files:
|
|
134
179
|
- lib/activefacts/cql/Terms.treetop
|
135
180
|
- lib/activefacts/cql/ValueTypes.treetop
|
136
181
|
- lib/activefacts/cql/compiler.rb
|
182
|
+
- lib/activefacts/cql/compiler/constraint.rb
|
183
|
+
- lib/activefacts/cql/compiler/entity_type.rb
|
184
|
+
- lib/activefacts/cql/compiler/fact.rb
|
185
|
+
- lib/activefacts/cql/compiler/fact_type.rb
|
186
|
+
- lib/activefacts/cql/compiler/reading.rb
|
187
|
+
- lib/activefacts/cql/compiler/shared.rb
|
188
|
+
- lib/activefacts/cql/compiler/value_type.rb
|
137
189
|
- lib/activefacts/cql/parser.rb
|
138
190
|
- lib/activefacts/generate/absorption.rb
|
139
191
|
- lib/activefacts/generate/cql.rb
|
140
|
-
- lib/activefacts/generate/cql/html.rb
|
141
192
|
- lib/activefacts/generate/null.rb
|
142
193
|
- lib/activefacts/generate/oo.rb
|
143
194
|
- lib/activefacts/generate/ordered.rb
|
@@ -159,8 +210,8 @@ files:
|
|
159
210
|
- lib/activefacts/vocabulary.rb
|
160
211
|
- lib/activefacts/vocabulary/extensions.rb
|
161
212
|
- lib/activefacts/vocabulary/metamodel.rb
|
213
|
+
- lib/activefacts/vocabulary/verbaliser.rb
|
162
214
|
- script/txt2html
|
163
|
-
- spec/absorption_ruby_spec.rb
|
164
215
|
- spec/absorption_spec.rb
|
165
216
|
- spec/api/autocounter.rb
|
166
217
|
- spec/api/constellation.rb
|
@@ -170,6 +221,8 @@ files:
|
|
170
221
|
- spec/api/value_type.rb
|
171
222
|
- spec/api_spec.rb
|
172
223
|
- spec/cql/context_spec.rb
|
224
|
+
- spec/cql/deontic_spec.rb
|
225
|
+
- spec/cql/matching_spec.rb
|
173
226
|
- spec/cql/samples_spec.rb
|
174
227
|
- spec/cql/unit_spec.rb
|
175
228
|
- spec/cql_cql_spec.rb
|
@@ -179,9 +232,15 @@ files:
|
|
179
232
|
- spec/cql_sql_spec.rb
|
180
233
|
- spec/cql_symbol_tables_spec.rb
|
181
234
|
- spec/cqldump_spec.rb
|
235
|
+
- spec/helpers/array_matcher.rb
|
236
|
+
- spec/helpers/ctrl_c_support.rb
|
237
|
+
- spec/helpers/diff_matcher.rb
|
182
238
|
- spec/helpers/file_matcher.rb
|
239
|
+
- spec/helpers/string_matcher.rb
|
240
|
+
- spec/helpers/test_parser.rb
|
183
241
|
- spec/norma_cql_spec.rb
|
184
242
|
- spec/norma_ruby_spec.rb
|
243
|
+
- spec/norma_ruby_sql_spec.rb
|
185
244
|
- spec/norma_sql_spec.rb
|
186
245
|
- spec/norma_tables_spec.rb
|
187
246
|
- spec/spec.opts
|
@@ -195,6 +254,7 @@ licenses: []
|
|
195
254
|
post_install_message: For more information on ActiveFacts, see http://dataconstellation.com/ActiveFacts
|
196
255
|
rdoc_options:
|
197
256
|
- -S
|
257
|
+
- -S
|
198
258
|
- -T
|
199
259
|
- hanna
|
200
260
|
- -A
|
@@ -210,21 +270,27 @@ rdoc_options:
|
|
210
270
|
require_paths:
|
211
271
|
- lib
|
212
272
|
required_ruby_version: !ruby/object:Gem::Requirement
|
273
|
+
none: false
|
213
274
|
requirements:
|
214
275
|
- - ">="
|
215
276
|
- !ruby/object:Gem::Version
|
277
|
+
hash: 3
|
278
|
+
segments:
|
279
|
+
- 0
|
216
280
|
version: "0"
|
217
|
-
version:
|
218
281
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
282
|
+
none: false
|
219
283
|
requirements:
|
220
284
|
- - ">="
|
221
285
|
- !ruby/object:Gem::Version
|
286
|
+
hash: 3
|
287
|
+
segments:
|
288
|
+
- 0
|
222
289
|
version: "0"
|
223
|
-
version:
|
224
290
|
requirements: []
|
225
291
|
|
226
292
|
rubyforge_project: cjheath@rubyforge.org
|
227
|
-
rubygems_version: 1.3.
|
293
|
+
rubygems_version: 1.3.7
|
228
294
|
signing_key:
|
229
295
|
specification_version: 3
|
230
296
|
summary: A semantic modeling and query language (CQL) and application runtime (the Constellation API)
|