finitio 0.6.1 → 0.7.0.pre.rc1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b96114d305e1a1028b5928cb419060c63e5385b0
4
- data.tar.gz: a7630a2f60f26888e217113bc701222ff0822f45
3
+ metadata.gz: 62428c8d4da07e87d6941a239e5d7f068dcbfbe5
4
+ data.tar.gz: e20902929ec496b6ea231b5c66a63b7ef59432af
5
5
  SHA512:
6
- metadata.gz: 52b4db3b9a8d266b016ae992f8ce36113aaffb1c8468bc89f4468e92b6871db63ab59b7a5e6371b931c6074fb7d44bce438215280a25d4a71a632ed8fa7fde94
7
- data.tar.gz: 4628099b4394f0fab3d064265193b022565b6393c8278fe8f3ca02b3c8f6ba0dfe95bf690e9dbb260eb5fe121820b15e03b7df82ae41e16aca4a85b62c38bae0
6
+ metadata.gz: c75b78277e39efebb52b2ba293f336953deb0c59f5b9eaa248e5c4645ae8ca078783466a8352f8a1ad98570d2fb2286a3ad2d3dadf0a6560b76ec336f311fc18
7
+ data.tar.gz: b3cba6dc70482fb8b780c72ff500c37c13968f61ea2f8293fd263d1423261e1a482e9df296a6165cd71a787fdea5bfb696b91b3b944af006cf10a23e56121ac7
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- finitio (0.6.1)
4
+ finitio (0.7.0.pre.rc1)
5
5
  citrus (>= 2.4, < 4.0)
6
6
 
7
7
  GEM
@@ -1,5 +1,6 @@
1
1
  require 'set'
2
2
  require 'time'
3
+ require 'pathname'
3
4
 
4
5
  module Finitio
5
6
 
@@ -13,6 +14,14 @@ module Finitio
13
14
 
14
15
  ANY_TYPE = AnyType.new
15
16
 
17
+ STDLIB_PATHS = [
18
+ File.expand_path('../finitio/stdlib', __FILE__)
19
+ ]
20
+
21
+ def stdlib_path(path)
22
+ STDLIB_PATHS << path
23
+ end
24
+
16
25
  def parse(source)
17
26
  require "finitio/syntax"
18
27
  Syntax.parse(source)
@@ -31,6 +40,6 @@ module Finitio
31
40
  extend self
32
41
 
33
42
  DEFAULT_SYSTEM = system(File.read(
34
- File.expand_path('../finitio/Finitio/default.fio', __FILE__)
43
+ File.expand_path('../finitio/stdlib/finitio/data.fio', __FILE__)
35
44
  ))
36
45
  end # module Finitio
@@ -1,23 +1,53 @@
1
1
  module Finitio
2
2
  class Compilation
3
3
 
4
- def initialize(system = System.new, factory = TypeFactory.new)
4
+ def initialize(system = System.new, factory = TypeFactory.new, source = nil)
5
5
  @system = system
6
6
  @factory = factory
7
7
  @proxies = []
8
+ @source = source
8
9
  end
9
- attr_reader :system, :factory, :proxies
10
+ attr_reader :system, :factory, :proxies, :source
10
11
 
11
- def self.coerce(arg)
12
+ def self.coerce(arg, source = nil)
12
13
  case arg
13
- when NilClass then new
14
- when System then new(arg, arg.factory)
15
- when TypeFactory then new(System.new, arg)
14
+ when NilClass then new(System.new, TypeFactory.new, source)
15
+ when System then new(arg, arg.factory, source)
16
+ when TypeFactory then new(System.new, arg, source)
16
17
  else
17
18
  raise ArgumentError, "Unable to coerce `#{arg}`"
18
19
  end
19
20
  end
20
21
 
22
+ def imports
23
+ @system.send(:imports)
24
+ end
25
+
26
+ def add_import(import)
27
+ @system.add_import(import)
28
+ self
29
+ end
30
+
31
+ def resolve_url(url)
32
+ if url.to_s =~ /^\.\//
33
+ resolve_relative_url(url)
34
+ else
35
+ STDLIB_PATHS.each do |path|
36
+ file = File.expand_path("#{url}.fio", path)
37
+ return Pathname.new(file) if File.file?(file)
38
+ end
39
+ raise Error, "No such import `#{url}`"
40
+ end
41
+ end
42
+
43
+ def resolve_relative_url(url)
44
+ raise Error, "Unable to resolve `#{url}`, missing path context"\
45
+ unless source.respond_to?(:to_path)
46
+ file = File.expand_path("../#{url}.fio", source.to_path)
47
+ raise Error, "No such file `#{file}`" unless File.file?(file)
48
+ Pathname.new(file)
49
+ end
50
+
21
51
  def resolve_proxies!
