activefacts 0.8.6 → 0.8.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. data/Manifest.txt +33 -2
  2. data/README.rdoc +30 -36
  3. data/Rakefile +16 -20
  4. data/bin/afgen +17 -11
  5. data/bin/cql +313 -36
  6. data/download.html +43 -19
  7. data/examples/CQL/Address.cql +15 -15
  8. data/examples/CQL/Blog.cql +8 -8
  9. data/examples/CQL/CompanyDirectorEmployee.cql +6 -5
  10. data/examples/CQL/Death.cql +3 -3
  11. data/examples/CQL/Diplomacy.cql +48 -0
  12. data/examples/CQL/Genealogy.cql +41 -41
  13. data/examples/CQL/Insurance.cql +311 -0
  14. data/examples/CQL/JoinEquality.cql +35 -0
  15. data/examples/CQL/Marriage.cql +1 -1
  16. data/examples/CQL/Metamodel.cql +290 -185
  17. data/examples/CQL/MetamodelNext.cql +420 -0
  18. data/examples/CQL/Monogamy.cql +24 -0
  19. data/examples/CQL/MonthInSeason.cql +27 -0
  20. data/examples/CQL/Moon.cql +23 -0
  21. data/examples/CQL/MultiInheritance.cql +4 -4
  22. data/examples/CQL/NonRoleId.cql +14 -0
  23. data/examples/CQL/OddIdentifier.cql +18 -0
  24. data/examples/CQL/OilSupply.cql +24 -24
  25. data/examples/CQL/OneToOnes.cql +17 -0
  26. data/examples/CQL/Orienteering.cql +55 -55
  27. data/examples/CQL/OrienteeringER.cql +58 -0
  28. data/examples/CQL/PersonPlaysGame.cql +2 -2
  29. data/examples/CQL/RedundantDependency.cql +34 -0
  30. data/examples/CQL/SchoolActivities.cql +5 -5
  31. data/examples/CQL/SeparateSubtype.cql +28 -0
  32. data/examples/CQL/ServiceDirector.cql +283 -0
  33. data/examples/CQL/SimplestUnary.cql +2 -2
  34. data/examples/CQL/SubtypePI.cql +11 -11
  35. data/examples/CQL/Supervision.cql +38 -0
  36. data/examples/CQL/Tests.Test5.Load.cql +38 -0
  37. data/examples/CQL/WaiterTips.cql +33 -0
  38. data/examples/CQL/Warehousing.cql +55 -53
  39. data/examples/CQL/WindowInRoomInBldg.cql +9 -9
  40. data/examples/CQL/unit.cql +433 -544
  41. data/examples/index.html +314 -170
  42. data/examples/intro.html +6 -176
  43. data/examples/local.css +8 -4
  44. data/index.html +40 -25
  45. data/lib/activefacts/api/concept.rb +2 -2
  46. data/lib/activefacts/api/constellation.rb +4 -4
  47. data/lib/activefacts/api/instance.rb +2 -2
  48. data/lib/activefacts/api/instance_index.rb +4 -0
  49. data/lib/activefacts/api/numeric.rb +3 -1
  50. data/lib/activefacts/api/role.rb +1 -1
  51. data/lib/activefacts/api/standard_types.rb +23 -16
  52. data/lib/activefacts/api/support.rb +3 -1
  53. data/lib/activefacts/api/vocabulary.rb +4 -0
  54. data/lib/activefacts/cql/CQLParser.treetop +87 -39
  55. data/lib/activefacts/cql/Concepts.treetop +95 -69
  56. data/lib/activefacts/cql/Context.treetop +11 -2
  57. data/lib/activefacts/cql/Expressions.treetop +23 -59
  58. data/lib/activefacts/cql/FactTypes.treetop +141 -95
  59. data/lib/activefacts/cql/Language/English.treetop +33 -21
  60. data/lib/activefacts/cql/LexicalRules.treetop +6 -1
  61. data/lib/activefacts/cql/Terms.treetop +75 -26
  62. data/lib/activefacts/cql/ValueTypes.treetop +52 -54
  63. data/lib/activefacts/cql/compiler.rb +46 -1691
  64. data/lib/activefacts/cql/compiler/constraint.rb +602 -0
  65. data/lib/activefacts/cql/compiler/entity_type.rb +425 -0
  66. data/lib/activefacts/cql/compiler/fact.rb +300 -0
  67. data/lib/activefacts/cql/compiler/fact_type.rb +230 -0
  68. data/lib/activefacts/cql/compiler/reading.rb +832 -0
  69. data/lib/activefacts/cql/compiler/shared.rb +109 -0
  70. data/lib/activefacts/cql/compiler/value_type.rb +104 -0
  71. data/lib/activefacts/cql/parser.rb +132 -81
  72. data/lib/activefacts/generate/cql.rb +397 -274
  73. data/lib/activefacts/generate/oo.rb +13 -12
  74. data/lib/activefacts/generate/ordered.rb +107 -117
  75. data/lib/activefacts/generate/ruby.rb +34 -38
  76. data/lib/activefacts/generate/sql/mysql.rb +62 -45
  77. data/lib/activefacts/generate/sql/server.rb +59 -42
  78. data/lib/activefacts/input/cql.rb +6 -3
  79. data/lib/activefacts/input/orm.rb +991 -557
  80. data/lib/activefacts/persistence/columns.rb +16 -12
  81. data/lib/activefacts/persistence/foreignkey.rb +7 -4
  82. data/lib/activefacts/persistence/index.rb +3 -4
  83. data/lib/activefacts/persistence/reference.rb +5 -2
  84. data/lib/activefacts/support.rb +20 -14
  85. data/lib/activefacts/version.rb +1 -1
  86. data/lib/activefacts/vocabulary.rb +1 -0
  87. data/lib/activefacts/vocabulary/extensions.rb +328 -44
  88. data/lib/activefacts/vocabulary/metamodel.rb +145 -20
  89. data/lib/activefacts/vocabulary/verbaliser.rb +621 -0
  90. data/spec/absorption_spec.rb +4 -4
  91. data/spec/api/value_type.rb +1 -1
  92. data/spec/cql/context_spec.rb +45 -22
  93. data/spec/cql/deontic_spec.rb +88 -0
  94. data/spec/cql/matching_spec.rb +517 -0
  95. data/spec/cql/samples_spec.rb +88 -31
  96. data/spec/cql/unit_spec.rb +58 -37
  97. data/spec/cql_cql_spec.rb +12 -7
  98. data/spec/cql_mysql_spec.rb +3 -7
  99. data/spec/cql_parse_spec.rb +0 -4
  100. data/spec/cql_ruby_spec.rb +1 -4
  101. data/spec/cql_sql_spec.rb +5 -18
  102. data/spec/cql_symbol_tables_spec.rb +3 -0
  103. data/spec/cqldump_spec.rb +0 -2
  104. data/spec/helpers/array_matcher.rb +35 -0
  105. data/spec/helpers/ctrl_c_support.rb +52 -0
  106. data/spec/helpers/diff_matcher.rb +38 -0
  107. data/spec/helpers/file_matcher.rb +5 -3
  108. data/spec/helpers/string_matcher.rb +39 -0
  109. data/spec/helpers/test_parser.rb +13 -0
  110. data/spec/norma_cql_spec.rb +13 -5
  111. data/spec/norma_ruby_spec.rb +11 -3
  112. data/spec/{absorption_ruby_spec.rb → norma_ruby_sql_spec.rb} +37 -32
  113. data/spec/norma_sql_spec.rb +11 -5
  114. data/spec/norma_tables_spec.rb +33 -29
  115. data/spec/spec_helper.rb +4 -1
  116. data/status.html +92 -23
  117. metadata +102 -36
  118. data/lib/activefacts/generate/cql/html.rb +0 -403
