expressir 0.2.27-arm64-darwin → 1.0.0-arm64-darwin

Sign up to get free protection for your applications and to get access to all the features.
Files changed (90) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/rake.yml +3 -3
  3. data/.gitignore +2 -2
  4. data/demo.rb +5 -5
  5. data/exe/format +8 -8
  6. data/exe/format-test +11 -11
  7. data/expressir.gemspec +0 -1
  8. data/lib/expressir.rb +0 -1
  9. data/lib/expressir/cli.rb +0 -6
  10. data/lib/expressir/{express_exp → express}/2.4/express_parser.bundle +0 -0
  11. data/lib/expressir/{express_exp → express}/2.5/express_parser.bundle +0 -0
  12. data/lib/expressir/{express_exp → express}/2.6/express_parser.bundle +0 -0
  13. data/lib/expressir/{express_exp → express}/2.7/express_parser.bundle +0 -0
  14. data/lib/expressir/{express_exp → express}/3.0/express_parser.bundle +0 -0
  15. data/lib/expressir/{express_exp → express}/cache.rb +3 -6
  16. data/lib/expressir/{express_exp → express}/formatter.rb +72 -66
  17. data/lib/expressir/{express_exp → express}/hyperlink_formatter.rb +1 -1
  18. data/lib/expressir/{express_exp → express}/model_visitor.rb +1 -1
  19. data/lib/expressir/{express_exp → express}/parser.rb +3 -3
  20. data/lib/expressir/{express_exp → express}/resolve_references_model_visitor.rb +2 -2
  21. data/lib/expressir/{express_exp → express}/schema_head_formatter.rb +1 -1
  22. data/lib/expressir/{express_exp → express}/visitor.rb +21 -25
  23. data/lib/expressir/model.rb +2 -2
  24. data/lib/expressir/model/entity.rb +6 -6
  25. data/lib/expressir/model/model_element.rb +1 -1
  26. data/lib/expressir/model/rule.rb +3 -3
  27. data/lib/expressir/model/type.rb +6 -6
  28. data/lib/expressir/model/types/enumeration.rb +2 -4
  29. data/lib/expressir/model/types/select.rb +2 -4
  30. data/lib/expressir/model/{unique.rb → unique_rule.rb} +1 -1
  31. data/lib/expressir/model/{where.rb → where_rule.rb} +1 -1
  32. data/lib/expressir/version.rb +1 -1
  33. data/rakelib/cross-ruby.rake +1 -1
  34. data/spec/expressir/{express_exp → express}/cache_spec.rb +9 -9
  35. data/spec/expressir/express/formatter_spec.rb +127 -0
  36. data/spec/expressir/{express_exp → express}/parser_spec.rb +23 -23
  37. data/spec/expressir/model/model_element_spec.rb +45 -45
  38. data/{original/examples → spec}/syntax/multiple.exp +0 -0
  39. data/{original/examples → spec}/syntax/multiple.yaml +4 -4
  40. data/{original/examples → spec}/syntax/multiple_formatted.exp +0 -0
  41. data/{original/examples → spec}/syntax/multiple_hyperlink_formatted.exp +0 -0
  42. data/{original/examples → spec}/syntax/multiple_schema_head_hyperlink_formatted.exp +0 -0
  43. data/{original/examples → spec}/syntax/remark.exp +0 -0
  44. data/{original/examples → spec}/syntax/remark.yaml +13 -13
  45. data/{original/examples → spec}/syntax/remark_formatted.exp +0 -0
  46. data/{original/examples → spec}/syntax/single.exp +0 -0
  47. data/{original/examples → spec}/syntax/single.yaml +1 -1
  48. data/{original/examples → spec}/syntax/single_formatted.exp +0 -0
  49. data/{original/examples → spec}/syntax/single_formatted.yaml +1 -1
  50. data/{original/examples → spec}/syntax/syntax.exp +10 -10
  51. data/{original/examples → spec}/syntax/syntax.yaml +106 -106
  52. data/{original/examples → spec}/syntax/syntax_formatted.exp +10 -10
  53. data/{original/examples → spec}/syntax/syntax_hyperlink_formatted.exp +10 -10
  54. data/{original/examples → spec}/syntax/syntax_schema_head_formatted.exp +0 -0
  55. metadata +37 -85
  56. data/lib/expressir/express.rb +0 -11
  57. data/lib/expressir/express/aggregate_dimension.rb +0 -38
  58. data/lib/expressir/express/attribute.rb +0 -15
  59. data/lib/expressir/express/comment.rb +0 -7
  60. data/lib/expressir/express/defined_type.rb +0 -36
  61. data/lib/expressir/express/derived.rb +0 -65
  62. data/lib/expressir/express/derived_aggregate.rb +0 -43
  63. data/lib/expressir/express/entity.rb +0 -137
  64. data/lib/expressir/express/explicit.rb +0 -70
  65. data/lib/expressir/express/explicit_aggregate.rb +0 -46
  66. data/lib/expressir/express/explicit_or_derived.rb +0 -16
  67. data/lib/expressir/express/global_rule.rb +0 -44
  68. data/lib/expressir/express/interface_specification.rb +0 -51
  69. data/lib/expressir/express/interfaced_item.rb +0 -38
  70. data/lib/expressir/express/inverse.rb +0 -46
  71. data/lib/expressir/express/inverse_aggregate.rb +0 -37
  72. data/lib/expressir/express/model_element.rb +0 -7
  73. data/lib/expressir/express/named_type.rb +0 -19
  74. data/lib/expressir/express/remark.rb +0 -8
  75. data/lib/expressir/express/repository.rb +0 -306
  76. data/lib/expressir/express/schema_definition.rb +0 -96
  77. data/lib/expressir/express/subtype_constraint.rb +0 -14
  78. data/lib/expressir/express/type.rb +0 -26
  79. data/lib/expressir/express/type_aggregate.rb +0 -42
  80. data/lib/expressir/express/type_enum.rb +0 -29
  81. data/lib/expressir/express/type_parser.rb +0 -45
  82. data/lib/expressir/express/type_select.rb +0 -82
  83. data/lib/expressir/express/unique_rule.rb +0 -35
  84. data/lib/expressir/express/where_rule.rb +0 -32
  85. data/lib/expressir/express_parser.rb +0 -30
  86. data/lib/expressir/parser.rb +0 -6
  87. data/lib/expressir/parser/owl_parser.rb +0 -8
  88. data/spec/acceptance/express_to_owl_spec.rb +0 -18
  89. data/spec/expressir/express/repository_spec.rb +0 -25
  90. data/spec/expressir/express_exp/formatter_spec.rb +0 -127