22
52
  proxies.each do |p|
23
53
  p.resolve(system)
@@ -3,6 +3,10 @@ require_relative 'syntax/node'
3
3
  require_relative 'syntax/literal'
4
4
  require_relative 'syntax/expr'
5
5
  require_relative 'syntax/type'
6
+ require_relative 'syntax/import'
7
+ require_relative 'syntax/imports'
8
+ require_relative 'syntax/definitions'
9
+ require_relative 'syntax/system'
6
10
  module Finitio
7
11
  module Syntax
8
12
 
@@ -21,13 +25,13 @@ module Finitio
21
25
  end
22
26
 
23
27
  def self.compile(source, cpl = nil)
24
- cpl = Compilation.coerce(cpl)
28
+ cpl = Compilation.coerce(cpl, source)
25
29
  parse(source, root: "system").compile(cpl)
26
30
  cpl.resolve_proxies!.system
27
31
  end
28
32
 
29
33
  def self.compile_type(source, cpl = nil)
30
- cpl = Compilation.coerce(cpl)
34
+ cpl = Compilation.coerce(cpl, source)
31
35
  parse(source, root: "type").compile(cpl)
32
36
  end
33
37
 
@@ -10,10 +10,20 @@ grammar Finitio::Syntax::Parser
10
10
  include Finitio::Syntax::Types
11
11
 
12
12
  rule system
13
- (spacing definitions spacing main_type? spacing eof)
13
+ (spacing imports spacing definitions spacing main_type? spacing eof)
14
14
  <Finitio::Syntax::System>
15
15
  end
16
16
 
17
+ rule imports
18
+ (import (spacing import)*)?
19
+ <Finitio::Syntax::Imports>
20
+ end
21
+
22
+ rule import
23
+ ('@import' spaces import_url)
24
+ <Finitio::Syntax::Import>
25
+ end
26
+
17
27
  rule definitions
18
28
  (type_def (spacing type_def)*)?
19
29
  <Finitio::Syntax::Definitions>
@@ -0,0 +1,21 @@
1
+ module Finitio
2
+ module Syntax
3
+ module Import
4
+ include Node
5
+
6
+ capture :import_url
7
+
8
+ def compile(system)
9
+ file = system.resolve_url(import_url)
10
+ imported = Finitio.system(file)
11
+ system.add_import(imported)
12
+ system
13
+ end
14
+
15
+ def to_ast
16
+ [:import, import_url]
17
+ end
18
+
19
+ end # module Import
20
+ end # module Syntax
21
+ end # module Finitio
@@ -0,0 +1,19 @@
1
+ module Finitio
2
+ module Syntax
3
+ module Imports
4
+ include Node
5
+
6
+ def compile(system)
7
+ captures[:import].each do |node|
8
+ node.compile(system)
9
+ end
10
+ system
11
+ end
12
+
13
+ def to_ast
14
+ [:imports] + captures[:import].map(&:to_ast)
15
+ end
16
+
17
+ end # module Imports
18
+ end # module Syntax
19
+ end # module Finitio
@@ -32,6 +32,10 @@ grammar Finitio::Syntax::Lexer
32
32
  /[a-zA-Z0-9:]+/
33
33
  end
34
34
 
35
+ rule import_url
36
+ (!space .)+
37
+ end
38
+
35
39
  # LEXER symbols
36
40
 
37
41
  rule equal
@@ -3,16 +3,20 @@ module Finitio
3
3
  module System
4
4
  include Node
5
5
 
6
- capture :definitions, :main_type
6
+ capture :imports, :definitions, :main_type
7
7
 
8
8
  def compile(system)
9
+ imports.compile(system) if imports
9
10
  definitions.compile(system)
10
11
  main_type.compile(system) if main_type
11
12
  system
12
13
  end
13
14
 
14
15
  def to_ast
15
- ast = [ :system ] + definitions.to_ast
16
+ ast = [ :system ]
17
+ imports_ast = imports.to_ast
18
+ ast << imports_ast unless imports_ast.size == 1
19
+ ast += definitions.to_ast
16
20
  ast << main_type.to_ast if main_type
17
21
  ast
18
22
  end
@@ -1,5 +1,3 @@
1
- require_relative 'type/system'
2
- require_relative 'type/definitions'
3
1
  require_relative 'type/type_def'
4
2
  require_relative 'type/main_type'
5
3
  require_relative 'type/expression'
@@ -4,8 +4,16 @@ module Finitio
4
4
  #
