activefacts 1.6.0 → 1.7.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (169) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +14 -0
  3. data/.rspec +2 -0
  4. data/.travis.yml +4 -0
  5. data/Gemfile +14 -0
  6. data/LICENSE.txt +21 -0
  7. data/README.md +60 -0
  8. data/Rakefile +3 -80
  9. data/activefacts.gemspec +36 -0
  10. data/bin/afgen +4 -2
  11. data/bin/cql +5 -1
  12. data/lib/activefacts.rb +3 -12
  13. data/lib/activefacts/{vocabulary/query_evaluator.rb → query/evaluator.rb} +0 -0
  14. data/lib/activefacts/version.rb +2 -2
  15. metadata +48 -296
  16. data/History.txt +0 -4
  17. data/LICENSE +0 -19
  18. data/Manifest.txt +0 -165
  19. data/README.rdoc +0 -81
  20. data/css/offline.css +0 -3
  21. data/css/orm2.css +0 -124
  22. data/css/print.css +0 -8
  23. data/css/style-print.css +0 -357
  24. data/css/style.css +0 -387
  25. data/download.html +0 -110
  26. data/examples/CQL/Address.cql +0 -44
  27. data/examples/CQL/Blog.cql +0 -54
  28. data/examples/CQL/CompanyDirectorEmployee.cql +0 -56
  29. data/examples/CQL/Death.cql +0 -17
  30. data/examples/CQL/Diplomacy.cql +0 -48
  31. data/examples/CQL/Genealogy.cql +0 -98
  32. data/examples/CQL/Insurance.cql +0 -320
  33. data/examples/CQL/Marriage.cql +0 -18
  34. data/examples/CQL/Metamodel.cql +0 -493
  35. data/examples/CQL/Monogamy.cql +0 -24
  36. data/examples/CQL/MultiInheritance.cql +0 -22
  37. data/examples/CQL/NonRoleId.cql +0 -14
  38. data/examples/CQL/OddIdentifier.cql +0 -18
  39. data/examples/CQL/OilSupply.cql +0 -53
  40. data/examples/CQL/OneToOnes.cql +0 -17
  41. data/examples/CQL/Orienteering.cql +0 -111
  42. data/examples/CQL/PersonPlaysGame.cql +0 -18
  43. data/examples/CQL/RedundantDependency.cql +0 -34
  44. data/examples/CQL/SchoolActivities.cql +0 -33
  45. data/examples/CQL/SeparateSubtype.cql +0 -30
  46. data/examples/CQL/ServiceDirector.cql +0 -276
  47. data/examples/CQL/SimplestUnary.cql +0 -12
  48. data/examples/CQL/Supervision.cql +0 -34
  49. data/examples/CQL/WaiterTips.cql +0 -33
  50. data/examples/CQL/Warehousing.cql +0 -101
  51. data/examples/CQL/WindowInRoomInBldg.cql +0 -28
  52. data/examples/CQL/unit.cql +0 -474
  53. data/examples/index.html +0 -420
  54. data/examples/intro.html +0 -327
  55. data/examples/local.css +0 -24
  56. data/index.html +0 -111
  57. data/lib/activefacts/cql.rb +0 -35
  58. data/lib/activefacts/cql/CQLParser.treetop +0 -158
  59. data/lib/activefacts/cql/Context.treetop +0 -48
  60. data/lib/activefacts/cql/Expressions.treetop +0 -67
  61. data/lib/activefacts/cql/FactTypes.treetop +0 -358
  62. data/lib/activefacts/cql/Language/English.treetop +0 -315
  63. data/lib/activefacts/cql/LexicalRules.treetop +0 -253
  64. data/lib/activefacts/cql/ObjectTypes.treetop +0 -210
  65. data/lib/activefacts/cql/Rakefile +0 -14
  66. data/lib/activefacts/cql/Terms.treetop +0 -183
  67. data/lib/activefacts/cql/ValueTypes.treetop +0 -202
  68. data/lib/activefacts/cql/compiler.rb +0 -156
  69. data/lib/activefacts/cql/compiler/clause.rb +0 -1137
  70. data/lib/activefacts/cql/compiler/constraint.rb +0 -581
  71. data/lib/activefacts/cql/compiler/entity_type.rb +0 -457
  72. data/lib/activefacts/cql/compiler/expression.rb +0 -443
  73. data/lib/activefacts/cql/compiler/fact.rb +0 -390
  74. data/lib/activefacts/cql/compiler/fact_type.rb +0 -421
  75. data/lib/activefacts/cql/compiler/query.rb +0 -106
  76. data/lib/activefacts/cql/compiler/shared.rb +0 -161
  77. data/lib/activefacts/cql/compiler/value_type.rb +0 -174
  78. data/lib/activefacts/cql/nodes.rb +0 -49
  79. data/lib/activefacts/cql/parser.rb +0 -241
  80. data/lib/activefacts/dependency_analyser.rb +0 -182
  81. data/lib/activefacts/generate/absorption.rb +0 -70
  82. data/lib/activefacts/generate/composition.rb +0 -118
  83. data/lib/activefacts/generate/cql.rb +0 -714
  84. data/lib/activefacts/generate/dm.rb +0 -279
  85. data/lib/activefacts/generate/help.rb +0 -64
  86. data/lib/activefacts/generate/helpers/inject.rb +0 -16
  87. data/lib/activefacts/generate/helpers/oo.rb +0 -162
  88. data/lib/activefacts/generate/helpers/ordered.rb +0 -605
  89. data/lib/activefacts/generate/helpers/rails.rb +0 -57
  90. data/lib/activefacts/generate/html/glossary.rb +0 -461
  91. data/lib/activefacts/generate/json.rb +0 -337
  92. data/lib/activefacts/generate/null.rb +0 -32
  93. data/lib/activefacts/generate/rails/models.rb +0 -246
  94. data/lib/activefacts/generate/rails/schema.rb +0 -216
  95. data/lib/activefacts/generate/records.rb +0 -46
  96. data/lib/activefacts/generate/ruby.rb +0 -133
  97. data/lib/activefacts/generate/sql/mysql.rb +0 -280
  98. data/lib/activefacts/generate/sql/server.rb +0 -273
  99. data/lib/activefacts/generate/stats.rb +0 -69
  100. data/lib/activefacts/generate/text.rb +0 -27
  101. data/lib/activefacts/generate/topics.rb +0 -265
  102. data/lib/activefacts/generate/traits/datavault.rb +0 -241
  103. data/lib/activefacts/generate/traits/oo.rb +0 -73
  104. data/lib/activefacts/generate/traits/ordered.rb +0 -33
  105. data/lib/activefacts/generate/traits/ruby.rb +0 -210
  106. data/lib/activefacts/generate/transform/datavault.rb +0 -266
  107. data/lib/activefacts/generate/transform/surrogate.rb +0 -214
  108. data/lib/activefacts/generate/version.rb +0 -26
  109. data/lib/activefacts/input/cql.rb +0 -43
  110. data/lib/activefacts/input/orm.rb +0 -1636
  111. data/lib/activefacts/mapping/rails.rb +0 -132
  112. data/lib/activefacts/persistence.rb +0 -15
  113. data/lib/activefacts/persistence/columns.rb +0 -446
  114. data/lib/activefacts/persistence/foreignkey.rb +0 -187
  115. data/lib/activefacts/persistence/index.rb +0 -240
  116. data/lib/activefacts/persistence/object_type.rb +0 -198
  117. data/lib/activefacts/persistence/reference.rb +0 -434
  118. data/lib/activefacts/persistence/tables.rb +0 -380
  119. data/lib/activefacts/registry.rb +0 -11
  120. data/lib/activefacts/support.rb +0 -132
  121. data/lib/activefacts/vocabulary.rb +0 -9
  122. data/lib/activefacts/vocabulary/extensions.rb +0 -1348
  123. data/lib/activefacts/vocabulary/metamodel.rb +0 -570
  124. data/lib/activefacts/vocabulary/verbaliser.rb +0 -804
  125. data/script/txt2html +0 -71
  126. data/spec/absorption_spec.rb +0 -95
  127. data/spec/cql/comparison_spec.rb +0 -89
  128. data/spec/cql/context_spec.rb +0 -94
  129. data/spec/cql/contractions_spec.rb +0 -224
  130. data/spec/cql/deontic_spec.rb +0 -88
  131. data/spec/cql/entity_type_spec.rb +0 -320
  132. data/spec/cql/expressions_spec.rb +0 -66
  133. data/spec/cql/fact_type_matching_spec.rb +0 -338
  134. data/spec/cql/french_spec.rb +0 -21
  135. data/spec/cql/parser/bad_literals_spec.rb +0 -86
  136. data/spec/cql/parser/constraints_spec.rb +0 -19
  137. data/spec/cql/parser/entity_types_spec.rb +0 -106
  138. data/spec/cql/parser/expressions_spec.rb +0 -199
  139. data/spec/cql/parser/fact_types_spec.rb +0 -44
  140. data/spec/cql/parser/literals_spec.rb +0 -312
  141. data/spec/cql/parser/pragmas_spec.rb +0 -89
  142. data/spec/cql/parser/value_types_spec.rb +0 -42
  143. data/spec/cql/role_matching_spec.rb +0 -148
  144. data/spec/cql/samples_spec.rb +0 -244
  145. data/spec/cql_cql_spec.rb +0 -73
  146. data/spec/cql_dm_spec.rb +0 -136
  147. data/spec/cql_mysql_spec.rb +0 -69
  148. data/spec/cql_parse_spec.rb +0 -34
  149. data/spec/cql_ruby_spec.rb +0 -73
  150. data/spec/cql_sql_spec.rb +0 -72
  151. data/spec/cql_symbol_tables_spec.rb +0 -261
  152. data/spec/cqldump_spec.rb +0 -170
  153. data/spec/helpers/array_matcher.rb +0 -23
  154. data/spec/helpers/ctrl_c_support.rb +0 -52
  155. data/spec/helpers/diff_matcher.rb +0 -39
  156. data/spec/helpers/file_matcher.rb +0 -34
  157. data/spec/helpers/parse_to_ast_matcher.rb +0 -80
  158. data/spec/helpers/string_matcher.rb +0 -30
  159. data/spec/helpers/test_parser.rb +0 -15
  160. data/spec/norma_cql_spec.rb +0 -66
  161. data/spec/norma_ruby_spec.rb +0 -62
  162. data/spec/norma_ruby_sql_spec.rb +0 -107
  163. data/spec/norma_sql_spec.rb +0 -57
  164. data/spec/norma_tables_spec.rb +0 -95
  165. data/spec/ruby_api_spec.rb +0 -23
  166. data/spec/spec_helper.rb +0 -35
  167. data/spec/transform_surrogate_spec.rb +0 -59
  168. data/status.html +0 -138
  169. data/why.html +0 -60
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b1e7f3153a8b937d166b295d8b8340f3294888b7
4
- data.tar.gz: 74a1f5ddccb7c51b36c6d8e19791ef12841b5c44
3
+ metadata.gz: 531ea0cabbbe32609a115efae2fe46e9c8d43d8d
4
+ data.tar.gz: 518c5306efb9a599a4276d2d5f8765ef8c7fa302
5
5
  SHA512:
