seafoam 0.8 → 0.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/bin/bgv2isabelle +1 -5
  3. data/bin/bgv2json +1 -5
  4. data/bin/seafoam +1 -5
  5. data/lib/seafoam/bgv/bgv_parser.rb +1 -2
  6. data/lib/seafoam/commands.rb +135 -101
  7. data/lib/seafoam/formatters/base.rb +88 -0
  8. data/lib/seafoam/formatters/formatters.rb +8 -0
  9. data/lib/seafoam/formatters/json.rb +82 -0
  10. data/lib/seafoam/formatters/text.rb +70 -0
  11. data/lib/seafoam/graal/graph_description.rb +22 -0
  12. data/lib/seafoam/graal/pi.rb +18 -0
  13. data/lib/seafoam/graal/source.rb +5 -9
  14. data/lib/seafoam/graph.rb +9 -1
  15. data/lib/seafoam/graphviz_writer.rb +3 -0
  16. data/lib/seafoam/json_writer.rb +1 -3
  17. data/lib/seafoam/{annotators → passes}/fallback.rb +4 -4
  18. data/lib/seafoam/{annotators → passes}/graal.rb +43 -15
  19. data/lib/seafoam/passes/truffle.rb +58 -0
  20. data/lib/seafoam/passes.rb +61 -0
  21. data/lib/seafoam/version.rb +1 -1
  22. data/lib/seafoam.rb +7 -6
  23. metadata +17 -81
  24. data/.github/probots.yml +0 -2
  25. data/.github/workflows/workflows.yml +0 -40
  26. data/.gitignore +0 -6
  27. data/.rubocop.yml +0 -37
  28. data/.ruby-version +0 -1
  29. data/.seafoam/config +0 -1
  30. data/CODE_OF_CONDUCT.md +0 -128
  31. data/CONTRIBUTING.md +0 -5
  32. data/Gemfile +0 -2
  33. data/Gemfile.lock +0 -59
  34. data/LICENSE.md +0 -7
  35. data/README.md +0 -378
  36. data/bin/cfg2asm +0 -24
  37. data/demos/box-unbox-stats +0 -65
  38. data/docs/annotators.md +0 -43
  39. data/docs/bgv.md +0 -294
  40. data/docs/getting-graphs.md +0 -63
  41. data/docs/images/igv.png +0 -0
  42. data/docs/images/seafoam.png +0 -0
  43. data/docs/images/spotlight-igv.png +0 -0
  44. data/docs/images/spotlight-seafoam.png +0 -0
  45. data/docs/json.md +0 -35
  46. data/examples/Fib.java +0 -24
  47. data/examples/MatMult.java +0 -39
  48. data/examples/fib-java.bgv.gz +0 -0
  49. data/examples/fib.js +0 -15
  50. data/examples/fib.rb +0 -15
  51. data/examples/identity.rb +0 -13
  52. data/examples/java/Irreducible.class +0 -0
  53. data/examples/java/Irreducible.j +0 -35
  54. data/examples/java/IrreducibleDecompiled.java +0 -21
  55. data/examples/java/JavaExamples.java +0 -418
  56. data/examples/matmult.rb +0 -29
  57. data/examples/overflow.rb +0 -13
  58. data/examples/ruby/clamps.rb +0 -20
  59. data/examples/ruby/graal.patch +0 -15
  60. data/examples/ruby/ruby_examples.rb +0 -278
  61. data/lib/seafoam/annotators.rb +0 -54
  62. data/lib/seafoam/cfg/cfg_parser.rb +0 -93
  63. data/lib/seafoam/cfg/disassembler.rb +0 -70
  64. data/lib/seafoam/config.rb +0 -34
  65. data/seafoam.gemspec +0 -22
  66. data/spec/seafoam/annotators/fallback_spec.rb +0 -69
  67. data/spec/seafoam/annotators/graal_spec.rb +0 -96
  68. data/spec/seafoam/annotators_spec.rb +0 -61
  69. data/spec/seafoam/bgv/bgv_parser_spec.rb +0 -167
  70. data/spec/seafoam/binary/io_binary_reader_spec.rb +0 -176
  71. data/spec/seafoam/cfg/cfg_parser_spec.rb +0 -21
  72. data/spec/seafoam/cfg/disassembler_spec.rb +0 -32
  73. data/spec/seafoam/command_spec.rb +0 -314
  74. data/spec/seafoam/graph_spec.rb +0 -172
  75. data/spec/seafoam/graphviz_writer_spec.rb +0 -63
  76. data/spec/seafoam/json_writer_spec.rb +0 -14
  77. data/spec/seafoam/spec_helpers.rb +0 -34
  78. data/spec/seafoam/spotlight_spec.rb +0 -38
  79. data/tools/render-all +0 -36