5
5
  class System
6
6
 
7
- def initialize(types = {})
7
+ def initialize(types = {}, imports = [])
8
8
  @types = types
9
+ @imports = imports
10
+ end
11
+
12
+ attr_reader :types, :imports
13
+ private :types, :imports
14
+
15
+ def add_import(system)
16
+ @imports << system
9
17
  end
10
18
 
11
19
  def add_type(type, name = nil, metadata = nil)
@@ -19,7 +27,9 @@ module Finitio
19
27
  end
20
28
 
21
29
  def get_type(name)
22
- @types[name] || @types[name.to_s]
30
+ fetch(name){|_|
31
+ fetch(name.to_s){ nil }
32
+ }
23
33
  end
24
34
  alias :[] :get_type
25
35
 
@@ -27,9 +37,27 @@ module Finitio
27
37
  self['Main']
28
38
  end
29
39
 
30
- def fetch(name, &bl)
31
- @types.fetch(name, &bl)
40
+ def fetch(name, with_imports = true, &bl)
41
+ if with_imports
42
+ @types.fetch(name) do
43
+ _fetch(name, @imports, &bl)
44
+ end
45
+ else
46
+ @types.fetch(name, &bl)
47
+ end
48
+ end
49
+
50
+ def _fetch(name, imports, &bl)
51
+ if imports.empty?
52
+ raise KeyError, %Q{key not found: "#{name}"} unless bl
53
+ bl.call(name)
54
+ else
55
+ imports.first.fetch(name, false) do
56
+ _fetch(name, imports[1..-1], &bl)
57
+ end
58
+ end
32
59
  end
60
+ private :_fetch
33
61
 
34
62
  def factory
35
63
  @factory ||= TypeFactory.new
@@ -56,7 +84,7 @@ module Finitio
56
84
  end
57
85
 
58
86
  def dup
59
- System.new(@types.dup)
87
+ System.new(@types.dup, @imports.dup)
60
88
  end
61
89
 
62
90
  end # class System
@@ -25,15 +25,15 @@ module Finitio
25
25
  :to_s
26
26
  ].each do |meth|
27
27
  define_method(meth) do |*args, &bl|
28
- raise Error, "Proxy not resolved" unless @target
28
+ raise Error, "No such type `#{@target_name}` (proxy not resolved?)" unless @target
29
29
  @target.send(meth, *args, &bl)
30
30
  end
31
31
  end
32
32
 
33
33
  def resolve(system)
34
- @target = system.fetch(target_name) do
34
+ @target = system.fetch(target_name){
35
35
  raise Error, "No such type `#{target_name}`"
36
- end
36
+ }
37
37
  end
38
38
 
39
39
  end # class ProxyType
@@ -2,8 +2,8 @@ module Finitio
2
2
  module Version
3
3
 
4
4
  MAJOR = 0
5
- MINOR = 6
6
- TINY = 1
5
+ MINOR = 7
6
+ TINY = "0-rc1"
7
7
 
8
8
  def self.to_s
9
9
  [ MAJOR, MINOR, TINY ].join('.')
File without changes
@@ -0,0 +1,48 @@
1
+ require 'spec_helper'
2
+ module Finitio
3
+ describe Syntax, "import" do
4
+
5
+ subject{
6
+ Syntax.parse(input, root: "import")
7
+ }
8
+
9
+ let(:sys){
10
+ Compilation.coerce(system, Path.dir/"test_import.rb")
11
+ }
12
+
13
+ let(:compiled){
14
+ subject.compile(sys)
15
+ }
16
+
17
+ let(:ast){
18
+ subject.to_ast
19
+ }
20
+
21
+ context 'with a stdlib import' do
22
+ let(:input){ '@import finitio/data' }
23
+
24
+ it 'compiles to an Import' do
25
+ expect(compiled).to be(sys)
26
+ expect(compiled.send(:imports).size).to eql(1)
27
+ end
28
+
29
+ it 'has the expected AST' do
30
+ expect(ast).to eq([:import, "finitio/data"])
31
+ end
32
+ end
33
+
34
+ context 'with a stdlib import' do
35
+ let(:input){ '@import ./imported' }
36
+
37
+ it 'compiles to an Import' do
38
+ expect(compiled).to be(sys)
39
+ expect(compiled.send(:imports).size).to eql(1)
40
+ end
41
+
42
+ it 'has the expected AST' do
43
+ expect(ast).to eq([:import, "./imported"])
44
+ end
45
+ end
46
+
47
+ end
48
+ end
@@ -38,5 +38,42 @@ module Finitio
38
38
  end
