furnace 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/furnace.gemspec +3 -3
- data/lib/furnace/ast.rb +2 -0
- data/lib/furnace/base.rb +5 -0
- data/lib/furnace/cfg.rb +2 -0
- data/lib/furnace/graphviz.rb +22 -22
- data/lib/furnace/version.rb +1 -1
- metadata +6 -5
data/furnace.gemspec
CHANGED
@@ -8,9 +8,9 @@ Gem::Specification.new do |s|
|
|
8
8
|
s.authors = ["Peter Zotov"]
|
9
9
|
s.email = ["whitequark@whitequark.org"]
|
10
10
|
s.homepage = "http://github.com/whitequark/furnace"
|
11
|
-
s.summary = %q{A static
|
12
|
-
s.description = %q{Furnace
|
13
|
-
%q{
|
11
|
+
s.summary = %q{A static code analysis framework}
|
12
|
+
s.description = %q{Furnace is a static code analysis framework for dynamic languages, } <<
|
13
|
+
%q{aimed at efficient type and behavior inference.}
|
14
14
|
|
15
15
|
s.files = `git ls-files`.split("\n")
|
16
16
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
data/lib/furnace/ast.rb
CHANGED
data/lib/furnace/base.rb
ADDED
data/lib/furnace/cfg.rb
CHANGED
data/lib/furnace/graphviz.rb
CHANGED
@@ -1,30 +1,30 @@
|
|
1
|
-
|
2
|
-
class Graphviz
|
3
|
-
def initialize
|
4
|
-
@code = "digraph {\n"
|
5
|
-
@code << "node [labeljust=l,nojustify=true,fontname=monospace];"
|
6
|
-
@code << "rankdir=TB;"
|
1
|
+
require 'furnace/base'
|
7
2
|
|
8
|
-
|
3
|
+
module Furnace::Graphviz
|
4
|
+
def initialize
|
5
|
+
@code = "digraph {\n"
|
6
|
+
@code << "node [labeljust=l,nojustify=true,fontname=monospace];"
|
7
|
+
@code << "rankdir=TB;"
|
9
8
|
|
10
|
-
|
11
|
-
end
|
9
|
+
yield self
|
12
10
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
11
|
+
@code << "}"
|
12
|
+
end
|
13
|
+
|
14
|
+
def node(name, content)
|
15
|
+
content.gsub!("&", "&")
|
16
|
+
content.gsub!(">", ">")
|
17
|
+
content.gsub!("<", "<")
|
18
|
+
content = content.lines.map { |l| %Q{<tr><td align="left">#{l}</td></tr>} }.join
|
18
19
|
|
19
|
-
|
20
|
-
|
20
|
+
@code << %Q{#{name.inspect} [shape=box,label=<<table border="0">#{content}</table>>];\n}
|
21
|
+
end
|
21
22
|
|
22
|
-
|
23
|
-
|
24
|
-
|
23
|
+
def edge(from, to, label="")
|
24
|
+
@code << %Q{#{from.inspect} -> #{to.inspect} [label=#{label.inspect}];\n}
|
25
|
+
end
|
25
26
|
|
26
|
-
|
27
|
-
|
28
|
-
end
|
27
|
+
def to_s
|
28
|
+
@code
|
29
29
|
end
|
30
30
|
end
|
data/lib/furnace/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: furnace
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 148493004
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 3
|
10
|
+
version: 0.0.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Peter Zotov
|
@@ -18,7 +18,7 @@ cert_chain: []
|
|
18
18
|
date: 2012-01-26 00:00:00 Z
|
19
19
|
dependencies: []
|
20
20
|
|
21
|
-
description: Furnace
|
21
|
+
description: Furnace is a static code analysis framework for dynamic languages, aimed at efficient type and behavior inference.
|
22
22
|
email:
|
23
23
|
- whitequark@whitequark.org
|
24
24
|
executables:
|
@@ -48,6 +48,7 @@ files:
|
|
48
48
|
- lib/furnace/ast/node.rb
|
49
49
|
- lib/furnace/ast/symbolic_node.rb
|
50
50
|
- lib/furnace/ast/visitor.rb
|
51
|
+
- lib/furnace/base.rb
|
51
52
|
- lib/furnace/cfg.rb
|
52
53
|
- lib/furnace/cfg/edge.rb
|
53
54
|
- lib/furnace/cfg/graph.rb
|
@@ -95,6 +96,6 @@ rubyforge_project:
|
|
95
96
|
rubygems_version: 1.8.12
|
96
97
|
signing_key:
|
97
98
|
specification_version: 3
|
98
|
-
summary: A static
|
99
|
+
summary: A static code analysis framework
|
99
100
|
test_files: []
|
100
101
|
|