@@ -0,0 +1,70 @@
1
+ module Seafoam
2
+ module Formatters
3
+ module Text
4
+ # A plain-text formatter for the `describe` command.
5
+ class DescribeFormatter < Seafoam::Formatters::Base::DescribeFormatter
6
+ def format
7
+ notes = Seafoam::Graal::GraphDescription::ATTRIBUTES.select { |attr| description.send(attr) }
8
+
9
+ ["#{graph.nodes.size} nodes", *notes].join(', ')
10
+ end
11
+ end
12
+
13
+ # A plain-text formatter for the `edges` command.
14
+ class EdgesFormatter < Seafoam::Formatters::Base::EdgesFormatter
15
+ def render_edges_entry(edges)
16
+ edges.map do |edge|
17
+ "#{edge.from.id_and_label} ->(#{edge.props[:label]}) #{edge.to.id_and_label}"
18
+ end.join("\n")
19
+ end
20
+
21
+ def render_node_entry(node)
22
+ ret = ['Input:']
23
+ ret += node.inputs.map do |input|
24
+ " #{node.id_and_label} <-(#{input.props[:label]}) #{input.from.id_and_label}"
25
+ end
26
+
27
+ ret << 'Output:'
28
+ ret += node.outputs.map do |output|
29
+ " #{node.id_and_label} ->(#{output.props[:label]}) #{output.to.id_and_label}"
30
+ end
31
+
32
+ ret.join("\n")
33
+ end
34
+
35
+ def render_summary_entry(node_count, edge_count)
36
+ "#{node_count} nodes, #{edge_count} edges"
37
+ end
38
+ end
39
+
40
+ # A plain-text formatter for the `info` command.
41
+ class InfoFormatter < Seafoam::Formatters::Base::InfoFormatter
42
+ def format
43
+ "BGV #{major_version}.#{minor_version}"
44
+ end
45
+ end
46
+
47
+ # A plain-text formatter for the `list` command.
48
+ class ListFormatter < Seafoam::Formatters::Base::ListFormatter
49
+ def format
50
+ entries.map do |entry|
51
+ "#{entry.file}:#{entry.index} #{entry.graph_name_components.join('/')}"
52
+ end.join("\n")
53
+ end
54
+ end
55
+
56
+ # A plain-text formatter for the `source` command.
57
+ class SourceFormatter < Seafoam::Formatters::Base::SourceFormatter
58
+ def format
59
+ Seafoam::Graal::Source.walk(source_position, &method(:render_method)).join("\n")
60
+ end
61
+
62
+ def render_method(method)
63
+ declaring_class = method[:declaring_class]
64
+ name = method[:method_name]
65
+ "#{declaring_class}##{name}"
66
+ end
67
+ end
68
+ end
69
+ end
70
+ end
@@ -0,0 +1,22 @@
1
+ module Seafoam
2
+ module Graal
3
+ # Provides a high level description of a Graal graph's features.
4
+ class GraphDescription
5
+ ATTRIBUTES = %i[branches calls deopts linear loops]
6
+
7
+ ATTRIBUTES.each { |attr| attr_accessor(attr) }
8
+
9
+ def initialize
10
+ @branches = false
11
+ @calls = false
12
+ @deopts = false
13
+ @linear = false
14
+ @loops = false
15
+ end
16
+
17
+ def linear
18
+ !branches && !loops
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,18 @@
1
+ module Seafoam
2
+ module Graal
3
+ # Routines for understanding pi nodes in Graal.
4
+ module Pi
5
+ # Find the actual value behind potentially a chain of pi nodes.
6
+ def self.follow_pi_object(node)
7
+ node = node.edges.find { |edge| edge.props[:name] == 'object' }.from while PI_NODES.include?(node.props.dig(:node_class, :node_class))
8
+ node
9
+ end
10
+
11
+ # Pi nodes add type information.
12
+ PI_NODES = [
13
+ 'org.graalvm.compiler.nodes.PiNode',
14
+ 'org.graalvm.compiler.nodes.PiArrayNode'
15
+ ]
16
+ end
17
+ end
18
+ end
@@ -2,21 +2,17 @@ module Seafoam
2
2
  module Graal