@@ -1,15 +1,15 @@
1
1
  require "yaml"
2
2
  require "spec_helper"
3
- require "expressir/express_exp/parser"
3
+ require "expressir/express/parser"
4
4
 
5
- RSpec.describe Expressir::ExpressExp::Parser do
5
+ RSpec.describe Expressir::Express::Parser do
6
6
  describe ".from_file" do
7
7
  it "parses a file (single.exp)" do
8
- exp_file = Expressir.root_path.join("original", "examples", "syntax", "single.exp")
9
- yaml_file = Expressir.root_path.join("original", "examples", "syntax", "single.yaml")
8
+ exp_file = Expressir.root_path.join("spec", "syntax", "single.exp")
9
+ yaml_file = Expressir.root_path.join("spec", "syntax", "single.yaml")
10
10
 
11
- repo = Expressir::ExpressExp::Parser.from_file(exp_file)
12
- result = YAML.dump(repo.to_hash(root_path: Expressir.root_path, skip_empty: true))
11
+ repo = Expressir::Express::Parser.from_file(exp_file)
12
+ result = YAML.dump(repo.to_hash(root_path: Expressir.root_path))
13
13
  # File.write(yaml_file, result)
14
14
  expected_result = File.read(yaml_file)
15
15
 
@@ -17,11 +17,11 @@ RSpec.describe Expressir::ExpressExp::Parser do
17
17
  end
18
18
 
19
19
  it "parses a file (multiple.exp)" do
20
- exp_file = Expressir.root_path.join("original", "examples", "syntax", "multiple.exp")
21
- yaml_file = Expressir.root_path.join("original", "examples", "syntax", "multiple.yaml")
20
+ exp_file = Expressir.root_path.join("spec", "syntax", "multiple.exp")
21
+ yaml_file = Expressir.root_path.join("spec", "syntax", "multiple.yaml")
22
22
 
23
- repo = Expressir::ExpressExp::Parser.from_file(exp_file)
24
- result = YAML.dump(repo.to_hash(root_path: Expressir.root_path, skip_empty: true))
23
+ repo = Expressir::Express::Parser.from_file(exp_file)
24
+ result = YAML.dump(repo.to_hash(root_path: Expressir.root_path))
25
25
  # File.write(yaml_file, result)
26
26
  expected_result = File.read(yaml_file)
27
27
 
@@ -29,11 +29,11 @@ RSpec.describe Expressir::ExpressExp::Parser do
29
29
  end
30
30
 
31
31
  it "parses a file (syntax.exp)" do