39
39
  end
40
40
 
41
+ context 'with an imported type' do
42
+ subject{
43
+ s = System.new
44
+ s.add_import(system)
45
+ s.fetch("intType", imports, &fallback)
46
+ }
47
+
48
+ context "specifying the use of imports" do
49
+ let(:imports) { true }
50
+ let(:fallback){ ->(name){ raise } }
51
+
52
+ it 'should return the type' do
53
+ expect(subject).to eq(intType)
54
+ end
55
+ end
56
+
57
+ context "specifying not to use the imports" do
58
+ let(:imports) { false }
59
+ let(:fallback){ ->(name){ "bar" } }
60
+
61
+ it 'should yield the fallback block' do
62
+ expect(subject).to eq("bar")
63
+ end
64
+ end
65
+
66
+ context "specifying not to use the imports and no fallbak" do
67
+ let(:imports) { false }
68
+ let(:fallback){ nil }
69
+
70
+ it 'should yield the fallback block' do
71
+ expect {
72
+ subject
73
+ }.to raise_error
74
+ end
75
+ end
76
+ end
77
+
41
78
  end
42
79
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: finitio
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.7.0.pre.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bernard Lambeau
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-23 00:00:00.000000000 Z
11
+ date: 2018-12-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: citrus
@@ -49,8 +49,8 @@ files:
49
49
  - Rakefile
50
50
  - finitio.gemspec
51
51
  - lib/finitio.rb
52
- - lib/finitio/Finitio/default.fio
53
52
  - lib/finitio/errors.rb
53
+ - lib/finitio/stdlib/finitio/data.fio
54
54
  - lib/finitio/support.rb
55
55
  - lib/finitio/support/attribute.rb
56
56
  - lib/finitio/support/compilation.rb
@@ -61,6 +61,7 @@ files:
61
61
  - lib/finitio/support/metadata.rb
62
62
  - lib/finitio/support/type_factory.rb
63
63
  - lib/finitio/syntax.rb
64
+ - lib/finitio/syntax/definitions.rb
64
65
  - lib/finitio/syntax/expr.rb
65
66
  - lib/finitio/syntax/expr/arith_op.rb
66
67
  - lib/finitio/syntax/expr/comparison.rb
@@ -75,6 +76,8 @@ files:
75
76
  - lib/finitio/syntax/expressions.citrus
76
77
  - lib/finitio/syntax/finitio.citrus
77
78
  - lib/finitio/syntax/finitio.sexp
79
+ - lib/finitio/syntax/import.rb
80
+ - lib/finitio/syntax/imports.rb
78
81
  - lib/finitio/syntax/lexer.citrus
79
82
  - lib/finitio/syntax/literal.rb
80
83
  - lib/finitio/syntax/literal/boolean.rb
@@ -83,6 +86,7 @@ files:
83
86
  - lib/finitio/syntax/literal/string.rb
84
87
  - lib/finitio/syntax/literals.citrus
85
88
  - lib/finitio/syntax/node.rb
89
+ - lib/finitio/syntax/system.rb
86
90
  - lib/finitio/syntax/type.rb
87
91
  - lib/finitio/syntax/type/ad_type.rb
88
92
  - lib/finitio/syntax/type/any_type.rb
@@ -91,7 +95,6 @@ files:
91
95
  - lib/finitio/syntax/type/constraint_def.rb
92
96
  - lib/finitio/syntax/type/constraints.rb
93
97
  - lib/finitio/syntax/type/contract.rb
94
- - lib/finitio/syntax/type/definitions.rb
95
98
  - lib/finitio/syntax/type/expression.rb
96
99
  - lib/finitio/syntax/type/external_pair.rb
97
100
  - lib/finitio/syntax/type/heading.rb
@@ -107,7 +110,6 @@ files:
107
110
  - lib/finitio/syntax/type/set_type.rb
108
111
  - lib/finitio/syntax/type/struct_type.rb
109
112
  - lib/finitio/syntax/type/sub_type.rb
110
- - lib/finitio/syntax/type/system.rb
111
113
  - lib/finitio/syntax/type/tuple_type.rb
112
114
  - lib/finitio/syntax/type/type_def.rb
113
115
  - lib/finitio/syntax/type/type_ref.rb
@@ -162,6 +164,7 @@ files:
162
164
  - spec/spec_helper.rb
163
165
  - spec/syntax/expr/test_free_variables.rb
164
166
  - spec/syntax/expr/test_to_proc_source.rb
167
+ - spec/syntax/nodes/imported.fio
165
168
  - spec/syntax/nodes/test_ad_type.rb