3
3
  # Routines for understanding source positions in Graal.
4
4
  module Source
5
- def self.render(source_position)
6
- lines = []
5
+ def self.walk(source_position, &block)
6
+ results = []
7
+
7
8
  caller = source_position
8
9
  while caller
9
10
  method = caller[:method]
10
- lines.push render_method(method)
11
+ results.push block.call(method)
11
12
  caller = caller[:caller]
12
13
  end
13
- lines.join("\n")
14
- end
15
14
 
16
- def self.render_method(method)
17
- declaring_class = method[:declaring_class]
18
- name = method[:method_name]
19
- "#{declaring_class}##{name}"
15
+ results
20
16
  end
21
17
  end
22
18
  end
data/lib/seafoam/graph.rb CHANGED
@@ -2,13 +2,14 @@ module Seafoam
2
2
  # A graph, with properties, nodes, and edges. We don't encapsulate the graph
3
3
  # too much - be careful.
4
4
  class Graph
5
- attr_reader :props, :nodes, :edges, :blocks
5
+ attr_reader :props, :nodes, :edges, :blocks, :new_id
6
6
 
7
7
  def initialize(props = nil)
8
8
  @props = props || {}
9
9
  @nodes = {}
10
10
  @edges = []
11
11
  @blocks = []
12
+ @new_id = 0
12
13
  end
13
14
 
14
15
  # Create a node.
@@ -16,6 +17,7 @@ module Seafoam
16
17
  props ||= {}
17
18
  node = Node.new(id, props)
18
19
  @nodes[id] = node
20
+ @new_id = id + 1
19
21
  node
20
22
  end
21
23
 
@@ -36,6 +38,12 @@ module Seafoam
36
38
  @blocks.push block
37
39
  block
38
40
  end
41
+
42
+ def remove_edge(edge)
43
+ edge.from.outputs.delete edge
44
+ edge.to.inputs.delete edge
45
+ edges.delete edge
46
+ end
39
47
  end
40
48
 
41
49
  # A node, with properties, input edges, and output edges.
@@ -100,6 +100,9 @@ module Seafoam
100
100
  # from a shaded node.
101
101
  next if edge.to.props[:hidden] && edge.from.props[:spotlight] != 'shaded'
102
102
 
103
+ # Skip the edge if it's hidden itself
104
+ next if edge.props[:hidden]
105
+
103
106
  write_edge inline_attrs, edge
104
107
  end
105
108
  end
@@ -36,9 +36,7 @@ module Seafoam
36
36
  @out.puts JSON.pretty_generate(prepare_json(object))
37
37
  end
38
38
 
39
- private
40
-
41
- def prepare_json(object)
39
+ def self.prepare_json(object)
42
40
  case object
43
41
  when Float
44
42
  if object.nan?
@@ -1,15 +1,15 @@
1
1
  module Seafoam
2
- module Annotators
3
- # The fallback annotator always applies, and adds some basic annotations.
2
+ module Passes
3
+ # The fallback pass always applies, and adds some basic properties.
4
4
  # Works for example with Truffle AST and call graphs, but also means anyone
5
5
  # can emit a graph with 'label' properties and we can do something useful
6
6
  # with it.
7
- class FallbackAnnotator < Annotator
7
+ class FallbackPass < Pass
8
8
  def self.applies?(_graph)
9
9
  true
10
10
  end
11
11
 
12
- def annotate(graph)
12
+ def apply(graph)
13
13
  graph.nodes.each_value do |node|
14
14
  if node.props[:label].nil? && node.props['label']
15
15
  node.props[:label] = node.props['label']
@@ -1,18 +1,19 @@
1
1
  module Seafoam
2
- module Annotators
3
- # The Graal annotator applies if it looks like it was compiled by Graal or
2
+ module Passes
3
+ # The Graal pass applies if it looks like it was compiled by Graal or
4
4
  # Truffle.