6
- metadata.gz: 82841996c8072aa90e40075d787e66fa16726b1048a804301c38cd0e076d02ad963955c6d7bf255bbfbb5b12b83921db132413f6d91ac982db14e28e1528b5c9
7
- data.tar.gz: 69fbf20eb22d9ec6bbddb5cc9d9366c0d2e0dced990f140542dfec12409ac550441f15acf48c972c09ece0eb52633eea1cc49cd6b42281ad9f9d5001d17b90d8
6
+ metadata.gz: 1ad369a71b0cce0fd21cc072b598a2a0a47090267495d300f2b7795cdaf7992eb7e56a67f521bf799b102a595026d7b6cdbbdb43860a2da123e990633a9d2976
7
+ data.tar.gz: f2e462c39da877390353119491bd6ec0b6eb01e252bda45e0bcc8f9273d5ab6af037e6699e4f0cfba3c0dba500a6c36c208b15b274b01629fc949b683ad61f9a
@@ -0,0 +1,14 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ *.swp
11
+ .DS_Store
12
+ *.rej
13
+ *.orig
14
+ *.diff
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
@@ -0,0 +1,4 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.1.5
4
+ before_install: gem install bundler -v 1.10.0.rc
data/Gemfile ADDED
@@ -0,0 +1,14 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ if ENV['PWD'] =~ %r{\A/Users/cjh/work/activefacts}
6
+ gem 'activefacts-api', path: '/Users/cjh/work/activefacts/api'
7
+ gem 'activefacts-metamodel', path: '/Users/cjh/work/activefacts/metamodel'
8
+ gem 'activefacts-cql', path: '/Users/cjh/work/activefacts/cql'
9
+ #gem 'activefacts-orm', path: '/Users/cjh/work/activefacts/orm'
10
+ gem 'activefacts-rmap', path: '/Users/cjh/work/activefacts/rmap'
11
+ #gem 'activefacts-compositions', path: '/Users/cjh/work/activefacts/compositions'
12
+ gem 'activefacts-generators', path: '/Users/cjh/work/activefacts/generators'
13
+ gem 'activefacts-examples', path: '/Users/cjh/work/activefacts/examples'
14
+ end
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Clifford Heath
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,60 @@
1
+ # ActiveFacts
2
+
3
+ * http://dataconstellation.com/ActiveFacts/
4
+
5
+ ## DESCRIPTION
6
+
7
+ ActiveFacts provides a fact-based semantic modeling language, the
8
+ Constellation Query Language (CQL). CQL combines natural language
9
+ verbalisation and formal logic, producing a formal language that
10
+ reads like plain English. ActiveFacts converts semantic models from
11
+ CQL to relational and object models in SQL, Ruby and other languages.
12
+
13
+ The generated models are guaranteed congruent, which can eliminate the
14
+ object-relational impedance mismatch. Fact based models are much more
15
+ stable under evolving requirements than either relational or
16
+ object-oriented models, because they directly express the underlying
17
+ conceptual structure as elementary facts, so are not susceptible to
18
+ ramifying change in the way those attribute-oriented approaches are.
19
+
20
+ Semantic modeling is a refinement of fact-based modeling techniques
21
+ such as ORM2, NIAM and others. ActiveFacts can convert ORM2 files from
22
+ NORMA to CQL. Fact-based modeling is closely related to relational
23
+ modeling in the sixth normal form (as Codd intended it!), but the
24
+ generated relation schemas are in 5NF, so they don't suffer from 6NF
25
+ inefficiency. The relational models it derives are highly efficient.
26
+
27
+ ## SYNOPSIS:
28
+
29
+ ```
30
+ afgen --help
31
+ afgen --sql/server myfile.cql
32
+ afgen --ruby myfile.cql
33
+ afgen --cql myfile.orm
34
+ afgen --transform/surrogate --rails/schema myfile.cql
35
+ afgen --transform/datavault --sql/server myfile.cql
36
+ cql (command-line interpreter, including a query evaluator)
37
+ ```
38
+
39
+ ## INSTALL:
40
+
41
+ > sudo gem install activefacts
42
+
43
+ ## STATUS
44
+
45
+ * The definition language is complete and the main generators are usable.
46
+
47
+ * Arithmetic and aggregate operations in queries are recognised but not compiled.
48
+
49
+ * Queries and derived fact types not yet generated to SQL queries or views..
50
+
51
+ * The Constellation API is solid; the CQL compiler uses the generated Ruby code extensively
52
+
53
+ * Advanced constraint types are mostly ignored by the generators.
54
+
55
+ ## REQUIREMENTS:
56
+
57
+ * Treetop parser generator
58
+
59
+ * NORMA (see <http://www.ormfoundation.org/files/>), if you want to
60
+ use ORM (needs Visual Studio Pro or Community edition)
data/Rakefile CHANGED
@@ -1,83 +1,6 @@
1
- require 'rubygems'
2
- require 'rake'
3
- require 'fileutils'
4
- $: << "lib"
5
- require File.dirname(__FILE__) + '/lib/activefacts'
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
6
3
 
7
- def File.read_utf(path)
8
- open path, 'rb' do |f|
9
- f.read.sub %r/\A\xEF\xBB\xBF/, ''
10
- end
11
- end
12
-
13
- def paragraphs_of path, *paragraphs
14
- File.read_utf(path).delete("\r").split(/\n\n+/).values_at(*paragraphs)
15
- end
16
-
17
- require 'jeweler'
18
- Jeweler::Tasks.new do |gem|
19
- gem.name = "activefacts"
20
- gem.homepage = "http://github.com/cjheath/activefacts"
21
- gem.license = "MIT"
22
- gem.version = ActiveFacts::VERSION
23
- gem.summary = "A semantic modeling and query language (CQL) and application runtime (the Constellation API)"
24
- gem.description = %q{
25
- ActiveFacts provides a semantic modeling language, the Constellation
26
- Query Language (CQL). CQL combines natural language verbalisation and
27
- formal logic, producing a formal language that reads like plain
28
- English. ActiveFacts converts semantic models from CQL to relational
29
- and object models in SQL, Ruby and other languages.
30
- }
31
- # gem.url = "http://dataconstellation.com/ActiveFacts/"
32
-
33
- gem.email = "cjh@dataconstellation.com"
34
- gem.authors = ["Clifford Heath"]
35
-
36
- # gem.changes = paragraphs_of("History.txt", 0..1).join("\n\n")
37
- # gem.extensions = ['lib/activefacts/cql/Rakefile']
38
- # gem.post_install_message = 'For more information on ActiveFacts, see http://dataconstellation.com/ActiveFacts'
39
-
40
- gem.files = File.open("Manifest.txt"){|f| f.read.split(/\n/)}
41
- gem.executables = gem.files.grep(%r{^bin/}).map{|f| f.sub('bin/', '')}
42
- gem.rdoc_options = # RDoc used to have these options: -A has_one -A one_to_one -A maybe
43
- %w{
44
- -x lib/activefacts/cql/.*.rb
45
- -x lib/activefacts/vocabulary/.*.rb
46
- }
47
- end
48
- Jeweler::RubygemsDotOrgTasks.new
49
-
50
- # Dir['tasks/**/*.rake'].each { |t| load t }
51
-
52
- require 'rspec'
53
- require 'rspec/core/rake_task'
54
-
55
- gem "rspec", :require => "spec/rake/spectask"
4
+ RSpec::Core::RakeTask.new(:spec)
56
5
 
57
6
  task :default => :spec
58
-
59
- desc "Run Rspec tests"
60
- RSpec::Core::RakeTask.new(:spec) do |t|
61
- t.ruby_opts = ['-I', "lib"]
62
- t.rspec_opts = %w{-f d}
63
- # t.pattern = FileList['spec/**/*_spec.rb']
64
- # t.rcov = true
65
- # t.rcov_opts = ['--exclude', 'spec,/usr/lib/ruby' ]
66
- end
67
-
68
- desc "Run RSpec tests and produce coverage files (results viewable in coverage/index.html)"
69
- RSpec::Core::RakeTask.new(:coverage) do |spec|
70
- if RUBY_VERSION < '1.9'
71
- spec.rcov_opts = [
72
- '--exclude', 'spec',
73
- '--exclude', 'gem/*'
74
- ]
75
- spec.rcov = true
76
- else
77
- spec.rspec_opts = ['--require', 'simplecov_helper']
78
- end
79
- end
80
-
81
- task :cov => :coverage
82
- task :rcov => :coverage
83
- task :simplecov => :coverage
@@ -0,0 +1,36 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'activefacts/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "activefacts"
8
+ spec.version = ActiveFacts::VERSION
9
+ spec.authors = ["Clifford Heath"]
10
+ spec.email = ["clifford.heath@gmail.com"]
11
+
12
+ spec.summary = %q{A fact modeling and query language (CQL) and application runtime (the Constellation API)}
13
+ spec.description = %q{
14
+ ActiveFacts provides the Constellation Query Language (CQL),
15
+ a fact modeling and query language.
16
+ CQL combines a controlled natural language verbalisation with formal logic,
17
+ producing a formal language that reads like plain English. ActiveFacts compiles
18
+ fact models in CQL and generates relational and object models in SQL, Ruby and other languages.
19
+ }
20
+ spec.homepage = "http://dataconstellation.com/ActiveFacts/"
21
+ spec.license = "MIT"
22
+
23
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
24
+ spec.bindir = "bin"
25
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
26
+ spec.require_paths = ["lib"]
27
+
28
+ spec.add_development_dependency "bundler", "~> 1.10.a"
29
+ spec.add_development_dependency "rake", "~> 10.0"
30
+ spec.add_development_dependency "rspec"
31
+
32
+ spec.add_runtime_dependency "activefacts-cql"
33
+ spec.add_runtime_dependency "activefacts-orm"
34
+ spec.add_runtime_dependency "activefacts-generators"
35
+ spec.add_runtime_dependency "nokogiri"
36
+ end
data/bin/afgen CHANGED
@@ -4,10 +4,12 @@
4
4
  #
5
5
  # Copyright (c) 2009 Clifford Heath. Read the LICENSE file.
6
6
  #
7
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
8
+ require 'bundler/setup' # Set up gems listed in the Gemfile.
7
9
  $:.unshift File.dirname(File.expand_path(__FILE__))+"/../lib"
8
10
 
9
11
  require 'activefacts'
10
- require 'activefacts/vocabulary'
12
+ require 'activefacts/metamodel'
11
13
 
12
14
  # Load the generators:
13
15
  generators = []
@@ -17,7 +19,7 @@ while arg =~ /^--([^=]*)(?:=(.*))?/
17
19
  begin
18
20
  base_generators = ActiveFacts::Registry.generators.keys
19
21
 
20
- require "activefacts/generate/#{module_name}"
22
+ require "activefacts/generators/#{module_name}"
21
23
 
22
24
  # One require may load more than one generator. Extract new ones.
23
25
  new_generators = ActiveFacts::Registry.generators
data/bin/cql CHANGED
@@ -5,11 +5,15 @@
5
5
  #
6
6
  # Copyright (c) 2009 Clifford Heath. Read the LICENSE file.
7
7
  #
8
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
9
+ require 'bundler/setup' # Set up gems listed in the Gemfile.
10
+ $:.unshift File.dirname(File.expand_path(__FILE__))+"/../lib"
11
+
8
12
  require 'readline'
9
13
 
10
14
  require 'activefacts'
11
15
  require 'activefacts/cql/compiler'
12
- require 'activefacts/vocabulary/query_evaluator'
16
+ require 'activefacts/query/evaluator'
13
17
 
14
18
  class InteractiveCQL < ActiveFacts::CQL::Compiler
15
19
  def initialize *a
@@ -1,12 +1,3 @@
1
- #
2
- # ActiveFacts Swiss-army knife.
3
- # Include all that's required for a non-persistent runtime application.
4
- #
5
- # Copyright (c) 2009 Clifford Heath. Read the LICENSE file.
6
- # Author: Clifford Heath.
7
- #
8
- require 'rubygems'
9
- require 'activefacts/version'
10
- require 'activefacts/support'
11
- require 'activefacts/api'
12
- require 'activefacts/registry'
1
+ require "activefacts/version"
2
+
3
+ require "activefacts/cql/require" # Polyglot loader for Ruby module generated from CQL
@@ -7,8 +7,8 @@
7
7
  module ActiveFacts
8
8
  module Version
9
9
  MAJOR = 1
10
- MINOR = 6
11
- PATCH = 0
10
+ MINOR = 7
11
+ PATCH = 1
12
12
 
13
13
  STRING = [MAJOR, MINOR, PATCH].compact.join('.')
14
14
  end
metadata CHANGED
@@ -1,395 +1,147 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activefacts
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 1.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Clifford Heath
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-02 00:00:00.000000000 Z
11
+ date: 2015-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: activefacts-api
14
+ name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: '1.7'
20
- - - "~>"
21
- - !ruby/object:Gem::Version
22
- version: '1'
23
- type: :runtime
24
- prerelease: false
25
- version_requirements: !ruby/object:Gem::Requirement
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- version: '1.7'
30
- - - "~>"
31
- - !ruby/object:Gem::Version
32
- version: '1'
33
- - !ruby/object:Gem::Dependency
34
- name: rbtree-pure
35
- requirement: !ruby/object:Gem::Requirement
36
- requirements:
37
- - - ">="
38
- - !ruby/object:Gem::Version
39
- version: 0.1.1
40
- - - "~>"
41
- - !ruby/object:Gem::Version
42
- version: '0'
43
- type: :runtime
44
- prerelease: false
45
- version_requirements: !ruby/object:Gem::Requirement
46
- requirements:
47
- - - ">="
48
- - !ruby/object:Gem::Version
49
- version: 0.1.1
50
- - - "~>"
51
- - !ruby/object:Gem::Version
52
- version: '0'
53
- - !ruby/object:Gem::Dependency
54
- name: treetop
55
- requirement: !ruby/object:Gem::Requirement
56
- requirements:
57
- - - ">="
58
- - !ruby/object:Gem::Version
59
- version: 1.4.14
60
- - - "~>"
61
- - !ruby/object:Gem::Version
62
- version: '1.4'
63
- type: :runtime
64
- prerelease: false
65
- version_requirements: !ruby/object:Gem::Requirement
66
- requirements:
67
- - - ">="
68
- - !ruby/object:Gem::Version
69
- version: 1.4.14
70
17
  - - "~>"
71
18
  - !ruby/object:Gem::Version
72
- version: '1.4'
73
- - !ruby/object:Gem::Dependency
74
- name: nokogiri
75
- requirement: !ruby/object:Gem::Requirement
76
- requirements:
77
- - - ">="
78
- - !ruby/object:Gem::Version
79
- version: '1.6'
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: '1'
83
- type: :runtime
19
+ version: 1.10.a
20
+ type: :development
84
21
  prerelease: false
85
22
  version_requirements: !ruby/object:Gem::Requirement
86
23
  requirements:
87
- - - ">="
88
- - !ruby/object:Gem::Version
89
- version: '1.6'
90
24
  - - "~>"
91
25
  - !ruby/object:Gem::Version
92
- version: '1'
26
+ version: 1.10.a
93
27
  - !ruby/object:Gem::Dependency
94
- name: activesupport
28
+ name: rake
95
29
  requirement: !ruby/object:Gem::Requirement
96
30
  requirements:
97
31
  - - "~>"
98
32
  - !ruby/object:Gem::Version
99
- version: '4'
33
+ version: '10.0'
100
34
  type: :development
101
35
  prerelease: false
102
36
  version_requirements: !ruby/object:Gem::Requirement
103
37
  requirements:
104
38
  - - "~>"
105
39
  - !ruby/object:Gem::Version
106
- version: '4'
40
+ version: '10.0'
107
41
  - !ruby/object:Gem::Dependency
108
- name: dm-core
42
+ name: rspec
109
43
  requirement: !ruby/object:Gem::Requirement
110
44
  requirements:
111
45
  - - ">="
112
46
  - !ruby/object:Gem::Version
113
- version: '1.2'
114
- - - "~>"
115
- - !ruby/object:Gem::Version
116
- version: '1'
47
+ version: '0'
117
48
  type: :development
118
49
  prerelease: false
119
50
  version_requirements: !ruby/object:Gem::Requirement
120
51
  requirements:
121
52
  - - ">="
122
53
  - !ruby/object:Gem::Version
123
- version: '1.2'
124
- - - "~>"
125
- - !ruby/object:Gem::Version
126
- version: '1'
54
+ version: '0'
127
55
  - !ruby/object:Gem::Dependency
128
- name: dm-constraints
56
+ name: activefacts-cql
129
57
  requirement: !ruby/object:Gem::Requirement
130
58
  requirements:
131
59
  - - ">="
132
60
  - !ruby/object:Gem::Version
133
- version: '1.2'
134
- - - "~>"
135
- - !ruby/object:Gem::Version
136
- version: '1'
137
- type: :development
61
+ version: '0'
62
+ type: :runtime
138
63
  prerelease: false
139
64
  version_requirements: !ruby/object:Gem::Requirement
140
65
  requirements:
141
66
  - - ">="
142
67
  - !ruby/object:Gem::Version
143
- version: '1.2'
144
- - - "~>"
145
- - !ruby/object:Gem::Version
146
- version: '1'
68
+ version: '0'
147
69
  - !ruby/object:Gem::Dependency
148
- name: dm-migrations
70
+ name: activefacts-orm
149
71
  requirement: !ruby/object:Gem::Requirement
150
72
  requirements:
151
73
  - - ">="
152
74
  - !ruby/object:Gem::Version
153
- version: '1.2'
154
- - - "~>"
155
- - !ruby/object:Gem::Version
156
- version: '1'
157
- type: :development
75
+ version: '0'
76
+ type: :runtime
158
77
  prerelease: false
159
78
  version_requirements: !ruby/object:Gem::Requirement
160
79
  requirements:
161
80
  - - ">="
162
81
  - !ruby/object:Gem::Version
163
- version: '1.2'
164
- - - "~>"
165
- - !ruby/object:Gem::Version
166
- version: '1'
82
+ version: '0'
167
83
  - !ruby/object:Gem::Dependency
168
- name: jeweler
84
+ name: activefacts-generators
169
85
  requirement: !ruby/object:Gem::Requirement
170
86
  requirements:
171
87
  - - ">="
172
88
  - !ruby/object:Gem::Version
173
- version: '2.0'
174
- - - "~>"
175
- - !ruby/object:Gem::Version
176
- version: '2'
177
- type: :development
89
+ version: '0'
90
+ type: :runtime
178
91
  prerelease: false
179
92
  version_requirements: !ruby/object:Gem::Requirement
180
93
  requirements:
181
94
  - - ">="
182
95
  - !ruby/object:Gem::Version
183
- version: '2.0'
184
- - - "~>"
185
- - !ruby/object:Gem::Version
186
- version: '2'
96
+ version: '0'
187
97
  - !ruby/object:Gem::Dependency
188
- name: rspec
98
+ name: nokogiri
189
99
  requirement: !ruby/object:Gem::Requirement
190
100
  requirements:
191
101
  - - ">="
192
102
  - !ruby/object:Gem::Version
193
- version: 2.11.0
194
- - - "~>"
195
- - !ruby/object:Gem::Version
196
- version: '2.11'
197
- type: :development
103
+ version: '0'
104
+ type: :runtime
198
105
  prerelease: false
199
106
  version_requirements: !ruby/object:Gem::Requirement
200
107
  requirements:
201
108
  - - ">="
202
109
  - !ruby/object:Gem::Version
203
- version: 2.11.0
204
- - - "~>"
205
- - !ruby/object:Gem::Version
206
- version: '2.11'
110
+ version: '0'
207
111
  description: |2
208
112
 
209
- ActiveFacts provides a semantic modeling language, the Constellation
210
- Query Language (CQL). CQL combines natural language verbalisation and
211
- formal logic, producing a formal language that reads like plain
212
- English. ActiveFacts converts semantic models from CQL to relational
213
- and object models in SQL, Ruby and other languages.
214
- email: cjh@dataconstellation.com
113
+ ActiveFacts provides the Constellation Query Language (CQL),
114
+ a fact modeling and query language.
115
+ CQL combines a controlled natural language verbalisation with formal logic,
116
+ producing a formal language that reads like plain English. ActiveFacts compiles
117
+ fact models in CQL and generates relational and object models in SQL, Ruby and other languages.
118
+ email:
119
+ - clifford.heath@gmail.com
215
120
  executables:
216
121
  - afgen
217
122
  - cql
218
123
  extensions: []
219
- extra_rdoc_files:
220
- - LICENSE
221
- - README.rdoc
124
+ extra_rdoc_files: []
222
125
  files:
223
- - History.txt
224
- - LICENSE
225
- - Manifest.txt
226
- - README.rdoc
126
+ - ".gitignore"
127
+ - ".rspec"
128
+ - ".travis.yml"
129
+ - Gemfile
130
+ - LICENSE.txt
131
+ - README.md
227
132
  - Rakefile
133
+ - activefacts.gemspec
228
134
  - bin/afgen
229
135
  - bin/cql
230
- - css/offline.css
231
- - css/orm2.css
232
- - css/print.css
233
- - css/style-print.css
234
- - css/style.css
235
- - download.html
236
- - examples/CQL/Address.cql
237
- - examples/CQL/Blog.cql
238
- - examples/CQL/CompanyDirectorEmployee.cql
239
- - examples/CQL/Death.cql
240
- - examples/CQL/Diplomacy.cql
241
- - examples/CQL/Genealogy.cql
242
- - examples/CQL/Insurance.cql
243
- - examples/CQL/Marriage.cql
244
- - examples/CQL/Metamodel.cql
245
- - examples/CQL/Monogamy.cql
246
- - examples/CQL/MultiInheritance.cql
247
- - examples/CQL/NonRoleId.cql
248
- - examples/CQL/OddIdentifier.cql
249
- - examples/CQL/OilSupply.cql
250
- - examples/CQL/OneToOnes.cql
251
- - examples/CQL/Orienteering.cql
252
- - examples/CQL/PersonPlaysGame.cql
253
- - examples/CQL/RedundantDependency.cql
254
- - examples/CQL/SchoolActivities.cql
255
- - examples/CQL/SeparateSubtype.cql
256
- - examples/CQL/ServiceDirector.cql
257
- - examples/CQL/SimplestUnary.cql
258
- - examples/CQL/Supervision.cql
259
- - examples/CQL/WaiterTips.cql
260
- - examples/CQL/Warehousing.cql
261
- - examples/CQL/WindowInRoomInBldg.cql
262
- - examples/CQL/unit.cql
263
- - examples/index.html
264
- - examples/intro.html
265
- - examples/local.css
266
- - index.html
267
136
  - lib/activefacts.rb
268
- - lib/activefacts/cql.rb
269
- - lib/activefacts/cql/CQLParser.treetop
270
- - lib/activefacts/cql/Context.treetop
271
- - lib/activefacts/cql/Expressions.treetop
272
- - lib/activefacts/cql/FactTypes.treetop
273
- - lib/activefacts/cql/Language/English.treetop
274
- - lib/activefacts/cql/LexicalRules.treetop
275
- - lib/activefacts/cql/ObjectTypes.treetop
276
- - lib/activefacts/cql/Rakefile
277
- - lib/activefacts/cql/Terms.treetop
278
- - lib/activefacts/cql/ValueTypes.treetop
279
- - lib/activefacts/cql/compiler.rb
280
- - lib/activefacts/cql/compiler/clause.rb
281
- - lib/activefacts/cql/compiler/constraint.rb
282
- - lib/activefacts/cql/compiler/entity_type.rb
283
- - lib/activefacts/cql/compiler/expression.rb
284
- - lib/activefacts/cql/compiler/fact.rb
285
- - lib/activefacts/cql/compiler/fact_type.rb
286
- - lib/activefacts/cql/compiler/query.rb
287
- - lib/activefacts/cql/compiler/shared.rb
288
- - lib/activefacts/cql/compiler/value_type.rb
289
- - lib/activefacts/cql/nodes.rb
290
- - lib/activefacts/cql/parser.rb
291
- - lib/activefacts/dependency_analyser.rb
292
- - lib/activefacts/generate/absorption.rb
293
- - lib/activefacts/generate/composition.rb
294
- - lib/activefacts/generate/cql.rb
295
- - lib/activefacts/generate/dm.rb
296
- - lib/activefacts/generate/help.rb
297
- - lib/activefacts/generate/helpers/inject.rb
298
- - lib/activefacts/generate/helpers/oo.rb
299
- - lib/activefacts/generate/helpers/ordered.rb
300
- - lib/activefacts/generate/helpers/rails.rb
301
- - lib/activefacts/generate/html/glossary.rb
302
- - lib/activefacts/generate/json.rb
303
- - lib/activefacts/generate/null.rb
304
- - lib/activefacts/generate/rails/models.rb
305
- - lib/activefacts/generate/rails/schema.rb
306
- - lib/activefacts/generate/records.rb
307
- - lib/activefacts/generate/ruby.rb
308
- - lib/activefacts/generate/sql/mysql.rb
309
- - lib/activefacts/generate/sql/server.rb
310
- - lib/activefacts/generate/stats.rb
311
- - lib/activefacts/generate/text.rb
312
- - lib/activefacts/generate/topics.rb
313
- - lib/activefacts/generate/traits/datavault.rb
314
- - lib/activefacts/generate/traits/oo.rb
315
- - lib/activefacts/generate/traits/ordered.rb
316
- - lib/activefacts/generate/traits/ruby.rb
317
- - lib/activefacts/generate/transform/datavault.rb
318
- - lib/activefacts/generate/transform/surrogate.rb
319
- - lib/activefacts/generate/version.rb
320
- - lib/activefacts/input/cql.rb
321
- - lib/activefacts/input/orm.rb
322
- - lib/activefacts/mapping/rails.rb
323
- - lib/activefacts/persistence.rb
324
- - lib/activefacts/persistence/columns.rb
325
- - lib/activefacts/persistence/foreignkey.rb
326
- - lib/activefacts/persistence/index.rb
327
- - lib/activefacts/persistence/object_type.rb
328
- - lib/activefacts/persistence/reference.rb
329
- - lib/activefacts/persistence/tables.rb
330
- - lib/activefacts/registry.rb
331
- - lib/activefacts/support.rb
137
+ - lib/activefacts/query/evaluator.rb
332
138
  - lib/activefacts/version.rb
333
- - lib/activefacts/vocabulary.rb
334
- - lib/activefacts/vocabulary/extensions.rb
335
- - lib/activefacts/vocabulary/metamodel.rb
336
- - lib/activefacts/vocabulary/query_evaluator.rb
337
- - lib/activefacts/vocabulary/verbaliser.rb
338
- - script/txt2html
339
- - spec/absorption_spec.rb
340
- - spec/cql/comparison_spec.rb
341
- - spec/cql/context_spec.rb
342
- - spec/cql/contractions_spec.rb
343
- - spec/cql/deontic_spec.rb
344
- - spec/cql/entity_type_spec.rb
345
- - spec/cql/expressions_spec.rb
346
- - spec/cql/fact_type_matching_spec.rb
347
- - spec/cql/french_spec.rb
348
- - spec/cql/parser/bad_literals_spec.rb
349
- - spec/cql/parser/constraints_spec.rb
350
- - spec/cql/parser/entity_types_spec.rb
351
- - spec/cql/parser/expressions_spec.rb
352
- - spec/cql/parser/fact_types_spec.rb
353
- - spec/cql/parser/literals_spec.rb
354
- - spec/cql/parser/pragmas_spec.rb
355
- - spec/cql/parser/value_types_spec.rb
356
- - spec/cql/role_matching_spec.rb
357
- - spec/cql/samples_spec.rb
358
- - spec/cql_cql_spec.rb
359
- - spec/cql_dm_spec.rb
360
- - spec/cql_mysql_spec.rb
361
- - spec/cql_parse_spec.rb
362
- - spec/cql_ruby_spec.rb
363
- - spec/cql_sql_spec.rb
364
- - spec/cql_symbol_tables_spec.rb
365
- - spec/cqldump_spec.rb
366
- - spec/helpers/array_matcher.rb
367
- - spec/helpers/ctrl_c_support.rb
368
- - spec/helpers/diff_matcher.rb
369
- - spec/helpers/file_matcher.rb
370
- - spec/helpers/parse_to_ast_matcher.rb
371
- - spec/helpers/string_matcher.rb
372
- - spec/helpers/test_parser.rb
373
- - spec/norma_cql_spec.rb
374
- - spec/norma_ruby_spec.rb
375
- - spec/norma_ruby_sql_spec.rb
376
- - spec/norma_sql_spec.rb
377
- - spec/norma_tables_spec.rb
378
- - spec/ruby_api_spec.rb
379
- - spec/spec_helper.rb
380
- - spec/transform_surrogate_spec.rb
381
- - status.html
382
- - why.html
383
- homepage: http://github.com/cjheath/activefacts
139
+ homepage: http://dataconstellation.com/ActiveFacts/
384
140
  licenses:
385
141
  - MIT
386
142
  metadata: {}
387
143
  post_install_message:
388
- rdoc_options:
389
- - "-x"
390
- - lib/activefacts/cql/.*.rb
391
- - "-x"
392
- - lib/activefacts/vocabulary/.*.rb
144
+ rdoc_options: []
393
145
  require_paths:
394
146
  - lib
395
147
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -407,6 +159,6 @@ rubyforge_project:
407
159
  rubygems_version: 2.2.2
408
160
  signing_key:
409
161
  specification_version: 4
410
- summary: A semantic modeling and query language (CQL) and application runtime (the
411
- Constellation API)
162
+ summary: A fact modeling and query language (CQL) and application runtime (the Constellation
163
+ API)
412
164
  test_files: []