166
169
  - spec/syntax/nodes/test_any_type.rb
167
170
  - spec/syntax/nodes/test_attribute.rb
@@ -172,6 +175,7 @@ files:
172
175
  - spec/syntax/nodes/test_contract.rb
173
176
  - spec/syntax/nodes/test_expression.rb
174
177
  - spec/syntax/nodes/test_heading.rb
178
+ - spec/syntax/nodes/test_import.rb
175
179
  - spec/syntax/nodes/test_metadata.rb
176
180
  - spec/syntax/nodes/test_named_constraint.rb
177
181
  - spec/syntax/nodes/test_relation_type.rb
@@ -307,169 +311,171 @@ required_ruby_version: !ruby/object:Gem::Requirement
307
311
  version: '0'
308
312
  required_rubygems_version: !ruby/object:Gem::Requirement
309
313
  requirements:
310
- - - ">="
314
+ - - ">"
311
315
  - !ruby/object:Gem::Version
312
- version: '0'
316
+ version: 1.3.1
313
317
  requirements: []
314
318
  rubyforge_project:
315
- rubygems_version: 2.5.2
319
+ rubygems_version: 2.6.11
316
320
  signing_key:
317
321
  specification_version: 4
318
322
  summary: Finitio - in Ruby
319
323
  test_files:
320
- - spec/spec_helper.rb
321
- - spec/type_factory/factory/test_tuple_type.rb
322
- - spec/type_factory/factory/test_builtin.rb
323
- - spec/type_factory/factory/test_set_type.rb
324
- - spec/type_factory/factory/test_struct_type.rb
325
- - spec/type_factory/factory/test_sub_type.rb
326
- - spec/type_factory/factory/test_seq_type.rb
327
- - spec/type_factory/dsl/test_attributes.rb
328
- - spec/type_factory/dsl/test_builtin.rb
329
- - spec/type_factory/dsl/test_adt.rb
330
- - spec/type_factory/dsl/test_multi_tuple.rb
331
- - spec/type_factory/dsl/test_seq.rb
332
- - spec/type_factory/dsl/test_multi_relation.rb
333
- - spec/type_factory/dsl/test_tuple.rb
334
- - spec/type_factory/dsl/test_set.rb
335
- - spec/type_factory/dsl/test_attribute.rb
336
- - spec/type_factory/dsl/test_any.rb
337
- - spec/type_factory/dsl/test_union.rb
338
- - spec/type_factory/dsl/test_struct.rb
339
- - spec/type_factory/dsl/test_relation.rb
340
- - spec/type_factory/dsl/test_subtype.rb
341
- - spec/attribute/test_initialize.rb
342
324
  - spec/attribute/test_equality.rb
343
- - spec/attribute/test_to_name.rb
344
325
  - spec/attribute/test_fetch_on.rb
326
+ - spec/attribute/test_initialize.rb
345
327
  - spec/attribute/test_optional.rb
346
328
  - spec/attribute/test_required.rb
329
+ - spec/attribute/test_to_name.rb
330
+ - spec/constraint/test_anonymous.rb
331
+ - spec/constraint/test_equality.rb
332
+ - spec/constraint/test_name.rb
333
+ - spec/constraint/test_named.rb
334
+ - spec/constraint/test_triple_equal.rb
335
+ - spec/finitio/system.fio
336
+ - spec/finitio/test_ast.rb
337
+ - spec/finitio/test_parse.rb
338
+ - spec/finitio/test_system.rb
339
+ - spec/heading/test_allow_extra.rb
340
+ - spec/heading/test_each.rb
341
+ - spec/heading/test_equality.rb
342
+ - spec/heading/test_hash.rb
347
343
  - spec/heading/test_hash_get.rb
348
344
  - spec/heading/test_initialize.rb
349
- - spec/heading/test_equality.rb
350
- - spec/heading/test_to_name.rb
351
345
  - spec/heading/test_multi.rb
352
- - spec/heading/test_hash.rb
353
- - spec/heading/test_allow_extra.rb
354
346
  - spec/heading/test_size.rb
