emfrp 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 59d962a4e429994cc567a8b55d5f2af0e0740315
4
- data.tar.gz: aedf5fea2452340e9eed146c46df4e13499eeeb5
3
+ metadata.gz: 61e335460dfc357d7b07dcffb638789a93033478
4
+ data.tar.gz: a8c3b82e4f36de3062ed97f3535cb6a1c5b32cbc
5
5
  SHA512:
6
- metadata.gz: dccd435654a7e1c861d50b7940e84e9adbe643d2807834b316b28deda96198c356450f6b0233ed8ed696fd8e44861f135d78beb1cb694afb4890f89161e58c45
7
- data.tar.gz: d6e567bea262b2e6989cd5adc549ce017b73e02d2f53ab31dae6306a94ea9c82f632a3787af9614505a489630acd47b046c43ff33ba4af5fb95abe2bdf6a4bed
6
+ metadata.gz: 106c4bdd43fd5fea6f6f8fc800e25ce1f8b50c34bcec336a0a006bb3517d6c55d94152a530e81e03deb66095927622e1523b5235f6e059c9d5567434d3ba08e0
7
+ data.tar.gz: 8791d44c0b27d9097f583b803c39ff7f54abc2334ed3227ed07b17fb79eb1ba6a653d9d770d2f455de9ad0c5c260b51cb02a52ef8cfab1b8ed3106b908308912
@@ -287,7 +287,7 @@ module Emfrp
287
287
 
288
288
  class InputDef
289
289
  def init_func_gen(ct)
290
- ct.define_func(tref(self), init_func_name(ct), []) do |x|
290
+ ct.define_func(ct.tref(self), init_func_name(ct), []) do |x|
291
291
  x << "return #{self[:init_exp].codegen(ct, x)};"
292
292
  end
293
293
  end
@@ -33,9 +33,9 @@ module Emfrp
33
33
  node[:params].each do |n|
34
34
  ch_name = n[:name][:desc]
35
35
  if n[:last]
36
- edge_stmts << "#{ch_name} -> #{name} [style = dashed];"
36
+ edge_stmts << "#{escape_name(ch_name)} -> #{escape_name(name)} [style = dashed];"
37
37
  else
38
- edge_stmts << "#{ch_name} -> #{name};"
38
+ edge_stmts << "#{escape_name(ch_name)} -> #{escape_name(name)};"
39
39
  end
40
40
  ch_node = top[:dict][:node_space][ch_name].get
41
41
  traverse(top, ch_node, node_stmts, edge_stmts, visited)
@@ -43,7 +43,11 @@ module Emfrp
43
43
  when InputDef
44
44
  node_attrs << "shape = \"invhouse\""
45
45
  end
46
- node_stmts << "#{name} [#{node_attrs.join(", ")}];"
46
+ node_stmts << "#{escape_name(name)} [#{node_attrs.join(", ")}];"
47
+ end
48
+
49
+ def escape_name(name)
50
+ CodegenContext.new(nil).escape_name(name)
47
51
  end
48
52
  end
49
53
  end