5
- class GraalAnnotator < Annotator
5
+ class GraalPass < Pass
6
6
  def self.applies?(graph)
7
7
  graph.props.values.any? do |v|
8
8
  TRIGGERS.any? { |t| v.to_s.include?(t) }
9
9
  end
10
10
  end
11
11
 
12
- def annotate(graph)
13
- annotate_nodes graph
14
- annotate_edges graph
12
+ def apply(graph)
13
+ apply_nodes graph
14
+ apply_edges graph
15
15
  hide_frame_state graph if @options[:hide_frame_state]
16
+ hide_pi graph if @options[:hide_pi]
16
17
  hide_floating graph if @options[:hide_floating]
17
18
  reduce_edges graph if @options[:reduce_edges]
18
19
  hide_unused_nodes graph
@@ -21,8 +22,10 @@ module Seafoam
21
22
  private
22
23
 
23
24
  # Annotate nodes with their label and kind
24
- def annotate_nodes(graph)
25
+ def apply_nodes(graph)
25
26
  graph.nodes.each_value do |node|
27
+ next if node.props[:label]
28
+
26
29
  # The Java class of the node.
27
30
  node_class = node.props.dig(:node_class, :node_class)
28
31
 
@@ -93,6 +96,11 @@ module Seafoam
93
96
  name_template = 'π'
94
97
  end
95
98
 
99
+ # Use a symbol for PiArrayNode.
100
+ if node_class == 'org.graalvm.compiler.nodes.PiArrayNode'
101
+ name_template = '[π]'
102
+ end
103
+
96
104
  # Use a symbol for PhiNode.
97
105
  if node_class == 'org.graalvm.compiler.nodes.ValuePhiNode'
98
106
  name_template = 'ϕ'
@@ -208,7 +216,7 @@ module Seafoam
208
216
  end
209
217
 
210
218
  # Annotate edges with their label and kind.
211
- def annotate_edges(graph)
219
+ def apply_edges(graph)
212
220
  graph.edges.each do |edge|
213
221
  if edge.to.props.dig(:node_class, :node_class) == 'org.graalvm.compiler.nodes.ValuePhiNode' && edge.props[:name] == 'values'
214
222
  merge_node = edge.to.edges.find { |e| e.props[:name] == 'merge' }.from
@@ -254,8 +262,6 @@ module Seafoam
254
262
  # loopBegin edges point from LoopEndNode (continue) and LoopExitNode
255
263
  # (break) to the LoopBeginNode. Both are drawn reversed.
256
264
  when 'loopBegin'
257
- edge.props[:hidden] = true
258
-
259
265
  case edge.to.props.dig(:node_class, :node_class)
260
266
  when 'org.graalvm.compiler.nodes.LoopEndNode'
261
267
  # If it's from the LoopEnd then it's the control edge to follow.
@@ -311,6 +317,24 @@ module Seafoam
311
317
  end
312
318
  end
313
319
 
320
+ # Hide pi nodes - they add information for optimisation, but not generally
321
+ # useful day-to-day for understanding the graph. Connect the user to the
322
+ # actual object, which may be several steps away.
323
+ def hide_pi(graph)
324
+ loop do
325
+ umodified = true
326
+ graph.edges.each do |edge|
327
+ next unless Graal::Pi::PI_NODES.include?(edge.from.props.dig(:node_class, :node_class))
328
+
329
+ object = Graal::Pi.follow_pi_object(edge.from)
330
+ graph.create_edge object, edge.to, edge.props.merge({ synthetic: true })
331
+ graph.remove_edge edge
332
+ umodified = false
333
+ end
334
+ break if umodified
335
+ end
336
+ end
337
+
314
338
  # Hide floating nodes. This highlights just the control flow backbone.
315
339
  def hide_floating(graph)
316
340
  graph.nodes.each_value do |node|
@@ -332,15 +356,19 @@ module Seafoam
332
356
  end
333
357
  end
334
358
 
335
- # Hide nodes that have no non-hidden users and no control flow in. These
336
- # would display as a node floating unconnected to the rest of the graph
337
- # otherwise. An exception is made for node with an anchor edge coming in,
338
- # as some guards are anchored like this.
359
+ # Hide nodes that have no non-hidden users or edges and no control flow
360
+ # in. These would display as a node floating unconnected to the rest of
361
+ # the graph otherwise. An exception is made for node with an anchor edge
362
+ # coming in, as some guards are anchored like this.
339
363
  def hide_unused_nodes(graph)