355
- - spec/heading/test_each.rb
356
- - spec/test_finitio.rb
357
- - spec/finitio/test_ast.rb
358
- - spec/finitio/system.fio
359
- - spec/finitio/test_system.rb
360
- - spec/finitio/test_parse.rb
361
- - spec/system/test_initialize.rb
362
- - spec/system/test_get_type.rb
363
- - spec/system/test_fetch.rb
364
- - spec/system/test_dup.rb
347
+ - spec/heading/test_to_name.rb
348
+ - spec/spec_helper.rb
349
+ - spec/syntax/expr/test_free_variables.rb
350
+ - spec/syntax/expr/test_to_proc_source.rb
351
+ - spec/syntax/nodes/imported.fio
352
+ - spec/syntax/nodes/test_ad_type.rb
353
+ - spec/syntax/nodes/test_any_type.rb
354
+ - spec/syntax/nodes/test_attribute.rb
355
+ - spec/syntax/nodes/test_builtin_type.rb
356
+ - spec/syntax/nodes/test_comment.rb
357
+ - spec/syntax/nodes/test_constraint_def.rb
358
+ - spec/syntax/nodes/test_constraints.rb
359
+ - spec/syntax/nodes/test_contract.rb
360
+ - spec/syntax/nodes/test_expression.rb
361
+ - spec/syntax/nodes/test_heading.rb
362
+ - spec/syntax/nodes/test_import.rb
363
+ - spec/syntax/nodes/test_metadata.rb
364
+ - spec/syntax/nodes/test_named_constraint.rb
365
+ - spec/syntax/nodes/test_relation_type.rb
366
+ - spec/syntax/nodes/test_seq_type.rb
367
+ - spec/syntax/nodes/test_set_type.rb
368
+ - spec/syntax/nodes/test_spacing.rb
369
+ - spec/syntax/nodes/test_struct_type.rb
370
+ - spec/syntax/nodes/test_sub_type.rb
371
+ - spec/syntax/nodes/test_system.rb
372
+ - spec/syntax/nodes/test_tuple_type.rb
373
+ - spec/syntax/nodes/test_type_def.rb
374
+ - spec/syntax/nodes/test_type_ref.rb
375
+ - spec/syntax/nodes/test_union_type.rb
376
+ - spec/syntax/nodes/test_unnamed_constraint.rb
377
+ - spec/syntax/test_compile.rb
378
+ - spec/syntax/test_compile_type.rb
365
379
  - spec/system/test_add_type.rb
366
380
  - spec/system/test_dsl.rb
367
- - spec/type/multi_relation_type/test_name.rb
368
- - spec/type/multi_relation_type/test_initialize.rb
369
- - spec/type/multi_relation_type/test_equality.rb
370
- - spec/type/multi_relation_type/test_include.rb
371
- - spec/type/multi_relation_type/test_default_name.rb
372
- - spec/type/multi_relation_type/test_dress.rb
373
- - spec/type/sub_type/test_name.rb
374
- - spec/type/sub_type/test_initialize.rb
375
- - spec/type/sub_type/test_equality.rb
376
- - spec/type/sub_type/test_include.rb
377
- - spec/type/sub_type/test_default_name.rb
378
- - spec/type/sub_type/test_dress.rb
379
- - spec/type/proxy_type/test_resolve.rb
380
- - spec/type/proxy_type/test_delegation.rb
381
- - spec/type/ad_type/test_name.rb
382
- - spec/type/ad_type/test_initialize.rb
383
- - spec/type/ad_type/test_include.rb
381
+ - spec/system/test_dup.rb
382
+ - spec/system/test_fetch.rb
383
+ - spec/system/test_get_type.rb
384
+ - spec/system/test_initialize.rb
385
+ - spec/test_finitio.rb
384
386
  - spec/type/ad_type/test_default_name.rb
385
387
  - spec/type/ad_type/test_dress.rb
386
- - spec/type/struct_type/test_name.rb
387
- - spec/type/struct_type/test_initialize.rb
388
- - spec/type/struct_type/test_equality.rb
389
- - spec/type/struct_type/test_include.rb
390
- - spec/type/struct_type/test_default_name.rb
391
- - spec/type/struct_type/test_dress.rb
392
- - spec/type/set_type/test_name.rb
393
- - spec/type/set_type/test_initialize.rb
394
- - spec/type/set_type/test_equality.rb
395
- - spec/type/set_type/test_include.rb
396
- - spec/type/set_type/test_default_name.rb
397
- - spec/type/set_type/test_dress.rb
398
- - spec/type/relation_type/test_name.rb
399
- - spec/type/relation_type/test_initialize.rb
400
- - spec/type/relation_type/test_equality.rb
401
- - spec/type/relation_type/test_include.rb
402
- - spec/type/relation_type/test_default_name.rb
403
- - spec/type/relation_type/test_dress.rb
404
- - spec/type/any_type/test_name.rb
405
- - spec/type/any_type/test_initialize.rb
406
- - spec/type/any_type/test_equality.rb
407
- - spec/type/any_type/test_include.rb
388
+ - spec/type/ad_type/test_include.rb
389
+ - spec/type/ad_type/test_initialize.rb
390
+ - spec/type/ad_type/test_name.rb
391
+ - spec/type/alias_type/test_default_name.rb
392
+ - spec/type/alias_type/test_delegation.rb
393
+ - spec/type/alias_type/test_name.rb
408
394
  - spec/type/any_type/test_default_name.rb
