seafoam 0.2 → 0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/workflows.yml +39 -0
- data/.rubocop.yml +4 -1
- data/README.md +107 -27
- data/bin/bgv2isabelle +16 -45
- data/bin/bgv2json +18 -36
- data/bin/cfg2asm +24 -0
- data/bin/seafoam +2 -2
- data/demos/box-unbox-stats +65 -0
- data/docs/bgv.md +16 -7
- data/docs/getting-graphs.md +12 -0
- data/docs/json.md +35 -0
- data/examples/fib-java.bgv.gz +0 -0
- data/examples/fib.js +1 -1
- data/examples/java/JavaExamples.java +1 -1
- data/examples/ruby/clamps.rb +20 -0
- data/examples/ruby/graal.patch +15 -0
- data/examples/ruby/ruby_examples.rb +278 -0
- data/lib/seafoam.rb +5 -1
- data/lib/seafoam/annotators/graal.rb +1 -1
- data/lib/seafoam/bgv/bgv_parser.rb +12 -2
- data/lib/seafoam/cfg/cfg_parser.rb +93 -0
- data/lib/seafoam/cfg/disassembler.rb +70 -0
- data/lib/seafoam/commands.rb +196 -36
- data/lib/seafoam/graal/source.rb +23 -0
- data/lib/seafoam/isabelle_writer.rb +46 -0
- data/lib/seafoam/json_writer.rb +58 -0
- data/lib/seafoam/version.rb +1 -1
- data/seafoam.gemspec +4 -2
- data/spec/seafoam/annotators/graal_spec.rb +7 -7
- data/spec/seafoam/bgv/bgv_parser_spec.rb +27 -14
- data/spec/seafoam/cfg/cfg_parser_spec.rb +21 -0
- data/spec/seafoam/cfg/disassembler_spec.rb +32 -0
- data/spec/seafoam/command_spec.rb +94 -30
- data/spec/seafoam/graphviz_writer_spec.rb +2 -2
- data/spec/seafoam/json_writer_spec.rb +14 -0
- data/spec/seafoam/spec_helpers.rb +5 -1
- data/spec/seafoam/spotlight_spec.rb +1 -1
- data/tools/render-all +2 -2
- metadata +34 -98
- data/.github/workflows/rubocop.yml +0 -10
- data/.github/workflows/specs.yml +0 -19
- data/examples/fib-java.bgv +0 -0
- data/examples/fib-js.bgv +0 -0
- data/examples/fib-ruby.bgv +0 -0
- data/examples/identity.bgv +0 -0
- data/examples/java/exampleArithOperator.bgv +0 -0
- data/examples/java/exampleArithOperator.cfg +0 -925
- data/examples/java/exampleArrayAllocation.bgv +0 -0
- data/examples/java/exampleArrayAllocation.cfg +0 -5268
- data/examples/java/exampleArrayRead.bgv +0 -0
- data/examples/java/exampleArrayRead.cfg +0 -2263
- data/examples/java/exampleArrayWrite.bgv +0 -0
- data/examples/java/exampleArrayWrite.cfg +0 -2315
- data/examples/java/exampleCatch.bgv +0 -0
- data/examples/java/exampleCatch.cfg +0 -4150
- data/examples/java/exampleCompareOperator.bgv +0 -0
- data/examples/java/exampleCompareOperator.cfg +0 -1109
- data/examples/java/exampleDoubleSynchronized.bgv +0 -0
- data/examples/java/exampleDoubleSynchronized.cfg +0 -26497
- data/examples/java/exampleExactArith.bgv +0 -0
- data/examples/java/exampleExactArith.cfg +0 -1888
- data/examples/java/exampleFieldRead.bgv +0 -0
- data/examples/java/exampleFieldRead.cfg +0 -1228
- data/examples/java/exampleFieldWrite.bgv +0 -0
- data/examples/java/exampleFieldWrite.cfg +0 -1102
- data/examples/java/exampleFor.bgv +0 -0
- data/examples/java/exampleFor.cfg +0 -3936
- data/examples/java/exampleFullEscape.bgv +0 -0
- data/examples/java/exampleFullEscape.cfg +0 -5893
- data/examples/java/exampleIf.bgv +0 -0
- data/examples/java/exampleIf.cfg +0 -2462
- data/examples/java/exampleIfNeverTaken.bgv +0 -0
- data/examples/java/exampleIfNeverTaken.cfg +0 -2476
- data/examples/java/exampleInstanceOfManyImpls.bgv +0 -0
- data/examples/java/exampleInstanceOfManyImpls.cfg +0 -6391
- data/examples/java/exampleInstanceOfOneImpl.bgv +0 -0
- data/examples/java/exampleInstanceOfOneImpl.cfg +0 -2604
- data/examples/java/exampleIntSwitch.bgv +0 -0
- data/examples/java/exampleIntSwitch.cfg +0 -3121
- data/examples/java/exampleInterfaceCallManyImpls.bgv +0 -0
- data/examples/java/exampleInterfaceCallManyImpls.cfg +0 -1358
- data/examples/java/exampleInterfaceCallOneImpl.bgv +0 -0
- data/examples/java/exampleInterfaceCallOneImpl.cfg +0 -3859
- data/examples/java/exampleLocalInstanceOf.bgv +0 -0
- data/examples/java/exampleLocalInstanceOf.cfg +0 -5276
- data/examples/java/exampleLocalSynchronized.bgv +0 -0
- data/examples/java/exampleLocalSynchronized.cfg +0 -1364
- data/examples/java/exampleLocalVariables.bgv +0 -0
- data/examples/java/exampleLocalVariables.cfg +0 -1195
- data/examples/java/exampleLocalVariablesState.bgv +0 -0
- data/examples/java/exampleLocalVariablesState.cfg +0 -1673
- data/examples/java/exampleNestedWhile.bgv +0 -0
- data/examples/java/exampleNestedWhile.cfg +0 -15499
- data/examples/java/exampleNestedWhileBreak.bgv +0 -0
- data/examples/java/exampleNestedWhileBreak.cfg +0 -11162
- data/examples/java/exampleNoEscape.bgv +0 -0
- data/examples/java/exampleNoEscape.cfg +0 -974
- data/examples/java/exampleObjectAllocation.bgv +0 -0
- data/examples/java/exampleObjectAllocation.cfg +0 -5287
- data/examples/java/examplePartialEscape.bgv +0 -0
- data/examples/java/examplePartialEscape.cfg +0 -7042
- data/examples/java/examplePhi.bgv +0 -0
- data/examples/java/examplePhi.cfg +0 -3227
- data/examples/java/exampleReducible.bgv +0 -0
- data/examples/java/exampleReducible.cfg +0 -5578
- data/examples/java/exampleSimpleCall.bgv +0 -0
- data/examples/java/exampleSimpleCall.cfg +0 -1435
- data/examples/java/exampleStamp.bgv +0 -0
- data/examples/java/exampleStamp.cfg +0 -913
- data/examples/java/exampleStaticCall.bgv +0 -0
- data/examples/java/exampleStaticCall.cfg +0 -1154
- data/examples/java/exampleStringSwitch.bgv +0 -0
- data/examples/java/exampleStringSwitch.cfg +0 -15377
- data/examples/java/exampleSynchronized.bgv +0 -0
- data/examples/java/exampleSynchronized.cfg +0 -26027
- data/examples/java/exampleThrow.bgv +0 -0
- data/examples/java/exampleThrow.cfg +0 -780
- data/examples/java/exampleThrowCatch.bgv +0 -0
- data/examples/java/exampleThrowCatch.cfg +0 -744
- data/examples/java/exampleUnsafeRead.bgv +0 -0
- data/examples/java/exampleUnsafeRead.cfg +0 -912
- data/examples/java/exampleUnsafeWrite.bgv +0 -0
- data/examples/java/exampleUnsafeWrite.cfg +0 -962
- data/examples/java/exampleWhile.bgv +0 -0
- data/examples/java/exampleWhile.cfg +0 -3936
- data/examples/java/exampleWhileBreak.bgv +0 -0
- data/examples/java/exampleWhileBreak.cfg +0 -5963
- data/examples/matmult-java.bgv +0 -0
- data/examples/matmult-ruby.bgv +0 -0
- data/examples/overflow.bgv +0 -0
- data/lib/seafoam/binary/binary_reader.rb +0 -21
- data/spec/seafoam/bgv/fixtures/not.bgv +0 -1
- data/spec/seafoam/bgv/fixtures/unsupported.bgv +0 -1
data/examples/matmult-java.bgv
DELETED
Binary file
|
data/examples/matmult-ruby.bgv
DELETED
Binary file
|
data/examples/overflow.bgv
DELETED
Binary file
|
@@ -1,21 +0,0 @@
|
|
1
|
-
require 'stringio'
|
2
|
-
|
3
|
-
module Seafoam
|
4
|
-
module Binary
|
5
|
-
# Factory for binary readers based on the input.
|
6
|
-
module BinaryReader
|
7
|
-
def self.for(source)
|
8
|
-
case source
|
9
|
-
when File
|
10
|
-
IOBinaryReader.new(StringIO.new(File.read(source)))
|
11
|
-
when IO
|
12
|
-
IOBinaryReader.new(source)
|
13
|
-
when String
|
14
|
-
IOBinaryReader.new(StringIO.new(source))
|
15
|
-
else
|
16
|
-
raise source.class
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
@@ -1 +0,0 @@
|
|
1
|
-
foobarbaz
|
@@ -1 +0,0 @@
|
|
1
|
-
BIGV
|