340
364
  loop do
341
365
  modified = false
342
366
  graph.nodes.each_value do |node|
343
- next unless node.outputs.all? { |edge| edge.to.props[:hidden] } &&
367
+ # Call trees are like Graal graphs but don't have these edges -
368
+ # don't hide them.
369
+ next if node.props['truffleCallees']
370
+
371
+ next unless node.outputs.all? { |edge| edge.to.props[:hidden] || edge.props[:hidden] } &&
344
372
  node.inputs.none? { |edge| edge.props[:kind] == 'control' } &&
345
373
  node.inputs.none? { |edge| edge.props[:name] == 'anchor' }
346
374
 
@@ -0,0 +1,58 @@
1
+ module Seafoam
2
+ module Passes
3
+ # The Truffle pass applies if it looks like it was compiled by Truffle.
4
+ class TrufflePass < Pass
5
+ def self.applies?(graph)
6
+ graph.props.values.any? do |v|
7
+ TRIGGERS.any? { |t| v.to_s.include?(t) }
8
+ end
9
+ end
10
+
11
+ def apply(graph)
12
+ simplify_truffle_args graph if @options[:simplify_truffle_args]
13
+ end
14
+
15
+ private
16
+
17
+ # Simplify a Truffle argument load into a single, inlined, node very much
18
+ # like a Graal parameter node.
19
+ def simplify_truffle_args(graph)
20
+ graph.nodes.dup.each_value do |node|
21
+ next unless node.props.dig(:node_class, :node_class) == 'org.graalvm.compiler.nodes.java.LoadIndexedNode'
22
+
23
+ index_node = node.inputs.find { |edge| edge.props[:name] == 'index' }.from
24
+ array_node = Graal::Pi.follow_pi_object(node.inputs.find { |edge| edge.props[:name] == 'array' }.from)
25
+
26
+ next unless index_node.props.dig(:node_class, :node_class) == 'org.graalvm.compiler.nodes.ConstantNode'
27
+ next unless array_node.props.dig(:node_class, :node_class) == 'org.graalvm.compiler.nodes.ParameterNode'
28
+
29
+ node.props[:truffle_arg_load] = true
30
+
31
+ index = index_node.props['rawvalue']
32
+
33
+ arg_node = graph.create_node(graph.new_id, { synthetic: true, inlined: true, label: "T(#{index})", kind: 'input' })
34
+
35
+ node.outputs.each do |output|
36
+ next if output.props[:name] == 'next'
37
+
38
+ graph.create_edge arg_node, output.to, output.props.dup
39
+ graph.remove_edge output
40
+ end
41
+ end
42
+
43
+ graph.nodes.each_value.select { |node| node.props[:truffle_arg_load] }.each do |node|
44
+ control_in = node.inputs.find { |edge| edge.props[:name] == 'next' }
45
+ control_out = node.outputs.find { |edge| edge.props[:name] == 'next' }
46
+ graph.create_edge control_in.from, control_out.to, { name: 'next' }
47
+ graph.remove_edge control_in
48
+ graph.remove_edge control_out
49
+ end
50
+ end
51
+
52
+ # If we see these in the graph properties it's probably a Truffle graph.
53
+ TRIGGERS = %w[
54
+ TruffleCompiler
55
+ ]
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,61 @@
1
+ module Seafoam
2
+ # Passes are routines to read the graph and apply properties which tools,
3
+ # such as the render command, can use to show more understandable output.
4
+ module Passes
5
+ # Apply all applicable passes to a graph.
6
+ def self.apply(graph, options = {})
7
+ passes.each do |pass|
8
+ next unless pass.applies?(graph)
9
+
10
+ # Record for information that the pass was applied this graph.
11
+ passes_applied = graph.props[:passes_applied] ||= []
12
+ passes_applied.push pass
13
+
14
+ # Run the pass.
15
+ instance = pass.new(options)
16
+ instance.apply graph
17
+ end
18
+ end
19
+
20
+ # Get a list of all passes in the system.
21
+ def self.passes
22
+ # We have a defined order for passes to run - these passes at the start.
23
+ pre_passes = [
24
+ TrufflePass,
25
+ GraalPass
26
+ ]
27
+
28
+ # The fallback pass runs last.
29
+ post_passes = [
30
+ FallbackPass
31
+ ]
32
+
33
+ # Any extra passes in the middle.
34
+ extra_passes = Pass::SUBCLASSES.dup - pre_passes - post_passes
35
+
36
+ pre_passes + extra_passes + post_passes
37
+ end
38
+ end
39
+
40
+ # The base class for all passes. You must subclass this to be recognized
41
+ # as an pass.
42
+ class Pass
43
+ SUBCLASSES = []
44
+
45
+ def initialize(options = {})
46
+ @options = options
47
+ end
48
+
49
+ def applies?(_graph)
50
+ raise NotImplementedError
51
+ end
52
+
53
+ def apply(_graph)
54
+ raise NotImplementedError
55
+ end
56
+
57
+ def self.inherited(pass)
58
+ SUBCLASSES.push pass
59
+ end
60
+ end
61
+ end
@@ -1,5 +1,5 @@
1
1
  module Seafoam