409
395
  - spec/type/any_type/test_dress.rb
410
- - spec/type/builtin_type/test_name.rb
411
- - spec/type/builtin_type/test_initialize.rb
412
- - spec/type/builtin_type/test_equality.rb
413
- - spec/type/builtin_type/test_include.rb
396
+ - spec/type/any_type/test_equality.rb
397
+ - spec/type/any_type/test_include.rb
398
+ - spec/type/any_type/test_initialize.rb
399
+ - spec/type/any_type/test_name.rb
414
400
  - spec/type/builtin_type/test_default_name.rb
415
401
  - spec/type/builtin_type/test_dress.rb
416
- - spec/type/union_type/test_name.rb
417
- - spec/type/union_type/test_initialize.rb
418
- - spec/type/union_type/test_equality.rb
419
- - spec/type/union_type/test_include.rb
420
- - spec/type/union_type/test_default_name.rb
421
- - spec/type/union_type/test_dress.rb
422
- - spec/type/tuple_type/test_name.rb
423
- - spec/type/tuple_type/test_initialize.rb
424
- - spec/type/tuple_type/test_equality.rb
425
- - spec/type/tuple_type/test_include.rb
426
- - spec/type/tuple_type/test_default_name.rb
427
- - spec/type/tuple_type/test_dress.rb
428
- - spec/type/alias_type/test_name.rb
429
- - spec/type/alias_type/test_default_name.rb
430
- - spec/type/alias_type/test_delegation.rb
431
- - spec/type/seq_type/test_name.rb
432
- - spec/type/seq_type/test_initialize.rb
433
- - spec/type/seq_type/test_equality.rb
434
- - spec/type/seq_type/test_include.rb
435
- - spec/type/seq_type/test_default_name.rb
436
- - spec/type/seq_type/test_dress.rb
437
- - spec/type/multi_tuple_type/test_name.rb
438
- - spec/type/multi_tuple_type/test_initialize.rb
439
- - spec/type/multi_tuple_type/test_equality.rb
440
- - spec/type/multi_tuple_type/test_include.rb
402
+ - spec/type/builtin_type/test_equality.rb
403
+ - spec/type/builtin_type/test_include.rb
404
+ - spec/type/builtin_type/test_initialize.rb
405
+ - spec/type/builtin_type/test_name.rb
406
+ - spec/type/multi_relation_type/test_default_name.rb
407
+ - spec/type/multi_relation_type/test_dress.rb
408
+ - spec/type/multi_relation_type/test_equality.rb
409
+ - spec/type/multi_relation_type/test_include.rb
410
+ - spec/type/multi_relation_type/test_initialize.rb
411
+ - spec/type/multi_relation_type/test_name.rb
441
412
  - spec/type/multi_tuple_type/test_default_name.rb
442
413
  - spec/type/multi_tuple_type/test_dress.rb