32
- exp_file = Expressir.root_path.join("original", "examples", "syntax", "syntax.exp")
33
- yaml_file = Expressir.root_path.join("original", "examples", "syntax", "syntax.yaml")
32
+ exp_file = Expressir.root_path.join("spec", "syntax", "syntax.exp")
33
+ yaml_file = Expressir.root_path.join("spec", "syntax", "syntax.yaml")
34
34
 
35
- repo = Expressir::ExpressExp::Parser.from_file(exp_file)
36
- result = YAML.dump(repo.to_hash(root_path: Expressir.root_path, skip_empty: true))
35
+ repo = Expressir::Express::Parser.from_file(exp_file)
36
+ result = YAML.dump(repo.to_hash(root_path: Expressir.root_path))
37
37
  # File.write(yaml_file, result)
38
38
  expected_result = File.read(yaml_file)
39
39
 
@@ -41,11 +41,11 @@ RSpec.describe Expressir::ExpressExp::Parser do
41
41
  end
42
42
 
43
43
  it "parses a file (remark.exp)" do
44
- exp_file = Expressir.root_path.join("original", "examples", "syntax", "remark.exp")
45
- yaml_file = Expressir.root_path.join("original", "examples", "syntax", "remark.yaml")
44
+ exp_file = Expressir.root_path.join("spec", "syntax", "remark.exp")
45
+ yaml_file = Expressir.root_path.join("spec", "syntax", "remark.yaml")
46
46
 
47
- repo = Expressir::ExpressExp::Parser.from_file(exp_file)
48
- result = YAML.dump(repo.to_hash(root_path: Expressir.root_path, skip_empty: true))
47
+ repo = Expressir::Express::Parser.from_file(exp_file)
48
+ result = YAML.dump(repo.to_hash(root_path: Expressir.root_path))
49
49
  # File.write(yaml_file, result)
50
50
  expected_result = File.read(yaml_file)
51
51
 
@@ -53,10 +53,10 @@ RSpec.describe Expressir::ExpressExp::Parser do
53
53
  end
54
54
 
55
55
  it "parses a file including original source (multiple.exp)" do
56
- exp_file = Expressir.root_path.join("original", "examples", "syntax", "multiple.exp")
56
+ exp_file = Expressir.root_path.join("spec", "syntax", "multiple.exp")
57
57
 
58
58
  input = File.read(exp_file)
59
- repo = Expressir::ExpressExp::Parser.from_file(exp_file, include_source: true)
59
+ repo = Expressir::Express::Parser.from_file(exp_file, include_source: true)
60
60
 
61
61
  schema = repo.schemas.first
62
62
  start_index = input.index("SCHEMA")
@@ -75,11 +75,11 @@ RSpec.describe Expressir::ExpressExp::Parser do
75
75
  describe ".from_files" do
76
76
  it "parses multiple files (single.exp, multiple.exp)" do
77
77
  exp_files = [
78
- Expressir.root_path.join("original", "examples", "syntax", "single.exp"),
79
- Expressir.root_path.join("original", "examples", "syntax", "multiple.exp")
78
+ Expressir.root_path.join("spec", "syntax", "single.exp"),
79
+ Expressir.root_path.join("spec", "syntax", "multiple.exp")
80
80
  ]
81
81
 
82
- repo = Expressir::ExpressExp::Parser.from_files(exp_files)
82
+ repo = Expressir::Express::Parser.from_files(exp_files)
83
83
 
84
84
  schemas = repo.schemas
85
85
  expect(schemas.count).to eq(5)
@@ -1,18 +1,18 @@
1
1
 
2
2
  require "yaml"
3
3
  require "spec_helper"
4
- require "expressir/express_exp/parser"
5
- require "expressir/express_exp/formatter"
4
+ require "expressir/express/parser"
5
+ require "expressir/express/formatter"
6
6
 
7
7
  RSpec.describe Expressir::Model::ModelElement do
8
8
  describe ".to_hash" do
9
9
  it "exports an object with a formatter (single.exp)" do
10
- exp_file = Expressir.root_path.join("original", "examples", "syntax", "single.exp")
11
- yaml_file = Expressir.root_path.join("original", "examples", "syntax", "single_formatted.yaml")
10
+ exp_file = Expressir.root_path.join("spec", "syntax", "single.exp")
11
+ yaml_file = Expressir.root_path.join("spec", "syntax", "single_formatted.yaml")
12
12
 
13
- repo = Expressir::ExpressExp::Parser.from_file(exp_file)
13
+ repo = Expressir::Express::Parser.from_file(exp_file)
14
14
 
15
- result = YAML.dump(repo.to_hash(root_path: Expressir.root_path, formatter: Expressir::ExpressExp::Formatter, skip_empty: true))
15
+ result = YAML.dump(repo.to_hash(root_path: Expressir.root_path, formatter: Expressir::Express::Formatter))
16
16
  # File.write(yaml_file, result)