2
2
  MAJOR_VERSION = 0
3
- MINOR_VERSION = 8
3
+ MINOR_VERSION = 12
4
4
  VERSION = "#{MAJOR_VERSION}.#{MINOR_VERSION}"
5
5
  end
data/lib/seafoam.rb CHANGED
@@ -1,17 +1,18 @@
1
1
  require 'seafoam/version'
2
2
  require 'seafoam/binary/io_binary_reader'
3
3
  require 'seafoam/bgv/bgv_parser'
4
- require 'seafoam/cfg/cfg_parser'
5
- require 'seafoam/cfg/disassembler'
6
4
  require 'seafoam/colors'
7
5
  require 'seafoam/graph'
6
+ require 'seafoam/graal/graph_description'
8
7
  require 'seafoam/graal/source'
9
- require 'seafoam/annotators'
10
- require 'seafoam/annotators/graal'
11
- require 'seafoam/annotators/fallback'
8
+ require 'seafoam/graal/pi'
9
+ require 'seafoam/passes'
10
+ require 'seafoam/passes/truffle'
11
+ require 'seafoam/passes/graal'
12
+ require 'seafoam/passes/fallback'
12
13
  require 'seafoam/spotlight'
13
14
  require 'seafoam/isabelle_writer'
14
15
  require 'seafoam/json_writer'
15
16
  require 'seafoam/graphviz_writer'
16
- require 'seafoam/config'
17
17
  require 'seafoam/commands'
18
+ require 'seafoam/formatters/formatters'
metadata CHANGED
@@ -1,43 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: seafoam
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.8'
4
+ version: '0.12'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Seaton
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-05 00:00:00.000000000 Z
11
+ date: 2022-02-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: crabstone
14
+ name: rake
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '4.0'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '4.0'
27
- - !ruby/object:Gem::Dependency
28
- name: benchmark-ips
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '2.7'
19
+ version: 13.0.6
34
20
  type: :development
35
21
  prerelease: false
36
22
  version_requirements: !ruby/object:Gem::Requirement
37
23
  requirements:
38
24
  - - "~>"
39
25
  - !ruby/object:Gem::Version
40
- version: '2.7'
26
+ version: 13.0.6
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: rspec
43
29
  requirement: !ruby/object:Gem::Requirement
@@ -72,83 +58,34 @@ executables:
72
58
  - seafoam
73
59
  - bgv2json
74
60
  - bgv2isabelle
75
- - cfg2asm
76
61
  extensions: []
77
62
  extra_rdoc_files: []
78
63
  files:
79
- - ".github/probots.yml"
80
- - ".github/workflows/workflows.yml"
81
- - ".gitignore"
82
- - ".rubocop.yml"
83
- - ".ruby-version"
84
- - ".seafoam/config"
85
- - CODE_OF_CONDUCT.md
86
- - CONTRIBUTING.md
87
- - Gemfile
88
- - Gemfile.lock
89
- - LICENSE.md
90
- - README.md
91
64
  - bin/bgv2isabelle
92
65
  - bin/bgv2json
93
- - bin/cfg2asm
94
66
  - bin/seafoam