@@ -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, "norma")
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
- vocabulary = ActiveFacts::Input::ORM.readfile(orm_file)
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)
@@ -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
- include ActiveFacts
17
- include ActiveFacts::Metamodel
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
- expected_tables = Exceptions[File.basename(orm_file, ".orm")]
51
- if !expected_tables
52
- sql_file_pattern = orm_file.sub(/\.orm\Z/, '*.sql')
53
- sql_file = Dir[sql_file_pattern][0]
54
- next unless sql_file
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
- expected_tables ?
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
- vocabulary = ActiveFacts::Input::ORM.readfile(orm_file)
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 ||= extract_created_tables_from_sql(sql_file)
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 }.sort
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.should == expected_tables
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/file_matcher.rb'
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 has DDL support sufficient to allow
16
- conversion of any ORM2 model. The Ruby generator is complete. The SQL
17
- generator is complete, but with a couple of known defects in corner cases.
18
- The generated Ruby code has only a partial implementation of the mapping
19
- data needed to convert to and from SQL tables, and even that has to be
20
- enabled using an option.
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
- CQL is not yet handling imported vocabularies, example fact populations or
25
- value type units yet. It has limited model validation facilities, and it's
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
- The Constellation API (in Ruby) supports the generated Ruby code, allowing
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
- The Metamodel is generated to Ruby from CQL or ORM2 to support the
39
- creation and manipulation of any semantic model. Some changes are upcoming
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
- <p>
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
- version: 0.8.6
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-04-09 00:00:00 +10:00
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
- type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
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
- version:
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
- type: :development
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
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
- version:
67
+ type: :development
68
+ version_requirements: *id003
35
69
  - !ruby/object:Gem::Dependency
36
70
  name: hoe
37
- type: :development
38
- version_requirement:
39
- version_requirements: !ruby/object:Gem::Requirement
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
- version:
83
+ type: :development
84
+ version_requirements: *id004
45
85
  description: |
46
86
 
47
- ActiveFacts is a semantic modeling toolkit, comprising an implementation
48
- of the Constellation Query Language, the Constellation API, and code
49
- generators that receive CQL or ORM (Object Role Modeling files, from
50
- NORMA) to emit CQL, Ruby and SQL.
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.5
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)