17
17
  expected_result = File.read(yaml_file)
18
18
 
@@ -22,48 +22,48 @@ RSpec.describe Expressir::Model::ModelElement do
22
22
 
23
23
  describe ".from_hash" do
24
24
  it "parses an object (single.yaml)" do
25
- yaml_file = Expressir.root_path.join("original", "examples", "syntax", "single.yaml")
25
+ yaml_file = Expressir.root_path.join("spec", "syntax", "single.yaml")
26
26
 
27
27
  input = YAML.load(File.read(yaml_file))
28
28
  repo = Expressir::Model::ModelElement.from_hash(input, root_path: Expressir.root_path)
29
29
 
30
- result = YAML.dump(repo.to_hash(root_path: Expressir.root_path, skip_empty: true))
30
+ result = YAML.dump(repo.to_hash(root_path: Expressir.root_path))
31
31
  expected_result = File.read(yaml_file)
32
32
 
33
33
  expect(result).to eq(expected_result)
34
34
  end
35
35
 
36
36
  it "parses an object (multiple.yaml)" do
37
- yaml_file = Expressir.root_path.join("original", "examples", "syntax", "multiple.yaml")
37
+ yaml_file = Expressir.root_path.join("spec", "syntax", "multiple.yaml")
38
38
 
39
39
  input = YAML.load(File.read(yaml_file))
40
40
  repo = Expressir::Model::ModelElement.from_hash(input, root_path: Expressir.root_path)
41
41
 
42
- result = YAML.dump(repo.to_hash(root_path: Expressir.root_path, skip_empty: true))
42
+ result = YAML.dump(repo.to_hash(root_path: Expressir.root_path))
43
43
  expected_result = File.read(yaml_file)
44
44
 
45
45
  expect(result).to eq(expected_result)
46
46
  end
47
47
 
48
48
  it "parses an object (syntax.yaml)" do
49
- yaml_file = Expressir.root_path.join("original", "examples", "syntax", "syntax.yaml")
49
+ yaml_file = Expressir.root_path.join("spec", "syntax", "syntax.yaml")
50
50
 
51
51
  input = YAML.load(File.read(yaml_file))
52
52
  repo = Expressir::Model::ModelElement.from_hash(input, root_path: Expressir.root_path)
53
53
 
54
- result = YAML.dump(repo.to_hash(root_path: Expressir.root_path, skip_empty: true))
54
+ result = YAML.dump(repo.to_hash(root_path: Expressir.root_path))
55
55
  expected_result = File.read(yaml_file)
56
56
 
57
57
  expect(result).to eq(expected_result)
58
58
  end
59
59
 
60
60
  it "parses an object (remark.yaml)" do
61
- yaml_file = Expressir.root_path.join("original", "examples", "syntax", "remark.yaml")
61
+ yaml_file = Expressir.root_path.join("spec", "syntax", "remark.yaml")
62
62
 
63
63
  input = YAML.load(File.read(yaml_file))
64
64
  repo = Expressir::Model::ModelElement.from_hash(input, root_path: Expressir.root_path)
65
65
 
66
- result = YAML.dump(repo.to_hash(root_path: Expressir.root_path, skip_empty: true))
66
+ result = YAML.dump(repo.to_hash(root_path: Expressir.root_path))
67
67
  expected_result = File.read(yaml_file)
68
68
 
69
69
  expect(result).to eq(expected_result)
@@ -72,9 +72,9 @@ RSpec.describe Expressir::Model::ModelElement do
72
72
 
73
73
  describe ".find" do
74
74
  it "finds an object (single.exp)" do
75
- exp_file = Expressir.root_path.join("original", "examples", "syntax", "single.exp")
75
+ exp_file = Expressir.root_path.join("spec", "syntax", "single.exp")
76
76
 
77
- repo = Expressir::ExpressExp::Parser.from_file(exp_file)
77
+ repo = Expressir::Express::Parser.from_file(exp_file)
78
78
 
79
79
  # universal scope
80
80
  expect(repo.find('single_schema')).to be_instance_of(Expressir::Model::Schema)
@@ -86,9 +86,9 @@ RSpec.describe Expressir::Model::ModelElement do
86
86
  end
87
87
 
88
88
  it "finds an object (multiple.exp)" do
89
- exp_file = Expressir.root_path.join("original", "examples", "syntax", "multiple.exp")
89
+ exp_file = Expressir.root_path.join("spec", "syntax", "multiple.exp")
90
90
 
91
- repo = Expressir::ExpressExp::Parser.from_file(exp_file)
91
+ repo = Expressir::Express::Parser.from_file(exp_file)
92
92
 
93
93
  # universal scope