95
- - demos/box-unbox-stats
96
- - docs/annotators.md
97
- - docs/bgv.md
98
- - docs/getting-graphs.md
99
- - docs/images/igv.png
100
- - docs/images/seafoam.png
101
- - docs/images/spotlight-igv.png
102
- - docs/images/spotlight-seafoam.png
103
- - docs/json.md
104
- - examples/Fib.java
105
- - examples/MatMult.java
106
- - examples/fib-java.bgv.gz
107
- - examples/fib.js
108
- - examples/fib.rb
109
- - examples/identity.rb
110
- - examples/java/Irreducible.class
111
- - examples/java/Irreducible.j
112
- - examples/java/IrreducibleDecompiled.java
113
- - examples/java/JavaExamples.java
114
- - examples/matmult.rb
115
- - examples/overflow.rb
116
- - examples/ruby/clamps.rb
117
- - examples/ruby/graal.patch
118
- - examples/ruby/ruby_examples.rb
119
67
  - lib/seafoam.rb
120
- - lib/seafoam/annotators.rb
121
- - lib/seafoam/annotators/fallback.rb
122
- - lib/seafoam/annotators/graal.rb
123
68
  - lib/seafoam/bgv/bgv_parser.rb
124
69
  - lib/seafoam/binary/io_binary_reader.rb
125
- - lib/seafoam/cfg/cfg_parser.rb
126
- - lib/seafoam/cfg/disassembler.rb
127
70
  - lib/seafoam/colors.rb
128
71
  - lib/seafoam/commands.rb
129
- - lib/seafoam/config.rb
72
+ - lib/seafoam/formatters/base.rb
73
+ - lib/seafoam/formatters/formatters.rb
74
+ - lib/seafoam/formatters/json.rb
75
+ - lib/seafoam/formatters/text.rb
76
+ - lib/seafoam/graal/graph_description.rb
77
+ - lib/seafoam/graal/pi.rb
130
78
  - lib/seafoam/graal/source.rb
131
79
  - lib/seafoam/graph.rb
132
80
  - lib/seafoam/graphviz_writer.rb
133
81
  - lib/seafoam/isabelle_writer.rb
134
82
  - lib/seafoam/json_writer.rb
83
+ - lib/seafoam/passes.rb
84
+ - lib/seafoam/passes/fallback.rb
85
+ - lib/seafoam/passes/graal.rb
86
+ - lib/seafoam/passes/truffle.rb
135
87
  - lib/seafoam/spotlight.rb
136
88
  - lib/seafoam/version.rb
137
- - seafoam.gemspec
138
- - spec/seafoam/annotators/fallback_spec.rb
139
- - spec/seafoam/annotators/graal_spec.rb
140
- - spec/seafoam/annotators_spec.rb
141
- - spec/seafoam/bgv/bgv_parser_spec.rb
142
- - spec/seafoam/binary/io_binary_reader_spec.rb
143
- - spec/seafoam/cfg/cfg_parser_spec.rb
144
- - spec/seafoam/cfg/disassembler_spec.rb
145
- - spec/seafoam/command_spec.rb
146
- - spec/seafoam/graph_spec.rb
147
- - spec/seafoam/graphviz_writer_spec.rb
148
- - spec/seafoam/json_writer_spec.rb
149
- - spec/seafoam/spec_helpers.rb
150
- - spec/seafoam/spotlight_spec.rb
151
- - tools/render-all
152
89
  homepage: https://github.com/Shopify/seafoam
153
90
  licenses:
154
91
  - MIT
@@ -161,15 +98,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
161
98
  requirements:
162
99
  - - ">="
163
100
  - !ruby/object:Gem::Version
164
- version: 2.5.8
101
+ version: 2.5.9
165
102
  required_rubygems_version: !ruby/object:Gem::Requirement
166
103
  requirements:
167
104
  - - ">="
168
105
  - !ruby/object:Gem::Version
169
106
  version: '0'
170
107
  requirements: []
171
- rubyforge_project:
172
- rubygems_version: 2.7.6.3
108
+ rubygems_version: 3.3.3
173
109
  signing_key:
174
110
  specification_version: 4
175
111
  summary: A tool for working with compiler graphs
data/.github/probots.yml DELETED
@@ -1,2 +0,0 @@
1
- enabled:
2
- - cla