data/lib/emfrp/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Emfrp
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -0,0 +1,41 @@
1
+ digraph UseSubModule {
2
+ x [label = "x : Int", shape = "invhouse"];
3
+ i1_hash_UseSubModule_cpbegin_a1_comma_b1_cpend_ [label = "i1#UseSubModule(a1,b1) : Int"];
4
+ x_hash_SubModule_cpbegin_a_cpend__hash_UseSubModule_cpbegin_a1_comma_b1_cpend_ [label = "x#SubModule(a)#UseSubModule(a1,b1) : Int"];
5
+ y_hash_SubModule_cpbegin_a_cpend__hash_UseSubModule_cpbegin_a1_comma_b1_cpend_ [label = "y#SubModule(a)#UseSubModule(a1,b1) : Int"];
6
+ a_hash_UseSubModule_cpbegin_a1_comma_b1_cpend_ [label = "a#UseSubModule(a1,b1) : Int"];
7
+ i2_hash_UseSubModule_cpbegin_a1_comma_b1_cpend_ [label = "i2#UseSubModule(a1,b1) : Int"];
8
+ x_hash_UseSubModule_cpbegin_a1_comma_b1_cpend_ [label = "x#UseSubModule(a1,b1) : Int"];
9
+ a1 [label = "a1 : Int", style = filled, fillcolor = "#e4e4e4"];
10
+ y_hash_UseSubModule_cpbegin_a1_comma_b1_cpend_ [label = "y#UseSubModule(a1,b1) : Int"];
11
+ b1 [label = "b1 : Int", style = filled, fillcolor = "#e4e4e4"];
12
+ i1_hash_UseSubModule_cpbegin_a2_comma_b2_cpend_ [label = "i1#UseSubModule(a2,b2) : Int"];
13
+ x_hash_SubModule_cpbegin_a_cpend__hash_UseSubModule_cpbegin_a2_comma_b2_cpend_ [label = "x#SubModule(a)#UseSubModule(a2,b2) : Int"];
14
+ y_hash_SubModule_cpbegin_a_cpend__hash_UseSubModule_cpbegin_a2_comma_b2_cpend_ [label = "y#SubModule(a)#UseSubModule(a2,b2) : Int"];
15
+ a_hash_UseSubModule_cpbegin_a2_comma_b2_cpend_ [label = "a#UseSubModule(a2,b2) : Int"];
16
+ i2_hash_UseSubModule_cpbegin_a2_comma_b2_cpend_ [label = "i2#UseSubModule(a2,b2) : Int"];
17
+ x_hash_UseSubModule_cpbegin_a2_comma_b2_cpend_ [label = "x#UseSubModule(a2,b2) : Int"];
18
+ a2 [label = "a2 : Int", style = filled, fillcolor = "#e4e4e4"];
19
+ y_hash_UseSubModule_cpbegin_a2_comma_b2_cpend_ [label = "y#UseSubModule(a2,b2) : Int"];
20
+ b2 [label = "b2 : Int", style = filled, fillcolor = "#e4e4e4"];
21
+ x_hash_UseSubModule_cpbegin_a1_comma_b1_cpend_ -> a1;
22
+ a_hash_UseSubModule_cpbegin_a1_comma_b1_cpend_ -> x_hash_UseSubModule_cpbegin_a1_comma_b1_cpend_;
23
+ y_hash_SubModule_cpbegin_a_cpend__hash_UseSubModule_cpbegin_a1_comma_b1_cpend_ -> a_hash_UseSubModule_cpbegin_a1_comma_b1_cpend_;
24
+ x_hash_SubModule_cpbegin_a_cpend__hash_UseSubModule_cpbegin_a1_comma_b1_cpend_ -> y_hash_SubModule_cpbegin_a_cpend__hash_UseSubModule_cpbegin_a1_comma_b1_cpend_;
25
+ i1_hash_UseSubModule_cpbegin_a1_comma_b1_cpend_ -> x_hash_SubModule_cpbegin_a_cpend__hash_UseSubModule_cpbegin_a1_comma_b1_cpend_;
26
+ x -> i1_hash_UseSubModule_cpbegin_a1_comma_b1_cpend_;
27
+ i2_hash_UseSubModule_cpbegin_a1_comma_b1_cpend_ -> x_hash_UseSubModule_cpbegin_a1_comma_b1_cpend_;
28
+ y_hash_UseSubModule_cpbegin_a1_comma_b1_cpend_ -> b1;
29
+ y_hash_UseSubModule_cpbegin_a1_comma_b1_cpend_ -> y_hash_UseSubModule_cpbegin_a1_comma_b1_cpend_ [style = dashed];
30
+ i2_hash_UseSubModule_cpbegin_a1_comma_b1_cpend_ -> y_hash_UseSubModule_cpbegin_a1_comma_b1_cpend_;
31
+ x_hash_UseSubModule_cpbegin_a2_comma_b2_cpend_ -> a2;
32
+ a_hash_UseSubModule_cpbegin_a2_comma_b2_cpend_ -> x_hash_UseSubModule_cpbegin_a2_comma_b2_cpend_;
33
+ y_hash_SubModule_cpbegin_a_cpend__hash_UseSubModule_cpbegin_a2_comma_b2_cpend_ -> a_hash_UseSubModule_cpbegin_a2_comma_b2_cpend_;
34
+ x_hash_SubModule_cpbegin_a_cpend__hash_UseSubModule_cpbegin_a2_comma_b2_cpend_ -> y_hash_SubModule_cpbegin_a_cpend__hash_UseSubModule_cpbegin_a2_comma_b2_cpend_;
35
+ i1_hash_UseSubModule_cpbegin_a2_comma_b2_cpend_ -> x_hash_SubModule_cpbegin_a_cpend__hash_UseSubModule_cpbegin_a2_comma_b2_cpend_;
36
+ x -> i1_hash_UseSubModule_cpbegin_a2_comma_b2_cpend_;
37
+ i2_hash_UseSubModule_cpbegin_a2_comma_b2_cpend_ -> x_hash_UseSubModule_cpbegin_a2_comma_b2_cpend_;
38
+ y_hash_UseSubModule_cpbegin_a2_comma_b2_cpend_ -> b2;
39
+ y_hash_UseSubModule_cpbegin_a2_comma_b2_cpend_ -> y_hash_UseSubModule_cpbegin_a2_comma_b2_cpend_ [style = dashed];
40
+ i2_hash_UseSubModule_cpbegin_a2_comma_b2_cpend_ -> y_hash_UseSubModule_cpbegin_a2_comma_b2_cpend_;
41
+ }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: emfrp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kensuke Sawada
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-24 00:00:00.000000000 Z
11
+ date: 2016-01-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize
@@ -160,6 +160,8 @@ files:
160
160
  - tests/compiler/UseSubModule/UseSubModuleMain.c
161
161
  - tests/compiler/UseSubModule/actual_out.txt
162
162
  - tests/compiler/UseSubModule/expected_out.txt
163
+ - tests/compiler/UseSubModule/graph.dot
164
+ - tests/compiler/UseSubModule/graph.png
163
165
  - tests/compiler/UseSubModule/in.txt
164
166
  - tests/core/FromAnnotation.mfrp
165
167
  - tests/core/Last.mfrp