94
94
  expect(repo.find('multiple_schema')).to be_instance_of(Expressir::Model::Schema)
@@ -108,9 +108,9 @@ RSpec.describe Expressir::Model::ModelElement do
108
108
  end
109
109
 
110
110
  it "finds an object (syntax.exp)" do
111
- exp_file = Expressir.root_path.join("original", "examples", "syntax", "syntax.exp")
111
+ exp_file = Expressir.root_path.join("spec", "syntax", "syntax.exp")
112
112
 
113
- repo = Expressir::ExpressExp::Parser.from_file(exp_file)
113
+ repo = Expressir::Express::Parser.from_file(exp_file)
114
114
 
115
115
  # universal scope
116
116
  expect(repo.find('syntax_schema')).to be_instance_of(Expressir::Model::Schema)
@@ -122,16 +122,16 @@ RSpec.describe Expressir::Model::ModelElement do
122
122
  end
123
123
 
124
124
  it "finds an object (remark.exp)" do
125
- exp_file = Expressir.root_path.join("original", "examples", "syntax", "remark.exp")
125
+ exp_file = Expressir.root_path.join("spec", "syntax", "remark.exp")
126
126
 
127
- repo = Expressir::ExpressExp::Parser.from_file(exp_file)
127
+ repo = Expressir::Express::Parser.from_file(exp_file)
128
128
 
129
129
  # universal scope
130
130
  expect(repo.find('remark_schema')).to be_instance_of(Expressir::Model::Schema)
131
131
  expect(repo.find('remark_schema.remark_constant')).to be_instance_of(Expressir::Model::Constant)
132
132
  expect(repo.find('remark_schema.remark_type')).to be_instance_of(Expressir::Model::Type)
133
- expect(repo.find('remark_schema.remark_type.WR1')).to be_instance_of(Expressir::Model::Where)
134
- expect(repo.find('remark_schema.remark_type.wr:WR1')).to be_instance_of(Expressir::Model::Where)
133
+ expect(repo.find('remark_schema.remark_type.WR1')).to be_instance_of(Expressir::Model::WhereRule)
134
+ expect(repo.find('remark_schema.remark_type.wr:WR1')).to be_instance_of(Expressir::Model::WhereRule)
135
135
  expect(repo.find('remark_schema.remark_type.IP1')).to be_instance_of(Expressir::Model::RemarkItem)
136
136
  expect(repo.find('remark_schema.remark_type.ip:IP1')).to be_instance_of(Expressir::Model::RemarkItem)
137
137
  expect(repo.find('remark_schema.remark_enumeration_item')).to be_instance_of(Expressir::Model::EnumerationItem)
@@ -139,9 +139,9 @@ RSpec.describe Expressir::Model::ModelElement do
139
139
  expect(repo.find('remark_schema.remark_entity.remark_attribute')).to be_instance_of(Expressir::Model::Attribute)
140
140
  expect(repo.find('remark_schema.remark_entity.remark_derived_attribute')).to be_instance_of(Expressir::Model::Attribute)
141
141
  expect(repo.find('remark_schema.remark_entity.remark_inverse_attribute')).to be_instance_of(Expressir::Model::Attribute)
142
- expect(repo.find('remark_schema.remark_entity.UR1')).to be_instance_of(Expressir::Model::Unique)
143
- expect(repo.find('remark_schema.remark_entity.WR1')).to be_instance_of(Expressir::Model::Where)
144
- expect(repo.find('remark_schema.remark_entity.wr:WR1')).to be_instance_of(Expressir::Model::Where)
142
+ expect(repo.find('remark_schema.remark_entity.UR1')).to be_instance_of(Expressir::Model::UniqueRule)
143
+ expect(repo.find('remark_schema.remark_entity.WR1')).to be_instance_of(Expressir::Model::WhereRule)
144
+ expect(repo.find('remark_schema.remark_entity.wr:WR1')).to be_instance_of(Expressir::Model::WhereRule)
145
145
  expect(repo.find('remark_schema.remark_entity.IP1')).to be_instance_of(Expressir::Model::RemarkItem)
146
146
  expect(repo.find('remark_schema.remark_entity.ip:IP1')).to be_instance_of(Expressir::Model::RemarkItem)
147
147
  expect(repo.find('remark_schema.remark_subtype_constraint')).to be_instance_of(Expressir::Model::SubtypeConstraint)
@@ -162,8 +162,8 @@ RSpec.describe Expressir::Model::ModelElement do
162
162
  expect(repo.find('remark_schema.remark_rule.remark_enumeration_item')).to be_instance_of(Expressir::Model::EnumerationItem)
163
163
  expect(repo.find('remark_schema.remark_rule.remark_constant')).to be_instance_of(Expressir::Model::Constant)