443
- - spec/syntax/nodes/test_tuple_type.rb
444
- - spec/syntax/nodes/test_set_type.rb
445
- - spec/syntax/nodes/test_union_type.rb
446
- - spec/syntax/nodes/test_heading.rb
447
- - spec/syntax/nodes/test_builtin_type.rb
448
- - spec/syntax/nodes/test_constraints.rb
449
- - spec/syntax/nodes/test_type_ref.rb
450
- - spec/syntax/nodes/test_system.rb
451
- - spec/syntax/nodes/test_attribute.rb
452
- - spec/syntax/nodes/test_contract.rb
453
- - spec/syntax/nodes/test_named_constraint.rb
454
- - spec/syntax/nodes/test_metadata.rb
455
- - spec/syntax/nodes/test_type_def.rb
456
- - spec/syntax/nodes/test_struct_type.rb
457
- - spec/syntax/nodes/test_sub_type.rb
458
- - spec/syntax/nodes/test_any_type.rb
459
- - spec/syntax/nodes/test_constraint_def.rb
460
- - spec/syntax/nodes/test_ad_type.rb
461
- - spec/syntax/nodes/test_expression.rb
462
- - spec/syntax/nodes/test_relation_type.rb
463
- - spec/syntax/nodes/test_spacing.rb
464
- - spec/syntax/nodes/test_comment.rb
465
- - spec/syntax/nodes/test_seq_type.rb
466
- - spec/syntax/nodes/test_unnamed_constraint.rb
467
- - spec/syntax/expr/test_to_proc_source.rb
468
- - spec/syntax/expr/test_free_variables.rb
469
- - spec/syntax/test_compile.rb
470
- - spec/syntax/test_compile_type.rb
471
- - spec/constraint/test_name.rb
472
- - spec/constraint/test_equality.rb
473
- - spec/constraint/test_anonymous.rb
474
- - spec/constraint/test_named.rb
475
- - spec/constraint/test_triple_equal.rb
414
+ - spec/type/multi_tuple_type/test_equality.rb
415
+ - spec/type/multi_tuple_type/test_include.rb
416
+ - spec/type/multi_tuple_type/test_initialize.rb
417
+ - spec/type/multi_tuple_type/test_name.rb
418
+ - spec/type/proxy_type/test_delegation.rb
419
+ - spec/type/proxy_type/test_resolve.rb
420
+ - spec/type/relation_type/test_default_name.rb
421
+ - spec/type/relation_type/test_dress.rb
422
+ - spec/type/relation_type/test_equality.rb
423
+ - spec/type/relation_type/test_include.rb
424
+ - spec/type/relation_type/test_initialize.rb
425
+ - spec/type/relation_type/test_name.rb
426
+ - spec/type/seq_type/test_default_name.rb
427
+ - spec/type/seq_type/test_dress.rb
428
+ - spec/type/seq_type/test_equality.rb
429
+ - spec/type/seq_type/test_include.rb
430
+ - spec/type/seq_type/test_initialize.rb
431
+ - spec/type/seq_type/test_name.rb
432
+ - spec/type/set_type/test_default_name.rb
433
+ - spec/type/set_type/test_dress.rb
434
+ - spec/type/set_type/test_equality.rb
435
+ - spec/type/set_type/test_include.rb
436
+ - spec/type/set_type/test_initialize.rb
437
+ - spec/type/set_type/test_name.rb
438
+ - spec/type/struct_type/test_default_name.rb
439
+ - spec/type/struct_type/test_dress.rb
440
+ - spec/type/struct_type/test_equality.rb
441
+ - spec/type/struct_type/test_include.rb
442
+ - spec/type/struct_type/test_initialize.rb
443
+ - spec/type/struct_type/test_name.rb
444
+ - spec/type/sub_type/test_default_name.rb
445
+ - spec/type/sub_type/test_dress.rb
446
+ - spec/type/sub_type/test_equality.rb
447
+ - spec/type/sub_type/test_include.rb
448
+ - spec/type/sub_type/test_initialize.rb
449
+ - spec/type/sub_type/test_name.rb
450
+ - spec/type/tuple_type/test_default_name.rb
451
+ - spec/type/tuple_type/test_dress.rb
452
+ - spec/type/tuple_type/test_equality.rb
453
+ - spec/type/tuple_type/test_include.rb
454
+ - spec/type/tuple_type/test_initialize.rb
455
+ - spec/type/tuple_type/test_name.rb
456
+ - spec/type/union_type/test_default_name.rb
457
+ - spec/type/union_type/test_dress.rb
458
+ - spec/type/union_type/test_equality.rb
459
+ - spec/type/union_type/test_include.rb
460
+ - spec/type/union_type/test_initialize.rb
461
+ - spec/type/union_type/test_name.rb
462
+ - spec/type_factory/dsl/test_adt.rb
463
+ - spec/type_factory/dsl/test_any.rb
464
+ - spec/type_factory/dsl/test_attribute.rb
465
+ - spec/type_factory/dsl/test_attributes.rb
466
+ - spec/type_factory/dsl/test_builtin.rb
467
+ - spec/type_factory/dsl/test_multi_relation.rb
468
+ - spec/type_factory/dsl/test_multi_tuple.rb
469
+ - spec/type_factory/dsl/test_relation.rb
470
+ - spec/type_factory/dsl/test_seq.rb
471
+ - spec/type_factory/dsl/test_set.rb
472
+ - spec/type_factory/dsl/test_struct.rb
473
+ - spec/type_factory/dsl/test_subtype.rb
474
+ - spec/type_factory/dsl/test_tuple.rb
475
+ - spec/type_factory/dsl/test_union.rb
476
+ - spec/type_factory/factory/test_builtin.rb
477
+ - spec/type_factory/factory/test_seq_type.rb
478
+ - spec/type_factory/factory/test_set_type.rb
479
+ - spec/type_factory/factory/test_struct_type.rb
480
+ - spec/type_factory/factory/test_sub_type.rb
481
+ - spec/type_factory/factory/test_tuple_type.rb