Skip to content

Commit

Permalink
Check facts (#31)
Browse files Browse the repository at this point in the history
* attempted fix to cle, missing parens
* adding atoms back

Signed-off-by: vsoch <vsoch@users.noreply.github.com>
Co-authored-by: vsoch <vsoch@users.noreply.github.com>
  • Loading branch information
vsoch and vsoch committed Jul 22, 2022
1 parent 74db0d9 commit 00c816e
Show file tree
Hide file tree
Showing 15 changed files with 247 additions and 64 deletions.
2 changes: 1 addition & 1 deletion array/atoms.asp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
abi_typelocation("lib.so","main","Export","Integer32","%rax").
abi_typelocation("lib.so","_Z3fooi3Foo","Import","Integer32","%rdi").
abi_typelocation("lib.so","_Z3fooi3Foo","Export","Integer32","%rsi").
abi_typelocation("lib.so","_Z3fooi3Foo","Import","Array[8]","%rdx").
abi_typelocation("lib.so","_Z3fooi3Foo","Import","Array[8:8]","%rdx").
abi_typelocation("lib.so","_Z3fooi3Foo","Import","Integer8","%rdx").
abi_typelocation("lib.so","_Z3fooi3Foo","Export","Float64","%xmm0").
abi_typelocation("lib.so","_Z3fooi3Foo","Export","Float64","%xmm1").
12 changes: 7 additions & 5 deletions array/facts.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
},
{
"name": "c",
"type": "5d91d0e2f1e27d9ccf8a1f793505c10e",
"type": "8eed461bfc3501fadc3cdbc18372b319",
"offset": 4,
"location": "%rdx",
"direction": "export"
Expand Down Expand Up @@ -88,11 +88,13 @@
"size": 8,
"class": "Integer"
},
"5d91d0e2f1e27d9ccf8a1f793505c10e": {
"8eed461bfc3501fadc3cdbc18372b319": {
"class": "Array",
"name": "c",
"size": 8,
"count": 0,
"counts": [
8
],
"underlying_type": {
"type": "char",
"size": 1,
Expand All @@ -104,7 +106,7 @@
"size": 8,
"class": "Float"
},
"6258e06c1116fa369b2b9c8dc692f3cf": {
"a55a12a304bd32496749c5178e5e4e01": {
"name": "Foo",
"size": 32,
"class": "Struct",
Expand All @@ -116,7 +118,7 @@
},
{
"name": "c",
"type": "5d91d0e2f1e27d9ccf8a1f793505c10e",
"type": "8eed461bfc3501fadc3cdbc18372b319",
"offset": 4
},
{
Expand Down
2 changes: 1 addition & 1 deletion fixed-sized-array/atoms.asp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
%----------------------------------------------------------------------------
% Library: lib.so
%----------------------------------------------------------------------------
abi_typelocation("lib.so","fixedSizeArray","Export","Array[120]","var").
abi_typelocation("lib.so","fixedSizeArray","Export","Array[120:30]","var").
abi_typelocation("lib.so","fixedSizeArray","Export","Integer32","var").
abi_typelocation("lib.so","main","Export","Integer32","%rax").
abi_typelocation("lib.so","_Z30function_with_fixed_size_arrayPi","Both","Integer32","(%rdi)").
2 changes: 1 addition & 1 deletion fixed-sized-array/atoms.truth.asp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
%----------------------------------------------------------------------------
% Library: lib.so
%----------------------------------------------------------------------------
abi_typelocation("lib.so","fixedSizeArray","Export","Array[120]","var").
abi_typelocation("lib.so","fixedSizeArray","Export","Array[120:30]","var").
abi_typelocation("lib.so","fixedSizeArray","Export","Integer32","var").
abi_typelocation("lib.so","main","Export","Integer32","%rax").
abi_typelocation("lib.so","_Z30function_with_fixed_size_arrayPi","Both","Integer32","(%rdi)").
8 changes: 5 additions & 3 deletions fixed-sized-array/facts.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{
"name": "fixedSizeArray",
"location": "var",
"type": "90b3cd95673cfb17514f68a9ff70a9a8",
"type": "8084b7ca14517cdeeb95d783ba48548d",
"direction": "export"
}
]
Expand Down Expand Up @@ -56,11 +56,13 @@
"size": 8,
"class": "Integer"
},
"90b3cd95673cfb17514f68a9ff70a9a8": {
"8084b7ca14517cdeeb95d783ba48548d": {
"class": "Array",
"name": "fixedSizeArray",
"size": 120,
"count": 0,
"counts": [
30
],
"underlying_type": {
"type": "int",
"size": 4,
Expand Down
12 changes: 7 additions & 5 deletions fixed-sized-array/facts.truth.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{
"name": "fixedSizeArray",
"location": "var",
"type": "90b3cd95673cfb17514f68a9ff70a9a8",
"type": "8084b7ca14517cdeeb95d783ba48548d",
"direction": "export"
}
]
Expand All @@ -31,8 +31,8 @@
{
"name": "array",
"type": "c31c2518fddc91c25994a30fb492944b",
"direction": "both",
"location": "%rdi"
"location": "%rdi",
"direction": "both"
}
],
"return": {
Expand All @@ -56,11 +56,13 @@
"size": 8,
"class": "Integer"
},
"90b3cd95673cfb17514f68a9ff70a9a8": {
"8084b7ca14517cdeeb95d783ba48548d": {
"class": "Array",
"name": "fixedSizeArray",
"size": 120,
"count": 0,
"counts": [
30
],
"underlying_type": {
"type": "int",
"size": 4,
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ abi_typelocation("example","main","Import","Integer32","%rdi").
abi_typelocation("example","main","Both","Integer8","((%rsi))").
abi_typelocation("example","main","Export","Integer32","%rax").
abi_typelocation("example","_Z3fooiP7Structy","Import","Integer32","%rdi").
abi_typelocation("example","_Z3fooiP7Structy","Import","Array[40]","(%rsi)").
abi_typelocation("example","_Z3fooiP7Structy","Import","Array[100:5,5]","(%rsi)").
abi_typelocation("example","_Z3fooiP7Structy","Import","Integer32","(%rsi)").
abi_typelocation("example","_Z3fooiP7Structy","Import","Array[240]","(%rsi)+100").
abi_typelocation("example","_Z3fooiP7Structy","Import","Array[24000:10,20,30]","(%rsi)+100").
abi_typelocation("example","_Z3fooiP7Structy","Import","Integer32","(%rsi)+100").
abi_typelocation("example","_Z3fooiP7Structy","Export","Integer32","%rax").
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"library": "/home/vanessa/Desktop/Code/smeagle-examples/structure-arrays-of-arrays/example",
"library": "/home/vanessa/Desktop/Code/smeagle-examples/multidimensional-array/example",
"locations": [
{
"function": {
Expand Down Expand Up @@ -40,7 +40,7 @@
},
{
"name": "array",
"type": "ef50de5b18081929847a8ed690d12122",
"type": "429b78b625bd1b4520290bf67ae42aa2",
"location": "%rsi",
"direction": "both"
}
Expand Down Expand Up @@ -85,50 +85,57 @@
"size": 8,
"class": "Integer"
},
"427e1ed160c9982c6c26abf96c5e9955": {
"2e197574c391d1b4115af009e86a70e0": {
"class": "Array",
"name": "two_d",
"size": 40,
"count": 0,
"size": 100,
"counts": [
5,
5
],
"underlying_type": {
"type": "int",
"size": 4,
"class": "Integer"
}
},
"f6a71a9d4e82c9bccf9e964b1761fa76": {
"ccf4dbe1061e0f4c6c42736ce0a92b0c": {
"class": "Array",
"name": "three_d",
"size": 240,
"count": 0,
"size": 24000,
"counts": [
10,
20,
30
],
"underlying_type": {
"type": "int",
"size": 4,
"class": "Integer"
}
},
"73b7223ee02fd0c8efa93da747a8847c": {
"a5b8f03151c2552b5bc5a6e4f11bc457": {
"name": "Structy",
"size": 24100,
"class": "Struct",
"fields": [
{
"name": "two_d",
"type": "427e1ed160c9982c6c26abf96c5e9955",
"type": "2e197574c391d1b4115af009e86a70e0",
"offset": 0
},
{
"name": "three_d",
"type": "f6a71a9d4e82c9bccf9e964b1761fa76",
"type": "ccf4dbe1061e0f4c6c42736ce0a92b0c",
"offset": 100
}
]
},
"ef50de5b18081929847a8ed690d12122": {
"429b78b625bd1b4520290bf67ae42aa2": {
"class": "Pointer",
"size": 8,
"underlying_type": {
"type": "73b7223ee02fd0c8efa93da747a8847c"
"type": "a5b8f03151c2552b5bc5a6e4f11bc457"
},
"name": "array"
}
Expand Down
143 changes: 143 additions & 0 deletions multidimensional-array/facts.truth.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
{
"library": "/home/vanessa/Desktop/Code/smeagle-examples/multidimensional-array/example",
"locations": [
{
"function": {
"name": "main",
"class": "Function",
"parameters": [
{
"name": "argc",
"type": "9c67aaa6ef89dd4db8543f00bd1f472f",
"location": "%rdi",
"direction": "import"
},
{
"name": "argv",
"type": "ba26a1b06c24691988f94f706e51b94d",
"location": "%rsi",
"direction": "both"
}
],
"return": {
"type": "9c67aaa6ef89dd4db8543f00bd1f472f",
"direction": "export",
"location": "%rax"
},
"direction": "export"
}
},
{
"function": {
"name": "_Z3fooiP7Structy",
"class": "Function",
"parameters": [
{
"name": "one",
"type": "9c67aaa6ef89dd4db8543f00bd1f472f",
"location": "%rdi",
"direction": "import"
},
{
"name": "array",
"type": "429b78b625bd1b4520290bf67ae42aa2",
"location": "%rsi",
"direction": "both"
}
],
"return": {
"type": "9c67aaa6ef89dd4db8543f00bd1f472f",
"direction": "export",
"location": "%rax"
},
"direction": "export"
}
}
],
"types": {
"9c67aaa6ef89dd4db8543f00bd1f472f": {
"type": "int",
"size": 4,
"class": "Integer"
},
"dbef5bff425a8e631e2bc5fba7cc20e6": {
"type": "char",
"size": 1,
"class": "Integer"
},
"7e23b4d1fe940040810be7a419c68aff": {
"class": "Pointer",
"size": 8,
"underlying_type": {
"type": "dbef5bff425a8e631e2bc5fba7cc20e6"
}
},
"ba26a1b06c24691988f94f706e51b94d": {
"class": "Pointer",
"size": 8,
"underlying_type": {
"type": "7e23b4d1fe940040810be7a419c68aff"
},
"name": "argv"
},
"7a2f32ee5b8a01b41c1806555f194fe7": {
"type": "long unsigned int",
"size": 8,
"class": "Integer"
},
"2e197574c391d1b4115af009e86a70e0": {
"class": "Array",
"name": "two_d",
"size": 100,
"counts": [
5,
5
],
"underlying_type": {
"type": "int",
"size": 4,
"class": "Integer"
}
},
"ccf4dbe1061e0f4c6c42736ce0a92b0c": {
"class": "Array",
"name": "three_d",
"size": 24000,
"counts": [
10,
20,
30
],
"underlying_type": {
"type": "int",
"size": 4,
"class": "Integer"
}
},
"a5b8f03151c2552b5bc5a6e4f11bc457": {
"name": "Structy",
"size": 24100,
"class": "Struct",
"fields": [
{
"name": "two_d",
"type": "2e197574c391d1b4115af009e86a70e0",
"offset": 0
},
{
"name": "three_d",
"type": "ccf4dbe1061e0f4c6c42736ce0a92b0c",
"offset": 100
}
]
},
"429b78b625bd1b4520290bf67ae42aa2": {
"class": "Pointer",
"size": 8,
"underlying_type": {
"type": "a5b8f03151c2552b5bc5a6e4f11bc457"
},
"name": "array"
}
}
}
2 changes: 1 addition & 1 deletion structure-array-structures/atoms.asp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ abi_typelocation("example","main","Import","Integer32","%rdi").
abi_typelocation("example","main","Both","Integer8","((%rsi))").
abi_typelocation("example","main","Export","Integer32","%rax").
abi_typelocation("example","_Z3fooiPP7Structy","Import","Integer32","%rdi").
abi_typelocation("example","_Z3fooiPP7Structy","Import","Array[40]","((%rsi))").
abi_typelocation("example","_Z3fooiPP7Structy","Import","Array[40:5]","((%rsi))").
abi_typelocation("example","_Z3fooiPP7Structy","Import","Integer32","(((%rsi)))").
abi_typelocation("example","_Z3fooiPP7Structy","Export","Integer32","%rax").

0 comments on commit 00c816e

Please sign in to comment.