164
164
  expect(repo.find('remark_schema.remark_rule.remark_variable')).to be_instance_of(Expressir::Model::Variable)
165
- expect(repo.find('remark_schema.remark_rule.WR1')).to be_instance_of(Expressir::Model::Where)
166
- expect(repo.find('remark_schema.remark_rule.wr:WR1')).to be_instance_of(Expressir::Model::Where)
165
+ expect(repo.find('remark_schema.remark_rule.WR1')).to be_instance_of(Expressir::Model::WhereRule)
166
+ expect(repo.find('remark_schema.remark_rule.wr:WR1')).to be_instance_of(Expressir::Model::WhereRule)
167
167
  expect(repo.find('remark_schema.remark_rule.IP1')).to be_instance_of(Expressir::Model::RemarkItem)
168
168
  expect(repo.find('remark_schema.remark_rule.ip:IP1')).to be_instance_of(Expressir::Model::RemarkItem)
169
169
  expect(repo.find('remark_schema.remark_item')).to be_instance_of(Expressir::Model::RemarkItem)
@@ -172,8 +172,8 @@ RSpec.describe Expressir::Model::ModelElement do
172
172
  schema = repo.schemas.first
173
173
  expect(schema.find('remark_constant')).to be_instance_of(Expressir::Model::Constant)
174
174
  expect(schema.find('remark_type')).to be_instance_of(Expressir::Model::Type)
175
- expect(schema.find('remark_type.WR1')).to be_instance_of(Expressir::Model::Where)
176
- expect(schema.find('remark_type.wr:WR1')).to be_instance_of(Expressir::Model::Where)
175
+ expect(schema.find('remark_type.WR1')).to be_instance_of(Expressir::Model::WhereRule)
176
+ expect(schema.find('remark_type.wr:WR1')).to be_instance_of(Expressir::Model::WhereRule)
177
177
  expect(schema.find('remark_type.IP1')).to be_instance_of(Expressir::Model::RemarkItem)
178
178
  expect(schema.find('remark_type.ip:IP1')).to be_instance_of(Expressir::Model::RemarkItem)
179
179
  expect(schema.find('remark_enumeration_item')).to be_instance_of(Expressir::Model::EnumerationItem)
@@ -181,9 +181,9 @@ RSpec.describe Expressir::Model::ModelElement do
181
181
  expect(schema.find('remark_entity.remark_attribute')).to be_instance_of(Expressir::Model::Attribute)
182
182
  expect(schema.find('remark_entity.remark_derived_attribute')).to be_instance_of(Expressir::Model::Attribute)
183
183
  expect(schema.find('remark_entity.remark_inverse_attribute')).to be_instance_of(Expressir::Model::Attribute)
184
- expect(schema.find('remark_entity.UR1')).to be_instance_of(Expressir::Model::Unique)
185
- expect(schema.find('remark_entity.WR1')).to be_instance_of(Expressir::Model::Where)
186
- expect(schema.find('remark_entity.wr:WR1')).to be_instance_of(Expressir::Model::Where)
184
+ expect(schema.find('remark_entity.UR1')).to be_instance_of(Expressir::Model::UniqueRule)
185
+ expect(schema.find('remark_entity.WR1')).to be_instance_of(Expressir::Model::WhereRule)
186
+ expect(schema.find('remark_entity.wr:WR1')).to be_instance_of(Expressir::Model::WhereRule)
187
187
  expect(schema.find('remark_entity.IP1')).to be_instance_of(Expressir::Model::RemarkItem)
188
188
  expect(schema.find('remark_entity.ip:IP1')).to be_instance_of(Expressir::Model::RemarkItem)
189
189
  expect(schema.find('remark_subtype_constraint')).to be_instance_of(Expressir::Model::SubtypeConstraint)
@@ -204,16 +204,16 @@ RSpec.describe Expressir::Model::ModelElement do
204
204
  expect(schema.find('remark_rule.remark_enumeration_item')).to be_instance_of(Expressir::Model::EnumerationItem)
205
205
  expect(schema.find('remark_rule.remark_constant')).to be_instance_of(Expressir::Model::Constant)
206
206
  expect(schema.find('remark_rule.remark_variable')).to be_instance_of(Expressir::Model::Variable)
207
- expect(schema.find('remark_rule.WR1')).to be_instance_of(Expressir::Model::Where)
208
- expect(schema.find('remark_rule.wr:WR1')).to be_instance_of(Expressir::Model::Where)
207
+ expect(schema.find('remark_rule.WR1')).to be_instance_of(Expressir::Model::WhereRule)
208
+ expect(schema.find('remark_rule.wr:WR1')).to be_instance_of(Expressir::Model::WhereRule)
209
209
  expect(schema.find('remark_rule.IP1')).to be_instance_of(Expressir::Model::RemarkItem)
210
210
  expect(schema.find('remark_rule.ip:IP1')).to be_instance_of(Expressir::Model::RemarkItem)
211
211
  expect(schema.find('remark_item')).to be_instance_of(Expressir::Model::RemarkItem)
212
212
 
213
213
  # type scope
214
214
  type = schema.types.first
215
- expect(type.find('WR1')).to be_instance_of(Expressir::Model::Where)
216
- expect(type.find('wr:WR1')).to be_instance_of(Expressir::Model::Where)
215
+ expect(type.find('WR1')).to be_instance_of(Expressir::Model::WhereRule)
216
+ expect(type.find('wr:WR1')).to be_instance_of(Expressir::Model::WhereRule)
217
217
  expect(type.find('IP1')).to be_instance_of(Expressir::Model::RemarkItem)
218
218
  expect(type.find('ip:IP1')).to be_instance_of(Expressir::Model::RemarkItem)
219
219
 
@@ -222,9 +222,9 @@ RSpec.describe Expressir::Model::ModelElement do
222
222
  expect(entity.find('remark_attribute')).to be_instance_of(Expressir::Model::Attribute)
223
223
  expect(entity.find('remark_derived_attribute')).to be_instance_of(Expressir::Model::Attribute)
224
224
  expect(entity.find('remark_inverse_attribute')).to be_instance_of(Expressir::Model::Attribute)
225
- expect(entity.find('UR1')).to be_instance_of(Expressir::Model::Unique)
226
- expect(entity.find('WR1')).to be_instance_of(Expressir::Model::Where)
227
- expect(entity.find('wr:WR1')).to be_instance_of(Expressir::Model::Where)
225
+ expect(entity.find('UR1')).to be_instance_of(Expressir::Model::UniqueRule)
226
+ expect(entity.find('WR1')).to be_instance_of(Expressir::Model::WhereRule)
227
+ expect(entity.find('wr:WR1')).to be_instance_of(Expressir::Model::WhereRule)
228
228
  expect(entity.find('IP1')).to be_instance_of(Expressir::Model::RemarkItem)
229
229
  expect(entity.find('ip:IP1')).to be_instance_of(Expressir::Model::RemarkItem)
230
230
 
@@ -250,15 +250,15 @@ RSpec.describe Expressir::Model::ModelElement do
250
250
  expect(rule.find('remark_enumeration_item')).to be_instance_of(Expressir::Model::EnumerationItem)
251
251
  expect(rule.find('remark_constant')).to be_instance_of(Expressir::Model::Constant)
252
252
  expect(rule.find('remark_variable')).to be_instance_of(Expressir::Model::Variable)
253
- expect(rule.find('WR1')).to be_instance_of(Expressir::Model::Where)
254
- expect(rule.find('wr:WR1')).to be_instance_of(Expressir::Model::Where)
253
+ expect(rule.find('WR1')).to be_instance_of(Expressir::Model::WhereRule)
254
+ expect(rule.find('wr:WR1')).to be_instance_of(Expressir::Model::WhereRule)
255
255
  expect(rule.find('IP1')).to be_instance_of(Expressir::Model::RemarkItem)
256
256
  expect(rule.find('ip:IP1')).to be_instance_of(Expressir::Model::RemarkItem)
257
257
 
258
258
  # retry search in parent scope
259
259
  expect(entity.find('remark_type')).to be_instance_of(Expressir::Model::Type)
260
- expect(entity.find('remark_type.WR1')).to be_instance_of(Expressir::Model::Where)
261
- expect(entity.find('remark_type.wr:WR1')).to be_instance_of(Expressir::Model::Where)
260
+ expect(entity.find('remark_type.WR1')).to be_instance_of(Expressir::Model::WhereRule)
261
+ expect(entity.find('remark_type.wr:WR1')).to be_instance_of(Expressir::Model::WhereRule)
262
262
  expect(entity.find('remark_type.IP1')).to be_instance_of(Expressir::Model::RemarkItem)
263
263
  expect(entity.find('remark_type.ip:IP1')).to be_instance_of(Expressir::Model::RemarkItem)
264
264
  end
File without changes
@@ -2,7 +2,7 @@
2
2
  _class: Expressir::Model::Repository
3
3
  schemas:
4
4
  - _class: Expressir::Model::Schema
5
- file: original/examples/syntax/multiple.exp
5
+ file: spec/syntax/multiple.exp
6
6
  id: multiple_schema
7
7
  interfaces:
8
8
  - _class: Expressir::Model::Interface
@@ -161,7 +161,7 @@ schemas:
161
161
  - _class: Expressir::Model::Expressions::SimpleReference
162
162
  id: missing_entity
163
163
  - _class: Expressir::Model::Schema
164
- file: original/examples/syntax/multiple.exp
164
+ file: spec/syntax/multiple.exp
165
165
  id: multiple_schema2
166
166
  entities:
167
167
  - _class: Expressir::Model::Entity
@@ -173,7 +173,7 @@ schemas:
173
173
  type:
174
174
  _class: Expressir::Model::Types::Boolean
175
175
  - _class: Expressir::Model::Schema
176
- file: original/examples/syntax/multiple.exp
176
+ file: spec/syntax/multiple.exp
177
177
  id: multiple_schema3
178
178
  entities:
179
179
  - _class: Expressir::Model::Entity
@@ -185,7 +185,7 @@ schemas:
185
185
  type:
186
186
  _class: Expressir::Model::Types::Boolean
187
187
  - _class: Expressir::Model::Schema
188
- file: original/examples/syntax/multiple.exp
188
+ file: spec/syntax/multiple.exp
189
189
  id: multiple_schema4
190
190
  entities:
191
191
  - _class: Expressir::Model::Entity
File without changes
@@ -2,7 +2,7 @@
2
2
  _class: Expressir::Model::Repository
3
3
  schemas:
4
4
  - _class: Expressir::Model::Schema
5
- file: original/examples/syntax/remark.exp
5
+ file: spec/syntax/remark.exp
6
6
  id: remark_schema
7
7
  remarks:
8
8
  - |-
@@ -36,7 +36,7 @@ schemas:
36
36
  remarks:
37
37
  - schema scope - type
38
38
  - universal scope - type
39
- type:
39
+ underlying_type:
40
40
  _class: Expressir::Model::Types::Enumeration
41
41
  items:
42
42
  - _class: Expressir::Model::EnumerationItem
@@ -46,8 +46,8 @@ schemas:
46
46
  - schema scope - enumeration item, on the same level as the type
47
47
  - universal scope - enumeration item
48
48
  - universal scope - enumeration item, on the same level as the type
49
- where:
50
- - _class: Expressir::Model::Where
49
+ where_rules:
50
+ - _class: Expressir::Model::WhereRule
51
51
  id: WR1
52
52
  remarks:
53
53
  - type scope - type where
@@ -112,8 +112,8 @@ schemas:
112
112
  _class: Expressir::Model::Expressions::SimpleReference
113
113
  id: remark_attribute
114
114
  base_path: remark_schema.remark_entity.remark_attribute
115
- unique:
116
- - _class: Expressir::Model::Unique
115
+ unique_rules:
116
+ - _class: Expressir::Model::UniqueRule
117
117
  id: UR1
118
118
  remarks:
119
119
  - entity scope - entity unique
@@ -123,8 +123,8 @@ schemas:
123
123
  - _class: Expressir::Model::Expressions::SimpleReference
124
124
  id: remark_attribute
125
125
  base_path: remark_schema.remark_entity.remark_attribute
126
- where:
127
- - _class: Expressir::Model::Where
126
+ where_rules:
127
+ - _class: Expressir::Model::WhereRule
128
128
  id: WR1
129
129
  remarks:
130
130
  - entity scope - entity where
@@ -180,7 +180,7 @@ schemas:
180
180
  - function scope - function type
181
181
  - schema scope - function type
182
182
  - universal scope - function type
183
- type:
183
+ underlying_type:
184
184
  _class: Expressir::Model::Types::Enumeration
185
185
  items:
186
186
  - _class: Expressir::Model::EnumerationItem
@@ -271,7 +271,7 @@ schemas:
271
271
  - rule scope - rule type
272
272
  - schema scope - rule type
273
273
  - universal scope - rule type
274
- type:
274
+ underlying_type:
275
275
  _class: Expressir::Model::Types::Enumeration
276
276
  items:
277
277
  - _class: Expressir::Model::EnumerationItem
@@ -344,8 +344,8 @@ schemas:
344
344
  expression:
345
345
  _class: Expressir::Model::Literals::Logical
346
346
  value: :TRUE
347
- where:
348
- - _class: Expressir::Model::Where
347
+ where_rules:
348
+ - _class: Expressir::Model::WhereRule
349
349
  id: WR1
350
350
  remarks:
351
351
  - rule scope - rule where
@@ -389,7 +389,7 @@ schemas:
389
389
  - procedure scope - procedure type
390
390
  - schema scope - procedure type
391
391
  - universal scope - procedure type
392
- type:
392
+ underlying_type:
393
393
  _class: Expressir::Model::Types::Enumeration
394
394
  items:
395
395
  - _class: Expressir::Model::EnumerationItem