diff --git a/lisa/gradle.properties b/lisa/gradle.properties index 117e132c0..114baa7bf 100644 --- a/lisa/gradle.properties +++ b/lisa/gradle.properties @@ -1,6 +1,6 @@ # project properties group = 'it.unive' -version = 0.1b8 +version = 0.1b9 # gradle build properties org.gradle.caching=true diff --git a/lisa/java.gradle b/lisa/java.gradle index 4e1e7632f..aa1638daf 100644 --- a/lisa/java.gradle +++ b/lisa/java.gradle @@ -43,6 +43,9 @@ javadoc { if(JavaVersion.current().isJava9Compatible()) { options.addBooleanOption('html5', true) } + options { + links 'https://docs.oracle.com/javase/11/docs/api/' + } } test { diff --git a/lisa/lisa-analyses/imp-testcases/arrays/allocations-fields/report.json b/lisa/lisa-analyses/imp-testcases/arrays/allocations-fields/report.json new file mode 100644 index 000000000..28468fdbc --- /dev/null +++ b/lisa/lisa-analyses/imp-testcases/arrays/allocations-fields/report.json @@ -0,0 +1,38 @@ +{ + "warnings" : [ ], + "files" : [ "report.json", "untyped_arrays.bitest(arrays__this).json", "untyped_arrays.test(arrays__this).json" ], + "info" : { + "cfgs" : "2", + "duration" : "420ms", + "end" : "2023-09-11T19:18:34.470+02:00", + "expressions" : "64", + "files" : "2", + "globals" : "0", + "members" : "2", + "programs" : "1", + "start" : "2023-09-11T19:18:34.050+02:00", + "statements" : "19", + "units" : "1", + "version" : "0.1b8", + "warnings" : "0" + }, + "configuration" : { + "analysisGraphs" : "NONE", + "descendingPhaseType" : "NONE", + "dumpForcesUnwinding" : "false", + "fixpointWorkingSet" : "DuplicateFreeFIFOWorkingSet", + "glbThreshold" : "5", + "hotspots" : "unset", + "jsonOutput" : "true", + "openCallPolicy" : "WorstCasePolicy", + "optimize" : "false", + "recursionWideningThreshold" : "5", + "semanticChecks" : "", + "serializeInputs" : "false", + "serializeResults" : "true", + "syntacticChecks" : "", + "useWideningPoints" : "true", + "wideningThreshold" : "5", + "workdir" : "test-outputs/arrays/allocations-fields" + } +} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/arrays/allocations-fields/untyped_arrays.bitest(arrays__this).json b/lisa/lisa-analyses/imp-testcases/arrays/allocations-fields/untyped_arrays.bitest(arrays__this).json new file mode 100644 index 000000000..9ecd35dfe --- /dev/null +++ b/lisa/lisa-analyses/imp-testcases/arrays/allocations-fields/untyped_arrays.bitest(arrays__this).json @@ -0,0 +1 @@ +{"name":"untyped arrays::bitest(arrays* this)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"a1 = new int32[](3)"},{"id":1,"text":"a1"},{"id":2,"subNodes":[3],"text":"new int32[](3)"},{"id":3,"text":"3"},{"id":4,"subNodes":[5,8],"text":"[](a1, 0) = 0"},{"id":5,"subNodes":[6,7],"text":"[](a1, 0)"},{"id":6,"text":"a1"},{"id":7,"text":"0"},{"id":8,"text":"0"},{"id":9,"subNodes":[10,13],"text":"[](a1, 1) = 1"},{"id":10,"subNodes":[11,12],"text":"[](a1, 1)"},{"id":11,"text":"a1"},{"id":12,"text":"1"},{"id":13,"text":"1"},{"id":14,"subNodes":[15,18],"text":"[](a1, 2) = 2"},{"id":15,"subNodes":[16,17],"text":"[](a1, 2)"},{"id":16,"text":"a1"},{"id":17,"text":"2"},{"id":18,"text":"2"},{"id":19,"subNodes":[20,21],"text":"a2 = new int32[](2)"},{"id":20,"text":"a2"},{"id":21,"subNodes":[22],"text":"new int32[](2)"},{"id":22,"text":"2"},{"id":23,"subNodes":[24,27],"text":"[](a2, 0) = 5"},{"id":24,"subNodes":[25,26],"text":"[](a2, 0)"},{"id":25,"text":"a2"},{"id":26,"text":"0"},{"id":27,"text":"5"},{"id":28,"subNodes":[29,32],"text":"[](a2, 1) = 6"},{"id":29,"subNodes":[30,31],"text":"[](a2, 1)"},{"id":30,"text":"a2"},{"id":31,"text":"1"},{"id":32,"text":"6"},{"id":33,"subNodes":[34,35],"text":"x = arraylen(a1)"},{"id":34,"text":"x"},{"id":35,"subNodes":[36],"text":"arraylen(a1)"},{"id":36,"text":"a1"},{"id":37,"subNodes":[38,39],"text":"y = arraylen(a2)"},{"id":38,"text":"y"},{"id":39,"subNodes":[40],"text":"arraylen(a2)"},{"id":40,"text":"a2"},{"id":41,"subNodes":[42,43],"text":"z = +(x, y)"},{"id":42,"text":"z"},{"id":43,"subNodes":[44,45],"text":"+(x, y)"},{"id":44,"text":"x"},{"id":45,"text":"y"},{"id":46,"subNodes":[47],"text":"return z"},{"id":47,"text":"z"}],"edges":[{"sourceId":0,"destId":4,"kind":"SequentialEdge"},{"sourceId":4,"destId":9,"kind":"SequentialEdge"},{"sourceId":9,"destId":14,"kind":"SequentialEdge"},{"sourceId":14,"destId":19,"kind":"SequentialEdge"},{"sourceId":19,"destId":23,"kind":"SequentialEdge"},{"sourceId":23,"destId":28,"kind":"SequentialEdge"},{"sourceId":28,"destId":33,"kind":"SequentialEdge"},{"sourceId":33,"destId":37,"kind":"SequentialEdge"},{"sourceId":37,"destId":41,"kind":"SequentialEdge"},{"sourceId":41,"destId":46,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["a1"],"state":{"heap":{"a1":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":"[3, 3]"}}}},{"nodeId":1,"description":{"expressions":["a1"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":"[3, 3]"}}}},{"nodeId":2,"description":{"expressions":["ref$new int32[]"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":"[3, 3]"}}}},{"nodeId":3,"description":{"expressions":["3"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"this":["arrays*"]},"value":"#TOP#"}}},{"nodeId":4,"description":{"expressions":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]"],"state":{"heap":{"a1":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":"[3, 3]"}}}},{"nodeId":5,"description":{"expressions":["*(a1)->0"],"state":{"heap":{"a1":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":"[3, 3]"}}}},{"nodeId":6,"description":{"expressions":["a1"],"state":{"heap":{"a1":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":"[3, 3]"}}}},{"nodeId":7,"description":{"expressions":["0"],"state":{"heap":{"a1":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":"[3, 3]"}}}},{"nodeId":8,"description":{"expressions":["0"],"state":{"heap":{"a1":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":"[3, 3]"}}}},{"nodeId":9,"description":{"expressions":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]"],"state":{"heap":{"a1":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":"[1, 1]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":"[3, 3]"}}}},{"nodeId":10,"description":{"expressions":["*(a1)->1"],"state":{"heap":{"a1":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":"[3, 3]"}}}},{"nodeId":11,"description":{"expressions":["a1"],"state":{"heap":{"a1":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":"[3, 3]"}}}},{"nodeId":12,"description":{"expressions":["1"],"state":{"heap":{"a1":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":"[3, 3]"}}}},{"nodeId":13,"description":{"expressions":["1"],"state":{"heap":{"a1":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":"[3, 3]"}}}},{"nodeId":14,"description":{"expressions":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]"],"state":{"heap":{"a1":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":"[1, 1]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":"[2, 2]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":"[3, 3]"}}}},{"nodeId":15,"description":{"expressions":["*(a1)->2"],"state":{"heap":{"a1":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":"[1, 1]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":"[3, 3]"}}}},{"nodeId":16,"description":{"expressions":["a1"],"state":{"heap":{"a1":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":"[1, 1]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":"[3, 3]"}}}},{"nodeId":17,"description":{"expressions":["2"],"state":{"heap":{"a1":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":"[1, 1]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":"[3, 3]"}}}},{"nodeId":18,"description":{"expressions":["2"],"state":{"heap":{"a1":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":"[1, 1]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":"[3, 3]"}}}},{"nodeId":19,"description":{"expressions":["a2"],"state":{"heap":{"a1":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"a2":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":"[1, 1]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":"[2, 2]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":"[3, 3]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[len]":"[2, 2]"}}}},{"nodeId":20,"description":{"expressions":["a2"],"state":{"heap":{"a1":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":"[1, 1]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":"[2, 2]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":"[3, 3]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[len]":"[2, 2]"}}}},{"nodeId":21,"description":{"expressions":["ref$new int32[]"],"state":{"heap":{"a1":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":"[1, 1]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":"[2, 2]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":"[3, 3]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[len]":"[2, 2]"}}}},{"nodeId":22,"description":{"expressions":["2"],"state":{"heap":{"a1":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":"[1, 1]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":"[2, 2]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":"[3, 3]"}}}},{"nodeId":23,"description":{"expressions":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[0]"],"state":{"heap":{"a1":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"a2":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":"[1, 1]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":"[2, 2]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":"[3, 3]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[0]":"[5, 5]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[len]":"[2, 2]"}}}},{"nodeId":24,"description":{"expressions":["*(a2)->0"],"state":{"heap":{"a1":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"a2":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":"[1, 1]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":"[2, 2]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":"[3, 3]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[len]":"[2, 2]"}}}},{"nodeId":25,"description":{"expressions":["a2"],"state":{"heap":{"a1":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"a2":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":"[1, 1]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":"[2, 2]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":"[3, 3]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[len]":"[2, 2]"}}}},{"nodeId":26,"description":{"expressions":["0"],"state":{"heap":{"a1":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"a2":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":"[1, 1]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":"[2, 2]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":"[3, 3]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[len]":"[2, 2]"}}}},{"nodeId":27,"description":{"expressions":["5"],"state":{"heap":{"a1":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"a2":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":"[1, 1]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":"[2, 2]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":"[3, 3]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[len]":"[2, 2]"}}}},{"nodeId":28,"description":{"expressions":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[1]"],"state":{"heap":{"a1":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"a2":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":"[1, 1]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":"[2, 2]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":"[3, 3]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[0]":"[5, 5]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[1]":"[6, 6]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[len]":"[2, 2]"}}}},{"nodeId":29,"description":{"expressions":["*(a2)->1"],"state":{"heap":{"a1":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"a2":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":"[1, 1]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":"[2, 2]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":"[3, 3]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[0]":"[5, 5]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[len]":"[2, 2]"}}}},{"nodeId":30,"description":{"expressions":["a2"],"state":{"heap":{"a1":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"a2":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":"[1, 1]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":"[2, 2]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":"[3, 3]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[0]":"[5, 5]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[len]":"[2, 2]"}}}},{"nodeId":31,"description":{"expressions":["1"],"state":{"heap":{"a1":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"a2":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":"[1, 1]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":"[2, 2]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":"[3, 3]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[0]":"[5, 5]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[len]":"[2, 2]"}}}},{"nodeId":32,"description":{"expressions":["6"],"state":{"heap":{"a1":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"a2":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":"[1, 1]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":"[2, 2]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":"[3, 3]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[0]":"[5, 5]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[len]":"[2, 2]"}}}},{"nodeId":33,"description":{"expressions":["x"],"state":{"heap":{"a1":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"a2":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[len]":["int32"],"this":["arrays*"],"x":["int32"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":"[1, 1]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":"[2, 2]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":"[3, 3]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[0]":"[5, 5]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[1]":"[6, 6]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[len]":"[2, 2]","x":"[3, 3]"}}}},{"nodeId":34,"description":{"expressions":["x"],"state":{"heap":{"a1":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"a2":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":"[1, 1]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":"[2, 2]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":"[3, 3]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[0]":"[5, 5]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[1]":"[6, 6]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[len]":"[2, 2]"}}}},{"nodeId":35,"description":{"expressions":["*(a1)->len"],"state":{"heap":{"a1":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"a2":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":"[1, 1]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":"[2, 2]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":"[3, 3]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[0]":"[5, 5]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[1]":"[6, 6]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[len]":"[2, 2]"}}}},{"nodeId":36,"description":{"expressions":["a1"],"state":{"heap":{"a1":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"a2":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":"[1, 1]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":"[2, 2]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":"[3, 3]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[0]":"[5, 5]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[1]":"[6, 6]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[len]":"[2, 2]"}}}},{"nodeId":37,"description":{"expressions":["y"],"state":{"heap":{"a1":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"a2":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[len]":["int32"],"this":["arrays*"],"x":["int32"],"y":["int32"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":"[1, 1]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":"[2, 2]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":"[3, 3]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[0]":"[5, 5]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[1]":"[6, 6]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[len]":"[2, 2]","x":"[3, 3]","y":"[2, 2]"}}}},{"nodeId":38,"description":{"expressions":["y"],"state":{"heap":{"a1":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"a2":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[len]":["int32"],"this":["arrays*"],"x":["int32"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":"[1, 1]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":"[2, 2]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":"[3, 3]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[0]":"[5, 5]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[1]":"[6, 6]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[len]":"[2, 2]","x":"[3, 3]"}}}},{"nodeId":39,"description":{"expressions":["*(a2)->len"],"state":{"heap":{"a1":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"a2":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[len]":["int32"],"this":["arrays*"],"x":["int32"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":"[1, 1]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":"[2, 2]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":"[3, 3]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[0]":"[5, 5]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[1]":"[6, 6]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[len]":"[2, 2]","x":"[3, 3]"}}}},{"nodeId":40,"description":{"expressions":["a2"],"state":{"heap":{"a1":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"a2":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[len]":["int32"],"this":["arrays*"],"x":["int32"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":"[1, 1]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":"[2, 2]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":"[3, 3]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[0]":"[5, 5]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[1]":"[6, 6]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[len]":"[2, 2]","x":"[3, 3]"}}}},{"nodeId":41,"description":{"expressions":["z"],"state":{"heap":{"a1":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"a2":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[len]":["int32"],"this":["arrays*"],"x":["int32"],"y":["int32"],"z":["int32"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":"[1, 1]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":"[2, 2]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":"[3, 3]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[0]":"[5, 5]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[1]":"[6, 6]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[len]":"[2, 2]","x":"[3, 3]","y":"[2, 2]","z":"[5, 5]"}}}},{"nodeId":42,"description":{"expressions":["z"],"state":{"heap":{"a1":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"a2":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[len]":["int32"],"this":["arrays*"],"x":["int32"],"y":["int32"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":"[1, 1]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":"[2, 2]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":"[3, 3]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[0]":"[5, 5]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[1]":"[6, 6]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[len]":"[2, 2]","x":"[3, 3]","y":"[2, 2]"}}}},{"nodeId":43,"description":{"expressions":["x + y"],"state":{"heap":{"a1":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"a2":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[len]":["int32"],"this":["arrays*"],"x":["int32"],"y":["int32"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":"[1, 1]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":"[2, 2]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":"[3, 3]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[0]":"[5, 5]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[1]":"[6, 6]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[len]":"[2, 2]","x":"[3, 3]","y":"[2, 2]"}}}},{"nodeId":44,"description":{"expressions":["x"],"state":{"heap":{"a1":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"a2":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[len]":["int32"],"this":["arrays*"],"x":["int32"],"y":["int32"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":"[1, 1]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":"[2, 2]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":"[3, 3]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[0]":"[5, 5]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[1]":"[6, 6]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[len]":"[2, 2]","x":"[3, 3]","y":"[2, 2]"}}}},{"nodeId":45,"description":{"expressions":["y"],"state":{"heap":{"a1":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"a2":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[len]":["int32"],"this":["arrays*"],"x":["int32"],"y":["int32"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":"[1, 1]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":"[2, 2]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":"[3, 3]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[0]":"[5, 5]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[1]":"[6, 6]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[len]":"[2, 2]","x":"[3, 3]","y":"[2, 2]"}}}},{"nodeId":46,"description":{"expressions":["ret_value@bitest"],"state":{"heap":{"a1":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"a2":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[len]":["int32"],"ret_value@bitest":["int32"],"this":["arrays*"],"x":["int32"],"y":["int32"],"z":["int32"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":"[1, 1]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":"[2, 2]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":"[3, 3]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[0]":"[5, 5]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[1]":"[6, 6]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[len]":"[2, 2]","ret_value@bitest":"[5, 5]","x":"[3, 3]","y":"[2, 2]","z":"[5, 5]"}}}},{"nodeId":47,"description":{"expressions":["z"],"state":{"heap":{"a1":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"a2":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[len]":["int32"],"this":["arrays*"],"x":["int32"],"y":["int32"],"z":["int32"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[1]":"[1, 1]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[2]":"[2, 2]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':15:20[len]":"[3, 3]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[0]":"[5, 5]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[1]":"[6, 6]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':20:20[len]":"[2, 2]","x":"[3, 3]","y":"[2, 2]","z":"[5, 5]"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/arrays/allocations-fields/untyped_arrays.test(arrays__this).json b/lisa/lisa-analyses/imp-testcases/arrays/allocations-fields/untyped_arrays.test(arrays__this).json new file mode 100644 index 000000000..df01e2992 --- /dev/null +++ b/lisa/lisa-analyses/imp-testcases/arrays/allocations-fields/untyped_arrays.test(arrays__this).json @@ -0,0 +1 @@ +{"name":"untyped arrays::test(arrays* this)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"arr = new int32[](5)"},{"id":1,"text":"arr"},{"id":2,"subNodes":[3],"text":"new int32[](5)"},{"id":3,"text":"5"},{"id":4,"subNodes":[5,8],"text":"[](arr, 0) = 0"},{"id":5,"subNodes":[6,7],"text":"[](arr, 0)"},{"id":6,"text":"arr"},{"id":7,"text":"0"},{"id":8,"text":"0"},{"id":9,"subNodes":[10,13],"text":"[](arr, 1) = 1"},{"id":10,"subNodes":[11,12],"text":"[](arr, 1)"},{"id":11,"text":"arr"},{"id":12,"text":"1"},{"id":13,"text":"1"},{"id":14,"subNodes":[15,18],"text":"[](arr, 2) = 2"},{"id":15,"subNodes":[16,17],"text":"[](arr, 2)"},{"id":16,"text":"arr"},{"id":17,"text":"2"},{"id":18,"text":"2"},{"id":19,"subNodes":[20,23],"text":"[](arr, 3) = 3"},{"id":20,"subNodes":[21,22],"text":"[](arr, 3)"},{"id":21,"text":"arr"},{"id":22,"text":"3"},{"id":23,"text":"3"},{"id":24,"subNodes":[25,28],"text":"[](arr, 4) = 4"},{"id":25,"subNodes":[26,27],"text":"[](arr, 4)"},{"id":26,"text":"arr"},{"id":27,"text":"4"},{"id":28,"text":"4"},{"id":29,"subNodes":[30,31],"text":"x = arraylen(arr)"},{"id":30,"text":"x"},{"id":31,"subNodes":[32],"text":"arraylen(arr)"},{"id":32,"text":"arr"},{"id":33,"subNodes":[34],"text":"return x"},{"id":34,"text":"x"}],"edges":[{"sourceId":0,"destId":4,"kind":"SequentialEdge"},{"sourceId":4,"destId":9,"kind":"SequentialEdge"},{"sourceId":9,"destId":14,"kind":"SequentialEdge"},{"sourceId":14,"destId":19,"kind":"SequentialEdge"},{"sourceId":19,"destId":24,"kind":"SequentialEdge"},{"sourceId":24,"destId":29,"kind":"SequentialEdge"},{"sourceId":29,"destId":33,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["arr"],"state":{"heap":{"arr":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":"[5, 5]"}}}},{"nodeId":1,"description":{"expressions":["arr"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":"[5, 5]"}}}},{"nodeId":2,"description":{"expressions":["ref$new int32[]"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":"[5, 5]"}}}},{"nodeId":3,"description":{"expressions":["5"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"this":["arrays*"]},"value":"#TOP#"}}},{"nodeId":4,"description":{"expressions":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[0]"],"state":{"heap":{"arr":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":"[5, 5]"}}}},{"nodeId":5,"description":{"expressions":["*(arr)->0"],"state":{"heap":{"arr":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":"[5, 5]"}}}},{"nodeId":6,"description":{"expressions":["arr"],"state":{"heap":{"arr":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":"[5, 5]"}}}},{"nodeId":7,"description":{"expressions":["0"],"state":{"heap":{"arr":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":"[5, 5]"}}}},{"nodeId":8,"description":{"expressions":["0"],"state":{"heap":{"arr":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":"[5, 5]"}}}},{"nodeId":9,"description":{"expressions":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[1]"],"state":{"heap":{"arr":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[1]":"[1, 1]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":"[5, 5]"}}}},{"nodeId":10,"description":{"expressions":["*(arr)->1"],"state":{"heap":{"arr":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":"[5, 5]"}}}},{"nodeId":11,"description":{"expressions":["arr"],"state":{"heap":{"arr":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":"[5, 5]"}}}},{"nodeId":12,"description":{"expressions":["1"],"state":{"heap":{"arr":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":"[5, 5]"}}}},{"nodeId":13,"description":{"expressions":["1"],"state":{"heap":{"arr":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":"[5, 5]"}}}},{"nodeId":14,"description":{"expressions":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[2]"],"state":{"heap":{"arr":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[2]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[1]":"[1, 1]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[2]":"[2, 2]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":"[5, 5]"}}}},{"nodeId":15,"description":{"expressions":["*(arr)->2"],"state":{"heap":{"arr":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[1]":"[1, 1]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":"[5, 5]"}}}},{"nodeId":16,"description":{"expressions":["arr"],"state":{"heap":{"arr":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[1]":"[1, 1]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":"[5, 5]"}}}},{"nodeId":17,"description":{"expressions":["2"],"state":{"heap":{"arr":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[1]":"[1, 1]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":"[5, 5]"}}}},{"nodeId":18,"description":{"expressions":["2"],"state":{"heap":{"arr":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[1]":"[1, 1]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":"[5, 5]"}}}},{"nodeId":19,"description":{"expressions":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[3]"],"state":{"heap":{"arr":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[2]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[3]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[1]":"[1, 1]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[2]":"[2, 2]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[3]":"[3, 3]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":"[5, 5]"}}}},{"nodeId":20,"description":{"expressions":["*(arr)->3"],"state":{"heap":{"arr":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[2]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[1]":"[1, 1]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[2]":"[2, 2]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":"[5, 5]"}}}},{"nodeId":21,"description":{"expressions":["arr"],"state":{"heap":{"arr":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[2]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[1]":"[1, 1]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[2]":"[2, 2]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":"[5, 5]"}}}},{"nodeId":22,"description":{"expressions":["3"],"state":{"heap":{"arr":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[2]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[1]":"[1, 1]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[2]":"[2, 2]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":"[5, 5]"}}}},{"nodeId":23,"description":{"expressions":["3"],"state":{"heap":{"arr":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[2]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[1]":"[1, 1]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[2]":"[2, 2]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":"[5, 5]"}}}},{"nodeId":24,"description":{"expressions":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[4]"],"state":{"heap":{"arr":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[2]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[3]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[4]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[1]":"[1, 1]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[2]":"[2, 2]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[3]":"[3, 3]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[4]":"[4, 4]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":"[5, 5]"}}}},{"nodeId":25,"description":{"expressions":["*(arr)->4"],"state":{"heap":{"arr":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[2]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[3]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[1]":"[1, 1]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[2]":"[2, 2]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[3]":"[3, 3]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":"[5, 5]"}}}},{"nodeId":26,"description":{"expressions":["arr"],"state":{"heap":{"arr":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[2]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[3]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[1]":"[1, 1]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[2]":"[2, 2]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[3]":"[3, 3]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":"[5, 5]"}}}},{"nodeId":27,"description":{"expressions":["4"],"state":{"heap":{"arr":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[2]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[3]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[1]":"[1, 1]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[2]":"[2, 2]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[3]":"[3, 3]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":"[5, 5]"}}}},{"nodeId":28,"description":{"expressions":["4"],"state":{"heap":{"arr":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[2]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[3]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[1]":"[1, 1]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[2]":"[2, 2]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[3]":"[3, 3]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":"[5, 5]"}}}},{"nodeId":29,"description":{"expressions":["x"],"state":{"heap":{"arr":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[2]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[3]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[4]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":["int32"],"this":["arrays*"],"x":["int32"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[1]":"[1, 1]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[2]":"[2, 2]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[3]":"[3, 3]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[4]":"[4, 4]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":"[5, 5]","x":"[5, 5]"}}}},{"nodeId":30,"description":{"expressions":["x"],"state":{"heap":{"arr":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[2]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[3]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[4]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[1]":"[1, 1]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[2]":"[2, 2]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[3]":"[3, 3]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[4]":"[4, 4]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":"[5, 5]"}}}},{"nodeId":31,"description":{"expressions":["*(arr)->len"],"state":{"heap":{"arr":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[2]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[3]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[4]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[1]":"[1, 1]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[2]":"[2, 2]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[3]":"[3, 3]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[4]":"[4, 4]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":"[5, 5]"}}}},{"nodeId":32,"description":{"expressions":["arr"],"state":{"heap":{"arr":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[2]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[3]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[4]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":["int32"],"this":["arrays*"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[1]":"[1, 1]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[2]":"[2, 2]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[3]":"[3, 3]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[4]":"[4, 4]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":"[5, 5]"}}}},{"nodeId":33,"description":{"expressions":["ret_value@test"],"state":{"heap":{"arr":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[2]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[3]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[4]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":["int32"],"ret_value@test":["int32"],"this":["arrays*"],"x":["int32"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[1]":"[1, 1]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[2]":"[2, 2]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[3]":"[3, 3]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[4]":"[4, 4]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":"[5, 5]","ret_value@test":"[5, 5]","x":"[5, 5]"}}}},{"nodeId":34,"description":{"expressions":["x"],"state":{"heap":{"arr":["heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32[]"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[0]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[1]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[2]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[3]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[4]":["int32"],"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":["int32"],"this":["arrays*"],"x":["int32"]},"value":{"heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[0]":"[0, 0]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[1]":"[1, 1]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[2]":"[2, 2]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[3]":"[3, 3]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[4]":"[4, 4]","heap[s]:pp@'imp-testcases/arrays/arrays.imp':4:21[len]":"[5, 5]","x":"[5, 5]"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/arrays/allocations/report.json b/lisa/lisa-analyses/imp-testcases/arrays/allocations/report.json new file mode 100644 index 000000000..e40fb17c2 --- /dev/null +++ b/lisa/lisa-analyses/imp-testcases/arrays/allocations/report.json @@ -0,0 +1,38 @@ +{ + "warnings" : [ ], + "files" : [ "report.json", "untyped_arrays.bitest(arrays__this).json", "untyped_arrays.test(arrays__this).json" ], + "info" : { + "cfgs" : "2", + "duration" : "62ms", + "end" : "2023-09-11T19:18:35.263+02:00", + "expressions" : "64", + "files" : "2", + "globals" : "0", + "members" : "2", + "programs" : "1", + "start" : "2023-09-11T19:18:35.201+02:00", + "statements" : "19", + "units" : "1", + "version" : "0.1b8", + "warnings" : "0" + }, + "configuration" : { + "analysisGraphs" : "NONE", + "descendingPhaseType" : "NONE", + "dumpForcesUnwinding" : "false", + "fixpointWorkingSet" : "DuplicateFreeFIFOWorkingSet", + "glbThreshold" : "5", + "hotspots" : "unset", + "jsonOutput" : "true", + "openCallPolicy" : "WorstCasePolicy", + "optimize" : "false", + "recursionWideningThreshold" : "5", + "semanticChecks" : "", + "serializeInputs" : "false", + "serializeResults" : "true", + "syntacticChecks" : "", + "useWideningPoints" : "true", + "wideningThreshold" : "5", + "workdir" : "test-outputs/arrays/allocations" + } +} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/arrays/allocations/untyped_arrays.bitest(arrays__this).json b/lisa/lisa-analyses/imp-testcases/arrays/allocations/untyped_arrays.bitest(arrays__this).json new file mode 100644 index 000000000..95fa51068 --- /dev/null +++ b/lisa/lisa-analyses/imp-testcases/arrays/allocations/untyped_arrays.bitest(arrays__this).json @@ -0,0 +1 @@ +{"name":"untyped arrays::bitest(arrays* this)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"a1 = new int32[](3)"},{"id":1,"text":"a1"},{"id":2,"subNodes":[3],"text":"new int32[](3)"},{"id":3,"text":"3"},{"id":4,"subNodes":[5,8],"text":"[](a1, 0) = 0"},{"id":5,"subNodes":[6,7],"text":"[](a1, 0)"},{"id":6,"text":"a1"},{"id":7,"text":"0"},{"id":8,"text":"0"},{"id":9,"subNodes":[10,13],"text":"[](a1, 1) = 1"},{"id":10,"subNodes":[11,12],"text":"[](a1, 1)"},{"id":11,"text":"a1"},{"id":12,"text":"1"},{"id":13,"text":"1"},{"id":14,"subNodes":[15,18],"text":"[](a1, 2) = 2"},{"id":15,"subNodes":[16,17],"text":"[](a1, 2)"},{"id":16,"text":"a1"},{"id":17,"text":"2"},{"id":18,"text":"2"},{"id":19,"subNodes":[20,21],"text":"a2 = new int32[](2)"},{"id":20,"text":"a2"},{"id":21,"subNodes":[22],"text":"new int32[](2)"},{"id":22,"text":"2"},{"id":23,"subNodes":[24,27],"text":"[](a2, 0) = 5"},{"id":24,"subNodes":[25,26],"text":"[](a2, 0)"},{"id":25,"text":"a2"},{"id":26,"text":"0"},{"id":27,"text":"5"},{"id":28,"subNodes":[29,32],"text":"[](a2, 1) = 6"},{"id":29,"subNodes":[30,31],"text":"[](a2, 1)"},{"id":30,"text":"a2"},{"id":31,"text":"1"},{"id":32,"text":"6"},{"id":33,"subNodes":[34,35],"text":"x = arraylen(a1)"},{"id":34,"text":"x"},{"id":35,"subNodes":[36],"text":"arraylen(a1)"},{"id":36,"text":"a1"},{"id":37,"subNodes":[38,39],"text":"y = arraylen(a2)"},{"id":38,"text":"y"},{"id":39,"subNodes":[40],"text":"arraylen(a2)"},{"id":40,"text":"a2"},{"id":41,"subNodes":[42,43],"text":"z = +(x, y)"},{"id":42,"text":"z"},{"id":43,"subNodes":[44,45],"text":"+(x, y)"},{"id":44,"text":"x"},{"id":45,"text":"y"},{"id":46,"subNodes":[47],"text":"return z"},{"id":47,"text":"z"}],"edges":[{"sourceId":0,"destId":4,"kind":"SequentialEdge"},{"sourceId":4,"destId":9,"kind":"SequentialEdge"},{"sourceId":9,"destId":14,"kind":"SequentialEdge"},{"sourceId":14,"destId":19,"kind":"SequentialEdge"},{"sourceId":19,"destId":23,"kind":"SequentialEdge"},{"sourceId":23,"destId":28,"kind":"SequentialEdge"},{"sourceId":28,"destId":33,"kind":"SequentialEdge"},{"sourceId":33,"destId":37,"kind":"SequentialEdge"},{"sourceId":37,"destId":41,"kind":"SequentialEdge"},{"sourceId":41,"destId":46,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["a1"],"state":{"heap":{"a1":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":"[3, 3]"}}}},{"nodeId":1,"description":{"expressions":["a1"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":"[3, 3]"}}}},{"nodeId":2,"description":{"expressions":["ref$new int32[]"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":"[3, 3]"}}}},{"nodeId":3,"description":{"expressions":["3"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"this":["arrays*"]},"value":"#TOP#"}}},{"nodeId":4,"description":{"expressions":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"state":{"heap":{"a1":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":"[0, 3]"}}}},{"nodeId":5,"description":{"expressions":["*(a1)->0"],"state":{"heap":{"a1":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":"[3, 3]"}}}},{"nodeId":6,"description":{"expressions":["a1"],"state":{"heap":{"a1":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":"[3, 3]"}}}},{"nodeId":7,"description":{"expressions":["0"],"state":{"heap":{"a1":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":"[3, 3]"}}}},{"nodeId":8,"description":{"expressions":["0"],"state":{"heap":{"a1":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":"[3, 3]"}}}},{"nodeId":9,"description":{"expressions":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"state":{"heap":{"a1":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":"[0, 3]"}}}},{"nodeId":10,"description":{"expressions":["*(a1)->1"],"state":{"heap":{"a1":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":"[0, 3]"}}}},{"nodeId":11,"description":{"expressions":["a1"],"state":{"heap":{"a1":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":"[0, 3]"}}}},{"nodeId":12,"description":{"expressions":["1"],"state":{"heap":{"a1":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":"[0, 3]"}}}},{"nodeId":13,"description":{"expressions":["1"],"state":{"heap":{"a1":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":"[0, 3]"}}}},{"nodeId":14,"description":{"expressions":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"state":{"heap":{"a1":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":"[0, 3]"}}}},{"nodeId":15,"description":{"expressions":["*(a1)->2"],"state":{"heap":{"a1":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":"[0, 3]"}}}},{"nodeId":16,"description":{"expressions":["a1"],"state":{"heap":{"a1":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":"[0, 3]"}}}},{"nodeId":17,"description":{"expressions":["2"],"state":{"heap":{"a1":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":"[0, 3]"}}}},{"nodeId":18,"description":{"expressions":["2"],"state":{"heap":{"a1":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":"[0, 3]"}}}},{"nodeId":19,"description":{"expressions":["a2"],"state":{"heap":{"a1":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"a2":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32","int32[]"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":"[0, 3]","heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20":"[2, 2]"}}}},{"nodeId":20,"description":{"expressions":["a2"],"state":{"heap":{"a1":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32","int32[]"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":"[0, 3]","heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20":"[2, 2]"}}}},{"nodeId":21,"description":{"expressions":["ref$new int32[]"],"state":{"heap":{"a1":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32","int32[]"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":"[0, 3]","heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20":"[2, 2]"}}}},{"nodeId":22,"description":{"expressions":["2"],"state":{"heap":{"a1":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":"[0, 3]"}}}},{"nodeId":23,"description":{"expressions":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20"],"state":{"heap":{"a1":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"a2":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32","int32[]"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":"[0, 3]","heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20":"[2, 5]"}}}},{"nodeId":24,"description":{"expressions":["*(a2)->0"],"state":{"heap":{"a1":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"a2":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32","int32[]"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":"[0, 3]","heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20":"[2, 2]"}}}},{"nodeId":25,"description":{"expressions":["a2"],"state":{"heap":{"a1":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"a2":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32","int32[]"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":"[0, 3]","heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20":"[2, 2]"}}}},{"nodeId":26,"description":{"expressions":["0"],"state":{"heap":{"a1":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"a2":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32","int32[]"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":"[0, 3]","heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20":"[2, 2]"}}}},{"nodeId":27,"description":{"expressions":["5"],"state":{"heap":{"a1":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"a2":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32","int32[]"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":"[0, 3]","heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20":"[2, 2]"}}}},{"nodeId":28,"description":{"expressions":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20"],"state":{"heap":{"a1":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"a2":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32","int32[]"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":"[0, 3]","heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20":"[2, 6]"}}}},{"nodeId":29,"description":{"expressions":["*(a2)->1"],"state":{"heap":{"a1":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"a2":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32","int32[]"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":"[0, 3]","heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20":"[2, 5]"}}}},{"nodeId":30,"description":{"expressions":["a2"],"state":{"heap":{"a1":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"a2":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32","int32[]"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":"[0, 3]","heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20":"[2, 5]"}}}},{"nodeId":31,"description":{"expressions":["1"],"state":{"heap":{"a1":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"a2":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32","int32[]"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":"[0, 3]","heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20":"[2, 5]"}}}},{"nodeId":32,"description":{"expressions":["6"],"state":{"heap":{"a1":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"a2":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32","int32[]"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":"[0, 3]","heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20":"[2, 5]"}}}},{"nodeId":33,"description":{"expressions":["x"],"state":{"heap":{"a1":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"a2":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32","int32[]"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20":["int32","int32[]"],"this":["arrays*"],"x":["int32","int32[]"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":"[0, 3]","heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20":"[2, 6]","x":"[0, 3]"}}}},{"nodeId":34,"description":{"expressions":["x"],"state":{"heap":{"a1":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"a2":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32","int32[]"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":"[0, 3]","heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20":"[2, 6]"}}}},{"nodeId":35,"description":{"expressions":["*(a1)->len"],"state":{"heap":{"a1":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"a2":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32","int32[]"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":"[0, 3]","heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20":"[2, 6]"}}}},{"nodeId":36,"description":{"expressions":["a1"],"state":{"heap":{"a1":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"a2":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32","int32[]"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":"[0, 3]","heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20":"[2, 6]"}}}},{"nodeId":37,"description":{"expressions":["y"],"state":{"heap":{"a1":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"a2":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32","int32[]"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20":["int32","int32[]"],"this":["arrays*"],"x":["int32","int32[]"],"y":["int32","int32[]"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":"[0, 3]","heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20":"[2, 6]","x":"[0, 3]","y":"[2, 6]"}}}},{"nodeId":38,"description":{"expressions":["y"],"state":{"heap":{"a1":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"a2":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32","int32[]"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20":["int32","int32[]"],"this":["arrays*"],"x":["int32","int32[]"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":"[0, 3]","heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20":"[2, 6]","x":"[0, 3]"}}}},{"nodeId":39,"description":{"expressions":["*(a2)->len"],"state":{"heap":{"a1":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"a2":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32","int32[]"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20":["int32","int32[]"],"this":["arrays*"],"x":["int32","int32[]"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":"[0, 3]","heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20":"[2, 6]","x":"[0, 3]"}}}},{"nodeId":40,"description":{"expressions":["a2"],"state":{"heap":{"a1":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"a2":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32","int32[]"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20":["int32","int32[]"],"this":["arrays*"],"x":["int32","int32[]"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":"[0, 3]","heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20":"[2, 6]","x":"[0, 3]"}}}},{"nodeId":41,"description":{"expressions":["z"],"state":{"heap":{"a1":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"a2":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32","int32[]"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20":["int32","int32[]"],"this":["arrays*"],"x":["int32","int32[]"],"y":["int32","int32[]"],"z":["int32"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":"[0, 3]","heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20":"[2, 6]","x":"[0, 3]","y":"[2, 6]","z":"[2, 9]"}}}},{"nodeId":42,"description":{"expressions":["z"],"state":{"heap":{"a1":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"a2":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32","int32[]"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20":["int32","int32[]"],"this":["arrays*"],"x":["int32","int32[]"],"y":["int32","int32[]"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":"[0, 3]","heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20":"[2, 6]","x":"[0, 3]","y":"[2, 6]"}}}},{"nodeId":43,"description":{"expressions":["x + y"],"state":{"heap":{"a1":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"a2":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32","int32[]"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20":["int32","int32[]"],"this":["arrays*"],"x":["int32","int32[]"],"y":["int32","int32[]"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":"[0, 3]","heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20":"[2, 6]","x":"[0, 3]","y":"[2, 6]"}}}},{"nodeId":44,"description":{"expressions":["x"],"state":{"heap":{"a1":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"a2":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32","int32[]"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20":["int32","int32[]"],"this":["arrays*"],"x":["int32","int32[]"],"y":["int32","int32[]"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":"[0, 3]","heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20":"[2, 6]","x":"[0, 3]","y":"[2, 6]"}}}},{"nodeId":45,"description":{"expressions":["y"],"state":{"heap":{"a1":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"a2":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32","int32[]"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20":["int32","int32[]"],"this":["arrays*"],"x":["int32","int32[]"],"y":["int32","int32[]"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":"[0, 3]","heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20":"[2, 6]","x":"[0, 3]","y":"[2, 6]"}}}},{"nodeId":46,"description":{"expressions":["ret_value@bitest"],"state":{"heap":{"a1":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"a2":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32","int32[]"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20":["int32","int32[]"],"ret_value@bitest":["int32"],"this":["arrays*"],"x":["int32","int32[]"],"y":["int32","int32[]"],"z":["int32"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":"[0, 3]","heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20":"[2, 6]","ret_value@bitest":"[2, 9]","x":"[0, 3]","y":"[2, 6]","z":"[2, 9]"}}}},{"nodeId":47,"description":{"expressions":["z"],"state":{"heap":{"a1":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20"],"a2":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':14:8"]},"type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":["int32","int32[]"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20":["int32","int32[]"],"this":["arrays*"],"x":["int32","int32[]"],"y":["int32","int32[]"],"z":["int32"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':15:20":"[0, 3]","heap[w]:pp@'imp-testcases/arrays/arrays.imp':20:20":"[2, 6]","x":"[0, 3]","y":"[2, 6]","z":"[2, 9]"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/arrays/allocations/untyped_arrays.test(arrays__this).json b/lisa/lisa-analyses/imp-testcases/arrays/allocations/untyped_arrays.test(arrays__this).json new file mode 100644 index 000000000..6e7305d89 --- /dev/null +++ b/lisa/lisa-analyses/imp-testcases/arrays/allocations/untyped_arrays.test(arrays__this).json @@ -0,0 +1 @@ +{"name":"untyped arrays::test(arrays* this)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"arr = new int32[](5)"},{"id":1,"text":"arr"},{"id":2,"subNodes":[3],"text":"new int32[](5)"},{"id":3,"text":"5"},{"id":4,"subNodes":[5,8],"text":"[](arr, 0) = 0"},{"id":5,"subNodes":[6,7],"text":"[](arr, 0)"},{"id":6,"text":"arr"},{"id":7,"text":"0"},{"id":8,"text":"0"},{"id":9,"subNodes":[10,13],"text":"[](arr, 1) = 1"},{"id":10,"subNodes":[11,12],"text":"[](arr, 1)"},{"id":11,"text":"arr"},{"id":12,"text":"1"},{"id":13,"text":"1"},{"id":14,"subNodes":[15,18],"text":"[](arr, 2) = 2"},{"id":15,"subNodes":[16,17],"text":"[](arr, 2)"},{"id":16,"text":"arr"},{"id":17,"text":"2"},{"id":18,"text":"2"},{"id":19,"subNodes":[20,23],"text":"[](arr, 3) = 3"},{"id":20,"subNodes":[21,22],"text":"[](arr, 3)"},{"id":21,"text":"arr"},{"id":22,"text":"3"},{"id":23,"text":"3"},{"id":24,"subNodes":[25,28],"text":"[](arr, 4) = 4"},{"id":25,"subNodes":[26,27],"text":"[](arr, 4)"},{"id":26,"text":"arr"},{"id":27,"text":"4"},{"id":28,"text":"4"},{"id":29,"subNodes":[30,31],"text":"x = arraylen(arr)"},{"id":30,"text":"x"},{"id":31,"subNodes":[32],"text":"arraylen(arr)"},{"id":32,"text":"arr"},{"id":33,"subNodes":[34],"text":"return x"},{"id":34,"text":"x"}],"edges":[{"sourceId":0,"destId":4,"kind":"SequentialEdge"},{"sourceId":4,"destId":9,"kind":"SequentialEdge"},{"sourceId":9,"destId":14,"kind":"SequentialEdge"},{"sourceId":14,"destId":19,"kind":"SequentialEdge"},{"sourceId":19,"destId":24,"kind":"SequentialEdge"},{"sourceId":24,"destId":29,"kind":"SequentialEdge"},{"sourceId":29,"destId":33,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["arr"],"state":{"heap":{"arr":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":"[5, 5]"}}}},{"nodeId":1,"description":{"expressions":["arr"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":"[5, 5]"}}}},{"nodeId":2,"description":{"expressions":["ref$new int32[]"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":"[5, 5]"}}}},{"nodeId":3,"description":{"expressions":["5"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"this":["arrays*"]},"value":"#TOP#"}}},{"nodeId":4,"description":{"expressions":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"state":{"heap":{"arr":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":"[0, 5]"}}}},{"nodeId":5,"description":{"expressions":["*(arr)->0"],"state":{"heap":{"arr":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":"[5, 5]"}}}},{"nodeId":6,"description":{"expressions":["arr"],"state":{"heap":{"arr":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":"[5, 5]"}}}},{"nodeId":7,"description":{"expressions":["0"],"state":{"heap":{"arr":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":"[5, 5]"}}}},{"nodeId":8,"description":{"expressions":["0"],"state":{"heap":{"arr":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":"[5, 5]"}}}},{"nodeId":9,"description":{"expressions":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"state":{"heap":{"arr":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":"[0, 5]"}}}},{"nodeId":10,"description":{"expressions":["*(arr)->1"],"state":{"heap":{"arr":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":"[0, 5]"}}}},{"nodeId":11,"description":{"expressions":["arr"],"state":{"heap":{"arr":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":"[0, 5]"}}}},{"nodeId":12,"description":{"expressions":["1"],"state":{"heap":{"arr":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":"[0, 5]"}}}},{"nodeId":13,"description":{"expressions":["1"],"state":{"heap":{"arr":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":"[0, 5]"}}}},{"nodeId":14,"description":{"expressions":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"state":{"heap":{"arr":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":"[0, 5]"}}}},{"nodeId":15,"description":{"expressions":["*(arr)->2"],"state":{"heap":{"arr":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":"[0, 5]"}}}},{"nodeId":16,"description":{"expressions":["arr"],"state":{"heap":{"arr":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":"[0, 5]"}}}},{"nodeId":17,"description":{"expressions":["2"],"state":{"heap":{"arr":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":"[0, 5]"}}}},{"nodeId":18,"description":{"expressions":["2"],"state":{"heap":{"arr":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":"[0, 5]"}}}},{"nodeId":19,"description":{"expressions":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"state":{"heap":{"arr":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":"[0, 5]"}}}},{"nodeId":20,"description":{"expressions":["*(arr)->3"],"state":{"heap":{"arr":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":"[0, 5]"}}}},{"nodeId":21,"description":{"expressions":["arr"],"state":{"heap":{"arr":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":"[0, 5]"}}}},{"nodeId":22,"description":{"expressions":["3"],"state":{"heap":{"arr":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":"[0, 5]"}}}},{"nodeId":23,"description":{"expressions":["3"],"state":{"heap":{"arr":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":"[0, 5]"}}}},{"nodeId":24,"description":{"expressions":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"state":{"heap":{"arr":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":"[0, 5]"}}}},{"nodeId":25,"description":{"expressions":["*(arr)->4"],"state":{"heap":{"arr":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":"[0, 5]"}}}},{"nodeId":26,"description":{"expressions":["arr"],"state":{"heap":{"arr":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":"[0, 5]"}}}},{"nodeId":27,"description":{"expressions":["4"],"state":{"heap":{"arr":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":"[0, 5]"}}}},{"nodeId":28,"description":{"expressions":["4"],"state":{"heap":{"arr":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":"[0, 5]"}}}},{"nodeId":29,"description":{"expressions":["x"],"state":{"heap":{"arr":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32","int32[]"],"this":["arrays*"],"x":["int32","int32[]"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":"[0, 5]","x":"[0, 5]"}}}},{"nodeId":30,"description":{"expressions":["x"],"state":{"heap":{"arr":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":"[0, 5]"}}}},{"nodeId":31,"description":{"expressions":["*(arr)->len"],"state":{"heap":{"arr":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":"[0, 5]"}}}},{"nodeId":32,"description":{"expressions":["arr"],"state":{"heap":{"arr":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":"[0, 5]"}}}},{"nodeId":33,"description":{"expressions":["ret_value@test"],"state":{"heap":{"arr":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32","int32[]"],"ret_value@test":["int32","int32[]"],"this":["arrays*"],"x":["int32","int32[]"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":"[0, 5]","ret_value@test":"[0, 5]","x":"[0, 5]"}}}},{"nodeId":34,"description":{"expressions":["x"],"state":{"heap":{"arr":["heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/arrays/arrays.imp':3:6"]},"type":{"arr":["int32[]*"],"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":["int32","int32[]"],"this":["arrays*"],"x":["int32","int32[]"]},"value":{"heap[w]:pp@'imp-testcases/arrays/arrays.imp':4:21":"[0, 5]","x":"[0, 5]"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/arrays/arrays.imp b/lisa/lisa-analyses/imp-testcases/arrays/arrays.imp new file mode 100644 index 000000000..e3ece9d58 --- /dev/null +++ b/lisa/lisa-analyses/imp-testcases/arrays/arrays.imp @@ -0,0 +1,29 @@ +class arrays { + + test() { + def arr = new int[5]; + arr[0] = 0; + arr[1] = 1; + arr[2] = 2; + arr[3] = 3; + arr[4] = 4; + def x = arraylen(arr); + return x; + } + + bitest() { + def a1 = new int[3]; + a1[0] = 0; + a1[1] = 1; + a1[2] = 2; + + def a2 = new int[2]; + a2[0] = 5; + a2[1] = 6; + + def x = arraylen(a1); + def y = arraylen(a2); + def z = x + y; + return z; + } +} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/arrays/monolith/report.json b/lisa/lisa-analyses/imp-testcases/arrays/monolith/report.json new file mode 100644 index 000000000..cf3996f0e --- /dev/null +++ b/lisa/lisa-analyses/imp-testcases/arrays/monolith/report.json @@ -0,0 +1,38 @@ +{ + "warnings" : [ ], + "files" : [ "report.json", "untyped_arrays.bitest(arrays__this).json", "untyped_arrays.test(arrays__this).json" ], + "info" : { + "cfgs" : "2", + "duration" : "32ms", + "end" : "2023-09-11T19:18:35.529+02:00", + "expressions" : "64", + "files" : "2", + "globals" : "0", + "members" : "2", + "programs" : "1", + "start" : "2023-09-11T19:18:35.497+02:00", + "statements" : "19", + "units" : "1", + "version" : "0.1b8", + "warnings" : "0" + }, + "configuration" : { + "analysisGraphs" : "NONE", + "descendingPhaseType" : "NONE", + "dumpForcesUnwinding" : "false", + "fixpointWorkingSet" : "DuplicateFreeFIFOWorkingSet", + "glbThreshold" : "5", + "hotspots" : "unset", + "jsonOutput" : "true", + "openCallPolicy" : "WorstCasePolicy", + "optimize" : "false", + "recursionWideningThreshold" : "5", + "semanticChecks" : "", + "serializeInputs" : "false", + "serializeResults" : "true", + "syntacticChecks" : "", + "useWideningPoints" : "true", + "wideningThreshold" : "5", + "workdir" : "test-outputs/arrays/monolith" + } +} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/arrays/monolith/untyped_arrays.bitest(arrays__this).json b/lisa/lisa-analyses/imp-testcases/arrays/monolith/untyped_arrays.bitest(arrays__this).json new file mode 100644 index 000000000..f1a5b4f0d --- /dev/null +++ b/lisa/lisa-analyses/imp-testcases/arrays/monolith/untyped_arrays.bitest(arrays__this).json @@ -0,0 +1 @@ +{"name":"untyped arrays::bitest(arrays* this)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"a1 = new int32[](3)"},{"id":1,"text":"a1"},{"id":2,"subNodes":[3],"text":"new int32[](3)"},{"id":3,"text":"3"},{"id":4,"subNodes":[5,8],"text":"[](a1, 0) = 0"},{"id":5,"subNodes":[6,7],"text":"[](a1, 0)"},{"id":6,"text":"a1"},{"id":7,"text":"0"},{"id":8,"text":"0"},{"id":9,"subNodes":[10,13],"text":"[](a1, 1) = 1"},{"id":10,"subNodes":[11,12],"text":"[](a1, 1)"},{"id":11,"text":"a1"},{"id":12,"text":"1"},{"id":13,"text":"1"},{"id":14,"subNodes":[15,18],"text":"[](a1, 2) = 2"},{"id":15,"subNodes":[16,17],"text":"[](a1, 2)"},{"id":16,"text":"a1"},{"id":17,"text":"2"},{"id":18,"text":"2"},{"id":19,"subNodes":[20,21],"text":"a2 = new int32[](2)"},{"id":20,"text":"a2"},{"id":21,"subNodes":[22],"text":"new int32[](2)"},{"id":22,"text":"2"},{"id":23,"subNodes":[24,27],"text":"[](a2, 0) = 5"},{"id":24,"subNodes":[25,26],"text":"[](a2, 0)"},{"id":25,"text":"a2"},{"id":26,"text":"0"},{"id":27,"text":"5"},{"id":28,"subNodes":[29,32],"text":"[](a2, 1) = 6"},{"id":29,"subNodes":[30,31],"text":"[](a2, 1)"},{"id":30,"text":"a2"},{"id":31,"text":"1"},{"id":32,"text":"6"},{"id":33,"subNodes":[34,35],"text":"x = arraylen(a1)"},{"id":34,"text":"x"},{"id":35,"subNodes":[36],"text":"arraylen(a1)"},{"id":36,"text":"a1"},{"id":37,"subNodes":[38,39],"text":"y = arraylen(a2)"},{"id":38,"text":"y"},{"id":39,"subNodes":[40],"text":"arraylen(a2)"},{"id":40,"text":"a2"},{"id":41,"subNodes":[42,43],"text":"z = +(x, y)"},{"id":42,"text":"z"},{"id":43,"subNodes":[44,45],"text":"+(x, y)"},{"id":44,"text":"x"},{"id":45,"text":"y"},{"id":46,"subNodes":[47],"text":"return z"},{"id":47,"text":"z"}],"edges":[{"sourceId":0,"destId":4,"kind":"SequentialEdge"},{"sourceId":4,"destId":9,"kind":"SequentialEdge"},{"sourceId":9,"destId":14,"kind":"SequentialEdge"},{"sourceId":14,"destId":19,"kind":"SequentialEdge"},{"sourceId":19,"destId":23,"kind":"SequentialEdge"},{"sourceId":23,"destId":28,"kind":"SequentialEdge"},{"sourceId":28,"destId":33,"kind":"SequentialEdge"},{"sourceId":33,"destId":37,"kind":"SequentialEdge"},{"sourceId":37,"destId":41,"kind":"SequentialEdge"},{"sourceId":41,"destId":46,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["a1"],"state":{"heap":"monolith","type":{"a1":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[3, 3]"}}}},{"nodeId":1,"description":{"expressions":["a1"],"state":{"heap":"monolith","type":{"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[3, 3]"}}}},{"nodeId":2,"description":{"expressions":["ref$new int32[]"],"state":{"heap":"monolith","type":{"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[3, 3]"}}}},{"nodeId":3,"description":{"expressions":["3"],"state":{"heap":"monolith","type":{"this":["arrays*"]},"value":"#TOP#"}}},{"nodeId":4,"description":{"expressions":["heap[w]:heap"],"state":{"heap":"monolith","type":{"a1":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[0, 3]"}}}},{"nodeId":5,"description":{"expressions":["*(a1)->0"],"state":{"heap":"monolith","type":{"a1":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[3, 3]"}}}},{"nodeId":6,"description":{"expressions":["a1"],"state":{"heap":"monolith","type":{"a1":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[3, 3]"}}}},{"nodeId":7,"description":{"expressions":["0"],"state":{"heap":"monolith","type":{"a1":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[3, 3]"}}}},{"nodeId":8,"description":{"expressions":["0"],"state":{"heap":"monolith","type":{"a1":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[3, 3]"}}}},{"nodeId":9,"description":{"expressions":["heap[w]:heap"],"state":{"heap":"monolith","type":{"a1":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[0, 3]"}}}},{"nodeId":10,"description":{"expressions":["*(a1)->1"],"state":{"heap":"monolith","type":{"a1":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[0, 3]"}}}},{"nodeId":11,"description":{"expressions":["a1"],"state":{"heap":"monolith","type":{"a1":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[0, 3]"}}}},{"nodeId":12,"description":{"expressions":["1"],"state":{"heap":"monolith","type":{"a1":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[0, 3]"}}}},{"nodeId":13,"description":{"expressions":["1"],"state":{"heap":"monolith","type":{"a1":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[0, 3]"}}}},{"nodeId":14,"description":{"expressions":["heap[w]:heap"],"state":{"heap":"monolith","type":{"a1":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[0, 3]"}}}},{"nodeId":15,"description":{"expressions":["*(a1)->2"],"state":{"heap":"monolith","type":{"a1":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[0, 3]"}}}},{"nodeId":16,"description":{"expressions":["a1"],"state":{"heap":"monolith","type":{"a1":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[0, 3]"}}}},{"nodeId":17,"description":{"expressions":["2"],"state":{"heap":"monolith","type":{"a1":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[0, 3]"}}}},{"nodeId":18,"description":{"expressions":["2"],"state":{"heap":"monolith","type":{"a1":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[0, 3]"}}}},{"nodeId":19,"description":{"expressions":["a2"],"state":{"heap":"monolith","type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[0, 3]"}}}},{"nodeId":20,"description":{"expressions":["a2"],"state":{"heap":"monolith","type":{"a1":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[0, 3]"}}}},{"nodeId":21,"description":{"expressions":["ref$new int32[]"],"state":{"heap":"monolith","type":{"a1":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[0, 3]"}}}},{"nodeId":22,"description":{"expressions":["2"],"state":{"heap":"monolith","type":{"a1":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[0, 3]"}}}},{"nodeId":23,"description":{"expressions":["heap[w]:heap"],"state":{"heap":"monolith","type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[0, 5]"}}}},{"nodeId":24,"description":{"expressions":["*(a2)->0"],"state":{"heap":"monolith","type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[0, 3]"}}}},{"nodeId":25,"description":{"expressions":["a2"],"state":{"heap":"monolith","type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[0, 3]"}}}},{"nodeId":26,"description":{"expressions":["0"],"state":{"heap":"monolith","type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[0, 3]"}}}},{"nodeId":27,"description":{"expressions":["5"],"state":{"heap":"monolith","type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[0, 3]"}}}},{"nodeId":28,"description":{"expressions":["heap[w]:heap"],"state":{"heap":"monolith","type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[0, 6]"}}}},{"nodeId":29,"description":{"expressions":["*(a2)->1"],"state":{"heap":"monolith","type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[0, 5]"}}}},{"nodeId":30,"description":{"expressions":["a2"],"state":{"heap":"monolith","type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[0, 5]"}}}},{"nodeId":31,"description":{"expressions":["1"],"state":{"heap":"monolith","type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[0, 5]"}}}},{"nodeId":32,"description":{"expressions":["6"],"state":{"heap":"monolith","type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[0, 5]"}}}},{"nodeId":33,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"],"x":["int32","int32[]"]},"value":{"heap[w]:heap":"[0, 6]","x":"[0, 6]"}}}},{"nodeId":34,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[0, 6]"}}}},{"nodeId":35,"description":{"expressions":["*(a1)->len"],"state":{"heap":"monolith","type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[0, 6]"}}}},{"nodeId":36,"description":{"expressions":["a1"],"state":{"heap":"monolith","type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[0, 6]"}}}},{"nodeId":37,"description":{"expressions":["y"],"state":{"heap":"monolith","type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"],"x":["int32","int32[]"],"y":["int32","int32[]"]},"value":{"heap[w]:heap":"[0, 6]","x":"[0, 6]","y":"[0, 6]"}}}},{"nodeId":38,"description":{"expressions":["y"],"state":{"heap":"monolith","type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"],"x":["int32","int32[]"]},"value":{"heap[w]:heap":"[0, 6]","x":"[0, 6]"}}}},{"nodeId":39,"description":{"expressions":["*(a2)->len"],"state":{"heap":"monolith","type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"],"x":["int32","int32[]"]},"value":{"heap[w]:heap":"[0, 6]","x":"[0, 6]"}}}},{"nodeId":40,"description":{"expressions":["a2"],"state":{"heap":"monolith","type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"],"x":["int32","int32[]"]},"value":{"heap[w]:heap":"[0, 6]","x":"[0, 6]"}}}},{"nodeId":41,"description":{"expressions":["z"],"state":{"heap":"monolith","type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"],"x":["int32","int32[]"],"y":["int32","int32[]"],"z":["int32"]},"value":{"heap[w]:heap":"[0, 6]","x":"[0, 6]","y":"[0, 6]","z":"[0, 12]"}}}},{"nodeId":42,"description":{"expressions":["z"],"state":{"heap":"monolith","type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"],"x":["int32","int32[]"],"y":["int32","int32[]"]},"value":{"heap[w]:heap":"[0, 6]","x":"[0, 6]","y":"[0, 6]"}}}},{"nodeId":43,"description":{"expressions":["x + y"],"state":{"heap":"monolith","type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"],"x":["int32","int32[]"],"y":["int32","int32[]"]},"value":{"heap[w]:heap":"[0, 6]","x":"[0, 6]","y":"[0, 6]"}}}},{"nodeId":44,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"],"x":["int32","int32[]"],"y":["int32","int32[]"]},"value":{"heap[w]:heap":"[0, 6]","x":"[0, 6]","y":"[0, 6]"}}}},{"nodeId":45,"description":{"expressions":["y"],"state":{"heap":"monolith","type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"],"x":["int32","int32[]"],"y":["int32","int32[]"]},"value":{"heap[w]:heap":"[0, 6]","x":"[0, 6]","y":"[0, 6]"}}}},{"nodeId":46,"description":{"expressions":["ret_value@bitest"],"state":{"heap":"monolith","type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"ret_value@bitest":["int32"],"this":["arrays*"],"x":["int32","int32[]"],"y":["int32","int32[]"],"z":["int32"]},"value":{"heap[w]:heap":"[0, 6]","ret_value@bitest":"[0, 12]","x":"[0, 6]","y":"[0, 6]","z":"[0, 12]"}}}},{"nodeId":47,"description":{"expressions":["z"],"state":{"heap":"monolith","type":{"a1":["int32[]*"],"a2":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"],"x":["int32","int32[]"],"y":["int32","int32[]"],"z":["int32"]},"value":{"heap[w]:heap":"[0, 6]","x":"[0, 6]","y":"[0, 6]","z":"[0, 12]"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/arrays/monolith/untyped_arrays.test(arrays__this).json b/lisa/lisa-analyses/imp-testcases/arrays/monolith/untyped_arrays.test(arrays__this).json new file mode 100644 index 000000000..5a27f08e5 --- /dev/null +++ b/lisa/lisa-analyses/imp-testcases/arrays/monolith/untyped_arrays.test(arrays__this).json @@ -0,0 +1 @@ +{"name":"untyped arrays::test(arrays* this)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"arr = new int32[](5)"},{"id":1,"text":"arr"},{"id":2,"subNodes":[3],"text":"new int32[](5)"},{"id":3,"text":"5"},{"id":4,"subNodes":[5,8],"text":"[](arr, 0) = 0"},{"id":5,"subNodes":[6,7],"text":"[](arr, 0)"},{"id":6,"text":"arr"},{"id":7,"text":"0"},{"id":8,"text":"0"},{"id":9,"subNodes":[10,13],"text":"[](arr, 1) = 1"},{"id":10,"subNodes":[11,12],"text":"[](arr, 1)"},{"id":11,"text":"arr"},{"id":12,"text":"1"},{"id":13,"text":"1"},{"id":14,"subNodes":[15,18],"text":"[](arr, 2) = 2"},{"id":15,"subNodes":[16,17],"text":"[](arr, 2)"},{"id":16,"text":"arr"},{"id":17,"text":"2"},{"id":18,"text":"2"},{"id":19,"subNodes":[20,23],"text":"[](arr, 3) = 3"},{"id":20,"subNodes":[21,22],"text":"[](arr, 3)"},{"id":21,"text":"arr"},{"id":22,"text":"3"},{"id":23,"text":"3"},{"id":24,"subNodes":[25,28],"text":"[](arr, 4) = 4"},{"id":25,"subNodes":[26,27],"text":"[](arr, 4)"},{"id":26,"text":"arr"},{"id":27,"text":"4"},{"id":28,"text":"4"},{"id":29,"subNodes":[30,31],"text":"x = arraylen(arr)"},{"id":30,"text":"x"},{"id":31,"subNodes":[32],"text":"arraylen(arr)"},{"id":32,"text":"arr"},{"id":33,"subNodes":[34],"text":"return x"},{"id":34,"text":"x"}],"edges":[{"sourceId":0,"destId":4,"kind":"SequentialEdge"},{"sourceId":4,"destId":9,"kind":"SequentialEdge"},{"sourceId":9,"destId":14,"kind":"SequentialEdge"},{"sourceId":14,"destId":19,"kind":"SequentialEdge"},{"sourceId":19,"destId":24,"kind":"SequentialEdge"},{"sourceId":24,"destId":29,"kind":"SequentialEdge"},{"sourceId":29,"destId":33,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["arr"],"state":{"heap":"monolith","type":{"arr":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[5, 5]"}}}},{"nodeId":1,"description":{"expressions":["arr"],"state":{"heap":"monolith","type":{"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[5, 5]"}}}},{"nodeId":2,"description":{"expressions":["ref$new int32[]"],"state":{"heap":"monolith","type":{"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[5, 5]"}}}},{"nodeId":3,"description":{"expressions":["5"],"state":{"heap":"monolith","type":{"this":["arrays*"]},"value":"#TOP#"}}},{"nodeId":4,"description":{"expressions":["heap[w]:heap"],"state":{"heap":"monolith","type":{"arr":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[0, 5]"}}}},{"nodeId":5,"description":{"expressions":["*(arr)->0"],"state":{"heap":"monolith","type":{"arr":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[5, 5]"}}}},{"nodeId":6,"description":{"expressions":["arr"],"state":{"heap":"monolith","type":{"arr":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[5, 5]"}}}},{"nodeId":7,"description":{"expressions":["0"],"state":{"heap":"monolith","type":{"arr":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[5, 5]"}}}},{"nodeId":8,"description":{"expressions":["0"],"state":{"heap":"monolith","type":{"arr":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[5, 5]"}}}},{"nodeId":9,"description":{"expressions":["heap[w]:heap"],"state":{"heap":"monolith","type":{"arr":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[0, 5]"}}}},{"nodeId":10,"description":{"expressions":["*(arr)->1"],"state":{"heap":"monolith","type":{"arr":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[0, 5]"}}}},{"nodeId":11,"description":{"expressions":["arr"],"state":{"heap":"monolith","type":{"arr":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[0, 5]"}}}},{"nodeId":12,"description":{"expressions":["1"],"state":{"heap":"monolith","type":{"arr":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[0, 5]"}}}},{"nodeId":13,"description":{"expressions":["1"],"state":{"heap":"monolith","type":{"arr":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[0, 5]"}}}},{"nodeId":14,"description":{"expressions":["heap[w]:heap"],"state":{"heap":"monolith","type":{"arr":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[0, 5]"}}}},{"nodeId":15,"description":{"expressions":["*(arr)->2"],"state":{"heap":"monolith","type":{"arr":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[0, 5]"}}}},{"nodeId":16,"description":{"expressions":["arr"],"state":{"heap":"monolith","type":{"arr":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[0, 5]"}}}},{"nodeId":17,"description":{"expressions":["2"],"state":{"heap":"monolith","type":{"arr":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[0, 5]"}}}},{"nodeId":18,"description":{"expressions":["2"],"state":{"heap":"monolith","type":{"arr":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[0, 5]"}}}},{"nodeId":19,"description":{"expressions":["heap[w]:heap"],"state":{"heap":"monolith","type":{"arr":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[0, 5]"}}}},{"nodeId":20,"description":{"expressions":["*(arr)->3"],"state":{"heap":"monolith","type":{"arr":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[0, 5]"}}}},{"nodeId":21,"description":{"expressions":["arr"],"state":{"heap":"monolith","type":{"arr":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[0, 5]"}}}},{"nodeId":22,"description":{"expressions":["3"],"state":{"heap":"monolith","type":{"arr":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[0, 5]"}}}},{"nodeId":23,"description":{"expressions":["3"],"state":{"heap":"monolith","type":{"arr":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[0, 5]"}}}},{"nodeId":24,"description":{"expressions":["heap[w]:heap"],"state":{"heap":"monolith","type":{"arr":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[0, 5]"}}}},{"nodeId":25,"description":{"expressions":["*(arr)->4"],"state":{"heap":"monolith","type":{"arr":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[0, 5]"}}}},{"nodeId":26,"description":{"expressions":["arr"],"state":{"heap":"monolith","type":{"arr":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[0, 5]"}}}},{"nodeId":27,"description":{"expressions":["4"],"state":{"heap":"monolith","type":{"arr":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[0, 5]"}}}},{"nodeId":28,"description":{"expressions":["4"],"state":{"heap":"monolith","type":{"arr":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[0, 5]"}}}},{"nodeId":29,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"arr":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"],"x":["int32","int32[]"]},"value":{"heap[w]:heap":"[0, 5]","x":"[0, 5]"}}}},{"nodeId":30,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"arr":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[0, 5]"}}}},{"nodeId":31,"description":{"expressions":["*(arr)->len"],"state":{"heap":"monolith","type":{"arr":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[0, 5]"}}}},{"nodeId":32,"description":{"expressions":["arr"],"state":{"heap":"monolith","type":{"arr":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"]},"value":{"heap[w]:heap":"[0, 5]"}}}},{"nodeId":33,"description":{"expressions":["ret_value@test"],"state":{"heap":"monolith","type":{"arr":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"ret_value@test":["int32","int32[]"],"this":["arrays*"],"x":["int32","int32[]"]},"value":{"heap[w]:heap":"[0, 5]","ret_value@test":"[0, 5]","x":"[0, 5]"}}}},{"nodeId":34,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"arr":["int32[]*"],"heap[w]:heap":["int32","int32[]"],"this":["arrays*"],"x":["int32","int32[]"]},"value":{"heap[w]:heap":"[0, 5]","x":"[0, 5]"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/available-expressions/report.json b/lisa/lisa-analyses/imp-testcases/available-expressions/report.json index 119d40e90..f28102ee6 100644 --- a/lisa/lisa-analyses/imp-testcases/available-expressions/report.json +++ b/lisa/lisa-analyses/imp-testcases/available-expressions/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_ae.f0(ae__this).json", "untyped_ae.f1(ae__this).json", "untyped_ae.f2(ae__this).json", "untyped_ae.f3(ae__this).json", "untyped_ae.f4(ae__this).json" ], "info" : { "cfgs" : "5", - "duration" : "1s 596ms", - "end" : "2023-04-20T12:45:16.971+02:00", + "duration" : "1s 708ms", + "end" : "2023-09-07T11:45:37.118+02:00", "expressions" : "151", "files" : "5", "globals" : "0", "members" : "5", "programs" : "1", - "start" : "2023-04-20T12:45:15.375+02:00", + "start" : "2023-09-07T11:45:35.410+02:00", "statements" : "54", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/available-expressions" } diff --git a/lisa/lisa-analyses/imp-testcases/bricks/report.json b/lisa/lisa-analyses/imp-testcases/bricks/report.json index 5e14aef8d..5afa9b1ce 100644 --- a/lisa/lisa-analyses/imp-testcases/bricks/report.json +++ b/lisa/lisa-analyses/imp-testcases/bricks/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_bricks.m1(bricks__this).json", "untyped_bricks.m2(bricks__this,_untyped_x).json", "untyped_bricks.m3(bricks__this,_untyped_x).json" ], "info" : { "cfgs" : "3", - "duration" : "69ms", - "end" : "2023-04-20T12:45:39.221+02:00", + "duration" : "54ms", + "end" : "2023-09-07T11:45:57.267+02:00", "expressions" : "24", "files" : "3", "globals" : "0", "members" : "3", "programs" : "1", - "start" : "2023-04-20T12:45:39.152+02:00", + "start" : "2023-09-07T11:45:57.213+02:00", "statements" : "13", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/bricks" } diff --git a/lisa/lisa-analyses/imp-testcases/char-inclusion/report.json b/lisa/lisa-analyses/imp-testcases/char-inclusion/report.json index c102ccff9..4960f82f0 100644 --- a/lisa/lisa-analyses/imp-testcases/char-inclusion/report.json +++ b/lisa/lisa-analyses/imp-testcases/char-inclusion/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_ci.m1(ci__this).json", "untyped_ci.m2(ci__this,_untyped_x).json", "untyped_ci.m3(ci__this,_untyped_x).json" ], "info" : { "cfgs" : "3", - "duration" : "44ms", - "end" : "2023-04-20T12:45:39.324+02:00", + "duration" : "25ms", + "end" : "2023-09-07T11:45:57.326+02:00", "expressions" : "24", "files" : "3", "globals" : "0", "members" : "3", "programs" : "1", - "start" : "2023-04-20T12:45:39.280+02:00", + "start" : "2023-09-07T11:45:57.301+02:00", "statements" : "13", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/char-inclusion" } diff --git a/lisa/lisa-analyses/imp-testcases/constant-propagation-df/report.json b/lisa/lisa-analyses/imp-testcases/constant-propagation-df/report.json index a612f7710..0fc26a57a 100644 --- a/lisa/lisa-analyses/imp-testcases/constant-propagation-df/report.json +++ b/lisa/lisa-analyses/imp-testcases/constant-propagation-df/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_cp.f0(cp__this).json", "untyped_cp.f1(cp__this,_untyped_x,_untyped_y).json", "untyped_cp.f2(cp__this).json", "untyped_cp.f3(cp__this,_untyped_x,_untyped_y).json", "untyped_cp.f4(cp__this,_untyped_x,_untyped_y).json" ], "info" : { "cfgs" : "5", - "duration" : "167ms", - "end" : "2023-04-20T12:45:18.621+02:00", + "duration" : "155ms", + "end" : "2023-09-07T11:45:39.005+02:00", "expressions" : "71", "files" : "5", "globals" : "0", "members" : "5", "programs" : "1", - "start" : "2023-04-20T12:45:18.454+02:00", + "start" : "2023-09-07T11:45:38.850+02:00", "statements" : "33", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/constant-propagation-df" } diff --git a/lisa/lisa-analyses/imp-testcases/descending-maxglb/report.json b/lisa/lisa-analyses/imp-testcases/descending-maxglb/report.json index cd571984c..3c554fdf8 100644 --- a/lisa/lisa-analyses/imp-testcases/descending-maxglb/report.json +++ b/lisa/lisa-analyses/imp-testcases/descending-maxglb/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_tutorial.doublewhile(tutorial__this,_untyped_t).json", "untyped_tutorial.intv_dec(tutorial__this).json", "untyped_tutorial.sat(tutorial__this).json", "untyped_tutorial.sat2(tutorial__this).json" ], "info" : { "cfgs" : "4", - "duration" : "129ms", - "end" : "2023-04-20T12:45:20.846+02:00", + "duration" : "102ms", + "end" : "2023-09-07T11:45:40.646+02:00", "expressions" : "52", "files" : "4", "globals" : "0", "members" : "4", "programs" : "1", - "start" : "2023-04-20T12:45:20.717+02:00", + "start" : "2023-09-07T11:45:40.544+02:00", "statements" : "21", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/descending-maxglb" } diff --git a/lisa/lisa-analyses/imp-testcases/descending-widening/report.json b/lisa/lisa-analyses/imp-testcases/descending-widening/report.json index 8b322c1e9..3265420b5 100644 --- a/lisa/lisa-analyses/imp-testcases/descending-widening/report.json +++ b/lisa/lisa-analyses/imp-testcases/descending-widening/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_tutorial.doublewhile(tutorial__this,_untyped_t).json", "untyped_tutorial.intv_dec(tutorial__this).json", "untyped_tutorial.sat(tutorial__this).json", "untyped_tutorial.sat2(tutorial__this).json" ], "info" : { "cfgs" : "4", - "duration" : "254ms", - "end" : "2023-04-20T12:45:20.238+02:00", + "duration" : "169ms", + "end" : "2023-09-07T11:45:40.135+02:00", "expressions" : "52", "files" : "4", "globals" : "0", "members" : "4", "programs" : "1", - "start" : "2023-04-20T12:45:19.984+02:00", + "start" : "2023-09-07T11:45:39.966+02:00", "statements" : "21", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/descending-widening" } diff --git a/lisa/lisa-analyses/imp-testcases/fsa/report.json b/lisa/lisa-analyses/imp-testcases/fsa/report.json index 0ede1c09b..f7574b3d2 100644 --- a/lisa/lisa-analyses/imp-testcases/fsa/report.json +++ b/lisa/lisa-analyses/imp-testcases/fsa/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_fsa.branching(fsa__this,_untyped_x).json", "untyped_fsa.constants(fsa__this).json", "untyped_fsa.loops(fsa__this,_untyped_x).json" ], "info" : { "cfgs" : "3", - "duration" : "384ms", - "end" : "2023-04-20T12:45:39.848+02:00", + "duration" : "419ms", + "end" : "2023-09-07T11:45:57.915+02:00", "expressions" : "20", "files" : "3", "globals" : "0", "members" : "3", "programs" : "1", - "start" : "2023-04-20T12:45:39.464+02:00", + "start" : "2023-09-07T11:45:57.496+02:00", "statements" : "12", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/fsa" } diff --git a/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-insensitive/report.json b/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-insensitive/report.json index d7ec3ed34..e2b98bcb1 100644 --- a/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-insensitive/report.json +++ b/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-insensitive/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_A.f1(A__this).json", "untyped_A.f10(A__this).json", "untyped_A.f2(A__this).json", "untyped_A.f3(A__this).json", "untyped_A.f4(A__this).json", "untyped_A.f5(A__this).json", "untyped_A.f6(A__this).json", "untyped_A.f7(A__this).json", "untyped_A.f8(A__this).json", "untyped_A.f9(A__this).json" ], "info" : { "cfgs" : "10", - "duration" : "216ms", - "end" : "2023-04-20T12:45:22.710+02:00", + "duration" : "110ms", + "end" : "2023-09-13T14:02:18.859+02:00", "expressions" : "144", "files" : "10", "globals" : "2", "members" : "10", "programs" : "1", - "start" : "2023-04-20T12:45:22.494+02:00", + "start" : "2023-09-13T14:02:18.749+02:00", "statements" : "56", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/heap/point-based-heap/field-insensitive" } diff --git a/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-insensitive/untyped_A.f1(A__this).json b/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-insensitive/untyped_A.f1(A__this).json index b2abb60f7..18d8df993 100644 --- a/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-insensitive/untyped_A.f1(A__this).json +++ b/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-insensitive/untyped_A.f1(A__this).json @@ -1 +1 @@ -{"name":"untyped A::f1(A* this)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"o1 = new A(1, 2)"},{"id":1,"text":"o1"},{"id":2,"subNodes":[3,4],"text":"new A(1, 2)"},{"id":3,"text":"1"},{"id":4,"text":"2"},{"id":5,"subNodes":[6,8],"text":"o1::a = 1"},{"id":6,"subNodes":[7],"text":"o1::a"},{"id":7,"text":"o1"},{"id":8,"text":"1"},{"id":9,"subNodes":[10,12],"text":"o1::b = 2"},{"id":10,"subNodes":[11],"text":"o1::b"},{"id":11,"text":"o1"},{"id":12,"text":"2"},{"id":13,"subNodes":[14,16],"text":"o1::a = +(o1::b, 1)"},{"id":14,"subNodes":[15],"text":"o1::a"},{"id":15,"text":"o1"},{"id":16,"subNodes":[17,19],"text":"+(o1::b, 1)"},{"id":17,"subNodes":[18],"text":"o1::b"},{"id":18,"text":"o1"},{"id":19,"text":"1"},{"id":20,"text":"ret"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"},{"sourceId":5,"destId":9,"kind":"SequentialEdge"},{"sourceId":9,"destId":13,"kind":"SequentialEdge"},{"sourceId":13,"destId":20,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["o1"],"state":{"heap":{"o1":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":["A"],"o1":["A*"]},"value":"#TOP#"}}},{"nodeId":1,"description":{"expressions":["o1"],"state":{"heap":"#TOP#","type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":["A"]},"value":"#TOP#"}}},{"nodeId":2,"description":{"expressions":["ref$new A"],"state":{"heap":"#TOP#","type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":["A"]},"value":"#TOP#"}}},{"nodeId":3,"description":{"expressions":["1"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':5:4]"},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":4,"description":{"expressions":["2"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':5:4]"},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":5,"description":{"expressions":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20"],"state":{"heap":{"o1":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":["A","int32"],"o1":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":"[1, 1]"}}}},{"nodeId":6,"description":{"expressions":["*(o1)->a"],"state":{"heap":{"o1":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":["A"],"o1":["A*"]},"value":"#TOP#"}}},{"nodeId":7,"description":{"expressions":["o1"],"state":{"heap":{"o1":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":["A"],"o1":["A*"]},"value":"#TOP#"}}},{"nodeId":8,"description":{"expressions":["1"],"state":{"heap":{"o1":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":["A"],"o1":["A*"]},"value":"#TOP#"}}},{"nodeId":9,"description":{"expressions":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20"],"state":{"heap":{"o1":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":["A","int32"],"o1":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":"[1, 2]"}}}},{"nodeId":10,"description":{"expressions":["*(o1)->b"],"state":{"heap":{"o1":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":["A","int32"],"o1":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":"[1, 1]"}}}},{"nodeId":11,"description":{"expressions":["o1"],"state":{"heap":{"o1":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":["A","int32"],"o1":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":"[1, 1]"}}}},{"nodeId":12,"description":{"expressions":["2"],"state":{"heap":{"o1":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":["A","int32"],"o1":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":"[1, 1]"}}}},{"nodeId":13,"description":{"expressions":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20"],"state":{"heap":{"o1":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":["A","int32"],"o1":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":"[1, 3]"}}}},{"nodeId":14,"description":{"expressions":["*(o1)->a"],"state":{"heap":{"o1":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":["A","int32"],"o1":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":"[1, 2]"}}}},{"nodeId":15,"description":{"expressions":["o1"],"state":{"heap":{"o1":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":["A","int32"],"o1":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":"[1, 2]"}}}},{"nodeId":16,"description":{"expressions":["*(o1)->b + 1"],"state":{"heap":{"o1":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":["A","int32"],"o1":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":"[1, 2]"}}}},{"nodeId":17,"description":{"expressions":["*(o1)->b"],"state":{"heap":{"o1":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":["A","int32"],"o1":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":"[1, 2]"}}}},{"nodeId":18,"description":{"expressions":["o1"],"state":{"heap":{"o1":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":["A","int32"],"o1":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":"[1, 2]"}}}},{"nodeId":19,"description":{"expressions":["1"],"state":{"heap":{"o1":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":["A","int32"],"o1":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":"[1, 2]"}}}},{"nodeId":20,"description":{"expressions":["skip"],"state":{"heap":{"o1":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":["A","int32"],"o1":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":"[1, 3]"}}}}]} \ No newline at end of file +{"name":"untyped A::f1(A* this)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"o1 = new A(1, 2)"},{"id":1,"text":"o1"},{"id":2,"subNodes":[3,4],"text":"new A(1, 2)"},{"id":3,"text":"1"},{"id":4,"text":"2"},{"id":5,"subNodes":[6,8],"text":"o1::a = 1"},{"id":6,"subNodes":[7],"text":"o1::a"},{"id":7,"text":"o1"},{"id":8,"text":"1"},{"id":9,"subNodes":[10,12],"text":"o1::b = 2"},{"id":10,"subNodes":[11],"text":"o1::b"},{"id":11,"text":"o1"},{"id":12,"text":"2"},{"id":13,"subNodes":[14,16],"text":"o1::a = +(o1::b, 1)"},{"id":14,"subNodes":[15],"text":"o1::a"},{"id":15,"text":"o1"},{"id":16,"subNodes":[17,19],"text":"+(o1::b, 1)"},{"id":17,"subNodes":[18],"text":"o1::b"},{"id":18,"text":"o1"},{"id":19,"text":"1"},{"id":20,"text":"ret"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"},{"sourceId":5,"destId":9,"kind":"SequentialEdge"},{"sourceId":9,"destId":13,"kind":"SequentialEdge"},{"sourceId":13,"destId":20,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["o1"],"state":{"heap":{"o1":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":["A"],"o1":["A*"]},"value":"#TOP#"}}},{"nodeId":1,"description":{"expressions":["o1"],"state":{"heap":"#TOP#","type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":["A"]},"value":"#TOP#"}}},{"nodeId":2,"description":{"expressions":["ref$new A"],"state":{"heap":"#TOP#","type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":["A"]},"value":"#TOP#"}}},{"nodeId":3,"description":{"expressions":["1"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':5:4"]},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":4,"description":{"expressions":["2"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':5:4"]},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":5,"description":{"expressions":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20"],"state":{"heap":{"o1":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":["A","int32"],"o1":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":"[1, 1]"}}}},{"nodeId":6,"description":{"expressions":["*(o1)->a"],"state":{"heap":{"o1":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":["A"],"o1":["A*"]},"value":"#TOP#"}}},{"nodeId":7,"description":{"expressions":["o1"],"state":{"heap":{"o1":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":["A"],"o1":["A*"]},"value":"#TOP#"}}},{"nodeId":8,"description":{"expressions":["1"],"state":{"heap":{"o1":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":["A"],"o1":["A*"]},"value":"#TOP#"}}},{"nodeId":9,"description":{"expressions":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20"],"state":{"heap":{"o1":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":["A","int32"],"o1":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":"[1, 2]"}}}},{"nodeId":10,"description":{"expressions":["*(o1)->b"],"state":{"heap":{"o1":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":["A","int32"],"o1":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":"[1, 1]"}}}},{"nodeId":11,"description":{"expressions":["o1"],"state":{"heap":{"o1":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":["A","int32"],"o1":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":"[1, 1]"}}}},{"nodeId":12,"description":{"expressions":["2"],"state":{"heap":{"o1":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":["A","int32"],"o1":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":"[1, 1]"}}}},{"nodeId":13,"description":{"expressions":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20"],"state":{"heap":{"o1":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":["A","int32"],"o1":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":"[1, 3]"}}}},{"nodeId":14,"description":{"expressions":["*(o1)->a"],"state":{"heap":{"o1":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":["A","int32"],"o1":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":"[1, 2]"}}}},{"nodeId":15,"description":{"expressions":["o1"],"state":{"heap":{"o1":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":["A","int32"],"o1":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":"[1, 2]"}}}},{"nodeId":16,"description":{"expressions":["*(o1)->b + 1"],"state":{"heap":{"o1":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":["A","int32"],"o1":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":"[1, 2]"}}}},{"nodeId":17,"description":{"expressions":["*(o1)->b"],"state":{"heap":{"o1":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":["A","int32"],"o1":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":"[1, 2]"}}}},{"nodeId":18,"description":{"expressions":["o1"],"state":{"heap":{"o1":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":["A","int32"],"o1":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":"[1, 2]"}}}},{"nodeId":19,"description":{"expressions":["1"],"state":{"heap":{"o1":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":["A","int32"],"o1":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":"[1, 2]"}}}},{"nodeId":20,"description":{"expressions":["skip"],"state":{"heap":{"o1":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":["A","int32"],"o1":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':6:20":"[1, 3]"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-insensitive/untyped_A.f10(A__this).json b/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-insensitive/untyped_A.f10(A__this).json index e3faaadf1..c7b5d9c0b 100644 --- a/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-insensitive/untyped_A.f10(A__this).json +++ b/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-insensitive/untyped_A.f10(A__this).json @@ -1 +1 @@ -{"name":"untyped A::f10(A* this)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"x = new A(1, 2)"},{"id":1,"text":"x"},{"id":2,"subNodes":[3,4],"text":"new A(1, 2)"},{"id":3,"text":"1"},{"id":4,"text":"2"},{"id":5,"subNodes":[6,8],"text":"x::a = 1"},{"id":6,"subNodes":[7],"text":"x::a"},{"id":7,"text":"x"},{"id":8,"text":"1"},{"id":9,"text":"ret"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"},{"sourceId":5,"destId":9,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["x"],"state":{"heap":{"x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':85:19]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':85:19":["A"],"x":["A*"]},"value":"#TOP#"}}},{"nodeId":1,"description":{"expressions":["x"],"state":{"heap":"#TOP#","type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':85:19":["A"]},"value":"#TOP#"}}},{"nodeId":2,"description":{"expressions":["ref$new A"],"state":{"heap":"#TOP#","type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':85:19":["A"]},"value":"#TOP#"}}},{"nodeId":3,"description":{"expressions":["1"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':84:5]"},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":4,"description":{"expressions":["2"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':84:5]"},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":5,"description":{"expressions":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':85:19"],"state":{"heap":{"x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':85:19]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':85:19":["A","int32"],"x":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':85:19":"[1, 1]"}}}},{"nodeId":6,"description":{"expressions":["*(x)->a"],"state":{"heap":{"x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':85:19]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':85:19":["A"],"x":["A*"]},"value":"#TOP#"}}},{"nodeId":7,"description":{"expressions":["x"],"state":{"heap":{"x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':85:19]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':85:19":["A"],"x":["A*"]},"value":"#TOP#"}}},{"nodeId":8,"description":{"expressions":["1"],"state":{"heap":{"x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':85:19]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':85:19":["A"],"x":["A*"]},"value":"#TOP#"}}},{"nodeId":9,"description":{"expressions":["skip"],"state":{"heap":{"x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':85:19]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':85:19":["A","int32"],"x":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':85:19":"[1, 1]"}}}}]} \ No newline at end of file +{"name":"untyped A::f10(A* this)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"x = new A(1, 2)"},{"id":1,"text":"x"},{"id":2,"subNodes":[3,4],"text":"new A(1, 2)"},{"id":3,"text":"1"},{"id":4,"text":"2"},{"id":5,"subNodes":[6,8],"text":"x::a = 1"},{"id":6,"subNodes":[7],"text":"x::a"},{"id":7,"text":"x"},{"id":8,"text":"1"},{"id":9,"text":"ret"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"},{"sourceId":5,"destId":9,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["x"],"state":{"heap":{"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':85:19"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':85:19":["A"],"x":["A*"]},"value":"#TOP#"}}},{"nodeId":1,"description":{"expressions":["x"],"state":{"heap":"#TOP#","type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':85:19":["A"]},"value":"#TOP#"}}},{"nodeId":2,"description":{"expressions":["ref$new A"],"state":{"heap":"#TOP#","type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':85:19":["A"]},"value":"#TOP#"}}},{"nodeId":3,"description":{"expressions":["1"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':84:5"]},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":4,"description":{"expressions":["2"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':84:5"]},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":5,"description":{"expressions":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':85:19"],"state":{"heap":{"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':85:19"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':85:19":["A","int32"],"x":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':85:19":"[1, 1]"}}}},{"nodeId":6,"description":{"expressions":["*(x)->a"],"state":{"heap":{"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':85:19"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':85:19":["A"],"x":["A*"]},"value":"#TOP#"}}},{"nodeId":7,"description":{"expressions":["x"],"state":{"heap":{"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':85:19"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':85:19":["A"],"x":["A*"]},"value":"#TOP#"}}},{"nodeId":8,"description":{"expressions":["1"],"state":{"heap":{"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':85:19"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':85:19":["A"],"x":["A*"]},"value":"#TOP#"}}},{"nodeId":9,"description":{"expressions":["skip"],"state":{"heap":{"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':85:19"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':85:19":["A","int32"],"x":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':85:19":"[1, 1]"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-insensitive/untyped_A.f2(A__this).json b/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-insensitive/untyped_A.f2(A__this).json index 8840ea512..6a6d09491 100644 --- a/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-insensitive/untyped_A.f2(A__this).json +++ b/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-insensitive/untyped_A.f2(A__this).json @@ -1 +1 @@ -{"name":"untyped A::f2(A* this)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"o = new A(-1, -1)"},{"id":1,"text":"o"},{"id":2,"subNodes":[3,4],"text":"new A(-1, -1)"},{"id":3,"text":"-1"},{"id":4,"text":"-1"},{"id":5,"text":"true"},{"id":6,"subNodes":[7,8],"text":"o = new A(0, 0)"},{"id":7,"text":"o"},{"id":8,"subNodes":[9,10],"text":"new A(0, 0)"},{"id":9,"text":"0"},{"id":10,"text":"0"},{"id":11,"subNodes":[12,13],"text":"o = new A(1, 1)"},{"id":12,"text":"o"},{"id":13,"subNodes":[14,15],"text":"new A(1, 1)"},{"id":14,"text":"1"},{"id":15,"text":"1"},{"id":16,"text":"ret"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"},{"sourceId":5,"destId":6,"kind":"TrueEdge"},{"sourceId":5,"destId":11,"kind":"FalseEdge"},{"sourceId":6,"destId":16,"kind":"SequentialEdge"},{"sourceId":11,"destId":16,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["o"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':13:21]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':13:21":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":1,"description":{"expressions":["o"],"state":{"heap":"#TOP#","type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':13:21":["A"]},"value":"#TOP#"}}},{"nodeId":2,"description":{"expressions":["ref$new A"],"state":{"heap":"#TOP#","type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':13:21":["A"]},"value":"#TOP#"}}},{"nodeId":3,"description":{"expressions":["-1"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':12:4]"},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":4,"description":{"expressions":["-1"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':12:4]"},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":5,"description":{"expressions":["true"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':13:21]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':13:21":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":6,"description":{"expressions":["o"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':15:16]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':15:16":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":7,"description":{"expressions":["o"],"state":{"heap":"#TOP#","type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':15:16":["A"]},"value":"#TOP#"}}},{"nodeId":8,"description":{"expressions":["ref$new A"],"state":{"heap":"#TOP#","type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':15:16":["A"]},"value":"#TOP#"}}},{"nodeId":9,"description":{"expressions":["0"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':13:21]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':13:21":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":10,"description":{"expressions":["0"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':13:21]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':13:21":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":11,"description":{"expressions":["o"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':17:16]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':17:16":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":12,"description":{"expressions":["o"],"state":{"heap":"#TOP#","type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':17:16":["A"]},"value":"#TOP#"}}},{"nodeId":13,"description":{"expressions":["ref$new A"],"state":{"heap":"#TOP#","type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':17:16":["A"]},"value":"#TOP#"}}},{"nodeId":14,"description":{"expressions":["1"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':13:21]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':13:21":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":15,"description":{"expressions":["1"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':13:21]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':13:21":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":16,"description":{"expressions":["skip"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':17:16, heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':15:16]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':15:16":["A"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':17:16":["A"],"o":["A*"]},"value":"#TOP#"}}}]} \ No newline at end of file +{"name":"untyped A::f2(A* this)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"o = new A(-1, -1)"},{"id":1,"text":"o"},{"id":2,"subNodes":[3,4],"text":"new A(-1, -1)"},{"id":3,"text":"-1"},{"id":4,"text":"-1"},{"id":5,"text":"true"},{"id":6,"subNodes":[7,8],"text":"o = new A(0, 0)"},{"id":7,"text":"o"},{"id":8,"subNodes":[9,10],"text":"new A(0, 0)"},{"id":9,"text":"0"},{"id":10,"text":"0"},{"id":11,"subNodes":[12,13],"text":"o = new A(1, 1)"},{"id":12,"text":"o"},{"id":13,"subNodes":[14,15],"text":"new A(1, 1)"},{"id":14,"text":"1"},{"id":15,"text":"1"},{"id":16,"text":"ret"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"},{"sourceId":5,"destId":6,"kind":"TrueEdge"},{"sourceId":5,"destId":11,"kind":"FalseEdge"},{"sourceId":6,"destId":16,"kind":"SequentialEdge"},{"sourceId":11,"destId":16,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["o"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':13:21"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':13:21":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":1,"description":{"expressions":["o"],"state":{"heap":"#TOP#","type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':13:21":["A"]},"value":"#TOP#"}}},{"nodeId":2,"description":{"expressions":["ref$new A"],"state":{"heap":"#TOP#","type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':13:21":["A"]},"value":"#TOP#"}}},{"nodeId":3,"description":{"expressions":["-1"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':12:4"]},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":4,"description":{"expressions":["-1"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':12:4"]},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":5,"description":{"expressions":["true"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':13:21"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':13:21":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":6,"description":{"expressions":["o"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':15:16"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':15:16":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":7,"description":{"expressions":["o"],"state":{"heap":"#TOP#","type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':15:16":["A"]},"value":"#TOP#"}}},{"nodeId":8,"description":{"expressions":["ref$new A"],"state":{"heap":"#TOP#","type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':15:16":["A"]},"value":"#TOP#"}}},{"nodeId":9,"description":{"expressions":["0"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':13:21"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':13:21":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":10,"description":{"expressions":["0"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':13:21"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':13:21":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":11,"description":{"expressions":["o"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':17:16"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':17:16":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":12,"description":{"expressions":["o"],"state":{"heap":"#TOP#","type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':17:16":["A"]},"value":"#TOP#"}}},{"nodeId":13,"description":{"expressions":["ref$new A"],"state":{"heap":"#TOP#","type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':17:16":["A"]},"value":"#TOP#"}}},{"nodeId":14,"description":{"expressions":["1"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':13:21"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':13:21":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":15,"description":{"expressions":["1"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':13:21"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':13:21":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":16,"description":{"expressions":["skip"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':15:16","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':17:16"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':15:16":["A"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':17:16":["A"],"o":["A*"]},"value":"#TOP#"}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-insensitive/untyped_A.f3(A__this).json b/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-insensitive/untyped_A.f3(A__this).json index 806b08781..39fd3b6eb 100644 --- a/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-insensitive/untyped_A.f3(A__this).json +++ b/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-insensitive/untyped_A.f3(A__this).json @@ -1 +1 @@ -{"name":"untyped A::f3(A* this)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"o = new A(-1, -1)"},{"id":1,"text":"o"},{"id":2,"subNodes":[3,4],"text":"new A(-1, -1)"},{"id":3,"text":"-1"},{"id":4,"text":"-1"},{"id":5,"text":"true"},{"id":6,"subNodes":[7,8],"text":"o = new A(0, 0)"},{"id":7,"text":"o"},{"id":8,"subNodes":[9,10],"text":"new A(0, 0)"},{"id":9,"text":"0"},{"id":10,"text":"0"},{"id":11,"subNodes":[12,13],"text":"o = new A(1, 1)"},{"id":12,"text":"o"},{"id":13,"subNodes":[14,15],"text":"new A(1, 1)"},{"id":14,"text":"1"},{"id":15,"text":"1"},{"id":16,"subNodes":[17,19],"text":"o::a = 2"},{"id":17,"subNodes":[18],"text":"o::a"},{"id":18,"text":"o"},{"id":19,"text":"2"},{"id":20,"subNodes":[21,23],"text":"o::b = 3"},{"id":21,"subNodes":[22],"text":"o::b"},{"id":22,"text":"o"},{"id":23,"text":"3"},{"id":24,"text":"ret"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"},{"sourceId":5,"destId":6,"kind":"TrueEdge"},{"sourceId":5,"destId":11,"kind":"FalseEdge"},{"sourceId":6,"destId":16,"kind":"SequentialEdge"},{"sourceId":11,"destId":16,"kind":"SequentialEdge"},{"sourceId":16,"destId":20,"kind":"SequentialEdge"},{"sourceId":20,"destId":24,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["o"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':23:21]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':23:21":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":1,"description":{"expressions":["o"],"state":{"heap":"#TOP#","type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':23:21":["A"]},"value":"#TOP#"}}},{"nodeId":2,"description":{"expressions":["ref$new A"],"state":{"heap":"#TOP#","type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':23:21":["A"]},"value":"#TOP#"}}},{"nodeId":3,"description":{"expressions":["-1"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':22:4]"},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":4,"description":{"expressions":["-1"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':22:4]"},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":5,"description":{"expressions":["true"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':23:21]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':23:21":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":6,"description":{"expressions":["o"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":7,"description":{"expressions":["o"],"state":{"heap":"#TOP#","type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16":["A"]},"value":"#TOP#"}}},{"nodeId":8,"description":{"expressions":["ref$new A"],"state":{"heap":"#TOP#","type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16":["A"]},"value":"#TOP#"}}},{"nodeId":9,"description":{"expressions":["0"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':23:21]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':23:21":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":10,"description":{"expressions":["0"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':23:21]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':23:21":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":11,"description":{"expressions":["o"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":12,"description":{"expressions":["o"],"state":{"heap":"#TOP#","type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16":["A"]},"value":"#TOP#"}}},{"nodeId":13,"description":{"expressions":["ref$new A"],"state":{"heap":"#TOP#","type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16":["A"]},"value":"#TOP#"}}},{"nodeId":14,"description":{"expressions":["1"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':23:21]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':23:21":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":15,"description":{"expressions":["1"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':23:21]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':23:21":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":16,"description":{"expressions":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16, heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16":["A","int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16":["A","int32"],"o":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16":"[2, 2]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16":"[2, 2]"}}}},{"nodeId":17,"description":{"expressions":["*(o)->a"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16, heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16":["A"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":18,"description":{"expressions":["o"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16, heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16":["A"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":19,"description":{"expressions":["2"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16, heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16":["A"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":20,"description":{"expressions":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16, heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16":["A","int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16":["A","int32"],"o":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16":"[2, 3]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16":"[2, 3]"}}}},{"nodeId":21,"description":{"expressions":["*(o)->b"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16, heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16":["A","int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16":["A","int32"],"o":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16":"[2, 2]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16":"[2, 2]"}}}},{"nodeId":22,"description":{"expressions":["o"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16, heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16":["A","int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16":["A","int32"],"o":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16":"[2, 2]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16":"[2, 2]"}}}},{"nodeId":23,"description":{"expressions":["3"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16, heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16":["A","int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16":["A","int32"],"o":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16":"[2, 2]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16":"[2, 2]"}}}},{"nodeId":24,"description":{"expressions":["skip"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16, heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16":["A","int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16":["A","int32"],"o":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16":"[2, 3]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16":"[2, 3]"}}}}]} \ No newline at end of file +{"name":"untyped A::f3(A* this)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"o = new A(-1, -1)"},{"id":1,"text":"o"},{"id":2,"subNodes":[3,4],"text":"new A(-1, -1)"},{"id":3,"text":"-1"},{"id":4,"text":"-1"},{"id":5,"text":"true"},{"id":6,"subNodes":[7,8],"text":"o = new A(0, 0)"},{"id":7,"text":"o"},{"id":8,"subNodes":[9,10],"text":"new A(0, 0)"},{"id":9,"text":"0"},{"id":10,"text":"0"},{"id":11,"subNodes":[12,13],"text":"o = new A(1, 1)"},{"id":12,"text":"o"},{"id":13,"subNodes":[14,15],"text":"new A(1, 1)"},{"id":14,"text":"1"},{"id":15,"text":"1"},{"id":16,"subNodes":[17,19],"text":"o::a = 2"},{"id":17,"subNodes":[18],"text":"o::a"},{"id":18,"text":"o"},{"id":19,"text":"2"},{"id":20,"subNodes":[21,23],"text":"o::b = 3"},{"id":21,"subNodes":[22],"text":"o::b"},{"id":22,"text":"o"},{"id":23,"text":"3"},{"id":24,"text":"ret"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"},{"sourceId":5,"destId":6,"kind":"TrueEdge"},{"sourceId":5,"destId":11,"kind":"FalseEdge"},{"sourceId":6,"destId":16,"kind":"SequentialEdge"},{"sourceId":11,"destId":16,"kind":"SequentialEdge"},{"sourceId":16,"destId":20,"kind":"SequentialEdge"},{"sourceId":20,"destId":24,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["o"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':23:21"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':23:21":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":1,"description":{"expressions":["o"],"state":{"heap":"#TOP#","type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':23:21":["A"]},"value":"#TOP#"}}},{"nodeId":2,"description":{"expressions":["ref$new A"],"state":{"heap":"#TOP#","type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':23:21":["A"]},"value":"#TOP#"}}},{"nodeId":3,"description":{"expressions":["-1"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':22:4"]},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":4,"description":{"expressions":["-1"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':22:4"]},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":5,"description":{"expressions":["true"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':23:21"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':23:21":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":6,"description":{"expressions":["o"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":7,"description":{"expressions":["o"],"state":{"heap":"#TOP#","type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16":["A"]},"value":"#TOP#"}}},{"nodeId":8,"description":{"expressions":["ref$new A"],"state":{"heap":"#TOP#","type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16":["A"]},"value":"#TOP#"}}},{"nodeId":9,"description":{"expressions":["0"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':23:21"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':23:21":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":10,"description":{"expressions":["0"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':23:21"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':23:21":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":11,"description":{"expressions":["o"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":12,"description":{"expressions":["o"],"state":{"heap":"#TOP#","type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16":["A"]},"value":"#TOP#"}}},{"nodeId":13,"description":{"expressions":["ref$new A"],"state":{"heap":"#TOP#","type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16":["A"]},"value":"#TOP#"}}},{"nodeId":14,"description":{"expressions":["1"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':23:21"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':23:21":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":15,"description":{"expressions":["1"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':23:21"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':23:21":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":16,"description":{"expressions":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16":["A","int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16":["A","int32"],"o":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16":"[2, 2]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16":"[2, 2]"}}}},{"nodeId":17,"description":{"expressions":["*(o)->a"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16":["A"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":18,"description":{"expressions":["o"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16":["A"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":19,"description":{"expressions":["2"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16":["A"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":20,"description":{"expressions":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16":["A","int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16":["A","int32"],"o":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16":"[2, 3]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16":"[2, 3]"}}}},{"nodeId":21,"description":{"expressions":["*(o)->b"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16":["A","int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16":["A","int32"],"o":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16":"[2, 2]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16":"[2, 2]"}}}},{"nodeId":22,"description":{"expressions":["o"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16":["A","int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16":["A","int32"],"o":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16":"[2, 2]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16":"[2, 2]"}}}},{"nodeId":23,"description":{"expressions":["3"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16":["A","int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16":["A","int32"],"o":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16":"[2, 2]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16":"[2, 2]"}}}},{"nodeId":24,"description":{"expressions":["skip"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16":["A","int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16":["A","int32"],"o":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':25:16":"[2, 3]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':27:16":"[2, 3]"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-insensitive/untyped_A.f4(A__this).json b/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-insensitive/untyped_A.f4(A__this).json index bb9e11528..86bc4a760 100644 --- a/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-insensitive/untyped_A.f4(A__this).json +++ b/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-insensitive/untyped_A.f4(A__this).json @@ -1 +1 @@ -{"name":"untyped A::f4(A* this)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"o = new int32[](6)"},{"id":1,"text":"o"},{"id":2,"subNodes":[3],"text":"new int32[](6)"},{"id":3,"text":"6"},{"id":4,"subNodes":[5,6],"text":"i = 0"},{"id":5,"text":"i"},{"id":6,"text":"0"},{"id":7,"text":"true"},{"id":8,"subNodes":[9,12],"text":"[](o, 0) = 0"},{"id":9,"subNodes":[10,11],"text":"[](o, 0)"},{"id":10,"text":"o"},{"id":11,"text":"0"},{"id":12,"text":"0"},{"id":13,"subNodes":[14,15],"text":"i = +(i, 1)"},{"id":14,"text":"i"},{"id":15,"subNodes":[16,17],"text":"+(i, 1)"},{"id":16,"text":"i"},{"id":17,"text":"1"},{"id":18,"text":"ret"}],"edges":[{"sourceId":0,"destId":4,"kind":"SequentialEdge"},{"sourceId":4,"destId":7,"kind":"SequentialEdge"},{"sourceId":7,"destId":8,"kind":"TrueEdge"},{"sourceId":7,"destId":18,"kind":"FalseEdge"},{"sourceId":8,"destId":13,"kind":"SequentialEdge"},{"sourceId":13,"destId":7,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["o"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':34:4]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":["int32[]"],"o":["int32[]*"],"this":["A*"]},"value":"#TOP#"}}},{"nodeId":1,"description":{"expressions":["o"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':34:4]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":["int32[]"],"this":["A*"]},"value":"#TOP#"}}},{"nodeId":2,"description":{"expressions":["ref$new int32[]"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':34:4]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":["int32[]"],"this":["A*"]},"value":"#TOP#"}}},{"nodeId":3,"description":{"expressions":["6"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':34:4]"},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":4,"description":{"expressions":["i"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':34:4]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":["int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"i":"[0, 0]"}}}},{"nodeId":5,"description":{"expressions":["i"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':34:4]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":["int32[]"],"o":["int32[]*"],"this":["A*"]},"value":"#TOP#"}}},{"nodeId":6,"description":{"expressions":["0"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':34:4]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":["int32[]"],"o":["int32[]*"],"this":["A*"]},"value":"#TOP#"}}},{"nodeId":7,"description":{"expressions":["true"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':34:4]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":"[0, 0]","i":"[0, +Inf]"}}}},{"nodeId":8,"description":{"expressions":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':34:4]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":"[0, 0]","i":"[0, +Inf]"}}}},{"nodeId":9,"description":{"expressions":["*(o)->0"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':34:4]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":"[0, 0]","i":"[0, +Inf]"}}}},{"nodeId":10,"description":{"expressions":["o"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':34:4]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":"[0, 0]","i":"[0, +Inf]"}}}},{"nodeId":11,"description":{"expressions":["0"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':34:4]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":"[0, 0]","i":"[0, +Inf]"}}}},{"nodeId":12,"description":{"expressions":["0"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':34:4]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":"[0, 0]","i":"[0, +Inf]"}}}},{"nodeId":13,"description":{"expressions":["i"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':34:4]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":"[0, 0]","i":"[1, +Inf]"}}}},{"nodeId":14,"description":{"expressions":["i"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':34:4]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":"[0, 0]","i":"[0, +Inf]"}}}},{"nodeId":15,"description":{"expressions":["i + 1"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':34:4]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":"[0, 0]","i":"[0, +Inf]"}}}},{"nodeId":16,"description":{"expressions":["i"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':34:4]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":"[0, 0]","i":"[0, +Inf]"}}}},{"nodeId":17,"description":{"expressions":["1"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':34:4]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":"[0, 0]","i":"[0, +Inf]"}}}},{"nodeId":18,"description":{"expressions":["skip"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':34:4]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":"[0, 0]","i":"[0, +Inf]"}}}}]} \ No newline at end of file +{"name":"untyped A::f4(A* this)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"o = new int32[](6)"},{"id":1,"text":"o"},{"id":2,"subNodes":[3],"text":"new int32[](6)"},{"id":3,"text":"6"},{"id":4,"subNodes":[5,6],"text":"i = 0"},{"id":5,"text":"i"},{"id":6,"text":"0"},{"id":7,"text":"true"},{"id":8,"subNodes":[9,12],"text":"[](o, 0) = 0"},{"id":9,"subNodes":[10,11],"text":"[](o, 0)"},{"id":10,"text":"o"},{"id":11,"text":"0"},{"id":12,"text":"0"},{"id":13,"subNodes":[14,15],"text":"i = +(i, 1)"},{"id":14,"text":"i"},{"id":15,"subNodes":[16,17],"text":"+(i, 1)"},{"id":16,"text":"i"},{"id":17,"text":"1"},{"id":18,"text":"ret"}],"edges":[{"sourceId":0,"destId":4,"kind":"SequentialEdge"},{"sourceId":4,"destId":7,"kind":"SequentialEdge"},{"sourceId":7,"destId":8,"kind":"TrueEdge"},{"sourceId":7,"destId":18,"kind":"FalseEdge"},{"sourceId":8,"destId":13,"kind":"SequentialEdge"},{"sourceId":13,"destId":7,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["o"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':34:4"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":["int32","int32[]"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":"[6, 6]"}}}},{"nodeId":1,"description":{"expressions":["o"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':34:4"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":["int32","int32[]"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":"[6, 6]"}}}},{"nodeId":2,"description":{"expressions":["ref$new int32[]"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':34:4"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":["int32","int32[]"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":"[6, 6]"}}}},{"nodeId":3,"description":{"expressions":["6"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':34:4"]},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":4,"description":{"expressions":["i"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':34:4"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":"[6, 6]","i":"[0, 0]"}}}},{"nodeId":5,"description":{"expressions":["i"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':34:4"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":["int32","int32[]"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":"[6, 6]"}}}},{"nodeId":6,"description":{"expressions":["0"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':34:4"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":["int32","int32[]"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":"[6, 6]"}}}},{"nodeId":7,"description":{"expressions":["true"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':34:4"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":"[0, 6]","i":"[0, +Inf]"}}}},{"nodeId":8,"description":{"expressions":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':34:4"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":"[0, 6]","i":"[0, +Inf]"}}}},{"nodeId":9,"description":{"expressions":["*(o)->0"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':34:4"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":"[0, 6]","i":"[0, +Inf]"}}}},{"nodeId":10,"description":{"expressions":["o"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':34:4"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":"[0, 6]","i":"[0, +Inf]"}}}},{"nodeId":11,"description":{"expressions":["0"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':34:4"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":"[0, 6]","i":"[0, +Inf]"}}}},{"nodeId":12,"description":{"expressions":["0"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':34:4"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":"[0, 6]","i":"[0, +Inf]"}}}},{"nodeId":13,"description":{"expressions":["i"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':34:4"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":"[0, 6]","i":"[1, +Inf]"}}}},{"nodeId":14,"description":{"expressions":["i"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':34:4"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":"[0, 6]","i":"[0, +Inf]"}}}},{"nodeId":15,"description":{"expressions":["i + 1"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':34:4"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":"[0, 6]","i":"[0, +Inf]"}}}},{"nodeId":16,"description":{"expressions":["i"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':34:4"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":"[0, 6]","i":"[0, +Inf]"}}}},{"nodeId":17,"description":{"expressions":["1"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':34:4"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":"[0, 6]","i":"[0, +Inf]"}}}},{"nodeId":18,"description":{"expressions":["skip"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':34:4"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':35:19":"[0, 6]","i":"[0, +Inf]"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-insensitive/untyped_A.f5(A__this).json b/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-insensitive/untyped_A.f5(A__this).json index 6f90050f6..d5bd0a90b 100644 --- a/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-insensitive/untyped_A.f5(A__this).json +++ b/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-insensitive/untyped_A.f5(A__this).json @@ -1 +1 @@ -{"name":"untyped A::f5(A* this)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"i = 0"},{"id":1,"text":"i"},{"id":2,"text":"0"},{"id":3,"subNodes":[4,5],"text":"o = new int32[](6)"},{"id":4,"text":"o"},{"id":5,"subNodes":[6],"text":"new int32[](6)"},{"id":6,"text":"6"},{"id":7,"text":"true"},{"id":8,"subNodes":[9,10],"text":"o = new int32[](6)"},{"id":9,"text":"o"},{"id":10,"subNodes":[11],"text":"new int32[](6)"},{"id":11,"text":"6"},{"id":12,"subNodes":[13,16],"text":"[](o, 0) = 0"},{"id":13,"subNodes":[14,15],"text":"[](o, 0)"},{"id":14,"text":"o"},{"id":15,"text":"0"},{"id":16,"text":"0"},{"id":17,"subNodes":[18,19],"text":"i = +(i, 1)"},{"id":18,"text":"i"},{"id":19,"subNodes":[20,21],"text":"+(i, 1)"},{"id":20,"text":"i"},{"id":21,"text":"1"},{"id":22,"text":"ret"}],"edges":[{"sourceId":0,"destId":3,"kind":"SequentialEdge"},{"sourceId":3,"destId":7,"kind":"SequentialEdge"},{"sourceId":7,"destId":8,"kind":"TrueEdge"},{"sourceId":7,"destId":22,"kind":"FalseEdge"},{"sourceId":8,"destId":12,"kind":"SequentialEdge"},{"sourceId":12,"destId":17,"kind":"SequentialEdge"},{"sourceId":17,"destId":7,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["i"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':43:4]"},"type":{"i":["int32"],"this":["A*"]},"value":{"i":"[0, 0]"}}}},{"nodeId":1,"description":{"expressions":["i"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':43:4]"},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":2,"description":{"expressions":["0"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':43:4]"},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":3,"description":{"expressions":["o"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':43:4]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19":["int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"i":"[0, 0]"}}}},{"nodeId":4,"description":{"expressions":["o"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':43:4]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19":["int32[]"],"i":["int32"],"this":["A*"]},"value":{"i":"[0, 0]"}}}},{"nodeId":5,"description":{"expressions":["ref$new int32[]"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':43:4]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19":["int32[]"],"i":["int32"],"this":["A*"]},"value":{"i":"[0, 0]"}}}},{"nodeId":6,"description":{"expressions":["6"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':43:4]"},"type":{"i":["int32"],"this":["A*"]},"value":{"i":"[0, 0]"}}}},{"nodeId":7,"description":{"expressions":["true"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19, heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':43:4]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":"[0, 0]","i":"[0, +Inf]"}}}},{"nodeId":8,"description":{"expressions":["o"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':43:4]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":"[0, 0]","i":"[0, +Inf]"}}}},{"nodeId":9,"description":{"expressions":["o"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19, heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':43:4]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":"[0, 0]","i":"[0, +Inf]"}}}},{"nodeId":10,"description":{"expressions":["ref$new int32[]"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19, heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':43:4]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":"[0, 0]","i":"[0, +Inf]"}}}},{"nodeId":11,"description":{"expressions":["6"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19, heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':43:4]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":"[0, 0]","i":"[0, +Inf]"}}}},{"nodeId":12,"description":{"expressions":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':43:4]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":"[0, 0]","i":"[0, +Inf]"}}}},{"nodeId":13,"description":{"expressions":["*(o)->0"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':43:4]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":"[0, 0]","i":"[0, +Inf]"}}}},{"nodeId":14,"description":{"expressions":["o"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':43:4]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":"[0, 0]","i":"[0, +Inf]"}}}},{"nodeId":15,"description":{"expressions":["0"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':43:4]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":"[0, 0]","i":"[0, +Inf]"}}}},{"nodeId":16,"description":{"expressions":["0"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':43:4]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":"[0, 0]","i":"[0, +Inf]"}}}},{"nodeId":17,"description":{"expressions":["i"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':43:4]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":"[0, 0]","i":"[1, +Inf]"}}}},{"nodeId":18,"description":{"expressions":["i"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':43:4]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":"[0, 0]","i":"[0, +Inf]"}}}},{"nodeId":19,"description":{"expressions":["i + 1"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':43:4]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":"[0, 0]","i":"[0, +Inf]"}}}},{"nodeId":20,"description":{"expressions":["i"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':43:4]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":"[0, 0]","i":"[0, +Inf]"}}}},{"nodeId":21,"description":{"expressions":["1"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':43:4]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":"[0, 0]","i":"[0, +Inf]"}}}},{"nodeId":22,"description":{"expressions":["skip"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19, heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':43:4]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":"[0, 0]","i":"[0, +Inf]"}}}}]} \ No newline at end of file +{"name":"untyped A::f5(A* this)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"i = 0"},{"id":1,"text":"i"},{"id":2,"text":"0"},{"id":3,"subNodes":[4,5],"text":"o = new int32[](6)"},{"id":4,"text":"o"},{"id":5,"subNodes":[6],"text":"new int32[](6)"},{"id":6,"text":"6"},{"id":7,"text":"true"},{"id":8,"subNodes":[9,10],"text":"o = new int32[](6)"},{"id":9,"text":"o"},{"id":10,"subNodes":[11],"text":"new int32[](6)"},{"id":11,"text":"6"},{"id":12,"subNodes":[13,16],"text":"[](o, 0) = 0"},{"id":13,"subNodes":[14,15],"text":"[](o, 0)"},{"id":14,"text":"o"},{"id":15,"text":"0"},{"id":16,"text":"0"},{"id":17,"subNodes":[18,19],"text":"i = +(i, 1)"},{"id":18,"text":"i"},{"id":19,"subNodes":[20,21],"text":"+(i, 1)"},{"id":20,"text":"i"},{"id":21,"text":"1"},{"id":22,"text":"ret"}],"edges":[{"sourceId":0,"destId":3,"kind":"SequentialEdge"},{"sourceId":3,"destId":7,"kind":"SequentialEdge"},{"sourceId":7,"destId":8,"kind":"TrueEdge"},{"sourceId":7,"destId":22,"kind":"FalseEdge"},{"sourceId":8,"destId":12,"kind":"SequentialEdge"},{"sourceId":12,"destId":17,"kind":"SequentialEdge"},{"sourceId":17,"destId":7,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["i"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':43:4"]},"type":{"i":["int32"],"this":["A*"]},"value":{"i":"[0, 0]"}}}},{"nodeId":1,"description":{"expressions":["i"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':43:4"]},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":2,"description":{"expressions":["0"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':43:4"]},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":3,"description":{"expressions":["o"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':43:4"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19":"[6, 6]","i":"[0, 0]"}}}},{"nodeId":4,"description":{"expressions":["o"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':43:4"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19":["int32","int32[]"],"i":["int32"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19":"[6, 6]","i":"[0, 0]"}}}},{"nodeId":5,"description":{"expressions":["ref$new int32[]"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':43:4"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19":["int32","int32[]"],"i":["int32"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19":"[6, 6]","i":"[0, 0]"}}}},{"nodeId":6,"description":{"expressions":["6"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':43:4"]},"type":{"i":["int32"],"this":["A*"]},"value":{"i":"[0, 0]"}}}},{"nodeId":7,"description":{"expressions":["true"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':43:4"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19":["int32","int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19":"[6, 6]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":"[0, 6]","i":"[0, +Inf]"}}}},{"nodeId":8,"description":{"expressions":["o"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':43:4"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19":["int32","int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19":"[6, 6]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":"[0, 6]","i":"[0, +Inf]"}}}},{"nodeId":9,"description":{"expressions":["o"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':43:4"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19":["int32","int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19":"[6, 6]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":"[0, 6]","i":"[0, +Inf]"}}}},{"nodeId":10,"description":{"expressions":["ref$new int32[]"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':43:4"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19":["int32","int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19":"[6, 6]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":"[0, 6]","i":"[0, +Inf]"}}}},{"nodeId":11,"description":{"expressions":["6"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':43:4"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19":["int32","int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19":"[6, 6]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":"[0, 6]","i":"[0, +Inf]"}}}},{"nodeId":12,"description":{"expressions":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':43:4"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19":["int32","int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19":"[6, 6]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":"[0, 6]","i":"[0, +Inf]"}}}},{"nodeId":13,"description":{"expressions":["*(o)->0"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':43:4"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19":["int32","int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19":"[6, 6]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":"[0, 6]","i":"[0, +Inf]"}}}},{"nodeId":14,"description":{"expressions":["o"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':43:4"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19":["int32","int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19":"[6, 6]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":"[0, 6]","i":"[0, +Inf]"}}}},{"nodeId":15,"description":{"expressions":["0"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':43:4"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19":["int32","int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19":"[6, 6]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":"[0, 6]","i":"[0, +Inf]"}}}},{"nodeId":16,"description":{"expressions":["0"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':43:4"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19":["int32","int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19":"[6, 6]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":"[0, 6]","i":"[0, +Inf]"}}}},{"nodeId":17,"description":{"expressions":["i"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':43:4"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19":["int32","int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19":"[6, 6]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":"[0, 6]","i":"[1, +Inf]"}}}},{"nodeId":18,"description":{"expressions":["i"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':43:4"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19":["int32","int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19":"[6, 6]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":"[0, 6]","i":"[0, +Inf]"}}}},{"nodeId":19,"description":{"expressions":["i + 1"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':43:4"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19":["int32","int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19":"[6, 6]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":"[0, 6]","i":"[0, +Inf]"}}}},{"nodeId":20,"description":{"expressions":["i"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':43:4"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19":["int32","int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19":"[6, 6]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":"[0, 6]","i":"[0, +Inf]"}}}},{"nodeId":21,"description":{"expressions":["1"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':43:4"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19":["int32","int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19":"[6, 6]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":"[0, 6]","i":"[0, +Inf]"}}}},{"nodeId":22,"description":{"expressions":["skip"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':43:4"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19":["int32","int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":["int32","int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':45:19":"[6, 6]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':47:16":"[0, 6]","i":"[0, +Inf]"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-insensitive/untyped_A.f6(A__this).json b/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-insensitive/untyped_A.f6(A__this).json index 1e9c5a4fd..b82c15854 100644 --- a/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-insensitive/untyped_A.f6(A__this).json +++ b/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-insensitive/untyped_A.f6(A__this).json @@ -1 +1 @@ -{"name":"untyped A::f6(A* this)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"x = new int32[](3)"},{"id":1,"text":"x"},{"id":2,"subNodes":[3],"text":"new int32[](3)"},{"id":3,"text":"3"},{"id":4,"subNodes":[5,6],"text":"y = x"},{"id":5,"text":"y"},{"id":6,"text":"x"},{"id":7,"subNodes":[8,11],"text":"[](x, 0) = 1"},{"id":8,"subNodes":[9,10],"text":"[](x, 0)"},{"id":9,"text":"x"},{"id":10,"text":"0"},{"id":11,"text":"1"},{"id":12,"subNodes":[13,14],"text":"a = +([](x, 0), [](y, 0))"},{"id":13,"text":"a"},{"id":14,"subNodes":[15,18],"text":"+([](x, 0), [](y, 0))"},{"id":15,"subNodes":[16,17],"text":"[](x, 0)"},{"id":16,"text":"x"},{"id":17,"text":"0"},{"id":18,"subNodes":[19,20],"text":"[](y, 0)"},{"id":19,"text":"y"},{"id":20,"text":"0"},{"id":21,"text":"ret"}],"edges":[{"sourceId":0,"destId":4,"kind":"SequentialEdge"},{"sourceId":4,"destId":7,"kind":"SequentialEdge"},{"sourceId":7,"destId":12,"kind":"SequentialEdge"},{"sourceId":12,"destId":21,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["x"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':53:4]","x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":["int32[]"],"this":["A*"],"x":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":1,"description":{"expressions":["x"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':53:4]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":["int32[]"],"this":["A*"]},"value":"#TOP#"}}},{"nodeId":2,"description":{"expressions":["ref$new int32[]"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':53:4]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":["int32[]"],"this":["A*"]},"value":"#TOP#"}}},{"nodeId":3,"description":{"expressions":["3"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':53:4]"},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":4,"description":{"expressions":["y"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':53:4]","x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19]","y":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":["int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":5,"description":{"expressions":["y"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':53:4]","x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":["int32[]"],"this":["A*"],"x":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":6,"description":{"expressions":["x"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':53:4]","x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":["int32[]"],"this":["A*"],"x":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":7,"description":{"expressions":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':53:4]","x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19]","y":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":"[1, 1]"}}}},{"nodeId":8,"description":{"expressions":["*(x)->0"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':53:4]","x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19]","y":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":["int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":9,"description":{"expressions":["x"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':53:4]","x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19]","y":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":["int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":10,"description":{"expressions":["0"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':53:4]","x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19]","y":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":["int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":11,"description":{"expressions":["1"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':53:4]","x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19]","y":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":["int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":12,"description":{"expressions":["a"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':53:4]","x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19]","y":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19]"},"type":{"a":["int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"a":"[2, 2]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":"[1, 1]"}}}},{"nodeId":13,"description":{"expressions":["a"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':53:4]","x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19]","y":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":"[1, 1]"}}}},{"nodeId":14,"description":{"expressions":["*(x)->0 + *(y)->0"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':53:4]","x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19]","y":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":"[1, 1]"}}}},{"nodeId":15,"description":{"expressions":["*(x)->0"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':53:4]","x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19]","y":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":"[1, 1]"}}}},{"nodeId":16,"description":{"expressions":["x"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':53:4]","x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19]","y":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":"[1, 1]"}}}},{"nodeId":17,"description":{"expressions":["0"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':53:4]","x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19]","y":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":"[1, 1]"}}}},{"nodeId":18,"description":{"expressions":["*(y)->0"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':53:4]","x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19]","y":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":"[1, 1]"}}}},{"nodeId":19,"description":{"expressions":["y"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':53:4]","x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19]","y":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":"[1, 1]"}}}},{"nodeId":20,"description":{"expressions":["0"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':53:4]","x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19]","y":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":"[1, 1]"}}}},{"nodeId":21,"description":{"expressions":["skip"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':53:4]","x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19]","y":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19]"},"type":{"a":["int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"a":"[2, 2]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":"[1, 1]"}}}}]} \ No newline at end of file +{"name":"untyped A::f6(A* this)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"x = new int32[](3)"},{"id":1,"text":"x"},{"id":2,"subNodes":[3],"text":"new int32[](3)"},{"id":3,"text":"3"},{"id":4,"subNodes":[5,6],"text":"y = x"},{"id":5,"text":"y"},{"id":6,"text":"x"},{"id":7,"subNodes":[8,11],"text":"[](x, 0) = 1"},{"id":8,"subNodes":[9,10],"text":"[](x, 0)"},{"id":9,"text":"x"},{"id":10,"text":"0"},{"id":11,"text":"1"},{"id":12,"subNodes":[13,14],"text":"a = +([](x, 0), [](y, 0))"},{"id":13,"text":"a"},{"id":14,"subNodes":[15,18],"text":"+([](x, 0), [](y, 0))"},{"id":15,"subNodes":[16,17],"text":"[](x, 0)"},{"id":16,"text":"x"},{"id":17,"text":"0"},{"id":18,"subNodes":[19,20],"text":"[](y, 0)"},{"id":19,"text":"y"},{"id":20,"text":"0"},{"id":21,"text":"ret"}],"edges":[{"sourceId":0,"destId":4,"kind":"SequentialEdge"},{"sourceId":4,"destId":7,"kind":"SequentialEdge"},{"sourceId":7,"destId":12,"kind":"SequentialEdge"},{"sourceId":12,"destId":21,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["x"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':53:4"],"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":["int32","int32[]"],"this":["A*"],"x":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":"[3, 3]"}}}},{"nodeId":1,"description":{"expressions":["x"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':53:4"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":["int32","int32[]"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":"[3, 3]"}}}},{"nodeId":2,"description":{"expressions":["ref$new int32[]"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':53:4"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":["int32","int32[]"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":"[3, 3]"}}}},{"nodeId":3,"description":{"expressions":["3"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':53:4"]},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":4,"description":{"expressions":["y"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':53:4"],"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19"],"y":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":"[3, 3]"}}}},{"nodeId":5,"description":{"expressions":["y"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':53:4"],"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":["int32","int32[]"],"this":["A*"],"x":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":"[3, 3]"}}}},{"nodeId":6,"description":{"expressions":["x"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':53:4"],"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":["int32","int32[]"],"this":["A*"],"x":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":"[3, 3]"}}}},{"nodeId":7,"description":{"expressions":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':53:4"],"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19"],"y":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":"[1, 3]"}}}},{"nodeId":8,"description":{"expressions":["*(x)->0"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':53:4"],"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19"],"y":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":"[3, 3]"}}}},{"nodeId":9,"description":{"expressions":["x"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':53:4"],"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19"],"y":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":"[3, 3]"}}}},{"nodeId":10,"description":{"expressions":["0"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':53:4"],"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19"],"y":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":"[3, 3]"}}}},{"nodeId":11,"description":{"expressions":["1"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':53:4"],"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19"],"y":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":"[3, 3]"}}}},{"nodeId":12,"description":{"expressions":["a"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':53:4"],"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19"],"y":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19"]},"type":{"a":["int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"a":"[2, 6]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":"[1, 3]"}}}},{"nodeId":13,"description":{"expressions":["a"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':53:4"],"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19"],"y":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":"[1, 3]"}}}},{"nodeId":14,"description":{"expressions":["*(x)->0 + *(y)->0"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':53:4"],"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19"],"y":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":"[1, 3]"}}}},{"nodeId":15,"description":{"expressions":["*(x)->0"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':53:4"],"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19"],"y":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":"[1, 3]"}}}},{"nodeId":16,"description":{"expressions":["x"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':53:4"],"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19"],"y":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":"[1, 3]"}}}},{"nodeId":17,"description":{"expressions":["0"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':53:4"],"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19"],"y":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":"[1, 3]"}}}},{"nodeId":18,"description":{"expressions":["*(y)->0"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':53:4"],"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19"],"y":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":"[1, 3]"}}}},{"nodeId":19,"description":{"expressions":["y"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':53:4"],"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19"],"y":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":"[1, 3]"}}}},{"nodeId":20,"description":{"expressions":["0"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':53:4"],"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19"],"y":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":"[1, 3]"}}}},{"nodeId":21,"description":{"expressions":["skip"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':53:4"],"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19"],"y":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19"]},"type":{"a":["int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"a":"[2, 6]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':54:19":"[1, 3]"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-insensitive/untyped_A.f7(A__this).json b/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-insensitive/untyped_A.f7(A__this).json index 37a130eeb..09b095a1f 100644 --- a/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-insensitive/untyped_A.f7(A__this).json +++ b/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-insensitive/untyped_A.f7(A__this).json @@ -1 +1 @@ -{"name":"untyped A::f7(A* this)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"x = new int32[](3)"},{"id":1,"text":"x"},{"id":2,"subNodes":[3],"text":"new int32[](3)"},{"id":3,"text":"3"},{"id":4,"subNodes":[5,6],"text":"y = new int32[](3)"},{"id":5,"text":"y"},{"id":6,"subNodes":[7],"text":"new int32[](3)"},{"id":7,"text":"3"},{"id":8,"subNodes":[9,10],"text":"z = x"},{"id":9,"text":"z"},{"id":10,"text":"x"},{"id":11,"subNodes":[12,13],"text":"z = y"},{"id":12,"text":"z"},{"id":13,"text":"y"},{"id":14,"subNodes":[15,18],"text":"[](z, 0) = 1"},{"id":15,"subNodes":[16,17],"text":"[](z, 0)"},{"id":16,"text":"z"},{"id":17,"text":"0"},{"id":18,"text":"1"},{"id":19,"text":"ret"}],"edges":[{"sourceId":0,"destId":4,"kind":"SequentialEdge"},{"sourceId":4,"destId":8,"kind":"SequentialEdge"},{"sourceId":8,"destId":11,"kind":"SequentialEdge"},{"sourceId":11,"destId":14,"kind":"SequentialEdge"},{"sourceId":14,"destId":19,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["x"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':60:4]","x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19":["int32[]"],"this":["A*"],"x":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":1,"description":{"expressions":["x"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':60:4]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19":["int32[]"],"this":["A*"]},"value":"#TOP#"}}},{"nodeId":2,"description":{"expressions":["ref$new int32[]"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':60:4]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19":["int32[]"],"this":["A*"]},"value":"#TOP#"}}},{"nodeId":3,"description":{"expressions":["3"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':60:4]"},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":4,"description":{"expressions":["y"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':60:4]","x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19]","y":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19":["int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":5,"description":{"expressions":["y"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':60:4]","x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19":["int32[]"],"this":["A*"],"x":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":6,"description":{"expressions":["ref$new int32[]"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':60:4]","x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19":["int32[]"],"this":["A*"],"x":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":7,"description":{"expressions":["3"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':60:4]","x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19":["int32[]"],"this":["A*"],"x":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":8,"description":{"expressions":["z"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':60:4]","x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19]","y":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19]","z":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19":["int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"],"z":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":9,"description":{"expressions":["z"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':60:4]","x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19]","y":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19":["int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":10,"description":{"expressions":["x"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':60:4]","x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19]","y":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19":["int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":11,"description":{"expressions":["z"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':60:4]","x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19]","y":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19]","z":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19":["int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"],"z":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":12,"description":{"expressions":["z"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':60:4]","x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19]","y":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19]","z":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19":["int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"],"z":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":13,"description":{"expressions":["y"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':60:4]","x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19]","y":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19]","z":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19":["int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"],"z":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":14,"description":{"expressions":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':60:4]","x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19]","y":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19]","z":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"],"z":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19":"[1, 1]"}}}},{"nodeId":15,"description":{"expressions":["*(z)->0"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':60:4]","x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19]","y":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19]","z":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19":["int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"],"z":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":16,"description":{"expressions":["z"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':60:4]","x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19]","y":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19]","z":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19":["int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"],"z":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":17,"description":{"expressions":["0"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':60:4]","x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19]","y":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19]","z":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19":["int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"],"z":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":18,"description":{"expressions":["1"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':60:4]","x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19]","y":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19]","z":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19":["int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"],"z":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":19,"description":{"expressions":["skip"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':60:4]","x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19]","y":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19]","z":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"],"z":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19":"[1, 1]"}}}}]} \ No newline at end of file +{"name":"untyped A::f7(A* this)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"x = new int32[](3)"},{"id":1,"text":"x"},{"id":2,"subNodes":[3],"text":"new int32[](3)"},{"id":3,"text":"3"},{"id":4,"subNodes":[5,6],"text":"y = new int32[](3)"},{"id":5,"text":"y"},{"id":6,"subNodes":[7],"text":"new int32[](3)"},{"id":7,"text":"3"},{"id":8,"subNodes":[9,10],"text":"z = x"},{"id":9,"text":"z"},{"id":10,"text":"x"},{"id":11,"subNodes":[12,13],"text":"z = y"},{"id":12,"text":"z"},{"id":13,"text":"y"},{"id":14,"subNodes":[15,18],"text":"[](z, 0) = 1"},{"id":15,"subNodes":[16,17],"text":"[](z, 0)"},{"id":16,"text":"z"},{"id":17,"text":"0"},{"id":18,"text":"1"},{"id":19,"text":"ret"}],"edges":[{"sourceId":0,"destId":4,"kind":"SequentialEdge"},{"sourceId":4,"destId":8,"kind":"SequentialEdge"},{"sourceId":8,"destId":11,"kind":"SequentialEdge"},{"sourceId":11,"destId":14,"kind":"SequentialEdge"},{"sourceId":14,"destId":19,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["x"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':60:4"],"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19":["int32","int32[]"],"this":["A*"],"x":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19":"[3, 3]"}}}},{"nodeId":1,"description":{"expressions":["x"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':60:4"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19":["int32","int32[]"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19":"[3, 3]"}}}},{"nodeId":2,"description":{"expressions":["ref$new int32[]"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':60:4"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19":["int32","int32[]"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19":"[3, 3]"}}}},{"nodeId":3,"description":{"expressions":["3"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':60:4"]},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":4,"description":{"expressions":["y"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':60:4"],"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19"],"y":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19":["int32","int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19":"[3, 3]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19":"[3, 3]"}}}},{"nodeId":5,"description":{"expressions":["y"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':60:4"],"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19":["int32","int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19":["int32","int32[]"],"this":["A*"],"x":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19":"[3, 3]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19":"[3, 3]"}}}},{"nodeId":6,"description":{"expressions":["ref$new int32[]"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':60:4"],"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19":["int32","int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19":["int32","int32[]"],"this":["A*"],"x":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19":"[3, 3]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19":"[3, 3]"}}}},{"nodeId":7,"description":{"expressions":["3"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':60:4"],"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19":["int32","int32[]"],"this":["A*"],"x":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19":"[3, 3]"}}}},{"nodeId":8,"description":{"expressions":["z"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':60:4"],"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19"],"y":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19"],"z":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19":["int32","int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"],"z":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19":"[3, 3]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19":"[3, 3]"}}}},{"nodeId":9,"description":{"expressions":["z"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':60:4"],"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19"],"y":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19":["int32","int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19":"[3, 3]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19":"[3, 3]"}}}},{"nodeId":10,"description":{"expressions":["x"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':60:4"],"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19"],"y":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19":["int32","int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19":"[3, 3]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19":"[3, 3]"}}}},{"nodeId":11,"description":{"expressions":["z"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':60:4"],"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19"],"y":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19"],"z":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19":["int32","int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"],"z":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19":"[3, 3]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19":"[3, 3]"}}}},{"nodeId":12,"description":{"expressions":["z"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':60:4"],"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19"],"y":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19"],"z":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19":["int32","int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"],"z":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19":"[3, 3]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19":"[3, 3]"}}}},{"nodeId":13,"description":{"expressions":["y"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':60:4"],"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19"],"y":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19"],"z":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19":["int32","int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"],"z":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19":"[3, 3]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19":"[3, 3]"}}}},{"nodeId":14,"description":{"expressions":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':60:4"],"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19"],"y":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19"],"z":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19":["int32","int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"],"z":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19":"[3, 3]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19":"[1, 3]"}}}},{"nodeId":15,"description":{"expressions":["*(z)->0"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':60:4"],"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19"],"y":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19"],"z":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19":["int32","int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"],"z":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19":"[3, 3]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19":"[3, 3]"}}}},{"nodeId":16,"description":{"expressions":["z"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':60:4"],"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19"],"y":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19"],"z":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19":["int32","int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"],"z":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19":"[3, 3]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19":"[3, 3]"}}}},{"nodeId":17,"description":{"expressions":["0"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':60:4"],"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19"],"y":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19"],"z":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19":["int32","int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"],"z":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19":"[3, 3]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19":"[3, 3]"}}}},{"nodeId":18,"description":{"expressions":["1"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':60:4"],"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19"],"y":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19"],"z":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19":["int32","int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"],"z":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19":"[3, 3]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19":"[3, 3]"}}}},{"nodeId":19,"description":{"expressions":["skip"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':60:4"],"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19"],"y":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19"],"z":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19":["int32","int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"],"z":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':61:19":"[3, 3]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':62:19":"[1, 3]"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-insensitive/untyped_A.f8(A__this).json b/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-insensitive/untyped_A.f8(A__this).json index 16338185d..e28caf79c 100644 --- a/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-insensitive/untyped_A.f8(A__this).json +++ b/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-insensitive/untyped_A.f8(A__this).json @@ -1 +1 @@ -{"name":"untyped A::f8(A* this)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"x = int32[](3)"},{"id":1,"text":"x"},{"id":2,"subNodes":[3],"text":"int32[](3)"},{"id":3,"text":"3"},{"id":4,"subNodes":[5,8],"text":"[](x, 0) = 2"},{"id":5,"subNodes":[6,7],"text":"[](x, 0)"},{"id":6,"text":"x"},{"id":7,"text":"0"},{"id":8,"text":"2"},{"id":9,"subNodes":[10,11],"text":"y = x"},{"id":10,"text":"y"},{"id":11,"text":"x"},{"id":12,"subNodes":[13,16],"text":"[](y, 0) = 1"},{"id":13,"subNodes":[14,15],"text":"[](y, 0)"},{"id":14,"text":"y"},{"id":15,"text":"0"},{"id":16,"text":"1"},{"id":17,"text":"ret"}],"edges":[{"sourceId":0,"destId":4,"kind":"SequentialEdge"},{"sourceId":4,"destId":9,"kind":"SequentialEdge"},{"sourceId":9,"destId":12,"kind":"SequentialEdge"},{"sourceId":12,"destId":17,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["x"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':68:4]","x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":["int32[]"],"this":["A*"],"x":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":1,"description":{"expressions":["x"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':68:4]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":["int32[]"],"this":["A*"]},"value":"#TOP#"}}},{"nodeId":2,"description":{"expressions":["ref$int32[]"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':68:4]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":["int32[]"],"this":["A*"]},"value":"#TOP#"}}},{"nodeId":3,"description":{"expressions":["3"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':68:4]"},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":4,"description":{"expressions":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':68:4]","x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":["int32","int32[]"],"this":["A*"],"x":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":"[2, 2]"}}}},{"nodeId":5,"description":{"expressions":["*(x)->0"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':68:4]","x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":["int32[]"],"this":["A*"],"x":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":6,"description":{"expressions":["x"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':68:4]","x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":["int32[]"],"this":["A*"],"x":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":7,"description":{"expressions":["0"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':68:4]","x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":["int32[]"],"this":["A*"],"x":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":8,"description":{"expressions":["2"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':68:4]","x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":["int32[]"],"this":["A*"],"x":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":9,"description":{"expressions":["y"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':68:4]","x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20]","y":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':71:6]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":["int32","int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':71:6":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":"[2, 2]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':71:6":"[2, 2]"}}}},{"nodeId":10,"description":{"expressions":["y"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':68:4]","x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":["int32","int32[]"],"this":["A*"],"x":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":"[2, 2]"}}}},{"nodeId":11,"description":{"expressions":["x"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':68:4]","x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":["int32","int32[]"],"this":["A*"],"x":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":"[2, 2]"}}}},{"nodeId":12,"description":{"expressions":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':71:6"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':68:4]","x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20]","y":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':71:6]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":["int32","int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':71:6":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":"[2, 2]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':71:6":"[1, 2]"}}}},{"nodeId":13,"description":{"expressions":["*(y)->0"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':68:4]","x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20]","y":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':71:6]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":["int32","int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':71:6":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":"[2, 2]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':71:6":"[2, 2]"}}}},{"nodeId":14,"description":{"expressions":["y"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':68:4]","x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20]","y":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':71:6]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":["int32","int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':71:6":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":"[2, 2]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':71:6":"[2, 2]"}}}},{"nodeId":15,"description":{"expressions":["0"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':68:4]","x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20]","y":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':71:6]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":["int32","int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':71:6":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":"[2, 2]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':71:6":"[2, 2]"}}}},{"nodeId":16,"description":{"expressions":["1"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':68:4]","x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20]","y":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':71:6]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":["int32","int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':71:6":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":"[2, 2]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':71:6":"[2, 2]"}}}},{"nodeId":17,"description":{"expressions":["skip"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':68:4]","x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20]","y":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':71:6]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":["int32","int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':71:6":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":"[2, 2]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':71:6":"[1, 2]"}}}}]} \ No newline at end of file +{"name":"untyped A::f8(A* this)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"x = int32[](3)"},{"id":1,"text":"x"},{"id":2,"subNodes":[3],"text":"int32[](3)"},{"id":3,"text":"3"},{"id":4,"subNodes":[5,8],"text":"[](x, 0) = 2"},{"id":5,"subNodes":[6,7],"text":"[](x, 0)"},{"id":6,"text":"x"},{"id":7,"text":"0"},{"id":8,"text":"2"},{"id":9,"subNodes":[10,11],"text":"y = x"},{"id":10,"text":"y"},{"id":11,"text":"x"},{"id":12,"subNodes":[13,16],"text":"[](y, 0) = 1"},{"id":13,"subNodes":[14,15],"text":"[](y, 0)"},{"id":14,"text":"y"},{"id":15,"text":"0"},{"id":16,"text":"1"},{"id":17,"text":"ret"}],"edges":[{"sourceId":0,"destId":4,"kind":"SequentialEdge"},{"sourceId":4,"destId":9,"kind":"SequentialEdge"},{"sourceId":9,"destId":12,"kind":"SequentialEdge"},{"sourceId":12,"destId":17,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["x"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':68:4"],"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":["int32","int32[]"],"this":["A*"],"x":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":"[3, 3]"}}}},{"nodeId":1,"description":{"expressions":["x"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':68:4"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":["int32","int32[]"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":"[3, 3]"}}}},{"nodeId":2,"description":{"expressions":["ref$int32[]"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':68:4"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":["int32","int32[]"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":"[3, 3]"}}}},{"nodeId":3,"description":{"expressions":["3"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':68:4"]},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":4,"description":{"expressions":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':68:4"],"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":["int32","int32[]"],"this":["A*"],"x":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":"[2, 3]"}}}},{"nodeId":5,"description":{"expressions":["*(x)->0"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':68:4"],"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":["int32","int32[]"],"this":["A*"],"x":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":"[3, 3]"}}}},{"nodeId":6,"description":{"expressions":["x"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':68:4"],"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":["int32","int32[]"],"this":["A*"],"x":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":"[3, 3]"}}}},{"nodeId":7,"description":{"expressions":["0"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':68:4"],"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":["int32","int32[]"],"this":["A*"],"x":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":"[3, 3]"}}}},{"nodeId":8,"description":{"expressions":["2"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':68:4"],"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":["int32","int32[]"],"this":["A*"],"x":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":"[3, 3]"}}}},{"nodeId":9,"description":{"expressions":["y"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':68:4"],"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20"],"y":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':71:6"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":["int32","int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':71:6":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":"[2, 3]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':71:6":"[2, 3]"}}}},{"nodeId":10,"description":{"expressions":["y"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':68:4"],"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":["int32","int32[]"],"this":["A*"],"x":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":"[2, 3]"}}}},{"nodeId":11,"description":{"expressions":["x"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':68:4"],"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":["int32","int32[]"],"this":["A*"],"x":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":"[2, 3]"}}}},{"nodeId":12,"description":{"expressions":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':71:6"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':68:4"],"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20"],"y":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':71:6"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":["int32","int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':71:6":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":"[2, 3]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':71:6":"[1, 3]"}}}},{"nodeId":13,"description":{"expressions":["*(y)->0"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':68:4"],"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20"],"y":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':71:6"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":["int32","int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':71:6":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":"[2, 3]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':71:6":"[2, 3]"}}}},{"nodeId":14,"description":{"expressions":["y"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':68:4"],"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20"],"y":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':71:6"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":["int32","int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':71:6":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":"[2, 3]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':71:6":"[2, 3]"}}}},{"nodeId":15,"description":{"expressions":["0"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':68:4"],"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20"],"y":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':71:6"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":["int32","int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':71:6":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":"[2, 3]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':71:6":"[2, 3]"}}}},{"nodeId":16,"description":{"expressions":["1"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':68:4"],"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20"],"y":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':71:6"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":["int32","int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':71:6":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":"[2, 3]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':71:6":"[2, 3]"}}}},{"nodeId":17,"description":{"expressions":["skip"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':68:4"],"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20"],"y":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':71:6"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":["int32","int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':71:6":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':69:20":"[2, 3]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':71:6":"[1, 3]"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-insensitive/untyped_A.f9(A__this).json b/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-insensitive/untyped_A.f9(A__this).json index 5bff9515b..ff6a655b8 100644 --- a/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-insensitive/untyped_A.f9(A__this).json +++ b/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-insensitive/untyped_A.f9(A__this).json @@ -1 +1 @@ -{"name":"untyped A::f9(A* this)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"x = A(1, 2)"},{"id":1,"text":"x"},{"id":2,"subNodes":[3,4],"text":"A(1, 2)"},{"id":3,"text":"1"},{"id":4,"text":"2"},{"id":5,"subNodes":[6,8],"text":"x::a = 1"},{"id":6,"subNodes":[7],"text":"x::a"},{"id":7,"text":"x"},{"id":8,"text":"1"},{"id":9,"subNodes":[10,12],"text":"x::b = 2"},{"id":10,"subNodes":[11],"text":"x::b"},{"id":11,"text":"x"},{"id":12,"text":"2"},{"id":13,"subNodes":[14,15],"text":"y = x"},{"id":14,"text":"y"},{"id":15,"text":"x"},{"id":16,"subNodes":[17,19],"text":"y::a = 3"},{"id":17,"subNodes":[18],"text":"y::a"},{"id":18,"text":"y"},{"id":19,"text":"3"},{"id":20,"subNodes":[21,23],"text":"y::b = 4"},{"id":21,"subNodes":[22],"text":"y::b"},{"id":22,"text":"y"},{"id":23,"text":"4"},{"id":24,"text":"ret"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"},{"sourceId":5,"destId":9,"kind":"SequentialEdge"},{"sourceId":9,"destId":13,"kind":"SequentialEdge"},{"sourceId":13,"destId":16,"kind":"SequentialEdge"},{"sourceId":16,"destId":20,"kind":"SequentialEdge"},{"sourceId":20,"destId":24,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["x"],"state":{"heap":{"x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":["A"],"x":["A*"]},"value":"#TOP#"}}},{"nodeId":1,"description":{"expressions":["x"],"state":{"heap":"#TOP#","type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":["A"]},"value":"#TOP#"}}},{"nodeId":2,"description":{"expressions":["ref$A"],"state":{"heap":"#TOP#","type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":["A"]},"value":"#TOP#"}}},{"nodeId":3,"description":{"expressions":["1"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':75:4]"},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":4,"description":{"expressions":["2"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':75:4]"},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":5,"description":{"expressions":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20"],"state":{"heap":{"x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":["A","int32"],"x":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":"[1, 1]"}}}},{"nodeId":6,"description":{"expressions":["*(x)->a"],"state":{"heap":{"x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":["A"],"x":["A*"]},"value":"#TOP#"}}},{"nodeId":7,"description":{"expressions":["x"],"state":{"heap":{"x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":["A"],"x":["A*"]},"value":"#TOP#"}}},{"nodeId":8,"description":{"expressions":["1"],"state":{"heap":{"x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":["A"],"x":["A*"]},"value":"#TOP#"}}},{"nodeId":9,"description":{"expressions":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20"],"state":{"heap":{"x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":["A","int32"],"x":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":"[1, 2]"}}}},{"nodeId":10,"description":{"expressions":["*(x)->b"],"state":{"heap":{"x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":["A","int32"],"x":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":"[1, 1]"}}}},{"nodeId":11,"description":{"expressions":["x"],"state":{"heap":{"x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":["A","int32"],"x":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":"[1, 1]"}}}},{"nodeId":12,"description":{"expressions":["2"],"state":{"heap":{"x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":["A","int32"],"x":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":"[1, 1]"}}}},{"nodeId":13,"description":{"expressions":["y"],"state":{"heap":{"x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20]","y":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":["A","int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6":["A","int32"],"x":["A*"],"y":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":"[1, 2]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6":"[1, 2]"}}}},{"nodeId":14,"description":{"expressions":["y"],"state":{"heap":{"x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":["A","int32"],"x":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":"[1, 2]"}}}},{"nodeId":15,"description":{"expressions":["x"],"state":{"heap":{"x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":["A","int32"],"x":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":"[1, 2]"}}}},{"nodeId":16,"description":{"expressions":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6"],"state":{"heap":{"x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20]","y":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":["A","int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6":["A","int32"],"x":["A*"],"y":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":"[1, 2]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6":"[1, 3]"}}}},{"nodeId":17,"description":{"expressions":["*(y)->a"],"state":{"heap":{"x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20]","y":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":["A","int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6":["A","int32"],"x":["A*"],"y":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":"[1, 2]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6":"[1, 2]"}}}},{"nodeId":18,"description":{"expressions":["y"],"state":{"heap":{"x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20]","y":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":["A","int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6":["A","int32"],"x":["A*"],"y":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":"[1, 2]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6":"[1, 2]"}}}},{"nodeId":19,"description":{"expressions":["3"],"state":{"heap":{"x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20]","y":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":["A","int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6":["A","int32"],"x":["A*"],"y":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":"[1, 2]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6":"[1, 2]"}}}},{"nodeId":20,"description":{"expressions":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6"],"state":{"heap":{"x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20]","y":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":["A","int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6":["A","int32"],"x":["A*"],"y":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":"[1, 2]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6":"[1, 4]"}}}},{"nodeId":21,"description":{"expressions":["*(y)->b"],"state":{"heap":{"x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20]","y":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":["A","int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6":["A","int32"],"x":["A*"],"y":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":"[1, 2]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6":"[1, 3]"}}}},{"nodeId":22,"description":{"expressions":["y"],"state":{"heap":{"x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20]","y":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":["A","int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6":["A","int32"],"x":["A*"],"y":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":"[1, 2]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6":"[1, 3]"}}}},{"nodeId":23,"description":{"expressions":["4"],"state":{"heap":{"x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20]","y":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":["A","int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6":["A","int32"],"x":["A*"],"y":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":"[1, 2]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6":"[1, 3]"}}}},{"nodeId":24,"description":{"expressions":["skip"],"state":{"heap":{"x":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20]","y":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6]"},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":["A","int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6":["A","int32"],"x":["A*"],"y":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":"[1, 2]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6":"[1, 4]"}}}}]} \ No newline at end of file +{"name":"untyped A::f9(A* this)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"x = A(1, 2)"},{"id":1,"text":"x"},{"id":2,"subNodes":[3,4],"text":"A(1, 2)"},{"id":3,"text":"1"},{"id":4,"text":"2"},{"id":5,"subNodes":[6,8],"text":"x::a = 1"},{"id":6,"subNodes":[7],"text":"x::a"},{"id":7,"text":"x"},{"id":8,"text":"1"},{"id":9,"subNodes":[10,12],"text":"x::b = 2"},{"id":10,"subNodes":[11],"text":"x::b"},{"id":11,"text":"x"},{"id":12,"text":"2"},{"id":13,"subNodes":[14,15],"text":"y = x"},{"id":14,"text":"y"},{"id":15,"text":"x"},{"id":16,"subNodes":[17,19],"text":"y::a = 3"},{"id":17,"subNodes":[18],"text":"y::a"},{"id":18,"text":"y"},{"id":19,"text":"3"},{"id":20,"subNodes":[21,23],"text":"y::b = 4"},{"id":21,"subNodes":[22],"text":"y::b"},{"id":22,"text":"y"},{"id":23,"text":"4"},{"id":24,"text":"ret"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"},{"sourceId":5,"destId":9,"kind":"SequentialEdge"},{"sourceId":9,"destId":13,"kind":"SequentialEdge"},{"sourceId":13,"destId":16,"kind":"SequentialEdge"},{"sourceId":16,"destId":20,"kind":"SequentialEdge"},{"sourceId":20,"destId":24,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["x"],"state":{"heap":{"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":["A"],"x":["A*"]},"value":"#TOP#"}}},{"nodeId":1,"description":{"expressions":["x"],"state":{"heap":"#TOP#","type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":["A"]},"value":"#TOP#"}}},{"nodeId":2,"description":{"expressions":["ref$A"],"state":{"heap":"#TOP#","type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":["A"]},"value":"#TOP#"}}},{"nodeId":3,"description":{"expressions":["1"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':75:4"]},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":4,"description":{"expressions":["2"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':75:4"]},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":5,"description":{"expressions":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20"],"state":{"heap":{"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":["A","int32"],"x":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":"[1, 1]"}}}},{"nodeId":6,"description":{"expressions":["*(x)->a"],"state":{"heap":{"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":["A"],"x":["A*"]},"value":"#TOP#"}}},{"nodeId":7,"description":{"expressions":["x"],"state":{"heap":{"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":["A"],"x":["A*"]},"value":"#TOP#"}}},{"nodeId":8,"description":{"expressions":["1"],"state":{"heap":{"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":["A"],"x":["A*"]},"value":"#TOP#"}}},{"nodeId":9,"description":{"expressions":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20"],"state":{"heap":{"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":["A","int32"],"x":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":"[1, 2]"}}}},{"nodeId":10,"description":{"expressions":["*(x)->b"],"state":{"heap":{"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":["A","int32"],"x":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":"[1, 1]"}}}},{"nodeId":11,"description":{"expressions":["x"],"state":{"heap":{"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":["A","int32"],"x":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":"[1, 1]"}}}},{"nodeId":12,"description":{"expressions":["2"],"state":{"heap":{"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":["A","int32"],"x":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":"[1, 1]"}}}},{"nodeId":13,"description":{"expressions":["y"],"state":{"heap":{"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20"],"y":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":["A","int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6":["A","int32"],"x":["A*"],"y":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":"[1, 2]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6":"[1, 2]"}}}},{"nodeId":14,"description":{"expressions":["y"],"state":{"heap":{"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":["A","int32"],"x":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":"[1, 2]"}}}},{"nodeId":15,"description":{"expressions":["x"],"state":{"heap":{"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":["A","int32"],"x":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":"[1, 2]"}}}},{"nodeId":16,"description":{"expressions":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6"],"state":{"heap":{"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20"],"y":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":["A","int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6":["A","int32"],"x":["A*"],"y":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":"[1, 2]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6":"[1, 3]"}}}},{"nodeId":17,"description":{"expressions":["*(y)->a"],"state":{"heap":{"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20"],"y":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":["A","int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6":["A","int32"],"x":["A*"],"y":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":"[1, 2]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6":"[1, 2]"}}}},{"nodeId":18,"description":{"expressions":["y"],"state":{"heap":{"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20"],"y":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":["A","int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6":["A","int32"],"x":["A*"],"y":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":"[1, 2]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6":"[1, 2]"}}}},{"nodeId":19,"description":{"expressions":["3"],"state":{"heap":{"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20"],"y":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":["A","int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6":["A","int32"],"x":["A*"],"y":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":"[1, 2]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6":"[1, 2]"}}}},{"nodeId":20,"description":{"expressions":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6"],"state":{"heap":{"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20"],"y":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":["A","int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6":["A","int32"],"x":["A*"],"y":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":"[1, 2]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6":"[1, 4]"}}}},{"nodeId":21,"description":{"expressions":["*(y)->b"],"state":{"heap":{"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20"],"y":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":["A","int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6":["A","int32"],"x":["A*"],"y":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":"[1, 2]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6":"[1, 3]"}}}},{"nodeId":22,"description":{"expressions":["y"],"state":{"heap":{"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20"],"y":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":["A","int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6":["A","int32"],"x":["A*"],"y":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":"[1, 2]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6":"[1, 3]"}}}},{"nodeId":23,"description":{"expressions":["4"],"state":{"heap":{"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20"],"y":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":["A","int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6":["A","int32"],"x":["A*"],"y":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":"[1, 2]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6":"[1, 3]"}}}},{"nodeId":24,"description":{"expressions":["skip"],"state":{"heap":{"x":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20"],"y":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6"]},"type":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":["A","int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6":["A","int32"],"x":["A*"],"y":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':76:20":"[1, 2]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-insensitive/program.imp':79:6":"[1, 4]"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-sensitive/report.json b/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-sensitive/report.json index d42767baa..ec68085a3 100644 --- a/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-sensitive/report.json +++ b/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-sensitive/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_A.f1(A__this).json", "untyped_A.f2(A__this).json", "untyped_A.f3(A__this).json", "untyped_A.f4(A__this).json", "untyped_A.f5(A__this).json", "untyped_A.f6(A__this).json", "untyped_A.f7(A__this).json", "untyped_A.f8(A__this).json", "untyped_A.f9(A__this).json" ], "info" : { "cfgs" : "9", - "duration" : "313ms", - "end" : "2023-04-20T12:45:21.670+02:00", + "duration" : "604ms", + "end" : "2023-09-13T14:01:52.352+02:00", "expressions" : "143", "files" : "9", "globals" : "2", "members" : "9", "programs" : "1", - "start" : "2023-04-20T12:45:21.357+02:00", + "start" : "2023-09-13T14:01:51.748+02:00", "statements" : "55", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/heap/point-based-heap/field-sensitive" } diff --git a/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-sensitive/untyped_A.f1(A__this).json b/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-sensitive/untyped_A.f1(A__this).json index e4dba1e3f..987362619 100644 --- a/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-sensitive/untyped_A.f1(A__this).json +++ b/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-sensitive/untyped_A.f1(A__this).json @@ -1 +1 @@ -{"name":"untyped A::f1(A* this)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"o1 = new A(1, 2)"},{"id":1,"text":"o1"},{"id":2,"subNodes":[3,4],"text":"new A(1, 2)"},{"id":3,"text":"1"},{"id":4,"text":"2"},{"id":5,"subNodes":[6,8],"text":"o1::a = 1"},{"id":6,"subNodes":[7],"text":"o1::a"},{"id":7,"text":"o1"},{"id":8,"text":"1"},{"id":9,"subNodes":[10,12],"text":"o1::b = 2"},{"id":10,"subNodes":[11],"text":"o1::b"},{"id":11,"text":"o1"},{"id":12,"text":"2"},{"id":13,"subNodes":[14,16],"text":"o1::a = o1::b"},{"id":14,"subNodes":[15],"text":"o1::a"},{"id":15,"text":"o1"},{"id":16,"subNodes":[17],"text":"o1::b"},{"id":17,"text":"o1"},{"id":18,"text":"ret"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"},{"sourceId":5,"destId":9,"kind":"SequentialEdge"},{"sourceId":9,"destId":13,"kind":"SequentialEdge"},{"sourceId":13,"destId":18,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["o1"],"state":{"heap":{"o1":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20":["A"],"o1":["A*"]},"value":"#TOP#"}}},{"nodeId":1,"description":{"expressions":["o1"],"state":{"heap":"#TOP#","type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20":["A"]},"value":"#TOP#"}}},{"nodeId":2,"description":{"expressions":["ref$new A"],"state":{"heap":"#TOP#","type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20":["A"]},"value":"#TOP#"}}},{"nodeId":3,"description":{"expressions":["1"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':5:4]"},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":4,"description":{"expressions":["2"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':5:4]"},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":5,"description":{"expressions":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[a]"],"state":{"heap":{"o1":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[a]":["int32"],"o1":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[a]":"[1, 1]"}}}},{"nodeId":6,"description":{"expressions":["*(o1)->a"],"state":{"heap":{"o1":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20":["A"],"o1":["A*"]},"value":"#TOP#"}}},{"nodeId":7,"description":{"expressions":["o1"],"state":{"heap":{"o1":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20":["A"],"o1":["A*"]},"value":"#TOP#"}}},{"nodeId":8,"description":{"expressions":["1"],"state":{"heap":{"o1":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20":["A"],"o1":["A*"]},"value":"#TOP#"}}},{"nodeId":9,"description":{"expressions":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[b]"],"state":{"heap":{"o1":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[b]":["int32"],"o1":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[a]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[b]":"[2, 2]"}}}},{"nodeId":10,"description":{"expressions":["*(o1)->b"],"state":{"heap":{"o1":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[a]":["int32"],"o1":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[a]":"[1, 1]"}}}},{"nodeId":11,"description":{"expressions":["o1"],"state":{"heap":{"o1":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[a]":["int32"],"o1":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[a]":"[1, 1]"}}}},{"nodeId":12,"description":{"expressions":["2"],"state":{"heap":{"o1":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[a]":["int32"],"o1":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[a]":"[1, 1]"}}}},{"nodeId":13,"description":{"expressions":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[a]"],"state":{"heap":{"o1":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[b]":["int32"],"o1":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[a]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[b]":"[2, 2]"}}}},{"nodeId":14,"description":{"expressions":["*(o1)->a"],"state":{"heap":{"o1":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[b]":["int32"],"o1":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[a]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[b]":"[2, 2]"}}}},{"nodeId":15,"description":{"expressions":["o1"],"state":{"heap":{"o1":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[b]":["int32"],"o1":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[a]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[b]":"[2, 2]"}}}},{"nodeId":16,"description":{"expressions":["*(o1)->b"],"state":{"heap":{"o1":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[b]":["int32"],"o1":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[a]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[b]":"[2, 2]"}}}},{"nodeId":17,"description":{"expressions":["o1"],"state":{"heap":{"o1":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[b]":["int32"],"o1":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[a]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[b]":"[2, 2]"}}}},{"nodeId":18,"description":{"expressions":["skip"],"state":{"heap":{"o1":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[b]":["int32"],"o1":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[a]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[b]":"[2, 2]"}}}}]} \ No newline at end of file +{"name":"untyped A::f1(A* this)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"o1 = new A(1, 2)"},{"id":1,"text":"o1"},{"id":2,"subNodes":[3,4],"text":"new A(1, 2)"},{"id":3,"text":"1"},{"id":4,"text":"2"},{"id":5,"subNodes":[6,8],"text":"o1::a = 1"},{"id":6,"subNodes":[7],"text":"o1::a"},{"id":7,"text":"o1"},{"id":8,"text":"1"},{"id":9,"subNodes":[10,12],"text":"o1::b = 2"},{"id":10,"subNodes":[11],"text":"o1::b"},{"id":11,"text":"o1"},{"id":12,"text":"2"},{"id":13,"subNodes":[14,16],"text":"o1::a = o1::b"},{"id":14,"subNodes":[15],"text":"o1::a"},{"id":15,"text":"o1"},{"id":16,"subNodes":[17],"text":"o1::b"},{"id":17,"text":"o1"},{"id":18,"text":"ret"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"},{"sourceId":5,"destId":9,"kind":"SequentialEdge"},{"sourceId":9,"destId":13,"kind":"SequentialEdge"},{"sourceId":13,"destId":18,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["o1"],"state":{"heap":{"o1":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20":["A"],"o1":["A*"]},"value":"#TOP#"}}},{"nodeId":1,"description":{"expressions":["o1"],"state":{"heap":"#TOP#","type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20":["A"]},"value":"#TOP#"}}},{"nodeId":2,"description":{"expressions":["ref$new A"],"state":{"heap":"#TOP#","type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20":["A"]},"value":"#TOP#"}}},{"nodeId":3,"description":{"expressions":["1"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':5:4"]},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":4,"description":{"expressions":["2"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':5:4"]},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":5,"description":{"expressions":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[a]"],"state":{"heap":{"o1":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[a]":["int32"],"o1":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[a]":"[1, 1]"}}}},{"nodeId":6,"description":{"expressions":["*(o1)->a"],"state":{"heap":{"o1":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20":["A"],"o1":["A*"]},"value":"#TOP#"}}},{"nodeId":7,"description":{"expressions":["o1"],"state":{"heap":{"o1":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20":["A"],"o1":["A*"]},"value":"#TOP#"}}},{"nodeId":8,"description":{"expressions":["1"],"state":{"heap":{"o1":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20":["A"],"o1":["A*"]},"value":"#TOP#"}}},{"nodeId":9,"description":{"expressions":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[b]"],"state":{"heap":{"o1":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[b]":["int32"],"o1":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[a]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[b]":"[2, 2]"}}}},{"nodeId":10,"description":{"expressions":["*(o1)->b"],"state":{"heap":{"o1":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[a]":["int32"],"o1":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[a]":"[1, 1]"}}}},{"nodeId":11,"description":{"expressions":["o1"],"state":{"heap":{"o1":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[a]":["int32"],"o1":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[a]":"[1, 1]"}}}},{"nodeId":12,"description":{"expressions":["2"],"state":{"heap":{"o1":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[a]":["int32"],"o1":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[a]":"[1, 1]"}}}},{"nodeId":13,"description":{"expressions":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[a]"],"state":{"heap":{"o1":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[b]":["int32"],"o1":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[a]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[b]":"[2, 2]"}}}},{"nodeId":14,"description":{"expressions":["*(o1)->a"],"state":{"heap":{"o1":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[b]":["int32"],"o1":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[a]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[b]":"[2, 2]"}}}},{"nodeId":15,"description":{"expressions":["o1"],"state":{"heap":{"o1":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[b]":["int32"],"o1":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[a]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[b]":"[2, 2]"}}}},{"nodeId":16,"description":{"expressions":["*(o1)->b"],"state":{"heap":{"o1":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[b]":["int32"],"o1":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[a]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[b]":"[2, 2]"}}}},{"nodeId":17,"description":{"expressions":["o1"],"state":{"heap":{"o1":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[b]":["int32"],"o1":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[a]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[b]":"[2, 2]"}}}},{"nodeId":18,"description":{"expressions":["skip"],"state":{"heap":{"o1":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[b]":["int32"],"o1":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[a]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':6:20[b]":"[2, 2]"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-sensitive/untyped_A.f2(A__this).json b/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-sensitive/untyped_A.f2(A__this).json index cf2854446..86d9d24dc 100644 --- a/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-sensitive/untyped_A.f2(A__this).json +++ b/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-sensitive/untyped_A.f2(A__this).json @@ -1 +1 @@ -{"name":"untyped A::f2(A* this)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"o = new A(-1, -1)"},{"id":1,"text":"o"},{"id":2,"subNodes":[3,4],"text":"new A(-1, -1)"},{"id":3,"text":"-1"},{"id":4,"text":"-1"},{"id":5,"text":"true"},{"id":6,"subNodes":[7,8],"text":"o = new A(0, 0)"},{"id":7,"text":"o"},{"id":8,"subNodes":[9,10],"text":"new A(0, 0)"},{"id":9,"text":"0"},{"id":10,"text":"0"},{"id":11,"subNodes":[12,13],"text":"o = new A(1, 1)"},{"id":12,"text":"o"},{"id":13,"subNodes":[14,15],"text":"new A(1, 1)"},{"id":14,"text":"1"},{"id":15,"text":"1"},{"id":16,"text":"ret"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"},{"sourceId":5,"destId":6,"kind":"TrueEdge"},{"sourceId":5,"destId":11,"kind":"FalseEdge"},{"sourceId":6,"destId":16,"kind":"SequentialEdge"},{"sourceId":11,"destId":16,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["o"],"state":{"heap":{"o":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':13:21]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':13:21":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":1,"description":{"expressions":["o"],"state":{"heap":"#TOP#","type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':13:21":["A"]},"value":"#TOP#"}}},{"nodeId":2,"description":{"expressions":["ref$new A"],"state":{"heap":"#TOP#","type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':13:21":["A"]},"value":"#TOP#"}}},{"nodeId":3,"description":{"expressions":["-1"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':12:4]"},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":4,"description":{"expressions":["-1"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':12:4]"},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":5,"description":{"expressions":["true"],"state":{"heap":{"o":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':13:21]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':13:21":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":6,"description":{"expressions":["o"],"state":{"heap":{"o":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':15:16]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':15:16":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":7,"description":{"expressions":["o"],"state":{"heap":"#TOP#","type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':15:16":["A"]},"value":"#TOP#"}}},{"nodeId":8,"description":{"expressions":["ref$new A"],"state":{"heap":"#TOP#","type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':15:16":["A"]},"value":"#TOP#"}}},{"nodeId":9,"description":{"expressions":["0"],"state":{"heap":{"o":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':13:21]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':13:21":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":10,"description":{"expressions":["0"],"state":{"heap":{"o":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':13:21]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':13:21":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":11,"description":{"expressions":["o"],"state":{"heap":{"o":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':17:16]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':17:16":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":12,"description":{"expressions":["o"],"state":{"heap":"#TOP#","type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':17:16":["A"]},"value":"#TOP#"}}},{"nodeId":13,"description":{"expressions":["ref$new A"],"state":{"heap":"#TOP#","type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':17:16":["A"]},"value":"#TOP#"}}},{"nodeId":14,"description":{"expressions":["1"],"state":{"heap":{"o":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':13:21]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':13:21":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":15,"description":{"expressions":["1"],"state":{"heap":{"o":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':13:21]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':13:21":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":16,"description":{"expressions":["skip"],"state":{"heap":{"o":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':15:16, heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':17:16]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':15:16":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':17:16":["A"],"o":["A*"]},"value":"#TOP#"}}}]} \ No newline at end of file +{"name":"untyped A::f2(A* this)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"o = new A(-1, -1)"},{"id":1,"text":"o"},{"id":2,"subNodes":[3,4],"text":"new A(-1, -1)"},{"id":3,"text":"-1"},{"id":4,"text":"-1"},{"id":5,"text":"true"},{"id":6,"subNodes":[7,8],"text":"o = new A(0, 0)"},{"id":7,"text":"o"},{"id":8,"subNodes":[9,10],"text":"new A(0, 0)"},{"id":9,"text":"0"},{"id":10,"text":"0"},{"id":11,"subNodes":[12,13],"text":"o = new A(1, 1)"},{"id":12,"text":"o"},{"id":13,"subNodes":[14,15],"text":"new A(1, 1)"},{"id":14,"text":"1"},{"id":15,"text":"1"},{"id":16,"text":"ret"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"},{"sourceId":5,"destId":6,"kind":"TrueEdge"},{"sourceId":5,"destId":11,"kind":"FalseEdge"},{"sourceId":6,"destId":16,"kind":"SequentialEdge"},{"sourceId":11,"destId":16,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["o"],"state":{"heap":{"o":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':13:21"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':13:21":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":1,"description":{"expressions":["o"],"state":{"heap":"#TOP#","type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':13:21":["A"]},"value":"#TOP#"}}},{"nodeId":2,"description":{"expressions":["ref$new A"],"state":{"heap":"#TOP#","type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':13:21":["A"]},"value":"#TOP#"}}},{"nodeId":3,"description":{"expressions":["-1"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':12:4"]},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":4,"description":{"expressions":["-1"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':12:4"]},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":5,"description":{"expressions":["true"],"state":{"heap":{"o":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':13:21"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':13:21":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":6,"description":{"expressions":["o"],"state":{"heap":{"o":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':15:16"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':15:16":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":7,"description":{"expressions":["o"],"state":{"heap":"#TOP#","type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':15:16":["A"]},"value":"#TOP#"}}},{"nodeId":8,"description":{"expressions":["ref$new A"],"state":{"heap":"#TOP#","type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':15:16":["A"]},"value":"#TOP#"}}},{"nodeId":9,"description":{"expressions":["0"],"state":{"heap":{"o":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':13:21"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':13:21":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":10,"description":{"expressions":["0"],"state":{"heap":{"o":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':13:21"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':13:21":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":11,"description":{"expressions":["o"],"state":{"heap":{"o":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':17:16"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':17:16":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":12,"description":{"expressions":["o"],"state":{"heap":"#TOP#","type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':17:16":["A"]},"value":"#TOP#"}}},{"nodeId":13,"description":{"expressions":["ref$new A"],"state":{"heap":"#TOP#","type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':17:16":["A"]},"value":"#TOP#"}}},{"nodeId":14,"description":{"expressions":["1"],"state":{"heap":{"o":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':13:21"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':13:21":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":15,"description":{"expressions":["1"],"state":{"heap":{"o":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':13:21"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':13:21":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":16,"description":{"expressions":["skip"],"state":{"heap":{"o":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':15:16","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':17:16"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':15:16":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':17:16":["A"],"o":["A*"]},"value":"#TOP#"}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-sensitive/untyped_A.f3(A__this).json b/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-sensitive/untyped_A.f3(A__this).json index 271041f74..40d16adb7 100644 --- a/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-sensitive/untyped_A.f3(A__this).json +++ b/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-sensitive/untyped_A.f3(A__this).json @@ -1 +1 @@ -{"name":"untyped A::f3(A* this)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"o = new A(-1, -1)"},{"id":1,"text":"o"},{"id":2,"subNodes":[3,4],"text":"new A(-1, -1)"},{"id":3,"text":"-1"},{"id":4,"text":"-1"},{"id":5,"text":"true"},{"id":6,"subNodes":[7,8],"text":"o = new A(0, 0)"},{"id":7,"text":"o"},{"id":8,"subNodes":[9,10],"text":"new A(0, 0)"},{"id":9,"text":"0"},{"id":10,"text":"0"},{"id":11,"subNodes":[12,13],"text":"o = new A(1, 1)"},{"id":12,"text":"o"},{"id":13,"subNodes":[14,15],"text":"new A(1, 1)"},{"id":14,"text":"1"},{"id":15,"text":"1"},{"id":16,"subNodes":[17,19],"text":"o::a = 2"},{"id":17,"subNodes":[18],"text":"o::a"},{"id":18,"text":"o"},{"id":19,"text":"2"},{"id":20,"subNodes":[21,23],"text":"o::b = 3"},{"id":21,"subNodes":[22],"text":"o::b"},{"id":22,"text":"o"},{"id":23,"text":"3"},{"id":24,"text":"ret"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"},{"sourceId":5,"destId":6,"kind":"TrueEdge"},{"sourceId":5,"destId":11,"kind":"FalseEdge"},{"sourceId":6,"destId":16,"kind":"SequentialEdge"},{"sourceId":11,"destId":16,"kind":"SequentialEdge"},{"sourceId":16,"destId":20,"kind":"SequentialEdge"},{"sourceId":20,"destId":24,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["o"],"state":{"heap":{"o":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':23:21]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':23:21":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":1,"description":{"expressions":["o"],"state":{"heap":"#TOP#","type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':23:21":["A"]},"value":"#TOP#"}}},{"nodeId":2,"description":{"expressions":["ref$new A"],"state":{"heap":"#TOP#","type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':23:21":["A"]},"value":"#TOP#"}}},{"nodeId":3,"description":{"expressions":["-1"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':22:4]"},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":4,"description":{"expressions":["-1"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':22:4]"},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":5,"description":{"expressions":["true"],"state":{"heap":{"o":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':23:21]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':23:21":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":6,"description":{"expressions":["o"],"state":{"heap":{"o":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":7,"description":{"expressions":["o"],"state":{"heap":"#TOP#","type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16":["A"]},"value":"#TOP#"}}},{"nodeId":8,"description":{"expressions":["ref$new A"],"state":{"heap":"#TOP#","type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16":["A"]},"value":"#TOP#"}}},{"nodeId":9,"description":{"expressions":["0"],"state":{"heap":{"o":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':23:21]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':23:21":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":10,"description":{"expressions":["0"],"state":{"heap":{"o":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':23:21]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':23:21":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":11,"description":{"expressions":["o"],"state":{"heap":{"o":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":12,"description":{"expressions":["o"],"state":{"heap":"#TOP#","type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16":["A"]},"value":"#TOP#"}}},{"nodeId":13,"description":{"expressions":["ref$new A"],"state":{"heap":"#TOP#","type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16":["A"]},"value":"#TOP#"}}},{"nodeId":14,"description":{"expressions":["1"],"state":{"heap":{"o":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':23:21]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':23:21":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":15,"description":{"expressions":["1"],"state":{"heap":{"o":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':23:21]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':23:21":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":16,"description":{"expressions":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16[a]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16[a]"],"state":{"heap":{"o":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16, heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16[a]":["int32"],"o":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16[a]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16[a]":"[2, 2]"}}}},{"nodeId":17,"description":{"expressions":["*(o)->a"],"state":{"heap":{"o":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16, heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":18,"description":{"expressions":["o"],"state":{"heap":{"o":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16, heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":19,"description":{"expressions":["2"],"state":{"heap":{"o":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16, heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":20,"description":{"expressions":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16[b]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16[b]"],"state":{"heap":{"o":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16, heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16[b]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16[b]":["int32"],"o":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16[a]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16[b]":"[3, 3]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16[a]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16[b]":"[3, 3]"}}}},{"nodeId":21,"description":{"expressions":["*(o)->b"],"state":{"heap":{"o":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16, heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16[a]":["int32"],"o":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16[a]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16[a]":"[2, 2]"}}}},{"nodeId":22,"description":{"expressions":["o"],"state":{"heap":{"o":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16, heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16[a]":["int32"],"o":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16[a]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16[a]":"[2, 2]"}}}},{"nodeId":23,"description":{"expressions":["3"],"state":{"heap":{"o":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16, heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16[a]":["int32"],"o":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16[a]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16[a]":"[2, 2]"}}}},{"nodeId":24,"description":{"expressions":["skip"],"state":{"heap":{"o":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16, heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16[b]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16[b]":["int32"],"o":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16[a]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16[b]":"[3, 3]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16[a]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16[b]":"[3, 3]"}}}}]} \ No newline at end of file +{"name":"untyped A::f3(A* this)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"o = new A(-1, -1)"},{"id":1,"text":"o"},{"id":2,"subNodes":[3,4],"text":"new A(-1, -1)"},{"id":3,"text":"-1"},{"id":4,"text":"-1"},{"id":5,"text":"true"},{"id":6,"subNodes":[7,8],"text":"o = new A(0, 0)"},{"id":7,"text":"o"},{"id":8,"subNodes":[9,10],"text":"new A(0, 0)"},{"id":9,"text":"0"},{"id":10,"text":"0"},{"id":11,"subNodes":[12,13],"text":"o = new A(1, 1)"},{"id":12,"text":"o"},{"id":13,"subNodes":[14,15],"text":"new A(1, 1)"},{"id":14,"text":"1"},{"id":15,"text":"1"},{"id":16,"subNodes":[17,19],"text":"o::a = 2"},{"id":17,"subNodes":[18],"text":"o::a"},{"id":18,"text":"o"},{"id":19,"text":"2"},{"id":20,"subNodes":[21,23],"text":"o::b = 3"},{"id":21,"subNodes":[22],"text":"o::b"},{"id":22,"text":"o"},{"id":23,"text":"3"},{"id":24,"text":"ret"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"},{"sourceId":5,"destId":6,"kind":"TrueEdge"},{"sourceId":5,"destId":11,"kind":"FalseEdge"},{"sourceId":6,"destId":16,"kind":"SequentialEdge"},{"sourceId":11,"destId":16,"kind":"SequentialEdge"},{"sourceId":16,"destId":20,"kind":"SequentialEdge"},{"sourceId":20,"destId":24,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["o"],"state":{"heap":{"o":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':23:21"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':23:21":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":1,"description":{"expressions":["o"],"state":{"heap":"#TOP#","type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':23:21":["A"]},"value":"#TOP#"}}},{"nodeId":2,"description":{"expressions":["ref$new A"],"state":{"heap":"#TOP#","type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':23:21":["A"]},"value":"#TOP#"}}},{"nodeId":3,"description":{"expressions":["-1"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':22:4"]},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":4,"description":{"expressions":["-1"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':22:4"]},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":5,"description":{"expressions":["true"],"state":{"heap":{"o":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':23:21"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':23:21":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":6,"description":{"expressions":["o"],"state":{"heap":{"o":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":7,"description":{"expressions":["o"],"state":{"heap":"#TOP#","type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16":["A"]},"value":"#TOP#"}}},{"nodeId":8,"description":{"expressions":["ref$new A"],"state":{"heap":"#TOP#","type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16":["A"]},"value":"#TOP#"}}},{"nodeId":9,"description":{"expressions":["0"],"state":{"heap":{"o":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':23:21"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':23:21":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":10,"description":{"expressions":["0"],"state":{"heap":{"o":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':23:21"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':23:21":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":11,"description":{"expressions":["o"],"state":{"heap":{"o":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":12,"description":{"expressions":["o"],"state":{"heap":"#TOP#","type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16":["A"]},"value":"#TOP#"}}},{"nodeId":13,"description":{"expressions":["ref$new A"],"state":{"heap":"#TOP#","type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16":["A"]},"value":"#TOP#"}}},{"nodeId":14,"description":{"expressions":["1"],"state":{"heap":{"o":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':23:21"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':23:21":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":15,"description":{"expressions":["1"],"state":{"heap":{"o":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':23:21"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':23:21":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":16,"description":{"expressions":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16[a]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16[a]"],"state":{"heap":{"o":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16[a]":["int32"],"o":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16[a]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16[a]":"[2, 2]"}}}},{"nodeId":17,"description":{"expressions":["*(o)->a"],"state":{"heap":{"o":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":18,"description":{"expressions":["o"],"state":{"heap":{"o":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":19,"description":{"expressions":["2"],"state":{"heap":{"o":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16":["A"],"o":["A*"]},"value":"#TOP#"}}},{"nodeId":20,"description":{"expressions":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16[b]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16[b]"],"state":{"heap":{"o":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16[b]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16[b]":["int32"],"o":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16[a]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16[b]":"[3, 3]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16[a]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16[b]":"[3, 3]"}}}},{"nodeId":21,"description":{"expressions":["*(o)->b"],"state":{"heap":{"o":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16[a]":["int32"],"o":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16[a]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16[a]":"[2, 2]"}}}},{"nodeId":22,"description":{"expressions":["o"],"state":{"heap":{"o":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16[a]":["int32"],"o":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16[a]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16[a]":"[2, 2]"}}}},{"nodeId":23,"description":{"expressions":["3"],"state":{"heap":{"o":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16[a]":["int32"],"o":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16[a]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16[a]":"[2, 2]"}}}},{"nodeId":24,"description":{"expressions":["skip"],"state":{"heap":{"o":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16[b]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16[b]":["int32"],"o":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16[a]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':25:16[b]":"[3, 3]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16[a]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':27:16[b]":"[3, 3]"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-sensitive/untyped_A.f4(A__this).json b/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-sensitive/untyped_A.f4(A__this).json index ff599684e..91a518bc5 100644 --- a/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-sensitive/untyped_A.f4(A__this).json +++ b/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-sensitive/untyped_A.f4(A__this).json @@ -1 +1 @@ -{"name":"untyped A::f4(A* this)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"o = new int32[](6)"},{"id":1,"text":"o"},{"id":2,"subNodes":[3],"text":"new int32[](6)"},{"id":3,"text":"6"},{"id":4,"subNodes":[5,6],"text":"i = 0"},{"id":5,"text":"i"},{"id":6,"text":"0"},{"id":7,"text":"true"},{"id":8,"subNodes":[9,12],"text":"[](o, 0) = 0"},{"id":9,"subNodes":[10,11],"text":"[](o, 0)"},{"id":10,"text":"o"},{"id":11,"text":"0"},{"id":12,"text":"0"},{"id":13,"subNodes":[14,15],"text":"i = +(i, 1)"},{"id":14,"text":"i"},{"id":15,"subNodes":[16,17],"text":"+(i, 1)"},{"id":16,"text":"i"},{"id":17,"text":"1"},{"id":18,"text":"ret"}],"edges":[{"sourceId":0,"destId":4,"kind":"SequentialEdge"},{"sourceId":4,"destId":7,"kind":"SequentialEdge"},{"sourceId":7,"destId":8,"kind":"TrueEdge"},{"sourceId":7,"destId":18,"kind":"FalseEdge"},{"sourceId":8,"destId":13,"kind":"SequentialEdge"},{"sourceId":13,"destId":7,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["o"],"state":{"heap":{"o":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':34:4]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19":["int32[]"],"o":["int32[]*"],"this":["A*"]},"value":"#TOP#"}}},{"nodeId":1,"description":{"expressions":["o"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':34:4]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19":["int32[]"],"this":["A*"]},"value":"#TOP#"}}},{"nodeId":2,"description":{"expressions":["ref$new int32[]"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':34:4]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19":["int32[]"],"this":["A*"]},"value":"#TOP#"}}},{"nodeId":3,"description":{"expressions":["6"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':34:4]"},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":4,"description":{"expressions":["i"],"state":{"heap":{"o":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':34:4]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19":["int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"i":"[0, 0]"}}}},{"nodeId":5,"description":{"expressions":["i"],"state":{"heap":{"o":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':34:4]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19":["int32[]"],"o":["int32[]*"],"this":["A*"]},"value":"#TOP#"}}},{"nodeId":6,"description":{"expressions":["0"],"state":{"heap":{"o":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':34:4]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19":["int32[]"],"o":["int32[]*"],"this":["A*"]},"value":"#TOP#"}}},{"nodeId":7,"description":{"expressions":["true"],"state":{"heap":{"o":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':34:4]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[0]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[0]":"[0, 0]","i":"[0, +Inf]"}}}},{"nodeId":8,"description":{"expressions":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[0]"],"state":{"heap":{"o":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':34:4]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[0]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[0]":"[0, 0]","i":"[0, +Inf]"}}}},{"nodeId":9,"description":{"expressions":["*(o)->0"],"state":{"heap":{"o":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':34:4]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[0]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[0]":"[0, 0]","i":"[0, +Inf]"}}}},{"nodeId":10,"description":{"expressions":["o"],"state":{"heap":{"o":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':34:4]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[0]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[0]":"[0, 0]","i":"[0, +Inf]"}}}},{"nodeId":11,"description":{"expressions":["0"],"state":{"heap":{"o":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':34:4]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[0]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[0]":"[0, 0]","i":"[0, +Inf]"}}}},{"nodeId":12,"description":{"expressions":["0"],"state":{"heap":{"o":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':34:4]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[0]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[0]":"[0, 0]","i":"[0, +Inf]"}}}},{"nodeId":13,"description":{"expressions":["i"],"state":{"heap":{"o":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':34:4]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[0]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[0]":"[0, 0]","i":"[1, +Inf]"}}}},{"nodeId":14,"description":{"expressions":["i"],"state":{"heap":{"o":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':34:4]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[0]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[0]":"[0, 0]","i":"[0, +Inf]"}}}},{"nodeId":15,"description":{"expressions":["i + 1"],"state":{"heap":{"o":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':34:4]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[0]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[0]":"[0, 0]","i":"[0, +Inf]"}}}},{"nodeId":16,"description":{"expressions":["i"],"state":{"heap":{"o":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':34:4]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[0]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[0]":"[0, 0]","i":"[0, +Inf]"}}}},{"nodeId":17,"description":{"expressions":["1"],"state":{"heap":{"o":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':34:4]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[0]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[0]":"[0, 0]","i":"[0, +Inf]"}}}},{"nodeId":18,"description":{"expressions":["skip"],"state":{"heap":{"o":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':34:4]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[0]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[0]":"[0, 0]","i":"[0, +Inf]"}}}}]} \ No newline at end of file +{"name":"untyped A::f4(A* this)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"o = new int32[](6)"},{"id":1,"text":"o"},{"id":2,"subNodes":[3],"text":"new int32[](6)"},{"id":3,"text":"6"},{"id":4,"subNodes":[5,6],"text":"i = 0"},{"id":5,"text":"i"},{"id":6,"text":"0"},{"id":7,"text":"true"},{"id":8,"subNodes":[9,12],"text":"[](o, 0) = 0"},{"id":9,"subNodes":[10,11],"text":"[](o, 0)"},{"id":10,"text":"o"},{"id":11,"text":"0"},{"id":12,"text":"0"},{"id":13,"subNodes":[14,15],"text":"i = +(i, 1)"},{"id":14,"text":"i"},{"id":15,"subNodes":[16,17],"text":"+(i, 1)"},{"id":16,"text":"i"},{"id":17,"text":"1"},{"id":18,"text":"ret"}],"edges":[{"sourceId":0,"destId":4,"kind":"SequentialEdge"},{"sourceId":4,"destId":7,"kind":"SequentialEdge"},{"sourceId":7,"destId":8,"kind":"TrueEdge"},{"sourceId":7,"destId":18,"kind":"FalseEdge"},{"sourceId":8,"destId":13,"kind":"SequentialEdge"},{"sourceId":13,"destId":7,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["o"],"state":{"heap":{"o":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':34:4"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[len]":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[len]":"[6, 6]"}}}},{"nodeId":1,"description":{"expressions":["o"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':34:4"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[len]":["int32"],"this":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[len]":"[6, 6]"}}}},{"nodeId":2,"description":{"expressions":["ref$new int32[]"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':34:4"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[len]":["int32"],"this":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[len]":"[6, 6]"}}}},{"nodeId":3,"description":{"expressions":["6"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':34:4"]},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":4,"description":{"expressions":["i"],"state":{"heap":{"o":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':34:4"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[len]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[len]":"[6, 6]","i":"[0, 0]"}}}},{"nodeId":5,"description":{"expressions":["i"],"state":{"heap":{"o":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':34:4"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[len]":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[len]":"[6, 6]"}}}},{"nodeId":6,"description":{"expressions":["0"],"state":{"heap":{"o":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':34:4"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[len]":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[len]":"[6, 6]"}}}},{"nodeId":7,"description":{"expressions":["true"],"state":{"heap":{"o":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':34:4"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[len]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[0]":"[0, 0]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[len]":"[6, 6]","i":"[0, +Inf]"}}}},{"nodeId":8,"description":{"expressions":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[0]"],"state":{"heap":{"o":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':34:4"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[len]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[0]":"[0, 0]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[len]":"[6, 6]","i":"[0, +Inf]"}}}},{"nodeId":9,"description":{"expressions":["*(o)->0"],"state":{"heap":{"o":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':34:4"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[len]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[0]":"[0, 0]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[len]":"[6, 6]","i":"[0, +Inf]"}}}},{"nodeId":10,"description":{"expressions":["o"],"state":{"heap":{"o":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':34:4"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[len]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[0]":"[0, 0]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[len]":"[6, 6]","i":"[0, +Inf]"}}}},{"nodeId":11,"description":{"expressions":["0"],"state":{"heap":{"o":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':34:4"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[len]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[0]":"[0, 0]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[len]":"[6, 6]","i":"[0, +Inf]"}}}},{"nodeId":12,"description":{"expressions":["0"],"state":{"heap":{"o":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':34:4"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[len]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[0]":"[0, 0]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[len]":"[6, 6]","i":"[0, +Inf]"}}}},{"nodeId":13,"description":{"expressions":["i"],"state":{"heap":{"o":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':34:4"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[len]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[0]":"[0, 0]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[len]":"[6, 6]","i":"[1, +Inf]"}}}},{"nodeId":14,"description":{"expressions":["i"],"state":{"heap":{"o":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':34:4"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[len]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[0]":"[0, 0]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[len]":"[6, 6]","i":"[0, +Inf]"}}}},{"nodeId":15,"description":{"expressions":["i + 1"],"state":{"heap":{"o":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':34:4"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[len]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[0]":"[0, 0]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[len]":"[6, 6]","i":"[0, +Inf]"}}}},{"nodeId":16,"description":{"expressions":["i"],"state":{"heap":{"o":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':34:4"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[len]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[0]":"[0, 0]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[len]":"[6, 6]","i":"[0, +Inf]"}}}},{"nodeId":17,"description":{"expressions":["1"],"state":{"heap":{"o":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':34:4"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[len]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[0]":"[0, 0]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[len]":"[6, 6]","i":"[0, +Inf]"}}}},{"nodeId":18,"description":{"expressions":["skip"],"state":{"heap":{"o":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':34:4"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[len]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[0]":"[0, 0]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':35:19[len]":"[6, 6]","i":"[0, +Inf]"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-sensitive/untyped_A.f5(A__this).json b/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-sensitive/untyped_A.f5(A__this).json index ad3b62c7f..e402b678a 100644 --- a/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-sensitive/untyped_A.f5(A__this).json +++ b/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-sensitive/untyped_A.f5(A__this).json @@ -1 +1 @@ -{"name":"untyped A::f5(A* this)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"i = 0"},{"id":1,"text":"i"},{"id":2,"text":"0"},{"id":3,"subNodes":[4,5],"text":"o = new int32[](6)"},{"id":4,"text":"o"},{"id":5,"subNodes":[6],"text":"new int32[](6)"},{"id":6,"text":"6"},{"id":7,"text":"true"},{"id":8,"subNodes":[9,10],"text":"o = new int32[](6)"},{"id":9,"text":"o"},{"id":10,"subNodes":[11],"text":"new int32[](6)"},{"id":11,"text":"6"},{"id":12,"subNodes":[13,16],"text":"[](o, 0) = 0"},{"id":13,"subNodes":[14,15],"text":"[](o, 0)"},{"id":14,"text":"o"},{"id":15,"text":"0"},{"id":16,"text":"0"},{"id":17,"subNodes":[18,19],"text":"i = +(i, 1)"},{"id":18,"text":"i"},{"id":19,"subNodes":[20,21],"text":"+(i, 1)"},{"id":20,"text":"i"},{"id":21,"text":"1"},{"id":22,"text":"ret"}],"edges":[{"sourceId":0,"destId":3,"kind":"SequentialEdge"},{"sourceId":3,"destId":7,"kind":"SequentialEdge"},{"sourceId":7,"destId":8,"kind":"TrueEdge"},{"sourceId":7,"destId":22,"kind":"FalseEdge"},{"sourceId":8,"destId":12,"kind":"SequentialEdge"},{"sourceId":12,"destId":17,"kind":"SequentialEdge"},{"sourceId":17,"destId":7,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["i"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':43:4]"},"type":{"i":["int32"],"this":["A*"]},"value":{"i":"[0, 0]"}}}},{"nodeId":1,"description":{"expressions":["i"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':43:4]"},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":2,"description":{"expressions":["0"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':43:4]"},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":3,"description":{"expressions":["o"],"state":{"heap":{"o":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':43:4]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19":["int32[]"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"i":"[0, 0]"}}}},{"nodeId":4,"description":{"expressions":["o"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':43:4]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19":["int32[]"],"i":["int32"],"this":["A*"]},"value":{"i":"[0, 0]"}}}},{"nodeId":5,"description":{"expressions":["ref$new int32[]"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':43:4]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19":["int32[]"],"i":["int32"],"this":["A*"]},"value":{"i":"[0, 0]"}}}},{"nodeId":6,"description":{"expressions":["6"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':43:4]"},"type":{"i":["int32"],"this":["A*"]},"value":{"i":"[0, 0]"}}}},{"nodeId":7,"description":{"expressions":["true"],"state":{"heap":{"o":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19, heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':43:4]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":["int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":"[0, 0]","i":"[0, +Inf]"}}}},{"nodeId":8,"description":{"expressions":["o"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':43:4]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":["int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":"[0, 0]","i":"[0, +Inf]"}}}},{"nodeId":9,"description":{"expressions":["o"],"state":{"heap":{"o":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19, heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':43:4]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":["int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":"[0, 0]","i":"[0, +Inf]"}}}},{"nodeId":10,"description":{"expressions":["ref$new int32[]"],"state":{"heap":{"o":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19, heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':43:4]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":["int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":"[0, 0]","i":"[0, +Inf]"}}}},{"nodeId":11,"description":{"expressions":["6"],"state":{"heap":{"o":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19, heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':43:4]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":["int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":"[0, 0]","i":"[0, +Inf]"}}}},{"nodeId":12,"description":{"expressions":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':43:4]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":["int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":"[0, 0]","i":"[0, +Inf]"}}}},{"nodeId":13,"description":{"expressions":["*(o)->0"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':43:4]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":["int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":"[0, 0]","i":"[0, +Inf]"}}}},{"nodeId":14,"description":{"expressions":["o"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':43:4]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":["int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":"[0, 0]","i":"[0, +Inf]"}}}},{"nodeId":15,"description":{"expressions":["0"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':43:4]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":["int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":"[0, 0]","i":"[0, +Inf]"}}}},{"nodeId":16,"description":{"expressions":["0"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':43:4]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":["int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":"[0, 0]","i":"[0, +Inf]"}}}},{"nodeId":17,"description":{"expressions":["i"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':43:4]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":["int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":"[0, 0]","i":"[1, +Inf]"}}}},{"nodeId":18,"description":{"expressions":["i"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':43:4]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":["int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":"[0, 0]","i":"[0, +Inf]"}}}},{"nodeId":19,"description":{"expressions":["i + 1"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':43:4]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":["int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":"[0, 0]","i":"[0, +Inf]"}}}},{"nodeId":20,"description":{"expressions":["i"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':43:4]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":["int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":"[0, 0]","i":"[0, +Inf]"}}}},{"nodeId":21,"description":{"expressions":["1"],"state":{"heap":{"o":"[heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':43:4]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":["int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":"[0, 0]","i":"[0, +Inf]"}}}},{"nodeId":22,"description":{"expressions":["skip"],"state":{"heap":{"o":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19, heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16]","this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':43:4]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":["int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":"[0, 0]","i":"[0, +Inf]"}}}}]} \ No newline at end of file +{"name":"untyped A::f5(A* this)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"i = 0"},{"id":1,"text":"i"},{"id":2,"text":"0"},{"id":3,"subNodes":[4,5],"text":"o = new int32[](6)"},{"id":4,"text":"o"},{"id":5,"subNodes":[6],"text":"new int32[](6)"},{"id":6,"text":"6"},{"id":7,"text":"true"},{"id":8,"subNodes":[9,10],"text":"o = new int32[](6)"},{"id":9,"text":"o"},{"id":10,"subNodes":[11],"text":"new int32[](6)"},{"id":11,"text":"6"},{"id":12,"subNodes":[13,16],"text":"[](o, 0) = 0"},{"id":13,"subNodes":[14,15],"text":"[](o, 0)"},{"id":14,"text":"o"},{"id":15,"text":"0"},{"id":16,"text":"0"},{"id":17,"subNodes":[18,19],"text":"i = +(i, 1)"},{"id":18,"text":"i"},{"id":19,"subNodes":[20,21],"text":"+(i, 1)"},{"id":20,"text":"i"},{"id":21,"text":"1"},{"id":22,"text":"ret"}],"edges":[{"sourceId":0,"destId":3,"kind":"SequentialEdge"},{"sourceId":3,"destId":7,"kind":"SequentialEdge"},{"sourceId":7,"destId":8,"kind":"TrueEdge"},{"sourceId":7,"destId":22,"kind":"FalseEdge"},{"sourceId":8,"destId":12,"kind":"SequentialEdge"},{"sourceId":12,"destId":17,"kind":"SequentialEdge"},{"sourceId":17,"destId":7,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["i"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':43:4"]},"type":{"i":["int32"],"this":["A*"]},"value":{"i":"[0, 0]"}}}},{"nodeId":1,"description":{"expressions":["i"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':43:4"]},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":2,"description":{"expressions":["0"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':43:4"]},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":3,"description":{"expressions":["o"],"state":{"heap":{"o":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':43:4"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19[len]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19[len]":"[6, 6]","i":"[0, 0]"}}}},{"nodeId":4,"description":{"expressions":["o"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':43:4"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19[len]":["int32"],"i":["int32"],"this":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19[len]":"[6, 6]","i":"[0, 0]"}}}},{"nodeId":5,"description":{"expressions":["ref$new int32[]"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':43:4"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19[len]":["int32"],"i":["int32"],"this":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19[len]":"[6, 6]","i":"[0, 0]"}}}},{"nodeId":6,"description":{"expressions":["6"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':43:4"]},"type":{"i":["int32"],"this":["A*"]},"value":{"i":"[0, 0]"}}}},{"nodeId":7,"description":{"expressions":["true"],"state":{"heap":{"o":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':43:4"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19[len]":["int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":["int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[len]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19[len]":"[6, 6]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":"[0, 0]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[len]":"[6, 6]","i":"[0, +Inf]"}}}},{"nodeId":8,"description":{"expressions":["o"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':43:4"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19[len]":["int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":["int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[len]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19[len]":"[6, 6]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":"[0, 0]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[len]":"[6, 6]","i":"[0, +Inf]"}}}},{"nodeId":9,"description":{"expressions":["o"],"state":{"heap":{"o":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':43:4"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19[len]":["int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":["int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[len]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19[len]":"[6, 6]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":"[0, 0]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[len]":"[6, 6]","i":"[0, +Inf]"}}}},{"nodeId":10,"description":{"expressions":["ref$new int32[]"],"state":{"heap":{"o":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':43:4"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19[len]":["int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":["int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[len]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19[len]":"[6, 6]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":"[0, 0]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[len]":"[6, 6]","i":"[0, +Inf]"}}}},{"nodeId":11,"description":{"expressions":["6"],"state":{"heap":{"o":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':43:4"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19[len]":["int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":["int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[len]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19[len]":"[6, 6]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":"[0, 0]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[len]":"[6, 6]","i":"[0, +Inf]"}}}},{"nodeId":12,"description":{"expressions":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':43:4"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19[len]":["int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":["int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[len]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19[len]":"[6, 6]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":"[0, 0]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[len]":"[6, 6]","i":"[0, +Inf]"}}}},{"nodeId":13,"description":{"expressions":["*(o)->0"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':43:4"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19[len]":["int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":["int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[len]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19[len]":"[6, 6]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":"[0, 0]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[len]":"[6, 6]","i":"[0, +Inf]"}}}},{"nodeId":14,"description":{"expressions":["o"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':43:4"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19[len]":["int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":["int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[len]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19[len]":"[6, 6]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":"[0, 0]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[len]":"[6, 6]","i":"[0, +Inf]"}}}},{"nodeId":15,"description":{"expressions":["0"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':43:4"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19[len]":["int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":["int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[len]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19[len]":"[6, 6]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":"[0, 0]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[len]":"[6, 6]","i":"[0, +Inf]"}}}},{"nodeId":16,"description":{"expressions":["0"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':43:4"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19[len]":["int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":["int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[len]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19[len]":"[6, 6]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":"[0, 0]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[len]":"[6, 6]","i":"[0, +Inf]"}}}},{"nodeId":17,"description":{"expressions":["i"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':43:4"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19[len]":["int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":["int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[len]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19[len]":"[6, 6]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":"[0, 0]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[len]":"[6, 6]","i":"[1, +Inf]"}}}},{"nodeId":18,"description":{"expressions":["i"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':43:4"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19[len]":["int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":["int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[len]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19[len]":"[6, 6]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":"[0, 0]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[len]":"[6, 6]","i":"[0, +Inf]"}}}},{"nodeId":19,"description":{"expressions":["i + 1"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':43:4"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19[len]":["int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":["int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[len]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19[len]":"[6, 6]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":"[0, 0]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[len]":"[6, 6]","i":"[0, +Inf]"}}}},{"nodeId":20,"description":{"expressions":["i"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':43:4"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19[len]":["int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":["int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[len]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19[len]":"[6, 6]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":"[0, 0]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[len]":"[6, 6]","i":"[0, +Inf]"}}}},{"nodeId":21,"description":{"expressions":["1"],"state":{"heap":{"o":["heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':43:4"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19[len]":["int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":["int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[len]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19[len]":"[6, 6]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":"[0, 0]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[len]":"[6, 6]","i":"[0, +Inf]"}}}},{"nodeId":22,"description":{"expressions":["skip"],"state":{"heap":{"o":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16"],"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':43:4"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19[len]":["int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16":["int32[]"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":["int32"],"heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[len]":["int32"],"i":["int32"],"o":["int32[]*"],"this":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':45:19[len]":"[6, 6]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[0]":"[0, 0]","heap[w]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':47:16[len]":"[6, 6]","i":"[0, +Inf]"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-sensitive/untyped_A.f6(A__this).json b/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-sensitive/untyped_A.f6(A__this).json index e081a16f6..df072a6b5 100644 --- a/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-sensitive/untyped_A.f6(A__this).json +++ b/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-sensitive/untyped_A.f6(A__this).json @@ -1 +1 @@ -{"name":"untyped A::f6(A* this)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"x = new int32[](3)"},{"id":1,"text":"x"},{"id":2,"subNodes":[3],"text":"new int32[](3)"},{"id":3,"text":"3"},{"id":4,"subNodes":[5,6],"text":"y = x"},{"id":5,"text":"y"},{"id":6,"text":"x"},{"id":7,"subNodes":[8,11],"text":"[](x, 0) = 1"},{"id":8,"subNodes":[9,10],"text":"[](x, 0)"},{"id":9,"text":"x"},{"id":10,"text":"0"},{"id":11,"text":"1"},{"id":12,"subNodes":[13,14],"text":"a = +([](x, 0), [](y, 0))"},{"id":13,"text":"a"},{"id":14,"subNodes":[15,18],"text":"+([](x, 0), [](y, 0))"},{"id":15,"subNodes":[16,17],"text":"[](x, 0)"},{"id":16,"text":"x"},{"id":17,"text":"0"},{"id":18,"subNodes":[19,20],"text":"[](y, 0)"},{"id":19,"text":"y"},{"id":20,"text":"0"},{"id":21,"text":"ret"}],"edges":[{"sourceId":0,"destId":4,"kind":"SequentialEdge"},{"sourceId":4,"destId":7,"kind":"SequentialEdge"},{"sourceId":7,"destId":12,"kind":"SequentialEdge"},{"sourceId":12,"destId":21,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["x"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':53:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19":["int32[]"],"this":["A*"],"x":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":1,"description":{"expressions":["x"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':53:4]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19":["int32[]"],"this":["A*"]},"value":"#TOP#"}}},{"nodeId":2,"description":{"expressions":["ref$new int32[]"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':53:4]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19":["int32[]"],"this":["A*"]},"value":"#TOP#"}}},{"nodeId":3,"description":{"expressions":["3"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':53:4]"},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":4,"description":{"expressions":["y"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':53:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19]","y":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19":["int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":5,"description":{"expressions":["y"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':53:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19":["int32[]"],"this":["A*"],"x":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":6,"description":{"expressions":["x"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':53:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19":["int32[]"],"this":["A*"],"x":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":7,"description":{"expressions":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[0]"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':53:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19]","y":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[0]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[0]":"[1, 1]"}}}},{"nodeId":8,"description":{"expressions":["*(x)->0"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':53:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19]","y":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19":["int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":9,"description":{"expressions":["x"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':53:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19]","y":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19":["int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":10,"description":{"expressions":["0"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':53:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19]","y":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19":["int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":11,"description":{"expressions":["1"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':53:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19]","y":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19":["int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":12,"description":{"expressions":["a"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':53:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19]","y":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19]"},"type":{"a":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[0]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"a":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[0]":"[1, 1]"}}}},{"nodeId":13,"description":{"expressions":["a"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':53:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19]","y":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[0]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[0]":"[1, 1]"}}}},{"nodeId":14,"description":{"expressions":["*(x)->0 + *(y)->0"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':53:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19]","y":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[0]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[0]":"[1, 1]"}}}},{"nodeId":15,"description":{"expressions":["*(x)->0"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':53:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19]","y":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[0]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[0]":"[1, 1]"}}}},{"nodeId":16,"description":{"expressions":["x"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':53:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19]","y":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[0]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[0]":"[1, 1]"}}}},{"nodeId":17,"description":{"expressions":["0"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':53:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19]","y":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[0]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[0]":"[1, 1]"}}}},{"nodeId":18,"description":{"expressions":["*(y)->0"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':53:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19]","y":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[0]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[0]":"[1, 1]"}}}},{"nodeId":19,"description":{"expressions":["y"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':53:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19]","y":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[0]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[0]":"[1, 1]"}}}},{"nodeId":20,"description":{"expressions":["0"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':53:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19]","y":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[0]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[0]":"[1, 1]"}}}},{"nodeId":21,"description":{"expressions":["skip"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':53:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19]","y":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19]"},"type":{"a":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[0]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"a":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[0]":"[1, 1]"}}}}]} \ No newline at end of file +{"name":"untyped A::f6(A* this)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"x = new int32[](3)"},{"id":1,"text":"x"},{"id":2,"subNodes":[3],"text":"new int32[](3)"},{"id":3,"text":"3"},{"id":4,"subNodes":[5,6],"text":"y = x"},{"id":5,"text":"y"},{"id":6,"text":"x"},{"id":7,"subNodes":[8,11],"text":"[](x, 0) = 1"},{"id":8,"subNodes":[9,10],"text":"[](x, 0)"},{"id":9,"text":"x"},{"id":10,"text":"0"},{"id":11,"text":"1"},{"id":12,"subNodes":[13,14],"text":"a = +([](x, 0), [](y, 0))"},{"id":13,"text":"a"},{"id":14,"subNodes":[15,18],"text":"+([](x, 0), [](y, 0))"},{"id":15,"subNodes":[16,17],"text":"[](x, 0)"},{"id":16,"text":"x"},{"id":17,"text":"0"},{"id":18,"subNodes":[19,20],"text":"[](y, 0)"},{"id":19,"text":"y"},{"id":20,"text":"0"},{"id":21,"text":"ret"}],"edges":[{"sourceId":0,"destId":4,"kind":"SequentialEdge"},{"sourceId":4,"destId":7,"kind":"SequentialEdge"},{"sourceId":7,"destId":12,"kind":"SequentialEdge"},{"sourceId":12,"destId":21,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["x"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':53:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[len]":["int32"],"this":["A*"],"x":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[len]":"[3, 3]"}}}},{"nodeId":1,"description":{"expressions":["x"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':53:4"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[len]":["int32"],"this":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[len]":"[3, 3]"}}}},{"nodeId":2,"description":{"expressions":["ref$new int32[]"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':53:4"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[len]":["int32"],"this":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[len]":"[3, 3]"}}}},{"nodeId":3,"description":{"expressions":["3"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':53:4"]},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":4,"description":{"expressions":["y"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':53:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19"],"y":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[len]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[len]":"[3, 3]"}}}},{"nodeId":5,"description":{"expressions":["y"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':53:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[len]":["int32"],"this":["A*"],"x":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[len]":"[3, 3]"}}}},{"nodeId":6,"description":{"expressions":["x"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':53:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[len]":["int32"],"this":["A*"],"x":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[len]":"[3, 3]"}}}},{"nodeId":7,"description":{"expressions":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[0]"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':53:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19"],"y":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[len]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[len]":"[3, 3]"}}}},{"nodeId":8,"description":{"expressions":["*(x)->0"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':53:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19"],"y":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[len]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[len]":"[3, 3]"}}}},{"nodeId":9,"description":{"expressions":["x"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':53:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19"],"y":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[len]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[len]":"[3, 3]"}}}},{"nodeId":10,"description":{"expressions":["0"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':53:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19"],"y":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[len]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[len]":"[3, 3]"}}}},{"nodeId":11,"description":{"expressions":["1"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':53:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19"],"y":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[len]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[len]":"[3, 3]"}}}},{"nodeId":12,"description":{"expressions":["a"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':53:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19"],"y":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19"]},"type":{"a":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[len]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"a":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[len]":"[3, 3]"}}}},{"nodeId":13,"description":{"expressions":["a"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':53:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19"],"y":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[len]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[len]":"[3, 3]"}}}},{"nodeId":14,"description":{"expressions":["*(x)->0 + *(y)->0"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':53:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19"],"y":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[len]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[len]":"[3, 3]"}}}},{"nodeId":15,"description":{"expressions":["*(x)->0"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':53:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19"],"y":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[len]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[len]":"[3, 3]"}}}},{"nodeId":16,"description":{"expressions":["x"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':53:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19"],"y":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[len]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[len]":"[3, 3]"}}}},{"nodeId":17,"description":{"expressions":["0"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':53:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19"],"y":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[len]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[len]":"[3, 3]"}}}},{"nodeId":18,"description":{"expressions":["*(y)->0"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':53:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19"],"y":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[len]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[len]":"[3, 3]"}}}},{"nodeId":19,"description":{"expressions":["y"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':53:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19"],"y":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[len]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[len]":"[3, 3]"}}}},{"nodeId":20,"description":{"expressions":["0"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':53:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19"],"y":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[len]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[len]":"[3, 3]"}}}},{"nodeId":21,"description":{"expressions":["skip"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':53:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19"],"y":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19"]},"type":{"a":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[len]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"a":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':54:19[len]":"[3, 3]"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-sensitive/untyped_A.f7(A__this).json b/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-sensitive/untyped_A.f7(A__this).json index fffe3bd5d..379aedf60 100644 --- a/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-sensitive/untyped_A.f7(A__this).json +++ b/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-sensitive/untyped_A.f7(A__this).json @@ -1 +1 @@ -{"name":"untyped A::f7(A* this)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"x = new int32[](3)"},{"id":1,"text":"x"},{"id":2,"subNodes":[3],"text":"new int32[](3)"},{"id":3,"text":"3"},{"id":4,"subNodes":[5,6],"text":"y = new int32[](3)"},{"id":5,"text":"y"},{"id":6,"subNodes":[7],"text":"new int32[](3)"},{"id":7,"text":"3"},{"id":8,"subNodes":[9,10],"text":"z = x"},{"id":9,"text":"z"},{"id":10,"text":"x"},{"id":11,"subNodes":[12,13],"text":"z = y"},{"id":12,"text":"z"},{"id":13,"text":"y"},{"id":14,"subNodes":[15,18],"text":"[](z, 0) = 1"},{"id":15,"subNodes":[16,17],"text":"[](z, 0)"},{"id":16,"text":"z"},{"id":17,"text":"0"},{"id":18,"text":"1"},{"id":19,"text":"ret"}],"edges":[{"sourceId":0,"destId":4,"kind":"SequentialEdge"},{"sourceId":4,"destId":8,"kind":"SequentialEdge"},{"sourceId":8,"destId":11,"kind":"SequentialEdge"},{"sourceId":11,"destId":14,"kind":"SequentialEdge"},{"sourceId":14,"destId":19,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["x"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':60:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19":["int32[]"],"this":["A*"],"x":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":1,"description":{"expressions":["x"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':60:4]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19":["int32[]"],"this":["A*"]},"value":"#TOP#"}}},{"nodeId":2,"description":{"expressions":["ref$new int32[]"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':60:4]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19":["int32[]"],"this":["A*"]},"value":"#TOP#"}}},{"nodeId":3,"description":{"expressions":["3"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':60:4]"},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":4,"description":{"expressions":["y"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':60:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19]","y":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19":["int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":5,"description":{"expressions":["y"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':60:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19":["int32[]"],"this":["A*"],"x":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":6,"description":{"expressions":["ref$new int32[]"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':60:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19":["int32[]"],"this":["A*"],"x":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":7,"description":{"expressions":["3"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':60:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19":["int32[]"],"this":["A*"],"x":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":8,"description":{"expressions":["z"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':60:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19]","y":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19]","z":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19":["int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"],"z":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":9,"description":{"expressions":["z"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':60:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19]","y":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19":["int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":10,"description":{"expressions":["x"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':60:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19]","y":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19":["int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":11,"description":{"expressions":["z"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':60:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19]","y":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19]","z":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19":["int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"],"z":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":12,"description":{"expressions":["z"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':60:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19]","y":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19]","z":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19":["int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"],"z":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":13,"description":{"expressions":["y"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':60:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19]","y":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19]","z":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19":["int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"],"z":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":14,"description":{"expressions":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19[0]"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':60:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19]","y":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19]","z":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19[0]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"],"z":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19[0]":"[1, 1]"}}}},{"nodeId":15,"description":{"expressions":["*(z)->0"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':60:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19]","y":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19]","z":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19":["int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"],"z":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":16,"description":{"expressions":["z"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':60:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19]","y":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19]","z":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19":["int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"],"z":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":17,"description":{"expressions":["0"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':60:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19]","y":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19]","z":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19":["int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"],"z":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":18,"description":{"expressions":["1"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':60:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19]","y":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19]","z":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19":["int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"],"z":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":19,"description":{"expressions":["skip"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':60:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19]","y":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19]","z":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19[0]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"],"z":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19[0]":"[1, 1]"}}}}]} \ No newline at end of file +{"name":"untyped A::f7(A* this)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"x = new int32[](3)"},{"id":1,"text":"x"},{"id":2,"subNodes":[3],"text":"new int32[](3)"},{"id":3,"text":"3"},{"id":4,"subNodes":[5,6],"text":"y = new int32[](3)"},{"id":5,"text":"y"},{"id":6,"subNodes":[7],"text":"new int32[](3)"},{"id":7,"text":"3"},{"id":8,"subNodes":[9,10],"text":"z = x"},{"id":9,"text":"z"},{"id":10,"text":"x"},{"id":11,"subNodes":[12,13],"text":"z = y"},{"id":12,"text":"z"},{"id":13,"text":"y"},{"id":14,"subNodes":[15,18],"text":"[](z, 0) = 1"},{"id":15,"subNodes":[16,17],"text":"[](z, 0)"},{"id":16,"text":"z"},{"id":17,"text":"0"},{"id":18,"text":"1"},{"id":19,"text":"ret"}],"edges":[{"sourceId":0,"destId":4,"kind":"SequentialEdge"},{"sourceId":4,"destId":8,"kind":"SequentialEdge"},{"sourceId":8,"destId":11,"kind":"SequentialEdge"},{"sourceId":11,"destId":14,"kind":"SequentialEdge"},{"sourceId":14,"destId":19,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["x"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':60:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19[len]":["int32"],"this":["A*"],"x":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19[len]":"[3, 3]"}}}},{"nodeId":1,"description":{"expressions":["x"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':60:4"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19[len]":["int32"],"this":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19[len]":"[3, 3]"}}}},{"nodeId":2,"description":{"expressions":["ref$new int32[]"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':60:4"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19[len]":["int32"],"this":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19[len]":"[3, 3]"}}}},{"nodeId":3,"description":{"expressions":["3"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':60:4"]},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":4,"description":{"expressions":["y"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':60:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19"],"y":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19[len]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19[len]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19[len]":"[3, 3]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19[len]":"[3, 3]"}}}},{"nodeId":5,"description":{"expressions":["y"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':60:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19[len]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19[len]":["int32"],"this":["A*"],"x":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19[len]":"[3, 3]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19[len]":"[3, 3]"}}}},{"nodeId":6,"description":{"expressions":["ref$new int32[]"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':60:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19[len]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19[len]":["int32"],"this":["A*"],"x":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19[len]":"[3, 3]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19[len]":"[3, 3]"}}}},{"nodeId":7,"description":{"expressions":["3"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':60:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19[len]":["int32"],"this":["A*"],"x":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19[len]":"[3, 3]"}}}},{"nodeId":8,"description":{"expressions":["z"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':60:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19"],"y":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19"],"z":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19[len]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19[len]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"],"z":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19[len]":"[3, 3]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19[len]":"[3, 3]"}}}},{"nodeId":9,"description":{"expressions":["z"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':60:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19"],"y":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19[len]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19[len]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19[len]":"[3, 3]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19[len]":"[3, 3]"}}}},{"nodeId":10,"description":{"expressions":["x"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':60:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19"],"y":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19[len]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19[len]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19[len]":"[3, 3]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19[len]":"[3, 3]"}}}},{"nodeId":11,"description":{"expressions":["z"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':60:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19"],"y":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19"],"z":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19[len]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19[len]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"],"z":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19[len]":"[3, 3]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19[len]":"[3, 3]"}}}},{"nodeId":12,"description":{"expressions":["z"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':60:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19"],"y":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19"],"z":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19[len]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19[len]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"],"z":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19[len]":"[3, 3]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19[len]":"[3, 3]"}}}},{"nodeId":13,"description":{"expressions":["y"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':60:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19"],"y":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19"],"z":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19[len]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19[len]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"],"z":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19[len]":"[3, 3]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19[len]":"[3, 3]"}}}},{"nodeId":14,"description":{"expressions":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19[0]"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':60:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19"],"y":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19"],"z":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19[len]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19[len]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"],"z":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19[len]":"[3, 3]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19[len]":"[3, 3]"}}}},{"nodeId":15,"description":{"expressions":["*(z)->0"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':60:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19"],"y":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19"],"z":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19[len]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19[len]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"],"z":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19[len]":"[3, 3]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19[len]":"[3, 3]"}}}},{"nodeId":16,"description":{"expressions":["z"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':60:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19"],"y":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19"],"z":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19[len]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19[len]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"],"z":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19[len]":"[3, 3]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19[len]":"[3, 3]"}}}},{"nodeId":17,"description":{"expressions":["0"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':60:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19"],"y":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19"],"z":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19[len]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19[len]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"],"z":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19[len]":"[3, 3]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19[len]":"[3, 3]"}}}},{"nodeId":18,"description":{"expressions":["1"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':60:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19"],"y":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19"],"z":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19[len]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19[len]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"],"z":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19[len]":"[3, 3]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19[len]":"[3, 3]"}}}},{"nodeId":19,"description":{"expressions":["skip"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':60:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19"],"y":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19"],"z":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19[len]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19[len]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"],"z":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':61:19[len]":"[3, 3]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':62:19[len]":"[3, 3]"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-sensitive/untyped_A.f8(A__this).json b/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-sensitive/untyped_A.f8(A__this).json index 746d12201..3190d831f 100644 --- a/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-sensitive/untyped_A.f8(A__this).json +++ b/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-sensitive/untyped_A.f8(A__this).json @@ -1 +1 @@ -{"name":"untyped A::f8(A* this)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"x = int32[](3)"},{"id":1,"text":"x"},{"id":2,"subNodes":[3],"text":"int32[](3)"},{"id":3,"text":"3"},{"id":4,"subNodes":[5,8],"text":"[](x, 0) = 1"},{"id":5,"subNodes":[6,7],"text":"[](x, 0)"},{"id":6,"text":"x"},{"id":7,"text":"0"},{"id":8,"text":"1"},{"id":9,"subNodes":[10,13],"text":"[](x, 1) = 2"},{"id":10,"subNodes":[11,12],"text":"[](x, 1)"},{"id":11,"text":"x"},{"id":12,"text":"1"},{"id":13,"text":"2"},{"id":14,"subNodes":[15,16],"text":"y = x"},{"id":15,"text":"y"},{"id":16,"text":"x"},{"id":17,"subNodes":[18,21],"text":"[](y, 0) = -1"},{"id":18,"subNodes":[19,20],"text":"[](y, 0)"},{"id":19,"text":"y"},{"id":20,"text":"0"},{"id":21,"text":"-1"},{"id":22,"subNodes":[23,26],"text":"[](y, 1) = -2"},{"id":23,"subNodes":[24,25],"text":"[](y, 1)"},{"id":24,"text":"y"},{"id":25,"text":"1"},{"id":26,"text":"-2"},{"id":27,"text":"ret"}],"edges":[{"sourceId":0,"destId":4,"kind":"SequentialEdge"},{"sourceId":4,"destId":9,"kind":"SequentialEdge"},{"sourceId":9,"destId":14,"kind":"SequentialEdge"},{"sourceId":14,"destId":17,"kind":"SequentialEdge"},{"sourceId":17,"destId":22,"kind":"SequentialEdge"},{"sourceId":22,"destId":27,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["x"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':68:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20":["int32[]"],"this":["A*"],"x":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":1,"description":{"expressions":["x"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':68:4]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20":["int32[]"],"this":["A*"]},"value":"#TOP#"}}},{"nodeId":2,"description":{"expressions":["ref$int32[]"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':68:4]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20":["int32[]"],"this":["A*"]},"value":"#TOP#"}}},{"nodeId":3,"description":{"expressions":["3"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':68:4]"},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":4,"description":{"expressions":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':68:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":["int32"],"this":["A*"],"x":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":"[1, 1]"}}}},{"nodeId":5,"description":{"expressions":["*(x)->0"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':68:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20":["int32[]"],"this":["A*"],"x":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":6,"description":{"expressions":["x"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':68:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20":["int32[]"],"this":["A*"],"x":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":7,"description":{"expressions":["0"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':68:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20":["int32[]"],"this":["A*"],"x":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":8,"description":{"expressions":["1"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':68:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20":["int32[]"],"this":["A*"],"x":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":9,"description":{"expressions":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':68:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":["int32"],"this":["A*"],"x":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":"[2, 2]"}}}},{"nodeId":10,"description":{"expressions":["*(x)->1"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':68:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":["int32"],"this":["A*"],"x":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":"[1, 1]"}}}},{"nodeId":11,"description":{"expressions":["x"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':68:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":["int32"],"this":["A*"],"x":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":"[1, 1]"}}}},{"nodeId":12,"description":{"expressions":["1"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':68:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":["int32"],"this":["A*"],"x":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":"[1, 1]"}}}},{"nodeId":13,"description":{"expressions":["2"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':68:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":["int32"],"this":["A*"],"x":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":"[1, 1]"}}}},{"nodeId":14,"description":{"expressions":["y"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':68:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20]","y":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[1]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[1]":"[2, 2]"}}}},{"nodeId":15,"description":{"expressions":["y"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':68:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":["int32"],"this":["A*"],"x":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":"[2, 2]"}}}},{"nodeId":16,"description":{"expressions":["x"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':68:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":["int32"],"this":["A*"],"x":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":"[2, 2]"}}}},{"nodeId":17,"description":{"expressions":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[0]"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':68:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20]","y":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[1]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[0]":"[-1, -1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[1]":"[2, 2]"}}}},{"nodeId":18,"description":{"expressions":["*(y)->0"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':68:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20]","y":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[1]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[1]":"[2, 2]"}}}},{"nodeId":19,"description":{"expressions":["y"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':68:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20]","y":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[1]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[1]":"[2, 2]"}}}},{"nodeId":20,"description":{"expressions":["0"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':68:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20]","y":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[1]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[1]":"[2, 2]"}}}},{"nodeId":21,"description":{"expressions":["-1"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':68:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20]","y":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[1]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[1]":"[2, 2]"}}}},{"nodeId":22,"description":{"expressions":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[1]"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':68:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20]","y":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[1]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[0]":"[-1, -1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[1]":"[-2, -2]"}}}},{"nodeId":23,"description":{"expressions":["*(y)->1"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':68:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20]","y":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[1]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[0]":"[-1, -1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[1]":"[2, 2]"}}}},{"nodeId":24,"description":{"expressions":["y"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':68:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20]","y":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[1]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[0]":"[-1, -1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[1]":"[2, 2]"}}}},{"nodeId":25,"description":{"expressions":["1"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':68:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20]","y":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[1]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[0]":"[-1, -1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[1]":"[2, 2]"}}}},{"nodeId":26,"description":{"expressions":["-2"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':68:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20]","y":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[1]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[0]":"[-1, -1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[1]":"[2, 2]"}}}},{"nodeId":27,"description":{"expressions":["skip"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':68:4]","x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20]","y":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[1]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[0]":"[-1, -1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[1]":"[-2, -2]"}}}}]} \ No newline at end of file +{"name":"untyped A::f8(A* this)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"x = int32[](3)"},{"id":1,"text":"x"},{"id":2,"subNodes":[3],"text":"int32[](3)"},{"id":3,"text":"3"},{"id":4,"subNodes":[5,8],"text":"[](x, 0) = 1"},{"id":5,"subNodes":[6,7],"text":"[](x, 0)"},{"id":6,"text":"x"},{"id":7,"text":"0"},{"id":8,"text":"1"},{"id":9,"subNodes":[10,13],"text":"[](x, 1) = 2"},{"id":10,"subNodes":[11,12],"text":"[](x, 1)"},{"id":11,"text":"x"},{"id":12,"text":"1"},{"id":13,"text":"2"},{"id":14,"subNodes":[15,16],"text":"y = x"},{"id":15,"text":"y"},{"id":16,"text":"x"},{"id":17,"subNodes":[18,21],"text":"[](y, 0) = -1"},{"id":18,"subNodes":[19,20],"text":"[](y, 0)"},{"id":19,"text":"y"},{"id":20,"text":"0"},{"id":21,"text":"-1"},{"id":22,"subNodes":[23,26],"text":"[](y, 1) = -2"},{"id":23,"subNodes":[24,25],"text":"[](y, 1)"},{"id":24,"text":"y"},{"id":25,"text":"1"},{"id":26,"text":"-2"},{"id":27,"text":"ret"}],"edges":[{"sourceId":0,"destId":4,"kind":"SequentialEdge"},{"sourceId":4,"destId":9,"kind":"SequentialEdge"},{"sourceId":9,"destId":14,"kind":"SequentialEdge"},{"sourceId":14,"destId":17,"kind":"SequentialEdge"},{"sourceId":17,"destId":22,"kind":"SequentialEdge"},{"sourceId":22,"destId":27,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["x"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':68:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[len]":["int32"],"this":["A*"],"x":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[len]":"[3, 3]"}}}},{"nodeId":1,"description":{"expressions":["x"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':68:4"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[len]":["int32"],"this":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[len]":"[3, 3]"}}}},{"nodeId":2,"description":{"expressions":["ref$int32[]"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':68:4"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[len]":["int32"],"this":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[len]":"[3, 3]"}}}},{"nodeId":3,"description":{"expressions":["3"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':68:4"]},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":4,"description":{"expressions":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':68:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[len]":["int32"],"this":["A*"],"x":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[len]":"[3, 3]"}}}},{"nodeId":5,"description":{"expressions":["*(x)->0"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':68:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[len]":["int32"],"this":["A*"],"x":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[len]":"[3, 3]"}}}},{"nodeId":6,"description":{"expressions":["x"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':68:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[len]":["int32"],"this":["A*"],"x":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[len]":"[3, 3]"}}}},{"nodeId":7,"description":{"expressions":["0"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':68:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[len]":["int32"],"this":["A*"],"x":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[len]":"[3, 3]"}}}},{"nodeId":8,"description":{"expressions":["1"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':68:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[len]":["int32"],"this":["A*"],"x":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[len]":"[3, 3]"}}}},{"nodeId":9,"description":{"expressions":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':68:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[len]":["int32"],"this":["A*"],"x":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[len]":"[3, 3]"}}}},{"nodeId":10,"description":{"expressions":["*(x)->1"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':68:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[len]":["int32"],"this":["A*"],"x":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[len]":"[3, 3]"}}}},{"nodeId":11,"description":{"expressions":["x"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':68:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[len]":["int32"],"this":["A*"],"x":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[len]":"[3, 3]"}}}},{"nodeId":12,"description":{"expressions":["1"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':68:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[len]":["int32"],"this":["A*"],"x":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[len]":"[3, 3]"}}}},{"nodeId":13,"description":{"expressions":["2"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':68:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[len]":["int32"],"this":["A*"],"x":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[len]":"[3, 3]"}}}},{"nodeId":14,"description":{"expressions":["y"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':68:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20"],"y":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[len]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[1]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[len]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[len]":"[3, 3]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[1]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[len]":"[3, 3]"}}}},{"nodeId":15,"description":{"expressions":["y"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':68:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[len]":["int32"],"this":["A*"],"x":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[len]":"[3, 3]"}}}},{"nodeId":16,"description":{"expressions":["x"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':68:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[len]":["int32"],"this":["A*"],"x":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[len]":"[3, 3]"}}}},{"nodeId":17,"description":{"expressions":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[0]"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':68:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20"],"y":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[len]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[1]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[len]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[len]":"[3, 3]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[0]":"[-1, -1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[1]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[len]":"[3, 3]"}}}},{"nodeId":18,"description":{"expressions":["*(y)->0"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':68:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20"],"y":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[len]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[1]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[len]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[len]":"[3, 3]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[1]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[len]":"[3, 3]"}}}},{"nodeId":19,"description":{"expressions":["y"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':68:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20"],"y":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[len]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[1]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[len]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[len]":"[3, 3]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[1]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[len]":"[3, 3]"}}}},{"nodeId":20,"description":{"expressions":["0"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':68:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20"],"y":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[len]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[1]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[len]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[len]":"[3, 3]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[1]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[len]":"[3, 3]"}}}},{"nodeId":21,"description":{"expressions":["-1"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':68:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20"],"y":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[len]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[1]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[len]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[len]":"[3, 3]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[1]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[len]":"[3, 3]"}}}},{"nodeId":22,"description":{"expressions":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[1]"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':68:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20"],"y":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[len]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[1]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[len]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[len]":"[3, 3]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[0]":"[-1, -1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[1]":"[-2, -2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[len]":"[3, 3]"}}}},{"nodeId":23,"description":{"expressions":["*(y)->1"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':68:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20"],"y":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[len]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[1]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[len]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[len]":"[3, 3]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[0]":"[-1, -1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[1]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[len]":"[3, 3]"}}}},{"nodeId":24,"description":{"expressions":["y"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':68:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20"],"y":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[len]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[1]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[len]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[len]":"[3, 3]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[0]":"[-1, -1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[1]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[len]":"[3, 3]"}}}},{"nodeId":25,"description":{"expressions":["1"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':68:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20"],"y":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[len]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[1]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[len]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[len]":"[3, 3]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[0]":"[-1, -1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[1]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[len]":"[3, 3]"}}}},{"nodeId":26,"description":{"expressions":["-2"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':68:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20"],"y":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[len]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[1]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[len]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[len]":"[3, 3]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[0]":"[-1, -1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[1]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[len]":"[3, 3]"}}}},{"nodeId":27,"description":{"expressions":["skip"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':68:4"],"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20"],"y":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[len]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6":["int32[]"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[0]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[1]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[len]":["int32"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[0]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[1]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':69:20[len]":"[3, 3]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[0]":"[-1, -1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[1]":"[-2, -2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':72:6[len]":"[3, 3]"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-sensitive/untyped_A.f9(A__this).json b/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-sensitive/untyped_A.f9(A__this).json index 48a292130..3399b62c3 100644 --- a/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-sensitive/untyped_A.f9(A__this).json +++ b/lisa/lisa-analyses/imp-testcases/heap/point-based-heap/field-sensitive/untyped_A.f9(A__this).json @@ -1 +1 @@ -{"name":"untyped A::f9(A* this)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"x = A(1, 2)"},{"id":1,"text":"x"},{"id":2,"subNodes":[3,4],"text":"A(1, 2)"},{"id":3,"text":"1"},{"id":4,"text":"2"},{"id":5,"subNodes":[6,8],"text":"x::a = 1"},{"id":6,"subNodes":[7],"text":"x::a"},{"id":7,"text":"x"},{"id":8,"text":"1"},{"id":9,"subNodes":[10,12],"text":"x::b = 2"},{"id":10,"subNodes":[11],"text":"x::b"},{"id":11,"text":"x"},{"id":12,"text":"2"},{"id":13,"subNodes":[14,15],"text":"y = x"},{"id":14,"text":"y"},{"id":15,"text":"x"},{"id":16,"subNodes":[17,19],"text":"y::a = 3"},{"id":17,"subNodes":[18],"text":"y::a"},{"id":18,"text":"y"},{"id":19,"text":"3"},{"id":20,"subNodes":[21,23],"text":"y::b = 4"},{"id":21,"subNodes":[22],"text":"y::b"},{"id":22,"text":"y"},{"id":23,"text":"4"},{"id":24,"text":"ret"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"},{"sourceId":5,"destId":9,"kind":"SequentialEdge"},{"sourceId":9,"destId":13,"kind":"SequentialEdge"},{"sourceId":13,"destId":16,"kind":"SequentialEdge"},{"sourceId":16,"destId":20,"kind":"SequentialEdge"},{"sourceId":20,"destId":24,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["x"],"state":{"heap":{"x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20":["A"],"x":["A*"]},"value":"#TOP#"}}},{"nodeId":1,"description":{"expressions":["x"],"state":{"heap":"#TOP#","type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20":["A"]},"value":"#TOP#"}}},{"nodeId":2,"description":{"expressions":["ref$A"],"state":{"heap":"#TOP#","type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20":["A"]},"value":"#TOP#"}}},{"nodeId":3,"description":{"expressions":["1"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':77:4]"},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":4,"description":{"expressions":["2"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':77:4]"},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":5,"description":{"expressions":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]"],"state":{"heap":{"x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":["int32"],"x":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":"[1, 1]"}}}},{"nodeId":6,"description":{"expressions":["*(x)->a"],"state":{"heap":{"x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20":["A"],"x":["A*"]},"value":"#TOP#"}}},{"nodeId":7,"description":{"expressions":["x"],"state":{"heap":{"x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20":["A"],"x":["A*"]},"value":"#TOP#"}}},{"nodeId":8,"description":{"expressions":["1"],"state":{"heap":{"x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20":["A"],"x":["A*"]},"value":"#TOP#"}}},{"nodeId":9,"description":{"expressions":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[b]"],"state":{"heap":{"x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[b]":["int32"],"x":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[b]":"[2, 2]"}}}},{"nodeId":10,"description":{"expressions":["*(x)->b"],"state":{"heap":{"x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":["int32"],"x":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":"[1, 1]"}}}},{"nodeId":11,"description":{"expressions":["x"],"state":{"heap":{"x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":["int32"],"x":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":"[1, 1]"}}}},{"nodeId":12,"description":{"expressions":["2"],"state":{"heap":{"x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":["int32"],"x":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":"[1, 1]"}}}},{"nodeId":13,"description":{"expressions":["y"],"state":{"heap":{"x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20]","y":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[b]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[b]":["int32"],"x":["A*"],"y":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[b]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[a]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[b]":"[2, 2]"}}}},{"nodeId":14,"description":{"expressions":["y"],"state":{"heap":{"x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[b]":["int32"],"x":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[b]":"[2, 2]"}}}},{"nodeId":15,"description":{"expressions":["x"],"state":{"heap":{"x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[b]":["int32"],"x":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[b]":"[2, 2]"}}}},{"nodeId":16,"description":{"expressions":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[a]"],"state":{"heap":{"x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20]","y":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[b]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[b]":["int32"],"x":["A*"],"y":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[b]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[a]":"[3, 3]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[b]":"[2, 2]"}}}},{"nodeId":17,"description":{"expressions":["*(y)->a"],"state":{"heap":{"x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20]","y":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[b]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[b]":["int32"],"x":["A*"],"y":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[b]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[a]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[b]":"[2, 2]"}}}},{"nodeId":18,"description":{"expressions":["y"],"state":{"heap":{"x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20]","y":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[b]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[b]":["int32"],"x":["A*"],"y":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[b]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[a]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[b]":"[2, 2]"}}}},{"nodeId":19,"description":{"expressions":["3"],"state":{"heap":{"x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20]","y":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[b]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[b]":["int32"],"x":["A*"],"y":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[b]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[a]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[b]":"[2, 2]"}}}},{"nodeId":20,"description":{"expressions":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[b]"],"state":{"heap":{"x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20]","y":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[b]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[b]":["int32"],"x":["A*"],"y":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[b]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[a]":"[3, 3]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[b]":"[4, 4]"}}}},{"nodeId":21,"description":{"expressions":["*(y)->b"],"state":{"heap":{"x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20]","y":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[b]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[b]":["int32"],"x":["A*"],"y":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[b]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[a]":"[3, 3]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[b]":"[2, 2]"}}}},{"nodeId":22,"description":{"expressions":["y"],"state":{"heap":{"x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20]","y":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[b]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[b]":["int32"],"x":["A*"],"y":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[b]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[a]":"[3, 3]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[b]":"[2, 2]"}}}},{"nodeId":23,"description":{"expressions":["4"],"state":{"heap":{"x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20]","y":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[b]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[b]":["int32"],"x":["A*"],"y":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[b]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[a]":"[3, 3]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[b]":"[2, 2]"}}}},{"nodeId":24,"description":{"expressions":["skip"],"state":{"heap":{"x":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20]","y":"[heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6]"},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[b]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[b]":["int32"],"x":["A*"],"y":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[b]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[a]":"[3, 3]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[b]":"[4, 4]"}}}}]} \ No newline at end of file +{"name":"untyped A::f9(A* this)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"x = A(1, 2)"},{"id":1,"text":"x"},{"id":2,"subNodes":[3,4],"text":"A(1, 2)"},{"id":3,"text":"1"},{"id":4,"text":"2"},{"id":5,"subNodes":[6,8],"text":"x::a = 1"},{"id":6,"subNodes":[7],"text":"x::a"},{"id":7,"text":"x"},{"id":8,"text":"1"},{"id":9,"subNodes":[10,12],"text":"x::b = 2"},{"id":10,"subNodes":[11],"text":"x::b"},{"id":11,"text":"x"},{"id":12,"text":"2"},{"id":13,"subNodes":[14,15],"text":"y = x"},{"id":14,"text":"y"},{"id":15,"text":"x"},{"id":16,"subNodes":[17,19],"text":"y::a = 3"},{"id":17,"subNodes":[18],"text":"y::a"},{"id":18,"text":"y"},{"id":19,"text":"3"},{"id":20,"subNodes":[21,23],"text":"y::b = 4"},{"id":21,"subNodes":[22],"text":"y::b"},{"id":22,"text":"y"},{"id":23,"text":"4"},{"id":24,"text":"ret"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"},{"sourceId":5,"destId":9,"kind":"SequentialEdge"},{"sourceId":9,"destId":13,"kind":"SequentialEdge"},{"sourceId":13,"destId":16,"kind":"SequentialEdge"},{"sourceId":16,"destId":20,"kind":"SequentialEdge"},{"sourceId":20,"destId":24,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["x"],"state":{"heap":{"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20":["A"],"x":["A*"]},"value":"#TOP#"}}},{"nodeId":1,"description":{"expressions":["x"],"state":{"heap":"#TOP#","type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20":["A"]},"value":"#TOP#"}}},{"nodeId":2,"description":{"expressions":["ref$A"],"state":{"heap":"#TOP#","type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20":["A"]},"value":"#TOP#"}}},{"nodeId":3,"description":{"expressions":["1"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':77:4"]},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":4,"description":{"expressions":["2"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':77:4"]},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":5,"description":{"expressions":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]"],"state":{"heap":{"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":["int32"],"x":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":"[1, 1]"}}}},{"nodeId":6,"description":{"expressions":["*(x)->a"],"state":{"heap":{"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20":["A"],"x":["A*"]},"value":"#TOP#"}}},{"nodeId":7,"description":{"expressions":["x"],"state":{"heap":{"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20":["A"],"x":["A*"]},"value":"#TOP#"}}},{"nodeId":8,"description":{"expressions":["1"],"state":{"heap":{"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20":["A"],"x":["A*"]},"value":"#TOP#"}}},{"nodeId":9,"description":{"expressions":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[b]"],"state":{"heap":{"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[b]":["int32"],"x":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[b]":"[2, 2]"}}}},{"nodeId":10,"description":{"expressions":["*(x)->b"],"state":{"heap":{"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":["int32"],"x":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":"[1, 1]"}}}},{"nodeId":11,"description":{"expressions":["x"],"state":{"heap":{"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":["int32"],"x":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":"[1, 1]"}}}},{"nodeId":12,"description":{"expressions":["2"],"state":{"heap":{"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":["int32"],"x":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":"[1, 1]"}}}},{"nodeId":13,"description":{"expressions":["y"],"state":{"heap":{"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20"],"y":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[b]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[b]":["int32"],"x":["A*"],"y":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[b]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[a]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[b]":"[2, 2]"}}}},{"nodeId":14,"description":{"expressions":["y"],"state":{"heap":{"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[b]":["int32"],"x":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[b]":"[2, 2]"}}}},{"nodeId":15,"description":{"expressions":["x"],"state":{"heap":{"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[b]":["int32"],"x":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[b]":"[2, 2]"}}}},{"nodeId":16,"description":{"expressions":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[a]"],"state":{"heap":{"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20"],"y":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[b]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[b]":["int32"],"x":["A*"],"y":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[b]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[a]":"[3, 3]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[b]":"[2, 2]"}}}},{"nodeId":17,"description":{"expressions":["*(y)->a"],"state":{"heap":{"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20"],"y":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[b]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[b]":["int32"],"x":["A*"],"y":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[b]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[a]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[b]":"[2, 2]"}}}},{"nodeId":18,"description":{"expressions":["y"],"state":{"heap":{"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20"],"y":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[b]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[b]":["int32"],"x":["A*"],"y":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[b]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[a]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[b]":"[2, 2]"}}}},{"nodeId":19,"description":{"expressions":["3"],"state":{"heap":{"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20"],"y":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[b]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[b]":["int32"],"x":["A*"],"y":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[b]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[a]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[b]":"[2, 2]"}}}},{"nodeId":20,"description":{"expressions":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[b]"],"state":{"heap":{"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20"],"y":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[b]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[b]":["int32"],"x":["A*"],"y":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[b]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[a]":"[3, 3]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[b]":"[4, 4]"}}}},{"nodeId":21,"description":{"expressions":["*(y)->b"],"state":{"heap":{"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20"],"y":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[b]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[b]":["int32"],"x":["A*"],"y":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[b]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[a]":"[3, 3]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[b]":"[2, 2]"}}}},{"nodeId":22,"description":{"expressions":["y"],"state":{"heap":{"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20"],"y":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[b]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[b]":["int32"],"x":["A*"],"y":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[b]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[a]":"[3, 3]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[b]":"[2, 2]"}}}},{"nodeId":23,"description":{"expressions":["4"],"state":{"heap":{"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20"],"y":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[b]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[b]":["int32"],"x":["A*"],"y":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[b]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[a]":"[3, 3]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[b]":"[2, 2]"}}}},{"nodeId":24,"description":{"expressions":["skip"],"state":{"heap":{"x":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20"],"y":["heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6"]},"type":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[b]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6":["A"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[a]":["int32"],"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[b]":["int32"],"x":["A*"],"y":["A*"]},"value":{"heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[a]":"[1, 1]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':78:20[b]":"[2, 2]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[a]":"[3, 3]","heap[s]:pp@'imp-testcases/heap/point-based-heap/field-sensitive/program.imp':81:6[b]":"[4, 4]"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/heap/type-based-heap/report.json b/lisa/lisa-analyses/imp-testcases/heap/type-based-heap/report.json index 495c194fc..0d3cbde02 100644 --- a/lisa/lisa-analyses/imp-testcases/heap/type-based-heap/report.json +++ b/lisa/lisa-analyses/imp-testcases/heap/type-based-heap/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_A.f1(A__this).json", "untyped_A.f2(A__this).json", "untyped_A.f3(A__this).json", "untyped_A.f4(A__this).json", "untyped_A.f5(A__this).json" ], "info" : { "cfgs" : "5", - "duration" : "153ms", - "end" : "2023-04-20T12:45:23.512+02:00", + "duration" : "74ms", + "end" : "2023-09-07T11:45:43.272+02:00", "expressions" : "75", "files" : "5", "globals" : "2", "members" : "5", "programs" : "1", - "start" : "2023-04-20T12:45:23.359+02:00", + "start" : "2023-09-07T11:45:43.198+02:00", "statements" : "27", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/heap/type-based-heap" } diff --git a/lisa/lisa-analyses/imp-testcases/int-const/report.json b/lisa/lisa-analyses/imp-testcases/int-const/report.json index 21b60279a..a9e5493a9 100644 --- a/lisa/lisa-analyses/imp-testcases/int-const/report.json +++ b/lisa/lisa-analyses/imp-testcases/int-const/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_tutorial.constants(tutorial__this).json", "untyped_tutorial.div(tutorial__this,_untyped_i,_untyped_j).json", "untyped_tutorial.gcd(tutorial__this,_untyped_a,_untyped_b).json", "untyped_tutorial.glb(tutorial__this,_untyped_x,_untyped_y).json", "untyped_tutorial.intv_dec(tutorial__this).json", "untyped_tutorial.sign_parity_example(tutorial__this).json", "untyped_tutorial.ub_example(tutorial__this,_untyped_y,_untyped_z).json" ], "info" : { "cfgs" : "7", - "duration" : "109ms", - "end" : "2023-04-20T12:45:38.052+02:00", + "duration" : "35ms", + "end" : "2023-09-07T11:45:56.090+02:00", "expressions" : "77", "files" : "7", "globals" : "0", "members" : "7", "programs" : "1", - "start" : "2023-04-20T12:45:37.943+02:00", + "start" : "2023-09-07T11:45:56.055+02:00", "statements" : "32", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/int-const" } diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/CHA/report.json b/lisa/lisa-analyses/imp-testcases/interprocedural/CHA/report.json index 6b556207c..a9c0898ea 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/CHA/report.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/CHA/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_A.foo(A__this).json", "untyped_B.foo(B__this).json", "untyped_tests.subtyping(tests__this).json" ], "info" : { "cfgs" : "3", - "duration" : "45ms", - "end" : "2023-04-20T12:45:26.007+02:00", + "duration" : "55ms", + "end" : "2023-09-27T12:48:20.804+02:00", "expressions" : "11", "files" : "3", "globals" : "0", "members" : "3", "programs" : "1", - "start" : "2023-04-20T12:45:25.962+02:00", + "start" : "2023-09-27T12:48:20.749+02:00", "statements" : "8", "units" : "3", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/interprocedural/CHA" } diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/CHA/untyped_tests.subtyping(tests__this).json b/lisa/lisa-analyses/imp-testcases/interprocedural/CHA/untyped_tests.subtyping(tests__this).json index 7eb4c1aec..b67f4a41e 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/CHA/untyped_tests.subtyping(tests__this).json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/CHA/untyped_tests.subtyping(tests__this).json @@ -1 +1 @@ -{"name":"untyped tests::subtyping(tests* this)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"a = new B()"},{"id":1,"text":"a"},{"id":2,"text":"new B()"},{"id":3,"subNodes":[4,5],"text":"b = 0"},{"id":4,"text":"b"},{"id":5,"text":"0"},{"id":6,"subNodes":[7,8],"text":"<(b, 10)"},{"id":7,"text":"b"},{"id":8,"text":"10"},{"id":9,"subNodes":[10,11],"text":"a = new A()"},{"id":10,"text":"a"},{"id":11,"text":"new A()"},{"id":12,"subNodes":[13],"text":"foo(a)"},{"id":13,"text":"a"},{"id":14,"text":"ret"}],"edges":[{"sourceId":0,"destId":3,"kind":"SequentialEdge"},{"sourceId":3,"destId":6,"kind":"SequentialEdge"},{"sourceId":6,"destId":9,"kind":"TrueEdge"},{"sourceId":6,"destId":12,"kind":"FalseEdge"},{"sourceId":9,"destId":12,"kind":"SequentialEdge"},{"sourceId":12,"destId":14,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["a"],"state":{"heap":"monolith","type":{"a":["B*"],"heap[w]:heap":["B"]},"value":"#TOP#"}}},{"nodeId":1,"description":{"expressions":["a"],"state":{"heap":"monolith","type":{"heap[w]:heap":["B"]},"value":"#TOP#"}}},{"nodeId":2,"description":{"expressions":["ref$new B"],"state":{"heap":"monolith","type":{"heap[w]:heap":["B"]},"value":"#TOP#"}}},{"nodeId":3,"description":{"expressions":["b"],"state":{"heap":"monolith","type":{"a":["B*"],"b":["int32"],"heap[w]:heap":["B"]},"value":{"b":"0"}}}},{"nodeId":4,"description":{"expressions":["b"],"state":{"heap":"monolith","type":{"a":["B*"],"heap[w]:heap":["B"]},"value":"#TOP#"}}},{"nodeId":5,"description":{"expressions":["0"],"state":{"heap":"monolith","type":{"a":["B*"],"heap[w]:heap":["B"]},"value":"#TOP#"}}},{"nodeId":6,"description":{"expressions":["b < 10"],"state":{"heap":"monolith","type":{"a":["B*"],"b":["int32"],"heap[w]:heap":["B"]},"value":{"b":"0"}}}},{"nodeId":7,"description":{"expressions":["b"],"state":{"heap":"monolith","type":{"a":["B*"],"b":["int32"],"heap[w]:heap":["B"]},"value":{"b":"0"}}}},{"nodeId":8,"description":{"expressions":["10"],"state":{"heap":"monolith","type":{"a":["B*"],"b":["int32"],"heap[w]:heap":["B"]},"value":{"b":"0"}}}},{"nodeId":9,"description":{"expressions":["a"],"state":{"heap":"monolith","type":{"a":["A*"],"heap[w]:heap":["A"]},"value":"#TOP#"}}},{"nodeId":10,"description":{"expressions":["a"],"state":{"heap":"monolith","type":{"heap[w]:heap":["A"]},"value":"#TOP#"}}},{"nodeId":11,"description":{"expressions":["ref$new A"],"state":{"heap":"monolith","type":{"heap[w]:heap":["A"]},"value":"#TOP#"}}},{"nodeId":12,"description":{"expressions":["open_call_ret_value@'imp-testcases/interprocedural/program.imp':20:11"],"state":"#TOP#"}},{"nodeId":13,"description":{"expressions":["a"],"state":{"heap":"monolith","type":{"a":["A*"],"heap[w]:heap":["A"]},"value":"#TOP#"}}},{"nodeId":14,"description":{"expressions":["skip"],"state":"#TOP#"}}]} \ No newline at end of file +{"name":"untyped tests::subtyping(tests* this)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"a = new B()"},{"id":1,"text":"a"},{"id":2,"text":"new B()"},{"id":3,"subNodes":[4,5],"text":"b = 0"},{"id":4,"text":"b"},{"id":5,"text":"0"},{"id":6,"subNodes":[7,8],"text":"<(b, 10)"},{"id":7,"text":"b"},{"id":8,"text":"10"},{"id":9,"subNodes":[10,11],"text":"a = new A()"},{"id":10,"text":"a"},{"id":11,"text":"new A()"},{"id":12,"subNodes":[13],"text":"foo(a)"},{"id":13,"text":"a"},{"id":14,"text":"ret"}],"edges":[{"sourceId":0,"destId":3,"kind":"SequentialEdge"},{"sourceId":3,"destId":6,"kind":"SequentialEdge"},{"sourceId":6,"destId":9,"kind":"TrueEdge"},{"sourceId":6,"destId":12,"kind":"FalseEdge"},{"sourceId":9,"destId":12,"kind":"SequentialEdge"},{"sourceId":12,"destId":14,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["a"],"state":{"heap":"monolith","type":{"a":["B*"],"heap[w]:heap":["B"]},"value":"#TOP#"}}},{"nodeId":1,"description":{"expressions":["a"],"state":{"heap":"monolith","type":{"heap[w]:heap":["B"]},"value":"#TOP#"}}},{"nodeId":2,"description":{"expressions":["ref$new B"],"state":{"heap":"monolith","type":{"heap[w]:heap":["B"]},"value":"#TOP#"}}},{"nodeId":3,"description":{"expressions":["b"],"state":{"heap":"monolith","type":{"a":["B*"],"b":["int32"],"heap[w]:heap":["B"]},"value":{"b":"0"}}}},{"nodeId":4,"description":{"expressions":["b"],"state":{"heap":"monolith","type":{"a":["B*"],"heap[w]:heap":["B"]},"value":"#TOP#"}}},{"nodeId":5,"description":{"expressions":["0"],"state":{"heap":"monolith","type":{"a":["B*"],"heap[w]:heap":["B"]},"value":"#TOP#"}}},{"nodeId":6,"description":{"expressions":["b < 10"],"state":{"heap":"monolith","type":{"a":["B*"],"b":["int32"],"heap[w]:heap":["B"]},"value":{"b":"0"}}}},{"nodeId":7,"description":{"expressions":["b"],"state":{"heap":"monolith","type":{"a":["B*"],"b":["int32"],"heap[w]:heap":["B"]},"value":{"b":"0"}}}},{"nodeId":8,"description":{"expressions":["10"],"state":{"heap":"monolith","type":{"a":["B*"],"b":["int32"],"heap[w]:heap":["B"]},"value":{"b":"0"}}}},{"nodeId":9,"description":{"expressions":["a"],"state":{"heap":"monolith","type":{"a":["A*"],"heap[w]:heap":["A","B"]},"value":"#TOP#"}}},{"nodeId":10,"description":{"expressions":["a"],"state":{"heap":"monolith","type":{"heap[w]:heap":["A","B"]},"value":"#TOP#"}}},{"nodeId":11,"description":{"expressions":["ref$new A"],"state":{"heap":"monolith","type":{"heap[w]:heap":["A","B"]},"value":"#TOP#"}}},{"nodeId":12,"description":{"expressions":["open_call_ret_value@'imp-testcases/interprocedural/program.imp':20:11"],"state":"#TOP#"}},{"nodeId":13,"description":{"expressions":["a"],"state":{"heap":"monolith","type":{"a":["A*"],"heap[w]:heap":["A","B"]},"value":"#TOP#"}}},{"nodeId":14,"description":{"expressions":["skip"],"state":"#TOP#"}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/RTA/report.json b/lisa/lisa-analyses/imp-testcases/interprocedural/RTA/report.json index e669526bd..2785bb11d 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/RTA/report.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/RTA/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_A.foo(A__this).json", "untyped_B.foo(B__this).json", "untyped_tests.subtyping(tests__this).json" ], "info" : { "cfgs" : "3", - "duration" : "43ms", - "end" : "2023-04-20T12:45:25.834+02:00", + "duration" : "530ms", + "end" : "2023-09-27T12:48:20.351+02:00", "expressions" : "11", "files" : "3", "globals" : "0", "members" : "3", "programs" : "1", - "start" : "2023-04-20T12:45:25.791+02:00", + "start" : "2023-09-27T12:48:19.821+02:00", "statements" : "8", "units" : "3", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/interprocedural/RTA" } diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/RTA/untyped_tests.subtyping(tests__this).json b/lisa/lisa-analyses/imp-testcases/interprocedural/RTA/untyped_tests.subtyping(tests__this).json index 7eb4c1aec..b67f4a41e 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/RTA/untyped_tests.subtyping(tests__this).json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/RTA/untyped_tests.subtyping(tests__this).json @@ -1 +1 @@ -{"name":"untyped tests::subtyping(tests* this)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"a = new B()"},{"id":1,"text":"a"},{"id":2,"text":"new B()"},{"id":3,"subNodes":[4,5],"text":"b = 0"},{"id":4,"text":"b"},{"id":5,"text":"0"},{"id":6,"subNodes":[7,8],"text":"<(b, 10)"},{"id":7,"text":"b"},{"id":8,"text":"10"},{"id":9,"subNodes":[10,11],"text":"a = new A()"},{"id":10,"text":"a"},{"id":11,"text":"new A()"},{"id":12,"subNodes":[13],"text":"foo(a)"},{"id":13,"text":"a"},{"id":14,"text":"ret"}],"edges":[{"sourceId":0,"destId":3,"kind":"SequentialEdge"},{"sourceId":3,"destId":6,"kind":"SequentialEdge"},{"sourceId":6,"destId":9,"kind":"TrueEdge"},{"sourceId":6,"destId":12,"kind":"FalseEdge"},{"sourceId":9,"destId":12,"kind":"SequentialEdge"},{"sourceId":12,"destId":14,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["a"],"state":{"heap":"monolith","type":{"a":["B*"],"heap[w]:heap":["B"]},"value":"#TOP#"}}},{"nodeId":1,"description":{"expressions":["a"],"state":{"heap":"monolith","type":{"heap[w]:heap":["B"]},"value":"#TOP#"}}},{"nodeId":2,"description":{"expressions":["ref$new B"],"state":{"heap":"monolith","type":{"heap[w]:heap":["B"]},"value":"#TOP#"}}},{"nodeId":3,"description":{"expressions":["b"],"state":{"heap":"monolith","type":{"a":["B*"],"b":["int32"],"heap[w]:heap":["B"]},"value":{"b":"0"}}}},{"nodeId":4,"description":{"expressions":["b"],"state":{"heap":"monolith","type":{"a":["B*"],"heap[w]:heap":["B"]},"value":"#TOP#"}}},{"nodeId":5,"description":{"expressions":["0"],"state":{"heap":"monolith","type":{"a":["B*"],"heap[w]:heap":["B"]},"value":"#TOP#"}}},{"nodeId":6,"description":{"expressions":["b < 10"],"state":{"heap":"monolith","type":{"a":["B*"],"b":["int32"],"heap[w]:heap":["B"]},"value":{"b":"0"}}}},{"nodeId":7,"description":{"expressions":["b"],"state":{"heap":"monolith","type":{"a":["B*"],"b":["int32"],"heap[w]:heap":["B"]},"value":{"b":"0"}}}},{"nodeId":8,"description":{"expressions":["10"],"state":{"heap":"monolith","type":{"a":["B*"],"b":["int32"],"heap[w]:heap":["B"]},"value":{"b":"0"}}}},{"nodeId":9,"description":{"expressions":["a"],"state":{"heap":"monolith","type":{"a":["A*"],"heap[w]:heap":["A"]},"value":"#TOP#"}}},{"nodeId":10,"description":{"expressions":["a"],"state":{"heap":"monolith","type":{"heap[w]:heap":["A"]},"value":"#TOP#"}}},{"nodeId":11,"description":{"expressions":["ref$new A"],"state":{"heap":"monolith","type":{"heap[w]:heap":["A"]},"value":"#TOP#"}}},{"nodeId":12,"description":{"expressions":["open_call_ret_value@'imp-testcases/interprocedural/program.imp':20:11"],"state":"#TOP#"}},{"nodeId":13,"description":{"expressions":["a"],"state":{"heap":"monolith","type":{"a":["A*"],"heap[w]:heap":["A"]},"value":"#TOP#"}}},{"nodeId":14,"description":{"expressions":["skip"],"state":"#TOP#"}}]} \ No newline at end of file +{"name":"untyped tests::subtyping(tests* this)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"a = new B()"},{"id":1,"text":"a"},{"id":2,"text":"new B()"},{"id":3,"subNodes":[4,5],"text":"b = 0"},{"id":4,"text":"b"},{"id":5,"text":"0"},{"id":6,"subNodes":[7,8],"text":"<(b, 10)"},{"id":7,"text":"b"},{"id":8,"text":"10"},{"id":9,"subNodes":[10,11],"text":"a = new A()"},{"id":10,"text":"a"},{"id":11,"text":"new A()"},{"id":12,"subNodes":[13],"text":"foo(a)"},{"id":13,"text":"a"},{"id":14,"text":"ret"}],"edges":[{"sourceId":0,"destId":3,"kind":"SequentialEdge"},{"sourceId":3,"destId":6,"kind":"SequentialEdge"},{"sourceId":6,"destId":9,"kind":"TrueEdge"},{"sourceId":6,"destId":12,"kind":"FalseEdge"},{"sourceId":9,"destId":12,"kind":"SequentialEdge"},{"sourceId":12,"destId":14,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["a"],"state":{"heap":"monolith","type":{"a":["B*"],"heap[w]:heap":["B"]},"value":"#TOP#"}}},{"nodeId":1,"description":{"expressions":["a"],"state":{"heap":"monolith","type":{"heap[w]:heap":["B"]},"value":"#TOP#"}}},{"nodeId":2,"description":{"expressions":["ref$new B"],"state":{"heap":"monolith","type":{"heap[w]:heap":["B"]},"value":"#TOP#"}}},{"nodeId":3,"description":{"expressions":["b"],"state":{"heap":"monolith","type":{"a":["B*"],"b":["int32"],"heap[w]:heap":["B"]},"value":{"b":"0"}}}},{"nodeId":4,"description":{"expressions":["b"],"state":{"heap":"monolith","type":{"a":["B*"],"heap[w]:heap":["B"]},"value":"#TOP#"}}},{"nodeId":5,"description":{"expressions":["0"],"state":{"heap":"monolith","type":{"a":["B*"],"heap[w]:heap":["B"]},"value":"#TOP#"}}},{"nodeId":6,"description":{"expressions":["b < 10"],"state":{"heap":"monolith","type":{"a":["B*"],"b":["int32"],"heap[w]:heap":["B"]},"value":{"b":"0"}}}},{"nodeId":7,"description":{"expressions":["b"],"state":{"heap":"monolith","type":{"a":["B*"],"b":["int32"],"heap[w]:heap":["B"]},"value":{"b":"0"}}}},{"nodeId":8,"description":{"expressions":["10"],"state":{"heap":"monolith","type":{"a":["B*"],"b":["int32"],"heap[w]:heap":["B"]},"value":{"b":"0"}}}},{"nodeId":9,"description":{"expressions":["a"],"state":{"heap":"monolith","type":{"a":["A*"],"heap[w]:heap":["A","B"]},"value":"#TOP#"}}},{"nodeId":10,"description":{"expressions":["a"],"state":{"heap":"monolith","type":{"heap[w]:heap":["A","B"]},"value":"#TOP#"}}},{"nodeId":11,"description":{"expressions":["ref$new A"],"state":{"heap":"monolith","type":{"heap[w]:heap":["A","B"]},"value":"#TOP#"}}},{"nodeId":12,"description":{"expressions":["open_call_ret_value@'imp-testcases/interprocedural/program.imp':20:11"],"state":"#TOP#"}},{"nodeId":13,"description":{"expressions":["a"],"state":{"heap":"monolith","type":{"a":["A*"],"heap[w]:heap":["A","B"]},"value":"#TOP#"}}},{"nodeId":14,"description":{"expressions":["skip"],"state":"#TOP#"}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive1/report.json b/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive1/report.json index 6af1eaa0b..f35fef718 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive1/report.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive1/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_A.A(A__this)_1677856240.json", "untyped_A.getOne(A__this)_1677863959.json", "untyped_A.getPositive(A__this,_untyped_i)_1677876514.json", "untyped_A.getPositive(A__this,_untyped_i)_1677877444.json", "untyped_tests.main(tests__this).json" ], "info" : { "cfgs" : "5", - "duration" : "142ms", - "end" : "2023-04-20T12:45:23.913+02:00", + "duration" : "97ms", + "end" : "2023-09-07T11:45:43.663+02:00", "expressions" : "26", "files" : "5", "globals" : "0", "members" : "5", "programs" : "1", - "start" : "2023-04-20T12:45:23.771+02:00", + "start" : "2023-09-07T11:45:43.566+02:00", "statements" : "14", "units" : "2", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/interprocedural/RTAContextSensitive1" } diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive1/untyped_A.A(A__this)_1677856240.json b/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive1/untyped_A.A(A__this)_1677856240.json index e02572373..120dedef8 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive1/untyped_A.A(A__this)_1677856240.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive1/untyped_A.A(A__this)_1677856240.json @@ -1 +1 @@ -{"name":"untyped A::A(A* this)","description":"['imp-testcases/interprocedural/programContextSensitive1.imp':23:16]","nodes":[{"id":0,"subNodes":[1,2],"text":"i1 = 0"},{"id":1,"text":"i1"},{"id":2,"text":"0"},{"id":3,"text":"ret"}],"edges":[{"sourceId":0,"destId":3,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["i1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/programContextSensitive1.imp':23:16]:$lisareceiver":["A*"],"['imp-testcases/interprocedural/programContextSensitive1.imp':23:16]:this":["tests*"],"i1":["int32"],"this":["A"]},"value":{"i1":"0"}}}},{"nodeId":1,"description":{"expressions":["i1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/programContextSensitive1.imp':23:16]:$lisareceiver":["A*"],"['imp-testcases/interprocedural/programContextSensitive1.imp':23:16]:this":["tests*"],"this":["A"]},"value":"#TOP#"}}},{"nodeId":2,"description":{"expressions":["0"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/programContextSensitive1.imp':23:16]:$lisareceiver":["A*"],"['imp-testcases/interprocedural/programContextSensitive1.imp':23:16]:this":["tests*"],"this":["A"]},"value":"#TOP#"}}},{"nodeId":3,"description":{"expressions":["skip"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/programContextSensitive1.imp':23:16]:$lisareceiver":["A*"],"['imp-testcases/interprocedural/programContextSensitive1.imp':23:16]:this":["tests*"],"i1":["int32"],"this":["A"]},"value":{"i1":"0"}}}}]} \ No newline at end of file +{"name":"untyped A::A(A* this)","description":"['imp-testcases/interprocedural/programContextSensitive1.imp':23:16]","nodes":[{"id":0,"subNodes":[1,2],"text":"i1 = 0"},{"id":1,"text":"i1"},{"id":2,"text":"0"},{"id":3,"text":"ret"}],"edges":[{"sourceId":0,"destId":3,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["i1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/programContextSensitive1.imp':23:16]:$lisareceiver":["A*"],"['imp-testcases/interprocedural/programContextSensitive1.imp':23:16]:this":["tests*"],"i1":["int32"],"this":["A*"]},"value":{"i1":"0"}}}},{"nodeId":1,"description":{"expressions":["i1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/programContextSensitive1.imp':23:16]:$lisareceiver":["A*"],"['imp-testcases/interprocedural/programContextSensitive1.imp':23:16]:this":["tests*"],"this":["A*"]},"value":"#TOP#"}}},{"nodeId":2,"description":{"expressions":["0"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/programContextSensitive1.imp':23:16]:$lisareceiver":["A*"],"['imp-testcases/interprocedural/programContextSensitive1.imp':23:16]:this":["tests*"],"this":["A*"]},"value":"#TOP#"}}},{"nodeId":3,"description":{"expressions":["skip"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/programContextSensitive1.imp':23:16]:$lisareceiver":["A*"],"['imp-testcases/interprocedural/programContextSensitive1.imp':23:16]:this":["tests*"],"i1":["int32"],"this":["A*"]},"value":{"i1":"0"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive2/report.json b/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive2/report.json index dab9b7940..46d059f69 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive2/report.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive2/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_A.A(A__this)_1678785558.json", "untyped_A.identity(A__this,_untyped_i)_1678799291.json", "untyped_A.identity(A__this,_untyped_i)_1678800035.json", "untyped_A.identity(A__this,_untyped_i)_1678804902.json", "untyped_tests.helper(tests__this,_untyped_i,_untyped_dispatcher)_1678799167.json", "untyped_tests.main(tests__this).json" ], "info" : { "cfgs" : "6", - "duration" : "141ms", - "end" : "2023-04-20T12:45:24.270+02:00", + "duration" : "103ms", + "end" : "2023-09-07T11:45:44.027+02:00", "expressions" : "35", "files" : "6", "globals" : "0", "members" : "6", "programs" : "1", - "start" : "2023-04-20T12:45:24.129+02:00", + "start" : "2023-09-07T11:45:43.924+02:00", "statements" : "17", "units" : "2", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/interprocedural/RTAContextSensitive2" } diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive2/untyped_A.A(A__this)_1678785558.json b/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive2/untyped_A.A(A__this)_1678785558.json index 5780981a0..53f66bb98 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive2/untyped_A.A(A__this)_1678785558.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive2/untyped_A.A(A__this)_1678785558.json @@ -1 +1 @@ -{"name":"untyped A::A(A* this)","description":"['imp-testcases/interprocedural/programContextSensitive2.imp':24:22]","nodes":[{"id":0,"subNodes":[1,2],"text":"i1 = 0"},{"id":1,"text":"i1"},{"id":2,"text":"0"},{"id":3,"text":"ret"}],"edges":[{"sourceId":0,"destId":3,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["i1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/programContextSensitive2.imp':24:22]:$lisareceiver":["A*"],"['imp-testcases/interprocedural/programContextSensitive2.imp':24:22]:this":["tests*"],"i1":["int32"],"this":["A"]},"value":{"i1":"0"}}}},{"nodeId":1,"description":{"expressions":["i1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/programContextSensitive2.imp':24:22]:$lisareceiver":["A*"],"['imp-testcases/interprocedural/programContextSensitive2.imp':24:22]:this":["tests*"],"this":["A"]},"value":"#TOP#"}}},{"nodeId":2,"description":{"expressions":["0"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/programContextSensitive2.imp':24:22]:$lisareceiver":["A*"],"['imp-testcases/interprocedural/programContextSensitive2.imp':24:22]:this":["tests*"],"this":["A"]},"value":"#TOP#"}}},{"nodeId":3,"description":{"expressions":["skip"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/programContextSensitive2.imp':24:22]:$lisareceiver":["A*"],"['imp-testcases/interprocedural/programContextSensitive2.imp':24:22]:this":["tests*"],"i1":["int32"],"this":["A"]},"value":{"i1":"0"}}}}]} \ No newline at end of file +{"name":"untyped A::A(A* this)","description":"['imp-testcases/interprocedural/programContextSensitive2.imp':24:22]","nodes":[{"id":0,"subNodes":[1,2],"text":"i1 = 0"},{"id":1,"text":"i1"},{"id":2,"text":"0"},{"id":3,"text":"ret"}],"edges":[{"sourceId":0,"destId":3,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["i1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/programContextSensitive2.imp':24:22]:$lisareceiver":["A*"],"['imp-testcases/interprocedural/programContextSensitive2.imp':24:22]:this":["tests*"],"i1":["int32"],"this":["A*"]},"value":{"i1":"0"}}}},{"nodeId":1,"description":{"expressions":["i1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/programContextSensitive2.imp':24:22]:$lisareceiver":["A*"],"['imp-testcases/interprocedural/programContextSensitive2.imp':24:22]:this":["tests*"],"this":["A*"]},"value":"#TOP#"}}},{"nodeId":2,"description":{"expressions":["0"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/programContextSensitive2.imp':24:22]:$lisareceiver":["A*"],"['imp-testcases/interprocedural/programContextSensitive2.imp':24:22]:this":["tests*"],"this":["A*"]},"value":"#TOP#"}}},{"nodeId":3,"description":{"expressions":["skip"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/programContextSensitive2.imp':24:22]:$lisareceiver":["A*"],"['imp-testcases/interprocedural/programContextSensitive2.imp':24:22]:this":["tests*"],"i1":["int32"],"this":["A*"]},"value":{"i1":"0"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive3/report.json b/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive3/report.json index 7ea5d5268..d7844b5b1 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive3/report.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive3/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_A.A(A__this)_1679709079.json", "untyped_A.identity(A__this,_untyped_i)_1679722781.json", "untyped_tests.helper(tests__this,_untyped_i,_untyped_dispatcher)_1679727400.json", "untyped_tests.helper(tests__this,_untyped_i,_untyped_dispatcher)_1679732267.json", "untyped_tests.main(tests__this).json" ], "info" : { "cfgs" : "6", - "duration" : "110ms", - "end" : "2023-04-20T12:45:24.681+02:00", + "duration" : "75ms", + "end" : "2023-09-07T11:45:44.334+02:00", "expressions" : "32", "files" : "5", "globals" : "0", "members" : "6", "programs" : "1", - "start" : "2023-04-20T12:45:24.571+02:00", + "start" : "2023-09-07T11:45:44.259+02:00", "statements" : "16", "units" : "2", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/interprocedural/RTAContextSensitive3" } diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive3/untyped_A.A(A__this)_1679709079.json b/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive3/untyped_A.A(A__this)_1679709079.json index 966ed846a..56759a5a1 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive3/untyped_A.A(A__this)_1679709079.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive3/untyped_A.A(A__this)_1679709079.json @@ -1 +1 @@ -{"name":"untyped A::A(A* this)","description":"['imp-testcases/interprocedural/programContextSensitive3.imp':24:22]","nodes":[{"id":0,"subNodes":[1,2],"text":"i1 = 0"},{"id":1,"text":"i1"},{"id":2,"text":"0"},{"id":3,"text":"ret"}],"edges":[{"sourceId":0,"destId":3,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["i1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/programContextSensitive3.imp':24:22]:$lisareceiver":["A*"],"['imp-testcases/interprocedural/programContextSensitive3.imp':24:22]:this":["tests*"],"i1":["int32"],"this":["A"]},"value":{"i1":"0"}}}},{"nodeId":1,"description":{"expressions":["i1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/programContextSensitive3.imp':24:22]:$lisareceiver":["A*"],"['imp-testcases/interprocedural/programContextSensitive3.imp':24:22]:this":["tests*"],"this":["A"]},"value":"#TOP#"}}},{"nodeId":2,"description":{"expressions":["0"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/programContextSensitive3.imp':24:22]:$lisareceiver":["A*"],"['imp-testcases/interprocedural/programContextSensitive3.imp':24:22]:this":["tests*"],"this":["A"]},"value":"#TOP#"}}},{"nodeId":3,"description":{"expressions":["skip"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/programContextSensitive3.imp':24:22]:$lisareceiver":["A*"],"['imp-testcases/interprocedural/programContextSensitive3.imp':24:22]:this":["tests*"],"i1":["int32"],"this":["A"]},"value":{"i1":"0"}}}}]} \ No newline at end of file +{"name":"untyped A::A(A* this)","description":"['imp-testcases/interprocedural/programContextSensitive3.imp':24:22]","nodes":[{"id":0,"subNodes":[1,2],"text":"i1 = 0"},{"id":1,"text":"i1"},{"id":2,"text":"0"},{"id":3,"text":"ret"}],"edges":[{"sourceId":0,"destId":3,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["i1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/programContextSensitive3.imp':24:22]:$lisareceiver":["A*"],"['imp-testcases/interprocedural/programContextSensitive3.imp':24:22]:this":["tests*"],"i1":["int32"],"this":["A*"]},"value":{"i1":"0"}}}},{"nodeId":1,"description":{"expressions":["i1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/programContextSensitive3.imp':24:22]:$lisareceiver":["A*"],"['imp-testcases/interprocedural/programContextSensitive3.imp':24:22]:this":["tests*"],"this":["A*"]},"value":"#TOP#"}}},{"nodeId":2,"description":{"expressions":["0"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/programContextSensitive3.imp':24:22]:$lisareceiver":["A*"],"['imp-testcases/interprocedural/programContextSensitive3.imp':24:22]:this":["tests*"],"this":["A*"]},"value":"#TOP#"}}},{"nodeId":3,"description":{"expressions":["skip"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/programContextSensitive3.imp':24:22]:$lisareceiver":["A*"],"['imp-testcases/interprocedural/programContextSensitive3.imp':24:22]:this":["tests*"],"i1":["int32"],"this":["A*"]},"value":{"i1":"0"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive4/report.json b/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive4/report.json index bbd02f260..25004c1ee 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive4/report.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive4/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_A.A(A__this)_1679709079.json", "untyped_A.identity(A__this,_untyped_i)_-2083151821.json", "untyped_A.identity(A__this,_untyped_i)_-2083302698.json", "untyped_tests.helper(tests__this,_untyped_i,_untyped_dispatcher)_1679727400.json", "untyped_tests.helper(tests__this,_untyped_i,_untyped_dispatcher)_1679732267.json", "untyped_tests.main(tests__this).json" ], "info" : { "cfgs" : "6", - "duration" : "94ms", - "end" : "2023-04-20T12:45:25.042+02:00", + "duration" : "83ms", + "end" : "2023-09-07T11:45:44.632+02:00", "expressions" : "32", "files" : "6", "globals" : "0", "members" : "6", "programs" : "1", - "start" : "2023-04-20T12:45:24.948+02:00", + "start" : "2023-09-07T11:45:44.549+02:00", "statements" : "16", "units" : "2", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/interprocedural/RTAContextSensitive4" } diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive4/untyped_A.A(A__this)_1679709079.json b/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive4/untyped_A.A(A__this)_1679709079.json index 966ed846a..56759a5a1 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive4/untyped_A.A(A__this)_1679709079.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive4/untyped_A.A(A__this)_1679709079.json @@ -1 +1 @@ -{"name":"untyped A::A(A* this)","description":"['imp-testcases/interprocedural/programContextSensitive3.imp':24:22]","nodes":[{"id":0,"subNodes":[1,2],"text":"i1 = 0"},{"id":1,"text":"i1"},{"id":2,"text":"0"},{"id":3,"text":"ret"}],"edges":[{"sourceId":0,"destId":3,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["i1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/programContextSensitive3.imp':24:22]:$lisareceiver":["A*"],"['imp-testcases/interprocedural/programContextSensitive3.imp':24:22]:this":["tests*"],"i1":["int32"],"this":["A"]},"value":{"i1":"0"}}}},{"nodeId":1,"description":{"expressions":["i1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/programContextSensitive3.imp':24:22]:$lisareceiver":["A*"],"['imp-testcases/interprocedural/programContextSensitive3.imp':24:22]:this":["tests*"],"this":["A"]},"value":"#TOP#"}}},{"nodeId":2,"description":{"expressions":["0"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/programContextSensitive3.imp':24:22]:$lisareceiver":["A*"],"['imp-testcases/interprocedural/programContextSensitive3.imp':24:22]:this":["tests*"],"this":["A"]},"value":"#TOP#"}}},{"nodeId":3,"description":{"expressions":["skip"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/programContextSensitive3.imp':24:22]:$lisareceiver":["A*"],"['imp-testcases/interprocedural/programContextSensitive3.imp':24:22]:this":["tests*"],"i1":["int32"],"this":["A"]},"value":{"i1":"0"}}}}]} \ No newline at end of file +{"name":"untyped A::A(A* this)","description":"['imp-testcases/interprocedural/programContextSensitive3.imp':24:22]","nodes":[{"id":0,"subNodes":[1,2],"text":"i1 = 0"},{"id":1,"text":"i1"},{"id":2,"text":"0"},{"id":3,"text":"ret"}],"edges":[{"sourceId":0,"destId":3,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["i1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/programContextSensitive3.imp':24:22]:$lisareceiver":["A*"],"['imp-testcases/interprocedural/programContextSensitive3.imp':24:22]:this":["tests*"],"i1":["int32"],"this":["A*"]},"value":{"i1":"0"}}}},{"nodeId":1,"description":{"expressions":["i1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/programContextSensitive3.imp':24:22]:$lisareceiver":["A*"],"['imp-testcases/interprocedural/programContextSensitive3.imp':24:22]:this":["tests*"],"this":["A*"]},"value":"#TOP#"}}},{"nodeId":2,"description":{"expressions":["0"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/programContextSensitive3.imp':24:22]:$lisareceiver":["A*"],"['imp-testcases/interprocedural/programContextSensitive3.imp':24:22]:this":["tests*"],"this":["A*"]},"value":"#TOP#"}}},{"nodeId":3,"description":{"expressions":["skip"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/programContextSensitive3.imp':24:22]:$lisareceiver":["A*"],"['imp-testcases/interprocedural/programContextSensitive3.imp':24:22]:this":["tests*"],"i1":["int32"],"this":["A*"]},"value":{"i1":"0"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive5/report.json b/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive5/report.json index 88750c43c..2d67024c8 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive5/report.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive5/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_A.build(A__this,_untyped_a,_untyped_b,_untyped_c)_1680644876.json", "untyped_A.build(A__this,_untyped_a,_untyped_b,_untyped_c)_1680645868.json", "untyped_A.identity(A__this,_untyped_x)_1680635948.json", "untyped_A.main(A__this).json" ], "info" : { "cfgs" : "3", - "duration" : "94ms", - "end" : "2023-04-20T12:45:25.359+02:00", + "duration" : "83ms", + "end" : "2023-09-13T14:09:12.877+02:00", "expressions" : "33", "files" : "4", "globals" : "0", "members" : "3", "programs" : "1", - "start" : "2023-04-20T12:45:25.265+02:00", + "start" : "2023-09-13T14:09:12.794+02:00", "statements" : "10", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/interprocedural/RTAContextSensitive5" } diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive5/untyped_A.build(A__this,_untyped_a,_untyped_b,_untyped_c)_1680644876.json b/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive5/untyped_A.build(A__this,_untyped_a,_untyped_b,_untyped_c)_1680644876.json index 8168556a1..255574f66 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive5/untyped_A.build(A__this,_untyped_a,_untyped_b,_untyped_c)_1680644876.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive5/untyped_A.build(A__this,_untyped_a,_untyped_b,_untyped_c)_1680644876.json @@ -1 +1 @@ -{"name":"untyped A::build(A* this, untyped a, untyped b, untyped c)","description":"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]","nodes":[{"id":0,"subNodes":[1,2],"text":"res = new int32[](3)"},{"id":1,"text":"res"},{"id":2,"subNodes":[3],"text":"new int32[](3)"},{"id":3,"text":"3"},{"id":4,"subNodes":[5,8],"text":"[](res, 0) = a"},{"id":5,"subNodes":[6,7],"text":"[](res, 0)"},{"id":6,"text":"res"},{"id":7,"text":"0"},{"id":8,"text":"a"},{"id":9,"subNodes":[10,13],"text":"[](res, 1) = b"},{"id":10,"subNodes":[11,12],"text":"[](res, 1)"},{"id":11,"text":"res"},{"id":12,"text":"1"},{"id":13,"text":"b"},{"id":14,"subNodes":[15,18],"text":"[](res, 2) = c"},{"id":15,"subNodes":[16,17],"text":"[](res, 2)"},{"id":16,"text":"res"},{"id":17,"text":"2"},{"id":18,"text":"c"},{"id":19,"subNodes":[20],"text":"return identity(this, res)"},{"id":20,"subNodes":[21,22],"text":"identity(this, res)"},{"id":21,"text":"this"},{"id":22,"text":"res"}],"edges":[{"sourceId":0,"destId":4,"kind":"SequentialEdge"},{"sourceId":4,"destId":9,"kind":"SequentialEdge"},{"sourceId":9,"destId":14,"kind":"SequentialEdge"},{"sourceId":14,"destId":19,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["res"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[1, 1]","b":"[2, 2]","c":"[3, 3]"}}}},{"nodeId":1,"description":{"expressions":["res"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32[]"],"this":["A*"]},"value":{"a":"[1, 1]","b":"[2, 2]","c":"[3, 3]"}}}},{"nodeId":2,"description":{"expressions":["ref$new int32[]"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32[]"],"this":["A*"]},"value":{"a":"[1, 1]","b":"[2, 2]","c":"[3, 3]"}}}},{"nodeId":3,"description":{"expressions":["3"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"this":["A*"]},"value":{"a":"[1, 1]","b":"[2, 2]","c":"[3, 3]"}}}},{"nodeId":4,"description":{"expressions":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[1, 1]","b":"[2, 2]","c":"[3, 3]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[1, 1]"}}}},{"nodeId":5,"description":{"expressions":["*(res)->0"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[1, 1]","b":"[2, 2]","c":"[3, 3]"}}}},{"nodeId":6,"description":{"expressions":["res"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[1, 1]","b":"[2, 2]","c":"[3, 3]"}}}},{"nodeId":7,"description":{"expressions":["0"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[1, 1]","b":"[2, 2]","c":"[3, 3]"}}}},{"nodeId":8,"description":{"expressions":["a"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[1, 1]","b":"[2, 2]","c":"[3, 3]"}}}},{"nodeId":9,"description":{"expressions":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[1, 1]","b":"[2, 2]","c":"[3, 3]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[1, 2]"}}}},{"nodeId":10,"description":{"expressions":["*(res)->1"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[1, 1]","b":"[2, 2]","c":"[3, 3]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[1, 1]"}}}},{"nodeId":11,"description":{"expressions":["res"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[1, 1]","b":"[2, 2]","c":"[3, 3]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[1, 1]"}}}},{"nodeId":12,"description":{"expressions":["1"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[1, 1]","b":"[2, 2]","c":"[3, 3]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[1, 1]"}}}},{"nodeId":13,"description":{"expressions":["b"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[1, 1]","b":"[2, 2]","c":"[3, 3]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[1, 1]"}}}},{"nodeId":14,"description":{"expressions":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[1, 1]","b":"[2, 2]","c":"[3, 3]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[1, 3]"}}}},{"nodeId":15,"description":{"expressions":["*(res)->2"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[1, 1]","b":"[2, 2]","c":"[3, 3]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[1, 2]"}}}},{"nodeId":16,"description":{"expressions":["res"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[1, 1]","b":"[2, 2]","c":"[3, 3]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[1, 2]"}}}},{"nodeId":17,"description":{"expressions":["2"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[1, 1]","b":"[2, 2]","c":"[3, 3]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[1, 2]"}}}},{"nodeId":18,"description":{"expressions":["c"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[1, 1]","b":"[2, 2]","c":"[3, 3]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[1, 2]"}}}},{"nodeId":19,"description":{"expressions":["ret_value@build"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","ret_value@build":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"ret_value@build":["int32[]*"],"this":["A*"]},"value":{"a":"[-5, 1]","b":"[2, 5]","c":"[3, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":20,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/programContextSensitive4.imp':8:26"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","call_ret_value@'imp-testcases/interprocedural/programContextSensitive4.imp':8:26":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"call_ret_value@'imp-testcases/interprocedural/programContextSensitive4.imp':8:26":["int32[]*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[-5, 1]","b":"[2, 5]","c":"[3, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":21,"description":{"expressions":["this"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[1, 1]","b":"[2, 2]","c":"[3, 3]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[1, 3]"}}}},{"nodeId":22,"description":{"expressions":["res"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[1, 1]","b":"[2, 2]","c":"[3, 3]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[1, 3]"}}}}]} \ No newline at end of file +{"name":"untyped A::build(A* this, untyped a, untyped b, untyped c)","description":"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]","nodes":[{"id":0,"subNodes":[1,2],"text":"res = new int32[](3)"},{"id":1,"text":"res"},{"id":2,"subNodes":[3],"text":"new int32[](3)"},{"id":3,"text":"3"},{"id":4,"subNodes":[5,8],"text":"[](res, 0) = a"},{"id":5,"subNodes":[6,7],"text":"[](res, 0)"},{"id":6,"text":"res"},{"id":7,"text":"0"},{"id":8,"text":"a"},{"id":9,"subNodes":[10,13],"text":"[](res, 1) = b"},{"id":10,"subNodes":[11,12],"text":"[](res, 1)"},{"id":11,"text":"res"},{"id":12,"text":"1"},{"id":13,"text":"b"},{"id":14,"subNodes":[15,18],"text":"[](res, 2) = c"},{"id":15,"subNodes":[16,17],"text":"[](res, 2)"},{"id":16,"text":"res"},{"id":17,"text":"2"},{"id":18,"text":"c"},{"id":19,"subNodes":[20],"text":"return identity(this, res)"},{"id":20,"subNodes":[21,22],"text":"identity(this, res)"},{"id":21,"text":"this"},{"id":22,"text":"res"}],"edges":[{"sourceId":0,"destId":4,"kind":"SequentialEdge"},{"sourceId":4,"destId":9,"kind":"SequentialEdge"},{"sourceId":9,"destId":14,"kind":"SequentialEdge"},{"sourceId":14,"destId":19,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["res"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[1, 1]","b":"[2, 2]","c":"[3, 3]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[3, 3]"}}}},{"nodeId":1,"description":{"expressions":["res"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"this":["A*"]},"value":{"a":"[1, 1]","b":"[2, 2]","c":"[3, 3]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[3, 3]"}}}},{"nodeId":2,"description":{"expressions":["ref$new int32[]"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"this":["A*"]},"value":{"a":"[1, 1]","b":"[2, 2]","c":"[3, 3]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[3, 3]"}}}},{"nodeId":3,"description":{"expressions":["3"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"this":["A*"]},"value":{"a":"[1, 1]","b":"[2, 2]","c":"[3, 3]"}}}},{"nodeId":4,"description":{"expressions":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[1, 1]","b":"[2, 2]","c":"[3, 3]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[1, 3]"}}}},{"nodeId":5,"description":{"expressions":["*(res)->0"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[1, 1]","b":"[2, 2]","c":"[3, 3]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[3, 3]"}}}},{"nodeId":6,"description":{"expressions":["res"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[1, 1]","b":"[2, 2]","c":"[3, 3]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[3, 3]"}}}},{"nodeId":7,"description":{"expressions":["0"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[1, 1]","b":"[2, 2]","c":"[3, 3]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[3, 3]"}}}},{"nodeId":8,"description":{"expressions":["a"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[1, 1]","b":"[2, 2]","c":"[3, 3]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[3, 3]"}}}},{"nodeId":9,"description":{"expressions":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[1, 1]","b":"[2, 2]","c":"[3, 3]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[1, 3]"}}}},{"nodeId":10,"description":{"expressions":["*(res)->1"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[1, 1]","b":"[2, 2]","c":"[3, 3]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[1, 3]"}}}},{"nodeId":11,"description":{"expressions":["res"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[1, 1]","b":"[2, 2]","c":"[3, 3]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[1, 3]"}}}},{"nodeId":12,"description":{"expressions":["1"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[1, 1]","b":"[2, 2]","c":"[3, 3]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[1, 3]"}}}},{"nodeId":13,"description":{"expressions":["b"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[1, 1]","b":"[2, 2]","c":"[3, 3]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[1, 3]"}}}},{"nodeId":14,"description":{"expressions":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[1, 1]","b":"[2, 2]","c":"[3, 3]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[1, 3]"}}}},{"nodeId":15,"description":{"expressions":["*(res)->2"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[1, 1]","b":"[2, 2]","c":"[3, 3]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[1, 3]"}}}},{"nodeId":16,"description":{"expressions":["res"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[1, 1]","b":"[2, 2]","c":"[3, 3]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[1, 3]"}}}},{"nodeId":17,"description":{"expressions":["2"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[1, 1]","b":"[2, 2]","c":"[3, 3]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[1, 3]"}}}},{"nodeId":18,"description":{"expressions":["c"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[1, 1]","b":"[2, 2]","c":"[3, 3]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[1, 3]"}}}},{"nodeId":19,"description":{"expressions":["ret_value@build"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"ret_value@build":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"ret_value@build":["int32[]*"],"this":["A*"]},"value":{"a":"[-5, 1]","b":"[2, 5]","c":"[3, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":20,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/programContextSensitive4.imp':8:26"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"call_ret_value@'imp-testcases/interprocedural/programContextSensitive4.imp':8:26":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"call_ret_value@'imp-testcases/interprocedural/programContextSensitive4.imp':8:26":["int32[]*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[-5, 1]","b":"[2, 5]","c":"[3, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":21,"description":{"expressions":["this"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[1, 1]","b":"[2, 2]","c":"[3, 3]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[1, 3]"}}}},{"nodeId":22,"description":{"expressions":["res"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[1, 1]","b":"[2, 2]","c":"[3, 3]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[1, 3]"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive5/untyped_A.build(A__this,_untyped_a,_untyped_b,_untyped_c)_1680645868.json b/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive5/untyped_A.build(A__this,_untyped_a,_untyped_b,_untyped_c)_1680645868.json index e41949970..603ec9762 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive5/untyped_A.build(A__this,_untyped_a,_untyped_b,_untyped_c)_1680645868.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive5/untyped_A.build(A__this,_untyped_a,_untyped_b,_untyped_c)_1680645868.json @@ -1 +1 @@ -{"name":"untyped A::build(A* this, untyped a, untyped b, untyped c)","description":"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]","nodes":[{"id":0,"subNodes":[1,2],"text":"res = new int32[](3)"},{"id":1,"text":"res"},{"id":2,"subNodes":[3],"text":"new int32[](3)"},{"id":3,"text":"3"},{"id":4,"subNodes":[5,8],"text":"[](res, 0) = a"},{"id":5,"subNodes":[6,7],"text":"[](res, 0)"},{"id":6,"text":"res"},{"id":7,"text":"0"},{"id":8,"text":"a"},{"id":9,"subNodes":[10,13],"text":"[](res, 1) = b"},{"id":10,"subNodes":[11,12],"text":"[](res, 1)"},{"id":11,"text":"res"},{"id":12,"text":"1"},{"id":13,"text":"b"},{"id":14,"subNodes":[15,18],"text":"[](res, 2) = c"},{"id":15,"subNodes":[16,17],"text":"[](res, 2)"},{"id":16,"text":"res"},{"id":17,"text":"2"},{"id":18,"text":"c"},{"id":19,"subNodes":[20],"text":"return identity(this, res)"},{"id":20,"subNodes":[21,22],"text":"identity(this, res)"},{"id":21,"text":"this"},{"id":22,"text":"res"}],"edges":[{"sourceId":0,"destId":4,"kind":"SequentialEdge"},{"sourceId":4,"destId":9,"kind":"SequentialEdge"},{"sourceId":9,"destId":14,"kind":"SequentialEdge"},{"sourceId":14,"destId":19,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["res"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[-5, -5]","b":"[5, 5]","c":"[6, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":1,"description":{"expressions":["res"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"this":["A*"]},"value":{"a":"[-5, -5]","b":"[5, 5]","c":"[6, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":2,"description":{"expressions":["ref$new int32[]"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"this":["A*"]},"value":{"a":"[-5, -5]","b":"[5, 5]","c":"[6, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":3,"description":{"expressions":["3"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"this":["A*"]},"value":{"a":"[-5, -5]","b":"[5, 5]","c":"[6, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":4,"description":{"expressions":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[-5, -5]","b":"[5, 5]","c":"[6, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":5,"description":{"expressions":["*(res)->0"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[-5, -5]","b":"[5, 5]","c":"[6, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":6,"description":{"expressions":["res"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[-5, -5]","b":"[5, 5]","c":"[6, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":7,"description":{"expressions":["0"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[-5, -5]","b":"[5, 5]","c":"[6, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":8,"description":{"expressions":["a"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[-5, -5]","b":"[5, 5]","c":"[6, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":9,"description":{"expressions":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[-5, -5]","b":"[5, 5]","c":"[6, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":10,"description":{"expressions":["*(res)->1"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[-5, -5]","b":"[5, 5]","c":"[6, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":11,"description":{"expressions":["res"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[-5, -5]","b":"[5, 5]","c":"[6, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":12,"description":{"expressions":["1"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[-5, -5]","b":"[5, 5]","c":"[6, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":13,"description":{"expressions":["b"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[-5, -5]","b":"[5, 5]","c":"[6, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":14,"description":{"expressions":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[-5, -5]","b":"[5, 5]","c":"[6, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":15,"description":{"expressions":["*(res)->2"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[-5, -5]","b":"[5, 5]","c":"[6, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":16,"description":{"expressions":["res"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[-5, -5]","b":"[5, 5]","c":"[6, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":17,"description":{"expressions":["2"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[-5, -5]","b":"[5, 5]","c":"[6, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":18,"description":{"expressions":["c"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[-5, -5]","b":"[5, 5]","c":"[6, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":19,"description":{"expressions":["ret_value@build"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","ret_value@build":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"ret_value@build":["int32[]*"],"this":["A*"]},"value":{"a":"[-5, 1]","b":"[2, 5]","c":"[3, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":20,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/programContextSensitive4.imp':8:26"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","call_ret_value@'imp-testcases/interprocedural/programContextSensitive4.imp':8:26":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"call_ret_value@'imp-testcases/interprocedural/programContextSensitive4.imp':8:26":["int32[]*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[-5, 1]","b":"[2, 5]","c":"[3, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":21,"description":{"expressions":["this"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[-5, -5]","b":"[5, 5]","c":"[6, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":22,"description":{"expressions":["res"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[-5, -5]","b":"[5, 5]","c":"[6, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}}]} \ No newline at end of file +{"name":"untyped A::build(A* this, untyped a, untyped b, untyped c)","description":"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]","nodes":[{"id":0,"subNodes":[1,2],"text":"res = new int32[](3)"},{"id":1,"text":"res"},{"id":2,"subNodes":[3],"text":"new int32[](3)"},{"id":3,"text":"3"},{"id":4,"subNodes":[5,8],"text":"[](res, 0) = a"},{"id":5,"subNodes":[6,7],"text":"[](res, 0)"},{"id":6,"text":"res"},{"id":7,"text":"0"},{"id":8,"text":"a"},{"id":9,"subNodes":[10,13],"text":"[](res, 1) = b"},{"id":10,"subNodes":[11,12],"text":"[](res, 1)"},{"id":11,"text":"res"},{"id":12,"text":"1"},{"id":13,"text":"b"},{"id":14,"subNodes":[15,18],"text":"[](res, 2) = c"},{"id":15,"subNodes":[16,17],"text":"[](res, 2)"},{"id":16,"text":"res"},{"id":17,"text":"2"},{"id":18,"text":"c"},{"id":19,"subNodes":[20],"text":"return identity(this, res)"},{"id":20,"subNodes":[21,22],"text":"identity(this, res)"},{"id":21,"text":"this"},{"id":22,"text":"res"}],"edges":[{"sourceId":0,"destId":4,"kind":"SequentialEdge"},{"sourceId":4,"destId":9,"kind":"SequentialEdge"},{"sourceId":9,"destId":14,"kind":"SequentialEdge"},{"sourceId":14,"destId":19,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["res"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[-5, -5]","b":"[5, 5]","c":"[6, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":1,"description":{"expressions":["res"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"this":["A*"]},"value":{"a":"[-5, -5]","b":"[5, 5]","c":"[6, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":2,"description":{"expressions":["ref$new int32[]"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"this":["A*"]},"value":{"a":"[-5, -5]","b":"[5, 5]","c":"[6, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":3,"description":{"expressions":["3"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"this":["A*"]},"value":{"a":"[-5, -5]","b":"[5, 5]","c":"[6, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":4,"description":{"expressions":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[-5, -5]","b":"[5, 5]","c":"[6, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":5,"description":{"expressions":["*(res)->0"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[-5, -5]","b":"[5, 5]","c":"[6, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":6,"description":{"expressions":["res"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[-5, -5]","b":"[5, 5]","c":"[6, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":7,"description":{"expressions":["0"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[-5, -5]","b":"[5, 5]","c":"[6, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":8,"description":{"expressions":["a"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[-5, -5]","b":"[5, 5]","c":"[6, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":9,"description":{"expressions":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[-5, -5]","b":"[5, 5]","c":"[6, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":10,"description":{"expressions":["*(res)->1"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[-5, -5]","b":"[5, 5]","c":"[6, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":11,"description":{"expressions":["res"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[-5, -5]","b":"[5, 5]","c":"[6, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":12,"description":{"expressions":["1"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[-5, -5]","b":"[5, 5]","c":"[6, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":13,"description":{"expressions":["b"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[-5, -5]","b":"[5, 5]","c":"[6, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":14,"description":{"expressions":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[-5, -5]","b":"[5, 5]","c":"[6, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":15,"description":{"expressions":["*(res)->2"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[-5, -5]","b":"[5, 5]","c":"[6, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":16,"description":{"expressions":["res"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[-5, -5]","b":"[5, 5]","c":"[6, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":17,"description":{"expressions":["2"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[-5, -5]","b":"[5, 5]","c":"[6, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":18,"description":{"expressions":["c"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[-5, -5]","b":"[5, 5]","c":"[6, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":19,"description":{"expressions":["ret_value@build"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"ret_value@build":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"ret_value@build":["int32[]*"],"this":["A*"]},"value":{"a":"[-5, 1]","b":"[2, 5]","c":"[3, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":20,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/programContextSensitive4.imp':8:26"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"call_ret_value@'imp-testcases/interprocedural/programContextSensitive4.imp':8:26":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"call_ret_value@'imp-testcases/interprocedural/programContextSensitive4.imp':8:26":["int32[]*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[-5, 1]","b":"[2, 5]","c":"[3, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":21,"description":{"expressions":["this"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[-5, -5]","b":"[5, 5]","c":"[6, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":22,"description":{"expressions":["res"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"a":["int32"],"b":["int32"],"c":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[-5, -5]","b":"[5, 5]","c":"[6, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive5/untyped_A.identity(A__this,_untyped_x)_1680635948.json b/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive5/untyped_A.identity(A__this,_untyped_x)_1680635948.json index 2443c57c0..efa734289 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive5/untyped_A.identity(A__this,_untyped_x)_1680635948.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive5/untyped_A.identity(A__this,_untyped_x)_1680635948.json @@ -1 +1 @@ -{"name":"untyped A::identity(A* this, untyped x)","description":"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]","nodes":[{"id":0,"subNodes":[1,2],"text":"y = x"},{"id":1,"text":"y"},{"id":2,"text":"x"},{"id":3,"subNodes":[4],"text":"return y"},{"id":4,"text":"y"}],"edges":[{"sourceId":0,"destId":3,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["y"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","x":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","y":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]"},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:a":["int32"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:b":["int32"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:c":["int32"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:res":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:this":["A*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:a":"[-5, 1]","['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:b":"[2, 5]","['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:c":"[3, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":1,"description":{"expressions":["y"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","x":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]"},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:a":["int32"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:b":["int32"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:c":["int32"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:res":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:this":["A*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"this":["A*"],"x":["int32[]*"]},"value":{"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:a":"[-5, 1]","['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:b":"[2, 5]","['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:c":"[3, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":2,"description":{"expressions":["x"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","x":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]"},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:a":["int32"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:b":["int32"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:c":["int32"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:res":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:this":["A*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"this":["A*"],"x":["int32[]*"]},"value":{"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:a":"[-5, 1]","['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:b":"[2, 5]","['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:c":"[3, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":3,"description":{"expressions":["ret_value@identity"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","ret_value@identity":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","x":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","y":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]"},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:a":["int32"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:b":["int32"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:c":["int32"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:res":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:this":["A*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"ret_value@identity":["int32[]*"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:a":"[-5, 1]","['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:b":"[2, 5]","['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:c":"[3, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":4,"description":{"expressions":["y"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]","x":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","y":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]"},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:a":["int32"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:b":["int32"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:c":["int32"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:res":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:this":["A*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:a":"[-5, 1]","['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:b":"[2, 5]","['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:c":"[3, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}}]} \ No newline at end of file +{"name":"untyped A::identity(A* this, untyped x)","description":"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]","nodes":[{"id":0,"subNodes":[1,2],"text":"y = x"},{"id":1,"text":"y"},{"id":2,"text":"x"},{"id":3,"subNodes":[4],"text":"return y"},{"id":4,"text":"y"}],"edges":[{"sourceId":0,"destId":3,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["y"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"x":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"y":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"]},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:a":["int32"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:b":["int32"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:c":["int32"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:res":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:this":["A*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:a":"[-5, 1]","['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:b":"[2, 5]","['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:c":"[3, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":1,"description":{"expressions":["y"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"x":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"]},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:a":["int32"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:b":["int32"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:c":["int32"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:res":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:this":["A*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"this":["A*"],"x":["int32[]*"]},"value":{"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:a":"[-5, 1]","['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:b":"[2, 5]","['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:c":"[3, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":2,"description":{"expressions":["x"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"x":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"]},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:a":["int32"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:b":["int32"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:c":["int32"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:res":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:this":["A*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"this":["A*"],"x":["int32[]*"]},"value":{"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:a":"[-5, 1]","['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:b":"[2, 5]","['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:c":"[3, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":3,"description":{"expressions":["ret_value@identity"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"ret_value@identity":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"x":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"y":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"]},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:a":["int32"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:b":["int32"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:c":["int32"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:res":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:this":["A*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"ret_value@identity":["int32[]*"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:a":"[-5, 1]","['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:b":"[2, 5]","['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:c":"[3, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":4,"description":{"expressions":["y"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"],"x":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"y":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"]},"type":{"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':17:35]:this":["A*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:arr1":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:['imp-testcases/interprocedural/programContextSensitive4.imp':18:36]:this":["A*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:a":["int32"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:b":["int32"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:c":["int32"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:res":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:this":["A*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"this":["A*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:a":"[-5, 1]","['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:b":"[2, 5]","['imp-testcases/interprocedural/programContextSensitive4.imp':8:26]:c":"[3, 6]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive5/untyped_A.main(A__this).json b/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive5/untyped_A.main(A__this).json index ac6101c38..c739cf6f2 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive5/untyped_A.main(A__this).json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive5/untyped_A.main(A__this).json @@ -1 +1 @@ -{"name":"untyped A::main(A* this)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"arr1 = build(this, 1, 2, 3)"},{"id":1,"text":"arr1"},{"id":2,"subNodes":[3,4,5,6],"text":"build(this, 1, 2, 3)"},{"id":3,"text":"this"},{"id":4,"text":"1"},{"id":5,"text":"2"},{"id":6,"text":"3"},{"id":7,"subNodes":[8,9],"text":"arr2 = build(this, -5, 5, 6)"},{"id":8,"text":"arr2"},{"id":9,"subNodes":[10,11,12,13],"text":"build(this, -5, 5, 6)"},{"id":10,"text":"this"},{"id":11,"text":"-5"},{"id":12,"text":"5"},{"id":13,"text":"6"},{"id":14,"text":"ret"}],"edges":[{"sourceId":0,"destId":7,"kind":"SequentialEdge"},{"sourceId":7,"destId":14,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["arr1"],"state":{"heap":{"arr1":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"arr1":["int32[]*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":1,"description":{"expressions":["arr1"],"state":{"heap":{"call_ret_value@'imp-testcases/interprocedural/programContextSensitive4.imp':17:35":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"call_ret_value@'imp-testcases/interprocedural/programContextSensitive4.imp':17:35":["int32[]*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":2,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/programContextSensitive4.imp':17:35"],"state":{"heap":{"call_ret_value@'imp-testcases/interprocedural/programContextSensitive4.imp':17:35":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"call_ret_value@'imp-testcases/interprocedural/programContextSensitive4.imp':17:35":["int32[]*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":3,"description":{"expressions":["this"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":4,"description":{"expressions":["1"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":5,"description":{"expressions":["2"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":6,"description":{"expressions":["3"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":7,"description":{"expressions":["arr2"],"state":{"heap":{"arr1":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","arr2":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"arr1":["int32[]*"],"arr2":["int32[]*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":8,"description":{"expressions":["arr2"],"state":{"heap":{"arr1":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","call_ret_value@'imp-testcases/interprocedural/programContextSensitive4.imp':18:36":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"arr1":["int32[]*"],"call_ret_value@'imp-testcases/interprocedural/programContextSensitive4.imp':18:36":["int32[]*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":9,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/programContextSensitive4.imp':18:36"],"state":{"heap":{"arr1":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","call_ret_value@'imp-testcases/interprocedural/programContextSensitive4.imp':18:36":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"arr1":["int32[]*"],"call_ret_value@'imp-testcases/interprocedural/programContextSensitive4.imp':18:36":["int32[]*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":10,"description":{"expressions":["this"],"state":{"heap":{"arr1":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"arr1":["int32[]*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":11,"description":{"expressions":["-5"],"state":{"heap":{"arr1":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"arr1":["int32[]*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":12,"description":{"expressions":["5"],"state":{"heap":{"arr1":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"arr1":["int32[]*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":13,"description":{"expressions":["6"],"state":{"heap":{"arr1":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"arr1":["int32[]*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":14,"description":{"expressions":["skip"],"state":{"heap":{"arr1":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","arr2":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9]"},"type":{"arr1":["int32[]*"],"arr2":["int32[]*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}}]} \ No newline at end of file +{"name":"untyped A::main(A* this)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"arr1 = build(this, 1, 2, 3)"},{"id":1,"text":"arr1"},{"id":2,"subNodes":[3,4,5,6],"text":"build(this, 1, 2, 3)"},{"id":3,"text":"this"},{"id":4,"text":"1"},{"id":5,"text":"2"},{"id":6,"text":"3"},{"id":7,"subNodes":[8,9],"text":"arr2 = build(this, -5, 5, 6)"},{"id":8,"text":"arr2"},{"id":9,"subNodes":[10,11,12,13],"text":"build(this, -5, 5, 6)"},{"id":10,"text":"this"},{"id":11,"text":"-5"},{"id":12,"text":"5"},{"id":13,"text":"6"},{"id":14,"text":"ret"}],"edges":[{"sourceId":0,"destId":7,"kind":"SequentialEdge"},{"sourceId":7,"destId":14,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["arr1"],"state":{"heap":{"arr1":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"arr1":["int32[]*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":1,"description":{"expressions":["arr1"],"state":{"heap":{"call_ret_value@'imp-testcases/interprocedural/programContextSensitive4.imp':17:35":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"call_ret_value@'imp-testcases/interprocedural/programContextSensitive4.imp':17:35":["int32[]*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":2,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/programContextSensitive4.imp':17:35"],"state":{"heap":{"call_ret_value@'imp-testcases/interprocedural/programContextSensitive4.imp':17:35":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"call_ret_value@'imp-testcases/interprocedural/programContextSensitive4.imp':17:35":["int32[]*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":3,"description":{"expressions":["this"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":4,"description":{"expressions":["1"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":5,"description":{"expressions":["2"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":6,"description":{"expressions":["3"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":7,"description":{"expressions":["arr2"],"state":{"heap":{"arr1":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"arr2":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"arr1":["int32[]*"],"arr2":["int32[]*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":8,"description":{"expressions":["arr2"],"state":{"heap":{"arr1":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"call_ret_value@'imp-testcases/interprocedural/programContextSensitive4.imp':18:36":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"arr1":["int32[]*"],"call_ret_value@'imp-testcases/interprocedural/programContextSensitive4.imp':18:36":["int32[]*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":9,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/programContextSensitive4.imp':18:36"],"state":{"heap":{"arr1":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"call_ret_value@'imp-testcases/interprocedural/programContextSensitive4.imp':18:36":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"arr1":["int32[]*"],"call_ret_value@'imp-testcases/interprocedural/programContextSensitive4.imp':18:36":["int32[]*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":10,"description":{"expressions":["this"],"state":{"heap":{"arr1":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"arr1":["int32[]*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":11,"description":{"expressions":["-5"],"state":{"heap":{"arr1":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"arr1":["int32[]*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":12,"description":{"expressions":["5"],"state":{"heap":{"arr1":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"arr1":["int32[]*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":13,"description":{"expressions":["6"],"state":{"heap":{"arr1":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"arr1":["int32[]*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}},{"nodeId":14,"description":{"expressions":["skip"],"state":{"heap":{"arr1":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"arr2":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive4.imp':16:9"]},"type":{"arr1":["int32[]*"],"arr2":["int32[]*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":["int32","int32[]"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive4.imp':4:21":"[-5, 6]"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive6/report.json b/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive6/report.json index 5ef1a7d3d..eaa46fdde 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive6/report.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive6/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_A.build(A__this,_untyped_a)_1681564491.json", "untyped_A.main(A__this).json", "untyped_A.plusOne(A__this,_untyped_x)_1681558446.json" ], "info" : { "cfgs" : "3", - "duration" : "51ms", - "end" : "2023-04-20T12:45:25.649+02:00", + "duration" : "25ms", + "end" : "2023-09-13T14:09:13.167+02:00", "expressions" : "23", "files" : "3", "globals" : "0", "members" : "3", "programs" : "1", - "start" : "2023-04-20T12:45:25.598+02:00", + "start" : "2023-09-13T14:09:13.142+02:00", "statements" : "7", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/interprocedural/RTAContextSensitive6" } diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive6/untyped_A.build(A__this,_untyped_a)_1681564491.json b/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive6/untyped_A.build(A__this,_untyped_a)_1681564491.json index 9cdfaafa5..90b11cd1f 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive6/untyped_A.build(A__this,_untyped_a)_1681564491.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive6/untyped_A.build(A__this,_untyped_a)_1681564491.json @@ -1 +1 @@ -{"name":"untyped A::build(A* this, untyped a)","description":"['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]","nodes":[{"id":0,"subNodes":[1,2],"text":"res = new int32[](1)"},{"id":1,"text":"res"},{"id":2,"subNodes":[3],"text":"new int32[](1)"},{"id":3,"text":"1"},{"id":4,"subNodes":[5,8],"text":"[](res, 0) = a"},{"id":5,"subNodes":[6,7],"text":"[](res, 0)"},{"id":6,"text":"res"},{"id":7,"text":"0"},{"id":8,"text":"a"},{"id":9,"subNodes":[10],"text":"return plusOne(this, res)"},{"id":10,"subNodes":[11,12],"text":"plusOne(this, res)"},{"id":11,"text":"this"},{"id":12,"text":"res"}],"edges":[{"sourceId":0,"destId":4,"kind":"SequentialEdge"},{"sourceId":4,"destId":9,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["res"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]","res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["A*"],"a":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":["int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[1, 1]"}}}},{"nodeId":1,"description":{"expressions":["res"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["A*"],"a":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":["int32[]"],"this":["A*"]},"value":{"a":"[1, 1]"}}}},{"nodeId":2,"description":{"expressions":["ref$new int32[]"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["A*"],"a":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":["int32[]"],"this":["A*"]},"value":{"a":"[1, 1]"}}}},{"nodeId":3,"description":{"expressions":["1"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["A*"],"a":["int32"],"this":["A*"]},"value":{"a":"[1, 1]"}}}},{"nodeId":4,"description":{"expressions":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]","res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["A*"],"a":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[1, 1]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":"[1, 1]"}}}},{"nodeId":5,"description":{"expressions":["*(res)->0"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]","res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["A*"],"a":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":["int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[1, 1]"}}}},{"nodeId":6,"description":{"expressions":["res"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]","res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["A*"],"a":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":["int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[1, 1]"}}}},{"nodeId":7,"description":{"expressions":["0"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]","res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["A*"],"a":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":["int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[1, 1]"}}}},{"nodeId":8,"description":{"expressions":["a"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]","res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["A*"],"a":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":["int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[1, 1]"}}}},{"nodeId":9,"description":{"expressions":["ret_value@build"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]","res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21]","ret_value@build":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["A*"],"a":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"ret_value@build":["int32[]*"],"this":["A*"]},"value":{"a":"[1, 1]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":"[1, 2]"}}}},{"nodeId":10,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/programContextSensitive5.imp':6:25"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]","call_ret_value@'imp-testcases/interprocedural/programContextSensitive5.imp':6:25":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21]","res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["A*"],"a":["int32"],"call_ret_value@'imp-testcases/interprocedural/programContextSensitive5.imp':6:25":["int32[]*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[1, 1]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":"[1, 2]"}}}},{"nodeId":11,"description":{"expressions":["this"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]","res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["A*"],"a":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[1, 1]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":"[1, 1]"}}}},{"nodeId":12,"description":{"expressions":["res"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]","res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]"},"type":{"['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["A*"],"a":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[1, 1]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":"[1, 1]"}}}}]} \ No newline at end of file +{"name":"untyped A::build(A* this, untyped a)","description":"['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]","nodes":[{"id":0,"subNodes":[1,2],"text":"res = new int32[](1)"},{"id":1,"text":"res"},{"id":2,"subNodes":[3],"text":"new int32[](1)"},{"id":3,"text":"1"},{"id":4,"subNodes":[5,8],"text":"[](res, 0) = a"},{"id":5,"subNodes":[6,7],"text":"[](res, 0)"},{"id":6,"text":"res"},{"id":7,"text":"0"},{"id":8,"text":"a"},{"id":9,"subNodes":[10],"text":"return plusOne(this, res)"},{"id":10,"subNodes":[11,12],"text":"plusOne(this, res)"},{"id":11,"text":"this"},{"id":12,"text":"res"}],"edges":[{"sourceId":0,"destId":4,"kind":"SequentialEdge"},{"sourceId":4,"destId":9,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["res"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"],"res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["A*"],"a":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[1, 1]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":"[1, 1]"}}}},{"nodeId":1,"description":{"expressions":["res"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["A*"],"a":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":["int32","int32[]"],"this":["A*"]},"value":{"a":"[1, 1]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":"[1, 1]"}}}},{"nodeId":2,"description":{"expressions":["ref$new int32[]"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["A*"],"a":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":["int32","int32[]"],"this":["A*"]},"value":{"a":"[1, 1]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":"[1, 1]"}}}},{"nodeId":3,"description":{"expressions":["1"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["A*"],"a":["int32"],"this":["A*"]},"value":{"a":"[1, 1]"}}}},{"nodeId":4,"description":{"expressions":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"],"res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["A*"],"a":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[1, 1]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":"[1, 1]"}}}},{"nodeId":5,"description":{"expressions":["*(res)->0"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"],"res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["A*"],"a":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[1, 1]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":"[1, 1]"}}}},{"nodeId":6,"description":{"expressions":["res"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"],"res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["A*"],"a":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[1, 1]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":"[1, 1]"}}}},{"nodeId":7,"description":{"expressions":["0"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"],"res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["A*"],"a":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[1, 1]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":"[1, 1]"}}}},{"nodeId":8,"description":{"expressions":["a"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"],"res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["A*"],"a":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[1, 1]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":"[1, 1]"}}}},{"nodeId":9,"description":{"expressions":["ret_value@build"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"],"res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21"],"ret_value@build":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["A*"],"a":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"ret_value@build":["int32[]*"],"this":["A*"]},"value":{"a":"[1, 1]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":"[1, 2]"}}}},{"nodeId":10,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/programContextSensitive5.imp':6:25"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"],"call_ret_value@'imp-testcases/interprocedural/programContextSensitive5.imp':6:25":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21"],"res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["A*"],"a":["int32"],"call_ret_value@'imp-testcases/interprocedural/programContextSensitive5.imp':6:25":["int32[]*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[1, 1]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":"[1, 2]"}}}},{"nodeId":11,"description":{"expressions":["this"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"],"res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["A*"],"a":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[1, 1]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":"[1, 1]"}}}},{"nodeId":12,"description":{"expressions":["res"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"],"res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"]},"type":{"['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["A*"],"a":["int32"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":["int32","int32[]"],"res":["int32[]*"],"this":["A*"]},"value":{"a":"[1, 1]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":"[1, 1]"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive6/untyped_A.main(A__this).json b/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive6/untyped_A.main(A__this).json index 5a02d26b2..e0071b259 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive6/untyped_A.main(A__this).json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive6/untyped_A.main(A__this).json @@ -1 +1 @@ -{"name":"untyped A::main(A* this)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"arr1 = build(this, 1)"},{"id":1,"text":"arr1"},{"id":2,"subNodes":[3,4],"text":"build(this, 1)"},{"id":3,"text":"this"},{"id":4,"text":"1"},{"id":5,"text":"ret"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["arr1"],"state":{"heap":{"arr1":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]"},"type":{"arr1":["int32[]*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":["int32","int32[]"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":"[1, 2]"}}}},{"nodeId":1,"description":{"expressions":["arr1"],"state":{"heap":{"call_ret_value@'imp-testcases/interprocedural/programContextSensitive5.imp':15:31":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]"},"type":{"call_ret_value@'imp-testcases/interprocedural/programContextSensitive5.imp':15:31":["int32[]*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":["int32","int32[]"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":"[1, 2]"}}}},{"nodeId":2,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/programContextSensitive5.imp':15:31"],"state":{"heap":{"call_ret_value@'imp-testcases/interprocedural/programContextSensitive5.imp':15:31":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]"},"type":{"call_ret_value@'imp-testcases/interprocedural/programContextSensitive5.imp':15:31":["int32[]*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":["int32","int32[]"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":"[1, 2]"}}}},{"nodeId":3,"description":{"expressions":["this"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]"},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":4,"description":{"expressions":["1"],"state":{"heap":{"this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]"},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":5,"description":{"expressions":["skip"],"state":{"heap":{"arr1":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]"},"type":{"arr1":["int32[]*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":["int32","int32[]"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":"[1, 2]"}}}}]} \ No newline at end of file +{"name":"untyped A::main(A* this)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"arr1 = build(this, 1)"},{"id":1,"text":"arr1"},{"id":2,"subNodes":[3,4],"text":"build(this, 1)"},{"id":3,"text":"this"},{"id":4,"text":"1"},{"id":5,"text":"ret"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["arr1"],"state":{"heap":{"arr1":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"]},"type":{"arr1":["int32[]*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":["int32","int32[]"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":"[1, 2]"}}}},{"nodeId":1,"description":{"expressions":["arr1"],"state":{"heap":{"call_ret_value@'imp-testcases/interprocedural/programContextSensitive5.imp':15:31":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"]},"type":{"call_ret_value@'imp-testcases/interprocedural/programContextSensitive5.imp':15:31":["int32[]*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":["int32","int32[]"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":"[1, 2]"}}}},{"nodeId":2,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/programContextSensitive5.imp':15:31"],"state":{"heap":{"call_ret_value@'imp-testcases/interprocedural/programContextSensitive5.imp':15:31":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"]},"type":{"call_ret_value@'imp-testcases/interprocedural/programContextSensitive5.imp':15:31":["int32[]*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":["int32","int32[]"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":"[1, 2]"}}}},{"nodeId":3,"description":{"expressions":["this"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"]},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":4,"description":{"expressions":["1"],"state":{"heap":{"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"]},"type":{"this":["A*"]},"value":"#TOP#"}}},{"nodeId":5,"description":{"expressions":["skip"],"state":{"heap":{"arr1":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"]},"type":{"arr1":["int32[]*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":["int32","int32[]"],"this":["A*"]},"value":{"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":"[1, 2]"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive6/untyped_A.plusOne(A__this,_untyped_x)_1681558446.json b/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive6/untyped_A.plusOne(A__this,_untyped_x)_1681558446.json index 78056206f..e3dbd04cd 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive6/untyped_A.plusOne(A__this,_untyped_x)_1681558446.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/RTAContextSensitive6/untyped_A.plusOne(A__this,_untyped_x)_1681558446.json @@ -1 +1 @@ -{"name":"untyped A::plusOne(A* this, untyped x)","description":"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]","nodes":[{"id":0,"subNodes":[1,4],"text":"[](x, 0) = +([](x, 0), 1)"},{"id":1,"subNodes":[2,3],"text":"[](x, 0)"},{"id":2,"text":"x"},{"id":3,"text":"0"},{"id":4,"subNodes":[5,8],"text":"+([](x, 0), 1)"},{"id":5,"subNodes":[6,7],"text":"[](x, 0)"},{"id":6,"text":"x"},{"id":7,"text":"0"},{"id":8,"text":"1"},{"id":9,"subNodes":[10],"text":"return x"},{"id":10,"text":"x"}],"edges":[{"sourceId":0,"destId":9,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]","['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21]","['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]","x":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21]"},"type":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["A*"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:a":["int32"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:res":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:this":["A*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":["int32","int32[]"],"this":["A*"],"x":["int32[]*"]},"value":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:a":"[1, 1]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":"[1, 2]"}}}},{"nodeId":1,"description":{"expressions":["*(x)->0"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]","['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21]","['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]","x":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21]"},"type":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["A*"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:a":["int32"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:res":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:this":["A*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":["int32","int32[]"],"this":["A*"],"x":["int32[]*"]},"value":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:a":"[1, 1]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":"[1, 1]"}}}},{"nodeId":2,"description":{"expressions":["x"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]","['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21]","['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]","x":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21]"},"type":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["A*"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:a":["int32"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:res":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:this":["A*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":["int32","int32[]"],"this":["A*"],"x":["int32[]*"]},"value":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:a":"[1, 1]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":"[1, 1]"}}}},{"nodeId":3,"description":{"expressions":["0"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]","['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21]","['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]","x":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21]"},"type":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["A*"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:a":["int32"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:res":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:this":["A*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":["int32","int32[]"],"this":["A*"],"x":["int32[]*"]},"value":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:a":"[1, 1]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":"[1, 1]"}}}},{"nodeId":4,"description":{"expressions":["*(x)->0 + 1"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]","['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21]","['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]","x":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21]"},"type":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["A*"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:a":["int32"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:res":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:this":["A*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":["int32","int32[]"],"this":["A*"],"x":["int32[]*"]},"value":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:a":"[1, 1]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":"[1, 1]"}}}},{"nodeId":5,"description":{"expressions":["*(x)->0"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]","['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21]","['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]","x":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21]"},"type":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["A*"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:a":["int32"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:res":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:this":["A*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":["int32","int32[]"],"this":["A*"],"x":["int32[]*"]},"value":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:a":"[1, 1]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":"[1, 1]"}}}},{"nodeId":6,"description":{"expressions":["x"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]","['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21]","['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]","x":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21]"},"type":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["A*"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:a":["int32"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:res":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:this":["A*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":["int32","int32[]"],"this":["A*"],"x":["int32[]*"]},"value":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:a":"[1, 1]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":"[1, 1]"}}}},{"nodeId":7,"description":{"expressions":["0"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]","['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21]","['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]","x":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21]"},"type":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["A*"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:a":["int32"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:res":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:this":["A*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":["int32","int32[]"],"this":["A*"],"x":["int32[]*"]},"value":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:a":"[1, 1]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":"[1, 1]"}}}},{"nodeId":8,"description":{"expressions":["1"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]","['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21]","['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]","x":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21]"},"type":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["A*"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:a":["int32"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:res":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:this":["A*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":["int32","int32[]"],"this":["A*"],"x":["int32[]*"]},"value":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:a":"[1, 1]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":"[1, 1]"}}}},{"nodeId":9,"description":{"expressions":["ret_value@plusOne"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]","['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21]","['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]","ret_value@plusOne":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]","x":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21]"},"type":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["A*"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:a":["int32"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:res":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:this":["A*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":["int32","int32[]"],"ret_value@plusOne":["int32[]*"],"this":["A*"],"x":["int32[]*"]},"value":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:a":"[1, 1]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":"[1, 2]"}}}},{"nodeId":10,"description":{"expressions":["x"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]","['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:res":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21]","['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]","this":"[heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9]","x":"[heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21]"},"type":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["A*"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:a":["int32"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:res":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:this":["A*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":["int32","int32[]"],"this":["A*"],"x":["int32[]*"]},"value":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:a":"[1, 1]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":"[1, 2]"}}}}]} \ No newline at end of file +{"name":"untyped A::plusOne(A* this, untyped x)","description":"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]","nodes":[{"id":0,"subNodes":[1,4],"text":"[](x, 0) = +([](x, 0), 1)"},{"id":1,"subNodes":[2,3],"text":"[](x, 0)"},{"id":2,"text":"x"},{"id":3,"text":"0"},{"id":4,"subNodes":[5,8],"text":"+([](x, 0), 1)"},{"id":5,"subNodes":[6,7],"text":"[](x, 0)"},{"id":6,"text":"x"},{"id":7,"text":"0"},{"id":8,"text":"1"},{"id":9,"subNodes":[10],"text":"return x"},{"id":10,"text":"x"}],"edges":[{"sourceId":0,"destId":9,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"],"x":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21"]},"type":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["A*"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:a":["int32"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:res":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:this":["A*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":["int32","int32[]"],"this":["A*"],"x":["int32[]*"]},"value":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:a":"[1, 1]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":"[1, 2]"}}}},{"nodeId":1,"description":{"expressions":["*(x)->0"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"],"x":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21"]},"type":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["A*"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:a":["int32"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:res":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:this":["A*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":["int32","int32[]"],"this":["A*"],"x":["int32[]*"]},"value":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:a":"[1, 1]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":"[1, 1]"}}}},{"nodeId":2,"description":{"expressions":["x"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"],"x":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21"]},"type":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["A*"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:a":["int32"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:res":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:this":["A*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":["int32","int32[]"],"this":["A*"],"x":["int32[]*"]},"value":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:a":"[1, 1]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":"[1, 1]"}}}},{"nodeId":3,"description":{"expressions":["0"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"],"x":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21"]},"type":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["A*"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:a":["int32"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:res":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:this":["A*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":["int32","int32[]"],"this":["A*"],"x":["int32[]*"]},"value":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:a":"[1, 1]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":"[1, 1]"}}}},{"nodeId":4,"description":{"expressions":["*(x)->0 + 1"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"],"x":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21"]},"type":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["A*"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:a":["int32"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:res":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:this":["A*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":["int32","int32[]"],"this":["A*"],"x":["int32[]*"]},"value":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:a":"[1, 1]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":"[1, 1]"}}}},{"nodeId":5,"description":{"expressions":["*(x)->0"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"],"x":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21"]},"type":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["A*"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:a":["int32"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:res":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:this":["A*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":["int32","int32[]"],"this":["A*"],"x":["int32[]*"]},"value":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:a":"[1, 1]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":"[1, 1]"}}}},{"nodeId":6,"description":{"expressions":["x"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"],"x":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21"]},"type":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["A*"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:a":["int32"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:res":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:this":["A*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":["int32","int32[]"],"this":["A*"],"x":["int32[]*"]},"value":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:a":"[1, 1]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":"[1, 1]"}}}},{"nodeId":7,"description":{"expressions":["0"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"],"x":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21"]},"type":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["A*"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:a":["int32"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:res":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:this":["A*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":["int32","int32[]"],"this":["A*"],"x":["int32[]*"]},"value":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:a":"[1, 1]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":"[1, 1]"}}}},{"nodeId":8,"description":{"expressions":["1"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"],"x":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21"]},"type":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["A*"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:a":["int32"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:res":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:this":["A*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":["int32","int32[]"],"this":["A*"],"x":["int32[]*"]},"value":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:a":"[1, 1]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":"[1, 1]"}}}},{"nodeId":9,"description":{"expressions":["ret_value@plusOne"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"],"ret_value@plusOne":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"],"x":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21"]},"type":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["A*"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:a":["int32"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:res":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:this":["A*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":["int32","int32[]"],"ret_value@plusOne":["int32[]*"],"this":["A*"],"x":["int32[]*"]},"value":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:a":"[1, 1]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":"[1, 2]"}}}},{"nodeId":10,"description":{"expressions":["x"],"state":{"heap":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:res":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"],"this":["heap[s]:pp@unknown@'imp-testcases/interprocedural/programContextSensitive5.imp':14:9"],"x":["heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21"]},"type":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:['imp-testcases/interprocedural/programContextSensitive5.imp':15:31]:this":["A*"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:a":["int32"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:res":["int32[]*"],"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:this":["A*"],"heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":["int32","int32[]"],"this":["A*"],"x":["int32[]*"]},"value":{"['imp-testcases/interprocedural/programContextSensitive5.imp':6:25]:a":"[1, 1]","heap[w]:pp@'imp-testcases/interprocedural/programContextSensitive5.imp':4:21":"[1, 2]"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/factorial/full/report.json b/lisa/lisa-analyses/imp-testcases/interprocedural/factorial/full/report.json index 20e1710ba..1c0571223 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/factorial/full/report.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/factorial/full/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_factorial.factorial(factorial__this,_untyped_n)_-1504338471.json", "untyped_factorial.main(factorial__this,_untyped_a).json" ], "info" : { "cfgs" : "2", - "duration" : "59ms", - "end" : "2023-04-20T12:45:26.199+02:00", + "duration" : "39ms", + "end" : "2023-09-07T11:45:45.772+02:00", "expressions" : "16", "files" : "2", "globals" : "0", "members" : "2", "programs" : "1", - "start" : "2023-04-20T12:45:26.140+02:00", + "start" : "2023-09-07T11:45:45.733+02:00", "statements" : "6", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/interprocedural/factorial/full" } diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/factorial/insensitive/report.json b/lisa/lisa-analyses/imp-testcases/interprocedural/factorial/insensitive/report.json index 8abecb948..f74bae046 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/factorial/insensitive/report.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/factorial/insensitive/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_factorial.factorial(factorial__this,_untyped_n).json", "untyped_factorial.main(factorial__this,_untyped_a).json" ], "info" : { "cfgs" : "2", - "duration" : "46ms", - "end" : "2023-04-20T12:45:26.379+02:00", + "duration" : "17ms", + "end" : "2023-09-07T11:45:45.876+02:00", "expressions" : "16", "files" : "2", "globals" : "0", "members" : "2", "programs" : "1", - "start" : "2023-04-20T12:45:26.333+02:00", + "start" : "2023-09-07T11:45:45.859+02:00", "statements" : "6", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/interprocedural/factorial/insensitive" } diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/factorial/kdepth/report.json b/lisa/lisa-analyses/imp-testcases/interprocedural/factorial/kdepth/report.json index 63041894c..4e05381b0 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/factorial/kdepth/report.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/factorial/kdepth/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_factorial.factorial(factorial__this,_untyped_n)_-1504338471.json", "untyped_factorial.main(factorial__this,_untyped_a).json" ], "info" : { "cfgs" : "2", - "duration" : "103ms", - "end" : "2023-04-20T12:45:27.649+02:00", + "duration" : "32ms", + "end" : "2023-09-07T11:45:46.649+02:00", "expressions" : "16", "files" : "2", "globals" : "0", "members" : "2", "programs" : "1", - "start" : "2023-04-20T12:45:27.546+02:00", + "start" : "2023-09-07T11:45:46.617+02:00", "statements" : "6", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/interprocedural/factorial/kdepth" } diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/factorial/last/report.json b/lisa/lisa-analyses/imp-testcases/interprocedural/factorial/last/report.json index 4ac93cfef..30378cf92 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/factorial/last/report.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/factorial/last/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_factorial.factorial(factorial__this,_untyped_n)_-1504338471.json", "untyped_factorial.main(factorial__this,_untyped_a).json" ], "info" : { "cfgs" : "2", - "duration" : "35ms", - "end" : "2023-04-20T12:45:27.839+02:00", + "duration" : "36ms", + "end" : "2023-09-07T11:45:46.784+02:00", "expressions" : "16", "files" : "2", "globals" : "0", "members" : "2", "programs" : "1", - "start" : "2023-04-20T12:45:27.804+02:00", + "start" : "2023-09-07T11:45:46.748+02:00", "statements" : "6", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/interprocedural/factorial/last" } diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/factorialInterleaved/full/report.json b/lisa/lisa-analyses/imp-testcases/interprocedural/factorialInterleaved/full/report.json index 9bb793b8a..39114b42a 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/factorialInterleaved/full/report.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/factorialInterleaved/full/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_factorialInterleaved.factorial(factorialInterleaved__this,_untyped_n)_94492061.json", "untyped_factorialInterleaved.interleaved(factorialInterleaved__this,_untyped_x)_-1271226490.json", "untyped_factorialInterleaved.main(factorialInterleaved__this,_untyped_a).json" ], "info" : { "cfgs" : "3", - "duration" : "69ms", - "end" : "2023-04-20T12:45:26.590+02:00", + "duration" : "26ms", + "end" : "2023-09-07T11:45:45.994+02:00", "expressions" : "21", "files" : "3", "globals" : "0", "members" : "3", "programs" : "1", - "start" : "2023-04-20T12:45:26.521+02:00", + "start" : "2023-09-07T11:45:45.968+02:00", "statements" : "8", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/interprocedural/factorialInterleaved/full" } diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/factorialInterleaved/insensitive/report.json b/lisa/lisa-analyses/imp-testcases/interprocedural/factorialInterleaved/insensitive/report.json index 35ef70bfc..bffb3dc41 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/factorialInterleaved/insensitive/report.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/factorialInterleaved/insensitive/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_factorialInterleaved.factorial(factorialInterleaved__this,_untyped_n).json", "untyped_factorialInterleaved.interleaved(factorialInterleaved__this,_untyped_x).json", "untyped_factorialInterleaved.main(factorialInterleaved__this,_untyped_a).json" ], "info" : { "cfgs" : "3", - "duration" : "51ms", - "end" : "2023-04-20T12:45:26.791+02:00", + "duration" : "28ms", + "end" : "2023-09-07T11:45:46.109+02:00", "expressions" : "21", "files" : "3", "globals" : "0", "members" : "3", "programs" : "1", - "start" : "2023-04-20T12:45:26.740+02:00", + "start" : "2023-09-07T11:45:46.081+02:00", "statements" : "8", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/interprocedural/factorialInterleaved/insensitive" } diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/factorialInterleaved/kdepth/report.json b/lisa/lisa-analyses/imp-testcases/interprocedural/factorialInterleaved/kdepth/report.json index a72f9c20f..015bcf81f 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/factorialInterleaved/kdepth/report.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/factorialInterleaved/kdepth/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_factorialInterleaved.factorial(factorialInterleaved__this,_untyped_n)_94492061.json", "untyped_factorialInterleaved.interleaved(factorialInterleaved__this,_untyped_x)_-1271226490.json", "untyped_factorialInterleaved.main(factorialInterleaved__this,_untyped_a).json" ], "info" : { "cfgs" : "3", - "duration" : "78ms", - "end" : "2023-04-20T12:45:27.037+02:00", + "duration" : "69ms", + "end" : "2023-09-07T11:45:46.265+02:00", "expressions" : "21", "files" : "3", "globals" : "0", "members" : "3", "programs" : "1", - "start" : "2023-04-20T12:45:26.959+02:00", + "start" : "2023-09-07T11:45:46.196+02:00", "statements" : "8", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/interprocedural/factorialInterleaved/kdepth" } diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/factorialInterleaved/last/report.json b/lisa/lisa-analyses/imp-testcases/interprocedural/factorialInterleaved/last/report.json index faf21a0f0..281f1fac5 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/factorialInterleaved/last/report.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/factorialInterleaved/last/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_factorialInterleaved.factorial(factorialInterleaved__this,_untyped_n)_94492061.json", "untyped_factorialInterleaved.interleaved(factorialInterleaved__this,_untyped_x)_94486946.json", "untyped_factorialInterleaved.main(factorialInterleaved__this,_untyped_a).json" ], "info" : { "cfgs" : "3", - "duration" : "54ms", - "end" : "2023-04-20T12:45:27.311+02:00", + "duration" : "68ms", + "end" : "2023-09-07T11:45:46.480+02:00", "expressions" : "21", "files" : "3", "globals" : "0", "members" : "3", "programs" : "1", - "start" : "2023-04-20T12:45:27.257+02:00", + "start" : "2023-09-07T11:45:46.412+02:00", "statements" : "8", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/interprocedural/factorialInterleaved/last" } diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/factorialLoop/full/report.json b/lisa/lisa-analyses/imp-testcases/interprocedural/factorialLoop/full/report.json index 0b4b8de3d..211b23a89 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/factorialLoop/full/report.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/factorialLoop/full/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_factorialLoop.factorialLoop(factorialLoop__this,_untyped_n)_-1303134381.json", "untyped_factorialLoop.factorialLoopAux1(factorialLoop__this,_untyped_n)_1249376116.json", "untyped_factorialLoop.factorialLoopAux2(factorialLoop__this,_untyped_n)_-1227177876.json", "untyped_factorialLoop.main(factorialLoop__this,_untyped_a).json" ], "info" : { "cfgs" : "4", - "duration" : "82ms", - "end" : "2023-04-20T12:45:28.040+02:00", + "duration" : "116ms", + "end" : "2023-09-07T11:45:47.094+02:00", "expressions" : "40", "files" : "4", "globals" : "0", "members" : "4", "programs" : "1", - "start" : "2023-04-20T12:45:27.958+02:00", + "start" : "2023-09-07T11:45:46.978+02:00", "statements" : "14", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/interprocedural/factorialLoop/full" } diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/factorialLoop/insensitive/report.json b/lisa/lisa-analyses/imp-testcases/interprocedural/factorialLoop/insensitive/report.json index efd986397..d73a7931b 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/factorialLoop/insensitive/report.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/factorialLoop/insensitive/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_factorialLoop.factorialLoop(factorialLoop__this,_untyped_n).json", "untyped_factorialLoop.factorialLoopAux1(factorialLoop__this,_untyped_n).json", "untyped_factorialLoop.factorialLoopAux2(factorialLoop__this,_untyped_n).json", "untyped_factorialLoop.main(factorialLoop__this,_untyped_a).json" ], "info" : { "cfgs" : "4", - "duration" : "128ms", - "end" : "2023-04-20T12:45:28.497+02:00", + "duration" : "86ms", + "end" : "2023-09-07T11:45:47.630+02:00", "expressions" : "40", "files" : "4", "globals" : "0", "members" : "4", "programs" : "1", - "start" : "2023-04-20T12:45:28.369+02:00", + "start" : "2023-09-07T11:45:47.544+02:00", "statements" : "14", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/interprocedural/factorialLoop/insensitive" } diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/factorialLoop/kdepth/report.json b/lisa/lisa-analyses/imp-testcases/interprocedural/factorialLoop/kdepth/report.json index 617041867..e6805eaba 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/factorialLoop/kdepth/report.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/factorialLoop/kdepth/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_factorialLoop.factorialLoop(factorialLoop__this,_untyped_n)_-1303134381.json", "untyped_factorialLoop.factorialLoopAux1(factorialLoop__this,_untyped_n)_1249376116.json", "untyped_factorialLoop.factorialLoopAux2(factorialLoop__this,_untyped_n)_-1227177876.json", "untyped_factorialLoop.main(factorialLoop__this,_untyped_a).json" ], "info" : { "cfgs" : "4", - "duration" : "92ms", - "end" : "2023-04-20T12:45:28.864+02:00", + "duration" : "76ms", + "end" : "2023-09-07T11:45:47.880+02:00", "expressions" : "40", "files" : "4", "globals" : "0", "members" : "4", "programs" : "1", - "start" : "2023-04-20T12:45:28.772+02:00", + "start" : "2023-09-07T11:45:47.804+02:00", "statements" : "14", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/interprocedural/factorialLoop/kdepth" } diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/factorialLoop/last/report.json b/lisa/lisa-analyses/imp-testcases/interprocedural/factorialLoop/last/report.json index 9e6fbd8f7..809c3e77e 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/factorialLoop/last/report.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/factorialLoop/last/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_factorialLoop.factorialLoop(factorialLoop__this,_untyped_n)_-1303134381.json", "untyped_factorialLoop.factorialLoopAux1(factorialLoop__this,_untyped_n)_-1303131002.json", "untyped_factorialLoop.factorialLoopAux2(factorialLoop__this,_untyped_n)_-1303131777.json", "untyped_factorialLoop.main(factorialLoop__this,_untyped_a).json" ], "info" : { "cfgs" : "4", - "duration" : "85ms", - "end" : "2023-04-20T12:45:29.175+02:00", + "duration" : "55ms", + "end" : "2023-09-07T11:45:48.147+02:00", "expressions" : "40", "files" : "4", "globals" : "0", "members" : "4", "programs" : "1", - "start" : "2023-04-20T12:45:29.090+02:00", + "start" : "2023-09-07T11:45:48.092+02:00", "statements" : "14", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/interprocedural/factorialLoop/last" } diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/fibonacci/full/report.json b/lisa/lisa-analyses/imp-testcases/interprocedural/fibonacci/full/report.json index fa2170c27..1146d609b 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/fibonacci/full/report.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/fibonacci/full/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_fibonacci.fib(fibonacci__this,_untyped_n)_-718248077.json", "untyped_fibonacci.main(fibonacci__this,_untyped_a).json" ], "info" : { "cfgs" : "2", - "duration" : "75ms", - "end" : "2023-04-20T12:45:29.502+02:00", + "duration" : "645ms", + "end" : "2023-10-02T21:22:16.467+02:00", "expressions" : "22", "files" : "2", "globals" : "0", "members" : "2", "programs" : "1", - "start" : "2023-04-20T12:45:29.427+02:00", + "start" : "2023-10-02T21:22:15.822+02:00", "statements" : "7", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/interprocedural/fibonacci/full" } diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/fibonacci/full/untyped_fibonacci.fib(fibonacci__this,_untyped_n)_-718248077.json b/lisa/lisa-analyses/imp-testcases/interprocedural/fibonacci/full/untyped_fibonacci.fib(fibonacci__this,_untyped_n)_-718248077.json index d126153c2..f6e35230a 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/fibonacci/full/untyped_fibonacci.fib(fibonacci__this,_untyped_n)_-718248077.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/fibonacci/full/untyped_fibonacci.fib(fibonacci__this,_untyped_n)_-718248077.json @@ -1 +1 @@ -{"name":"untyped fibonacci::fib(fibonacci* this, untyped n)","description":"['imp-testcases/interprocedural/fibonacci.imp':14:20]","nodes":[{"id":0,"subNodes":[1,2],"text":"<=(n, 2)"},{"id":1,"text":"n"},{"id":2,"text":"2"},{"id":3,"subNodes":[4],"text":"return 1"},{"id":4,"text":"1"},{"id":5,"subNodes":[6,7],"text":"x = -(n, 1)"},{"id":6,"text":"x"},{"id":7,"subNodes":[8,9],"text":"-(n, 1)"},{"id":8,"text":"n"},{"id":9,"text":"1"},{"id":10,"subNodes":[11,12],"text":"y = -(n, 2)"},{"id":11,"text":"y"},{"id":12,"subNodes":[13,14],"text":"-(n, 2)"},{"id":13,"text":"n"},{"id":14,"text":"2"},{"id":15,"subNodes":[16],"text":"return +(fib(this, x), fib(this, y))"},{"id":16,"subNodes":[17,20],"text":"+(fib(this, x), fib(this, y))"},{"id":17,"subNodes":[18,19],"text":"fib(this, x)"},{"id":18,"text":"this"},{"id":19,"text":"x"},{"id":20,"subNodes":[21,22],"text":"fib(this, y)"},{"id":21,"text":"this"},{"id":22,"text":"y"}],"edges":[{"sourceId":0,"destId":3,"kind":"TrueEdge"},{"sourceId":0,"destId":5,"kind":"FalseEdge"},{"sourceId":5,"destId":10,"kind":"SequentialEdge"},{"sourceId":10,"destId":15,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["n <= 2"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":1,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":2,"description":{"expressions":["2"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":3,"description":{"expressions":["ret_value@fib"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","ret_value@fib":["int32"],"this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[-Inf, 2]","ret_value@fib":"[1, 1]"}}}},{"nodeId":4,"description":{"expressions":["1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[-Inf, 2]"}}}},{"nodeId":5,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]"}}}},{"nodeId":6,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]"}}}},{"nodeId":7,"description":{"expressions":["n - 1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]"}}}},{"nodeId":8,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]"}}}},{"nodeId":9,"description":{"expressions":["1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]"}}}},{"nodeId":10,"description":{"expressions":["y"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":11,"description":{"expressions":["y"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]"}}}},{"nodeId":12,"description":{"expressions":["n - 2"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]"}}}},{"nodeId":13,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]"}}}},{"nodeId":14,"description":{"expressions":["2"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]"}}}},{"nodeId":15,"description":{"expressions":["ret_value@fib"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","ret_value@fib":["int32"],"this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","ret_value@fib":"[2, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":16,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20 + call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:34","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20 strcat call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:34"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":["int32"],"call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:34":["int32"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":"[1, +Inf]","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:34":"[1, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":17,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":["int32"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":"[1, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":18,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":19,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":20,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:34"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":["int32"],"call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:34":["int32"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":"[1, +Inf]","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:34":"[1, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":21,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":["int32"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":"[1, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":22,"description":{"expressions":["y"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":["int32"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":"[1, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}}]} \ No newline at end of file +{"name":"untyped fibonacci::fib(fibonacci* this, untyped n)","description":"['imp-testcases/interprocedural/fibonacci.imp':14:20]","nodes":[{"id":0,"subNodes":[1,2],"text":"<=(n, 2)"},{"id":1,"text":"n"},{"id":2,"text":"2"},{"id":3,"subNodes":[4],"text":"return 1"},{"id":4,"text":"1"},{"id":5,"subNodes":[6,7],"text":"x = -(n, 1)"},{"id":6,"text":"x"},{"id":7,"subNodes":[8,9],"text":"-(n, 1)"},{"id":8,"text":"n"},{"id":9,"text":"1"},{"id":10,"subNodes":[11,12],"text":"y = -(n, 2)"},{"id":11,"text":"y"},{"id":12,"subNodes":[13,14],"text":"-(n, 2)"},{"id":13,"text":"n"},{"id":14,"text":"2"},{"id":15,"subNodes":[16],"text":"return +(fib(this, x), fib(this, y))"},{"id":16,"subNodes":[17,20],"text":"+(fib(this, x), fib(this, y))"},{"id":17,"subNodes":[18,19],"text":"fib(this, x)"},{"id":18,"text":"this"},{"id":19,"text":"x"},{"id":20,"subNodes":[21,22],"text":"fib(this, y)"},{"id":21,"text":"this"},{"id":22,"text":"y"}],"edges":[{"sourceId":0,"destId":3,"kind":"TrueEdge"},{"sourceId":0,"destId":5,"kind":"FalseEdge"},{"sourceId":5,"destId":10,"kind":"SequentialEdge"},{"sourceId":10,"destId":15,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["n <= 2"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":1,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":2,"description":{"expressions":["2"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":3,"description":{"expressions":["ret_value@fib"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","ret_value@fib":["int32"],"this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[-Inf, 2]","ret_value@fib":"[1, 1]"}}}},{"nodeId":4,"description":{"expressions":["1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[-Inf, 2]"}}}},{"nodeId":5,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]"}}}},{"nodeId":6,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]"}}}},{"nodeId":7,"description":{"expressions":["n - 1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]"}}}},{"nodeId":8,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]"}}}},{"nodeId":9,"description":{"expressions":["1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]"}}}},{"nodeId":10,"description":{"expressions":["y"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":11,"description":{"expressions":["y"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]"}}}},{"nodeId":12,"description":{"expressions":["n - 2"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]"}}}},{"nodeId":13,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]"}}}},{"nodeId":14,"description":{"expressions":["2"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]"}}}},{"nodeId":15,"description":{"expressions":["ret_value@fib"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","ret_value@fib":["int32"],"this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","ret_value@fib":"[2, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":16,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20 + call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:34"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":["int32"],"call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:34":["int32"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":"[1, +Inf]","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:34":"[1, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":17,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":["int32"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":"[1, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":18,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":19,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":20,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:34"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":["int32"],"call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:34":["int32"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":"[1, +Inf]","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:34":"[1, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":21,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":["int32"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":"[1, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":22,"description":{"expressions":["y"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":["int32"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":"[1, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/fibonacci/insensitive/report.json b/lisa/lisa-analyses/imp-testcases/interprocedural/fibonacci/insensitive/report.json index c312ead8b..8c2a88bdf 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/fibonacci/insensitive/report.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/fibonacci/insensitive/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_fibonacci.fib(fibonacci__this,_untyped_n).json", "untyped_fibonacci.main(fibonacci__this,_untyped_a).json" ], "info" : { "cfgs" : "2", - "duration" : "51ms", - "end" : "2023-04-20T12:45:29.605+02:00", + "duration" : "669ms", + "end" : "2023-10-02T21:25:18.909+02:00", "expressions" : "22", "files" : "2", "globals" : "0", "members" : "2", "programs" : "1", - "start" : "2023-04-20T12:45:29.554+02:00", + "start" : "2023-10-02T21:25:18.240+02:00", "statements" : "7", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/interprocedural/fibonacci/insensitive" } diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/fibonacci/insensitive/untyped_fibonacci.fib(fibonacci__this,_untyped_n).json b/lisa/lisa-analyses/imp-testcases/interprocedural/fibonacci/insensitive/untyped_fibonacci.fib(fibonacci__this,_untyped_n).json index b7865ca37..3038b3903 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/fibonacci/insensitive/untyped_fibonacci.fib(fibonacci__this,_untyped_n).json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/fibonacci/insensitive/untyped_fibonacci.fib(fibonacci__this,_untyped_n).json @@ -1 +1 @@ -{"name":"untyped fibonacci::fib(fibonacci* this, untyped n)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"<=(n, 2)"},{"id":1,"text":"n"},{"id":2,"text":"2"},{"id":3,"subNodes":[4],"text":"return 1"},{"id":4,"text":"1"},{"id":5,"subNodes":[6,7],"text":"x = -(n, 1)"},{"id":6,"text":"x"},{"id":7,"subNodes":[8,9],"text":"-(n, 1)"},{"id":8,"text":"n"},{"id":9,"text":"1"},{"id":10,"subNodes":[11,12],"text":"y = -(n, 2)"},{"id":11,"text":"y"},{"id":12,"subNodes":[13,14],"text":"-(n, 2)"},{"id":13,"text":"n"},{"id":14,"text":"2"},{"id":15,"subNodes":[16],"text":"return +(fib(this, x), fib(this, y))"},{"id":16,"subNodes":[17,20],"text":"+(fib(this, x), fib(this, y))"},{"id":17,"subNodes":[18,19],"text":"fib(this, x)"},{"id":18,"text":"this"},{"id":19,"text":"x"},{"id":20,"subNodes":[21,22],"text":"fib(this, y)"},{"id":21,"text":"this"},{"id":22,"text":"y"}],"edges":[{"sourceId":0,"destId":3,"kind":"TrueEdge"},{"sourceId":0,"destId":5,"kind":"FalseEdge"},{"sourceId":5,"destId":10,"kind":"SequentialEdge"},{"sourceId":10,"destId":15,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["n <= 2"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":1,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":2,"description":{"expressions":["2"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":3,"description":{"expressions":["ret_value@fib"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","ret_value@fib":["int32"],"this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[-Inf, 2]","ret_value@fib":"[1, 1]"}}}},{"nodeId":4,"description":{"expressions":["1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[-Inf, 2]"}}}},{"nodeId":5,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]"}}}},{"nodeId":6,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]"}}}},{"nodeId":7,"description":{"expressions":["n - 1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]"}}}},{"nodeId":8,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]"}}}},{"nodeId":9,"description":{"expressions":["1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]"}}}},{"nodeId":10,"description":{"expressions":["y"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":11,"description":{"expressions":["y"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]"}}}},{"nodeId":12,"description":{"expressions":["n - 2"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]"}}}},{"nodeId":13,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]"}}}},{"nodeId":14,"description":{"expressions":["2"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]"}}}},{"nodeId":15,"description":{"expressions":["ret_value@fib"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","ret_value@fib":["int32"],"this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","ret_value@fib":"[2, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":16,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20 + call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:34","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20 strcat call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:34"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":["int32"],"call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:34":["int32"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":"[1, +Inf]","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:34":"[1, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":17,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":["int32"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":"[1, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":18,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":19,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":20,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:34"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":["int32"],"call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:34":["int32"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":"[1, +Inf]","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:34":"[1, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":21,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":["int32"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":"[1, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":22,"description":{"expressions":["y"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":["int32"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":"[1, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}}]} \ No newline at end of file +{"name":"untyped fibonacci::fib(fibonacci* this, untyped n)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"<=(n, 2)"},{"id":1,"text":"n"},{"id":2,"text":"2"},{"id":3,"subNodes":[4],"text":"return 1"},{"id":4,"text":"1"},{"id":5,"subNodes":[6,7],"text":"x = -(n, 1)"},{"id":6,"text":"x"},{"id":7,"subNodes":[8,9],"text":"-(n, 1)"},{"id":8,"text":"n"},{"id":9,"text":"1"},{"id":10,"subNodes":[11,12],"text":"y = -(n, 2)"},{"id":11,"text":"y"},{"id":12,"subNodes":[13,14],"text":"-(n, 2)"},{"id":13,"text":"n"},{"id":14,"text":"2"},{"id":15,"subNodes":[16],"text":"return +(fib(this, x), fib(this, y))"},{"id":16,"subNodes":[17,20],"text":"+(fib(this, x), fib(this, y))"},{"id":17,"subNodes":[18,19],"text":"fib(this, x)"},{"id":18,"text":"this"},{"id":19,"text":"x"},{"id":20,"subNodes":[21,22],"text":"fib(this, y)"},{"id":21,"text":"this"},{"id":22,"text":"y"}],"edges":[{"sourceId":0,"destId":3,"kind":"TrueEdge"},{"sourceId":0,"destId":5,"kind":"FalseEdge"},{"sourceId":5,"destId":10,"kind":"SequentialEdge"},{"sourceId":10,"destId":15,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["n <= 2"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":1,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":2,"description":{"expressions":["2"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":3,"description":{"expressions":["ret_value@fib"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","ret_value@fib":["int32"],"this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[-Inf, 2]","ret_value@fib":"[1, 1]"}}}},{"nodeId":4,"description":{"expressions":["1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[-Inf, 2]"}}}},{"nodeId":5,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]"}}}},{"nodeId":6,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]"}}}},{"nodeId":7,"description":{"expressions":["n - 1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]"}}}},{"nodeId":8,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]"}}}},{"nodeId":9,"description":{"expressions":["1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]"}}}},{"nodeId":10,"description":{"expressions":["y"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":11,"description":{"expressions":["y"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]"}}}},{"nodeId":12,"description":{"expressions":["n - 2"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]"}}}},{"nodeId":13,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]"}}}},{"nodeId":14,"description":{"expressions":["2"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]"}}}},{"nodeId":15,"description":{"expressions":["ret_value@fib"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","ret_value@fib":["int32"],"this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","ret_value@fib":"[2, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":16,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20 + call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:34"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":["int32"],"call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:34":["int32"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":"[1, +Inf]","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:34":"[1, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":17,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":["int32"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":"[1, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":18,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":19,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":20,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:34"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":["int32"],"call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:34":["int32"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":"[1, +Inf]","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:34":"[1, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":21,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":["int32"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":"[1, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":22,"description":{"expressions":["y"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":["int32"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":"[1, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/fibonacci/kdepth/report.json b/lisa/lisa-analyses/imp-testcases/interprocedural/fibonacci/kdepth/report.json index 6fdee41de..9b7af5e9c 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/fibonacci/kdepth/report.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/fibonacci/kdepth/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_fibonacci.fib(fibonacci__this,_untyped_n)_-718248077.json", "untyped_fibonacci.main(fibonacci__this,_untyped_a).json" ], "info" : { "cfgs" : "2", - "duration" : "40ms", - "end" : "2023-04-20T12:45:29.685+02:00", + "duration" : "669ms", + "end" : "2023-10-02T21:23:35.568+02:00", "expressions" : "22", "files" : "2", "globals" : "0", "members" : "2", "programs" : "1", - "start" : "2023-04-20T12:45:29.645+02:00", + "start" : "2023-10-02T21:23:34.899+02:00", "statements" : "7", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/interprocedural/fibonacci/kdepth" } diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/fibonacci/kdepth/untyped_fibonacci.fib(fibonacci__this,_untyped_n)_-718248077.json b/lisa/lisa-analyses/imp-testcases/interprocedural/fibonacci/kdepth/untyped_fibonacci.fib(fibonacci__this,_untyped_n)_-718248077.json index d126153c2..f6e35230a 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/fibonacci/kdepth/untyped_fibonacci.fib(fibonacci__this,_untyped_n)_-718248077.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/fibonacci/kdepth/untyped_fibonacci.fib(fibonacci__this,_untyped_n)_-718248077.json @@ -1 +1 @@ -{"name":"untyped fibonacci::fib(fibonacci* this, untyped n)","description":"['imp-testcases/interprocedural/fibonacci.imp':14:20]","nodes":[{"id":0,"subNodes":[1,2],"text":"<=(n, 2)"},{"id":1,"text":"n"},{"id":2,"text":"2"},{"id":3,"subNodes":[4],"text":"return 1"},{"id":4,"text":"1"},{"id":5,"subNodes":[6,7],"text":"x = -(n, 1)"},{"id":6,"text":"x"},{"id":7,"subNodes":[8,9],"text":"-(n, 1)"},{"id":8,"text":"n"},{"id":9,"text":"1"},{"id":10,"subNodes":[11,12],"text":"y = -(n, 2)"},{"id":11,"text":"y"},{"id":12,"subNodes":[13,14],"text":"-(n, 2)"},{"id":13,"text":"n"},{"id":14,"text":"2"},{"id":15,"subNodes":[16],"text":"return +(fib(this, x), fib(this, y))"},{"id":16,"subNodes":[17,20],"text":"+(fib(this, x), fib(this, y))"},{"id":17,"subNodes":[18,19],"text":"fib(this, x)"},{"id":18,"text":"this"},{"id":19,"text":"x"},{"id":20,"subNodes":[21,22],"text":"fib(this, y)"},{"id":21,"text":"this"},{"id":22,"text":"y"}],"edges":[{"sourceId":0,"destId":3,"kind":"TrueEdge"},{"sourceId":0,"destId":5,"kind":"FalseEdge"},{"sourceId":5,"destId":10,"kind":"SequentialEdge"},{"sourceId":10,"destId":15,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["n <= 2"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":1,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":2,"description":{"expressions":["2"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":3,"description":{"expressions":["ret_value@fib"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","ret_value@fib":["int32"],"this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[-Inf, 2]","ret_value@fib":"[1, 1]"}}}},{"nodeId":4,"description":{"expressions":["1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[-Inf, 2]"}}}},{"nodeId":5,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]"}}}},{"nodeId":6,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]"}}}},{"nodeId":7,"description":{"expressions":["n - 1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]"}}}},{"nodeId":8,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]"}}}},{"nodeId":9,"description":{"expressions":["1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]"}}}},{"nodeId":10,"description":{"expressions":["y"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":11,"description":{"expressions":["y"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]"}}}},{"nodeId":12,"description":{"expressions":["n - 2"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]"}}}},{"nodeId":13,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]"}}}},{"nodeId":14,"description":{"expressions":["2"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]"}}}},{"nodeId":15,"description":{"expressions":["ret_value@fib"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","ret_value@fib":["int32"],"this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","ret_value@fib":"[2, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":16,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20 + call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:34","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20 strcat call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:34"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":["int32"],"call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:34":["int32"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":"[1, +Inf]","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:34":"[1, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":17,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":["int32"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":"[1, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":18,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":19,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":20,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:34"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":["int32"],"call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:34":["int32"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":"[1, +Inf]","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:34":"[1, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":21,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":["int32"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":"[1, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":22,"description":{"expressions":["y"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":["int32"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":"[1, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}}]} \ No newline at end of file +{"name":"untyped fibonacci::fib(fibonacci* this, untyped n)","description":"['imp-testcases/interprocedural/fibonacci.imp':14:20]","nodes":[{"id":0,"subNodes":[1,2],"text":"<=(n, 2)"},{"id":1,"text":"n"},{"id":2,"text":"2"},{"id":3,"subNodes":[4],"text":"return 1"},{"id":4,"text":"1"},{"id":5,"subNodes":[6,7],"text":"x = -(n, 1)"},{"id":6,"text":"x"},{"id":7,"subNodes":[8,9],"text":"-(n, 1)"},{"id":8,"text":"n"},{"id":9,"text":"1"},{"id":10,"subNodes":[11,12],"text":"y = -(n, 2)"},{"id":11,"text":"y"},{"id":12,"subNodes":[13,14],"text":"-(n, 2)"},{"id":13,"text":"n"},{"id":14,"text":"2"},{"id":15,"subNodes":[16],"text":"return +(fib(this, x), fib(this, y))"},{"id":16,"subNodes":[17,20],"text":"+(fib(this, x), fib(this, y))"},{"id":17,"subNodes":[18,19],"text":"fib(this, x)"},{"id":18,"text":"this"},{"id":19,"text":"x"},{"id":20,"subNodes":[21,22],"text":"fib(this, y)"},{"id":21,"text":"this"},{"id":22,"text":"y"}],"edges":[{"sourceId":0,"destId":3,"kind":"TrueEdge"},{"sourceId":0,"destId":5,"kind":"FalseEdge"},{"sourceId":5,"destId":10,"kind":"SequentialEdge"},{"sourceId":10,"destId":15,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["n <= 2"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":1,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":2,"description":{"expressions":["2"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":3,"description":{"expressions":["ret_value@fib"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","ret_value@fib":["int32"],"this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[-Inf, 2]","ret_value@fib":"[1, 1]"}}}},{"nodeId":4,"description":{"expressions":["1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[-Inf, 2]"}}}},{"nodeId":5,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]"}}}},{"nodeId":6,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]"}}}},{"nodeId":7,"description":{"expressions":["n - 1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]"}}}},{"nodeId":8,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]"}}}},{"nodeId":9,"description":{"expressions":["1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]"}}}},{"nodeId":10,"description":{"expressions":["y"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":11,"description":{"expressions":["y"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]"}}}},{"nodeId":12,"description":{"expressions":["n - 2"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]"}}}},{"nodeId":13,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]"}}}},{"nodeId":14,"description":{"expressions":["2"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]"}}}},{"nodeId":15,"description":{"expressions":["ret_value@fib"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","ret_value@fib":["int32"],"this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","ret_value@fib":"[2, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":16,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20 + call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:34"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":["int32"],"call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:34":["int32"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":"[1, +Inf]","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:34":"[1, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":17,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":["int32"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":"[1, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":18,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":19,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":20,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:34"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":["int32"],"call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:34":["int32"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":"[1, +Inf]","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:34":"[1, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":21,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":["int32"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":"[1, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":22,"description":{"expressions":["y"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":["int32"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":"[1, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/fibonacci/last/report.json b/lisa/lisa-analyses/imp-testcases/interprocedural/fibonacci/last/report.json index a6fa761a6..63aa152c5 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/fibonacci/last/report.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/fibonacci/last/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_fibonacci.fib(fibonacci__this,_untyped_n)_-718248077.json", "untyped_fibonacci.main(fibonacci__this,_untyped_a).json" ], "info" : { "cfgs" : "2", - "duration" : "48ms", - "end" : "2023-04-20T12:45:29.783+02:00", + "duration" : "840ms", + "end" : "2023-10-02T21:24:57.646+02:00", "expressions" : "22", "files" : "2", "globals" : "0", "members" : "2", "programs" : "1", - "start" : "2023-04-20T12:45:29.735+02:00", + "start" : "2023-10-02T21:24:56.806+02:00", "statements" : "7", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/interprocedural/fibonacci/last" } diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/fibonacci/last/untyped_fibonacci.fib(fibonacci__this,_untyped_n)_-718248077.json b/lisa/lisa-analyses/imp-testcases/interprocedural/fibonacci/last/untyped_fibonacci.fib(fibonacci__this,_untyped_n)_-718248077.json index d126153c2..f6e35230a 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/fibonacci/last/untyped_fibonacci.fib(fibonacci__this,_untyped_n)_-718248077.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/fibonacci/last/untyped_fibonacci.fib(fibonacci__this,_untyped_n)_-718248077.json @@ -1 +1 @@ -{"name":"untyped fibonacci::fib(fibonacci* this, untyped n)","description":"['imp-testcases/interprocedural/fibonacci.imp':14:20]","nodes":[{"id":0,"subNodes":[1,2],"text":"<=(n, 2)"},{"id":1,"text":"n"},{"id":2,"text":"2"},{"id":3,"subNodes":[4],"text":"return 1"},{"id":4,"text":"1"},{"id":5,"subNodes":[6,7],"text":"x = -(n, 1)"},{"id":6,"text":"x"},{"id":7,"subNodes":[8,9],"text":"-(n, 1)"},{"id":8,"text":"n"},{"id":9,"text":"1"},{"id":10,"subNodes":[11,12],"text":"y = -(n, 2)"},{"id":11,"text":"y"},{"id":12,"subNodes":[13,14],"text":"-(n, 2)"},{"id":13,"text":"n"},{"id":14,"text":"2"},{"id":15,"subNodes":[16],"text":"return +(fib(this, x), fib(this, y))"},{"id":16,"subNodes":[17,20],"text":"+(fib(this, x), fib(this, y))"},{"id":17,"subNodes":[18,19],"text":"fib(this, x)"},{"id":18,"text":"this"},{"id":19,"text":"x"},{"id":20,"subNodes":[21,22],"text":"fib(this, y)"},{"id":21,"text":"this"},{"id":22,"text":"y"}],"edges":[{"sourceId":0,"destId":3,"kind":"TrueEdge"},{"sourceId":0,"destId":5,"kind":"FalseEdge"},{"sourceId":5,"destId":10,"kind":"SequentialEdge"},{"sourceId":10,"destId":15,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["n <= 2"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":1,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":2,"description":{"expressions":["2"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":3,"description":{"expressions":["ret_value@fib"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","ret_value@fib":["int32"],"this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[-Inf, 2]","ret_value@fib":"[1, 1]"}}}},{"nodeId":4,"description":{"expressions":["1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[-Inf, 2]"}}}},{"nodeId":5,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]"}}}},{"nodeId":6,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]"}}}},{"nodeId":7,"description":{"expressions":["n - 1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]"}}}},{"nodeId":8,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]"}}}},{"nodeId":9,"description":{"expressions":["1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]"}}}},{"nodeId":10,"description":{"expressions":["y"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":11,"description":{"expressions":["y"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]"}}}},{"nodeId":12,"description":{"expressions":["n - 2"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]"}}}},{"nodeId":13,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]"}}}},{"nodeId":14,"description":{"expressions":["2"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]"}}}},{"nodeId":15,"description":{"expressions":["ret_value@fib"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","ret_value@fib":["int32"],"this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","ret_value@fib":"[2, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":16,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20 + call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:34","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20 strcat call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:34"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":["int32"],"call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:34":["int32"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":"[1, +Inf]","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:34":"[1, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":17,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":["int32"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":"[1, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":18,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":19,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":20,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:34"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":["int32"],"call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:34":["int32"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":"[1, +Inf]","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:34":"[1, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":21,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":["int32"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":"[1, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":22,"description":{"expressions":["y"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":["int32"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":"[1, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}}]} \ No newline at end of file +{"name":"untyped fibonacci::fib(fibonacci* this, untyped n)","description":"['imp-testcases/interprocedural/fibonacci.imp':14:20]","nodes":[{"id":0,"subNodes":[1,2],"text":"<=(n, 2)"},{"id":1,"text":"n"},{"id":2,"text":"2"},{"id":3,"subNodes":[4],"text":"return 1"},{"id":4,"text":"1"},{"id":5,"subNodes":[6,7],"text":"x = -(n, 1)"},{"id":6,"text":"x"},{"id":7,"subNodes":[8,9],"text":"-(n, 1)"},{"id":8,"text":"n"},{"id":9,"text":"1"},{"id":10,"subNodes":[11,12],"text":"y = -(n, 2)"},{"id":11,"text":"y"},{"id":12,"subNodes":[13,14],"text":"-(n, 2)"},{"id":13,"text":"n"},{"id":14,"text":"2"},{"id":15,"subNodes":[16],"text":"return +(fib(this, x), fib(this, y))"},{"id":16,"subNodes":[17,20],"text":"+(fib(this, x), fib(this, y))"},{"id":17,"subNodes":[18,19],"text":"fib(this, x)"},{"id":18,"text":"this"},{"id":19,"text":"x"},{"id":20,"subNodes":[21,22],"text":"fib(this, y)"},{"id":21,"text":"this"},{"id":22,"text":"y"}],"edges":[{"sourceId":0,"destId":3,"kind":"TrueEdge"},{"sourceId":0,"destId":5,"kind":"FalseEdge"},{"sourceId":5,"destId":10,"kind":"SequentialEdge"},{"sourceId":10,"destId":15,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["n <= 2"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":1,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":2,"description":{"expressions":["2"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":3,"description":{"expressions":["ret_value@fib"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","ret_value@fib":["int32"],"this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[-Inf, 2]","ret_value@fib":"[1, 1]"}}}},{"nodeId":4,"description":{"expressions":["1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[-Inf, 2]"}}}},{"nodeId":5,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]"}}}},{"nodeId":6,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]"}}}},{"nodeId":7,"description":{"expressions":["n - 1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]"}}}},{"nodeId":8,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]"}}}},{"nodeId":9,"description":{"expressions":["1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]"}}}},{"nodeId":10,"description":{"expressions":["y"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":11,"description":{"expressions":["y"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]"}}}},{"nodeId":12,"description":{"expressions":["n - 2"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]"}}}},{"nodeId":13,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]"}}}},{"nodeId":14,"description":{"expressions":["2"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]"}}}},{"nodeId":15,"description":{"expressions":["ret_value@fib"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","ret_value@fib":["int32"],"this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","ret_value@fib":"[2, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":16,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20 + call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:34"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":["int32"],"call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:34":["int32"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":"[1, +Inf]","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:34":"[1, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":17,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":["int32"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":"[1, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":18,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":19,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":20,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:34"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":["int32"],"call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:34":["int32"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":"[1, +Inf]","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:34":"[1, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":21,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":["int32"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":"[1, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}},{"nodeId":22,"description":{"expressions":["y"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"#TOP#","['imp-testcases/interprocedural/fibonacci.imp':14:20]:this":["fibonacci*"],"call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":["int32"],"n":"#TOP#","this":["fibonacci*"],"x":["float32","int32"],"y":["float32","int32"]},"value":{"['imp-testcases/interprocedural/fibonacci.imp':14:20]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/fibonacci.imp':9:20":"[1, +Inf]","n":"[3, +Inf]","x":"[2, +Inf]","y":"[1, +Inf]"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion1/full/report.json b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion1/full/report.json index 55b317b02..f134937ad 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion1/full/report.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion1/full/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_factorial.factorial(factorial__this,_untyped_n)_344402949.json", "untyped_factorial.main(factorial__this,_untyped_a).json" ], "info" : { "cfgs" : "2", - "duration" : "54ms", - "end" : "2023-04-20T12:45:29.899+02:00", + "duration" : "645ms", + "end" : "2023-09-29T11:59:00.685+02:00", "expressions" : "13", "files" : "2", "globals" : "0", "members" : "2", "programs" : "1", - "start" : "2023-04-20T12:45:29.845+02:00", + "start" : "2023-09-29T11:59:00.040+02:00", "statements" : "4", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/interprocedural/infiniteRecursion1/full" } diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion1/full/untyped_factorial.factorial(factorial__this,_untyped_n)_344402949.json b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion1/full/untyped_factorial.factorial(factorial__this,_untyped_n)_344402949.json index 2c9e7b67b..60d824f95 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion1/full/untyped_factorial.factorial(factorial__this,_untyped_n)_344402949.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion1/full/untyped_factorial.factorial(factorial__this,_untyped_n)_344402949.json @@ -1 +1 @@ -{"name":"untyped factorial::factorial(factorial* this, untyped n)","description":"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]","nodes":[{"id":0,"subNodes":[1,2],"text":"x = -(n, 1)"},{"id":1,"text":"x"},{"id":2,"subNodes":[3,4],"text":"-(n, 1)"},{"id":3,"text":"n"},{"id":4,"text":"1"},{"id":5,"subNodes":[6],"text":"return +(factorial(this, x), n)"},{"id":6,"subNodes":[7,10],"text":"+(factorial(this, x), n)"},{"id":7,"subNodes":[8,9],"text":"factorial(this, x)"},{"id":8,"text":"this"},{"id":9,"text":"x"},{"id":10,"text":"n"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","this":["factorial*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":1,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","this":["factorial*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":2,"description":{"expressions":["n - 1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","this":["factorial*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":3,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","this":["factorial*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":4,"description":{"expressions":["1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","this":["factorial*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":5,"description":{"expressions":["ret_value@factorial"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","ret_value@factorial":["float32","int32","string"],"this":["factorial*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","ret_value@factorial":"_|_","x":"[-Inf, +Inf]"}}}},{"nodeId":6,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':5:25 + n","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':5:25 strcat n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':5:25":["float32","int32","string"],"n":"#TOP#","this":["factorial*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':5:25":"_|_","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":7,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':5:25"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':5:25":["float32","int32","string"],"n":"#TOP#","this":["factorial*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':5:25":"_|_","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":8,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","this":["factorial*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":9,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","this":["factorial*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":10,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':5:25":["float32","int32","string"],"n":"#TOP#","this":["factorial*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':5:25":"_|_","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}}]} \ No newline at end of file +{"name":"untyped factorial::factorial(factorial* this, untyped n)","description":"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]","nodes":[{"id":0,"subNodes":[1,2],"text":"x = -(n, 1)"},{"id":1,"text":"x"},{"id":2,"subNodes":[3,4],"text":"-(n, 1)"},{"id":3,"text":"n"},{"id":4,"text":"1"},{"id":5,"subNodes":[6],"text":"return +(factorial(this, x), n)"},{"id":6,"subNodes":[7,10],"text":"+(factorial(this, x), n)"},{"id":7,"subNodes":[8,9],"text":"factorial(this, x)"},{"id":8,"text":"this"},{"id":9,"text":"x"},{"id":10,"text":"n"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","this":["factorial*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":1,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","this":["factorial*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":2,"description":{"expressions":["n - 1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","this":["factorial*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":3,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","this":["factorial*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":4,"description":{"expressions":["1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","this":["factorial*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":5,"description":"_|_"},{"nodeId":6,"description":"_|_"},{"nodeId":7,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':5:25"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':5:25":"_|_","n":"#TOP#","this":["factorial*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':5:25":"_|_","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":8,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","this":["factorial*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":9,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","this":["factorial*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":10,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':5:25":"_|_","n":"#TOP#","this":["factorial*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':5:25":"_|_","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion1/full/untyped_factorial.main(factorial__this,_untyped_a).json b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion1/full/untyped_factorial.main(factorial__this,_untyped_a).json index 0b827b98e..0a156c322 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion1/full/untyped_factorial.main(factorial__this,_untyped_a).json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion1/full/untyped_factorial.main(factorial__this,_untyped_a).json @@ -1 +1 @@ -{"name":"untyped factorial::main(factorial* this, untyped a)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"w = factorial(this, a)"},{"id":1,"text":"w"},{"id":2,"subNodes":[3,4],"text":"factorial(this, a)"},{"id":3,"text":"this"},{"id":4,"text":"a"},{"id":5,"text":"ret"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["w"],"state":{"heap":"monolith","type":{"a":"#TOP#","this":["factorial*"],"w":["float32","int32","string"]},"value":{"a":"[-Inf, +Inf]","w":"_|_"}}}},{"nodeId":1,"description":{"expressions":["w"],"state":{"heap":"monolith","type":{"a":"#TOP#","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':9:26":["float32","int32","string"],"this":["factorial*"]},"value":{"a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':9:26":"_|_"}}}},{"nodeId":2,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':9:26"],"state":{"heap":"monolith","type":{"a":"#TOP#","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':9:26":["float32","int32","string"],"this":["factorial*"]},"value":{"a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':9:26":"_|_"}}}},{"nodeId":3,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"a":"#TOP#","this":["factorial*"]},"value":{"a":"[-Inf, +Inf]"}}}},{"nodeId":4,"description":{"expressions":["a"],"state":{"heap":"monolith","type":{"a":"#TOP#","this":["factorial*"]},"value":{"a":"[-Inf, +Inf]"}}}},{"nodeId":5,"description":{"expressions":["skip"],"state":{"heap":"monolith","type":{"a":"#TOP#","this":["factorial*"],"w":["float32","int32","string"]},"value":{"a":"[-Inf, +Inf]","w":"_|_"}}}}]} \ No newline at end of file +{"name":"untyped factorial::main(factorial* this, untyped a)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"w = factorial(this, a)"},{"id":1,"text":"w"},{"id":2,"subNodes":[3,4],"text":"factorial(this, a)"},{"id":3,"text":"this"},{"id":4,"text":"a"},{"id":5,"text":"ret"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["w"],"state":{"heap":"monolith","type":"_|_","value":"_|_"}}},{"nodeId":1,"description":{"expressions":["w"],"state":{"heap":"monolith","type":"_|_","value":"_|_"}}},{"nodeId":2,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':9:26"],"state":"_|_"}},{"nodeId":3,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"a":"#TOP#","this":["factorial*"]},"value":{"a":"[-Inf, +Inf]"}}}},{"nodeId":4,"description":{"expressions":["a"],"state":{"heap":"monolith","type":{"a":"#TOP#","this":["factorial*"]},"value":{"a":"[-Inf, +Inf]"}}}},{"nodeId":5,"description":{"expressions":["skip"],"state":{"heap":"monolith","type":"_|_","value":"_|_"}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion1/insensitive/report.json b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion1/insensitive/report.json index a2cbbae11..03ad433b0 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion1/insensitive/report.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion1/insensitive/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_factorial.factorial(factorial__this,_untyped_n).json", "untyped_factorial.main(factorial__this,_untyped_a).json" ], "info" : { "cfgs" : "2", - "duration" : "41ms", - "end" : "2023-04-20T12:45:30.099+02:00", + "duration" : "17ms", + "end" : "2023-09-29T15:00:14.674+02:00", "expressions" : "13", "files" : "2", "globals" : "0", "members" : "2", "programs" : "1", - "start" : "2023-04-20T12:45:30.058+02:00", + "start" : "2023-09-29T15:00:14.657+02:00", "statements" : "4", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/interprocedural/infiniteRecursion1/insensitive" } diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion1/insensitive/untyped_factorial.factorial(factorial__this,_untyped_n).json b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion1/insensitive/untyped_factorial.factorial(factorial__this,_untyped_n).json index e5c6c7e32..f37ef603b 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion1/insensitive/untyped_factorial.factorial(factorial__this,_untyped_n).json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion1/insensitive/untyped_factorial.factorial(factorial__this,_untyped_n).json @@ -1 +1 @@ -{"name":"untyped factorial::factorial(factorial* this, untyped n)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"x = -(n, 1)"},{"id":1,"text":"x"},{"id":2,"subNodes":[3,4],"text":"-(n, 1)"},{"id":3,"text":"n"},{"id":4,"text":"1"},{"id":5,"subNodes":[6],"text":"return +(factorial(this, x), n)"},{"id":6,"subNodes":[7,10],"text":"+(factorial(this, x), n)"},{"id":7,"subNodes":[8,9],"text":"factorial(this, x)"},{"id":8,"text":"this"},{"id":9,"text":"x"},{"id":10,"text":"n"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","this":["factorial*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":1,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","this":["factorial*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":2,"description":{"expressions":["n - 1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","this":["factorial*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":3,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","this":["factorial*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":4,"description":{"expressions":["1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","this":["factorial*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":5,"description":{"expressions":["ret_value@factorial"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","ret_value@factorial":["float32","int32","string"],"this":["factorial*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","ret_value@factorial":"_|_","x":"[-Inf, +Inf]"}}}},{"nodeId":6,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':5:25 + n","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':5:25 strcat n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':5:25":["float32","int32","string"],"n":"#TOP#","this":["factorial*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':5:25":"_|_","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":7,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':5:25"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':5:25":["float32","int32","string"],"n":"#TOP#","this":["factorial*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':5:25":"_|_","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":8,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","this":["factorial*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":9,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","this":["factorial*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":10,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':5:25":["float32","int32","string"],"n":"#TOP#","this":["factorial*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':5:25":"_|_","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}}]} \ No newline at end of file +{"name":"untyped factorial::factorial(factorial* this, untyped n)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"x = -(n, 1)"},{"id":1,"text":"x"},{"id":2,"subNodes":[3,4],"text":"-(n, 1)"},{"id":3,"text":"n"},{"id":4,"text":"1"},{"id":5,"subNodes":[6],"text":"return +(factorial(this, x), n)"},{"id":6,"subNodes":[7,10],"text":"+(factorial(this, x), n)"},{"id":7,"subNodes":[8,9],"text":"factorial(this, x)"},{"id":8,"text":"this"},{"id":9,"text":"x"},{"id":10,"text":"n"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","this":["factorial*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":1,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","this":["factorial*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":2,"description":{"expressions":["n - 1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","this":["factorial*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":3,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","this":["factorial*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":4,"description":{"expressions":["1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","this":["factorial*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":5,"description":"_|_"},{"nodeId":6,"description":"_|_"},{"nodeId":7,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':5:25"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':5:25":"_|_","n":"#TOP#","this":["factorial*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':5:25":"_|_","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":8,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","this":["factorial*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":9,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","this":["factorial*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":10,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':5:25":"_|_","n":"#TOP#","this":["factorial*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':5:25":"_|_","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion1/insensitive/untyped_factorial.main(factorial__this,_untyped_a).json b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion1/insensitive/untyped_factorial.main(factorial__this,_untyped_a).json index 0b827b98e..0a156c322 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion1/insensitive/untyped_factorial.main(factorial__this,_untyped_a).json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion1/insensitive/untyped_factorial.main(factorial__this,_untyped_a).json @@ -1 +1 @@ -{"name":"untyped factorial::main(factorial* this, untyped a)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"w = factorial(this, a)"},{"id":1,"text":"w"},{"id":2,"subNodes":[3,4],"text":"factorial(this, a)"},{"id":3,"text":"this"},{"id":4,"text":"a"},{"id":5,"text":"ret"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["w"],"state":{"heap":"monolith","type":{"a":"#TOP#","this":["factorial*"],"w":["float32","int32","string"]},"value":{"a":"[-Inf, +Inf]","w":"_|_"}}}},{"nodeId":1,"description":{"expressions":["w"],"state":{"heap":"monolith","type":{"a":"#TOP#","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':9:26":["float32","int32","string"],"this":["factorial*"]},"value":{"a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':9:26":"_|_"}}}},{"nodeId":2,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':9:26"],"state":{"heap":"monolith","type":{"a":"#TOP#","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':9:26":["float32","int32","string"],"this":["factorial*"]},"value":{"a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':9:26":"_|_"}}}},{"nodeId":3,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"a":"#TOP#","this":["factorial*"]},"value":{"a":"[-Inf, +Inf]"}}}},{"nodeId":4,"description":{"expressions":["a"],"state":{"heap":"monolith","type":{"a":"#TOP#","this":["factorial*"]},"value":{"a":"[-Inf, +Inf]"}}}},{"nodeId":5,"description":{"expressions":["skip"],"state":{"heap":"monolith","type":{"a":"#TOP#","this":["factorial*"],"w":["float32","int32","string"]},"value":{"a":"[-Inf, +Inf]","w":"_|_"}}}}]} \ No newline at end of file +{"name":"untyped factorial::main(factorial* this, untyped a)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"w = factorial(this, a)"},{"id":1,"text":"w"},{"id":2,"subNodes":[3,4],"text":"factorial(this, a)"},{"id":3,"text":"this"},{"id":4,"text":"a"},{"id":5,"text":"ret"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["w"],"state":{"heap":"monolith","type":"_|_","value":"_|_"}}},{"nodeId":1,"description":{"expressions":["w"],"state":{"heap":"monolith","type":"_|_","value":"_|_"}}},{"nodeId":2,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':9:26"],"state":"_|_"}},{"nodeId":3,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"a":"#TOP#","this":["factorial*"]},"value":{"a":"[-Inf, +Inf]"}}}},{"nodeId":4,"description":{"expressions":["a"],"state":{"heap":"monolith","type":{"a":"#TOP#","this":["factorial*"]},"value":{"a":"[-Inf, +Inf]"}}}},{"nodeId":5,"description":{"expressions":["skip"],"state":{"heap":"monolith","type":"_|_","value":"_|_"}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion1/kdepth/report.json b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion1/kdepth/report.json index 720aff5d5..5cb251a6a 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion1/kdepth/report.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion1/kdepth/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_factorial.factorial(factorial__this,_untyped_n)_344402949.json", "untyped_factorial.main(factorial__this,_untyped_a).json" ], "info" : { "cfgs" : "2", - "duration" : "39ms", - "end" : "2023-04-20T12:45:30.282+02:00", + "duration" : "13ms", + "end" : "2023-09-29T15:00:14.757+02:00", "expressions" : "13", "files" : "2", "globals" : "0", "members" : "2", "programs" : "1", - "start" : "2023-04-20T12:45:30.243+02:00", + "start" : "2023-09-29T15:00:14.744+02:00", "statements" : "4", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/interprocedural/infiniteRecursion1/kdepth" } diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion1/kdepth/untyped_factorial.factorial(factorial__this,_untyped_n)_344402949.json b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion1/kdepth/untyped_factorial.factorial(factorial__this,_untyped_n)_344402949.json index 2c9e7b67b..60d824f95 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion1/kdepth/untyped_factorial.factorial(factorial__this,_untyped_n)_344402949.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion1/kdepth/untyped_factorial.factorial(factorial__this,_untyped_n)_344402949.json @@ -1 +1 @@ -{"name":"untyped factorial::factorial(factorial* this, untyped n)","description":"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]","nodes":[{"id":0,"subNodes":[1,2],"text":"x = -(n, 1)"},{"id":1,"text":"x"},{"id":2,"subNodes":[3,4],"text":"-(n, 1)"},{"id":3,"text":"n"},{"id":4,"text":"1"},{"id":5,"subNodes":[6],"text":"return +(factorial(this, x), n)"},{"id":6,"subNodes":[7,10],"text":"+(factorial(this, x), n)"},{"id":7,"subNodes":[8,9],"text":"factorial(this, x)"},{"id":8,"text":"this"},{"id":9,"text":"x"},{"id":10,"text":"n"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","this":["factorial*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":1,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","this":["factorial*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":2,"description":{"expressions":["n - 1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","this":["factorial*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":3,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","this":["factorial*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":4,"description":{"expressions":["1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","this":["factorial*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":5,"description":{"expressions":["ret_value@factorial"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","ret_value@factorial":["float32","int32","string"],"this":["factorial*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","ret_value@factorial":"_|_","x":"[-Inf, +Inf]"}}}},{"nodeId":6,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':5:25 + n","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':5:25 strcat n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':5:25":["float32","int32","string"],"n":"#TOP#","this":["factorial*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':5:25":"_|_","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":7,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':5:25"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':5:25":["float32","int32","string"],"n":"#TOP#","this":["factorial*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':5:25":"_|_","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":8,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","this":["factorial*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":9,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","this":["factorial*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":10,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':5:25":["float32","int32","string"],"n":"#TOP#","this":["factorial*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':5:25":"_|_","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}}]} \ No newline at end of file +{"name":"untyped factorial::factorial(factorial* this, untyped n)","description":"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]","nodes":[{"id":0,"subNodes":[1,2],"text":"x = -(n, 1)"},{"id":1,"text":"x"},{"id":2,"subNodes":[3,4],"text":"-(n, 1)"},{"id":3,"text":"n"},{"id":4,"text":"1"},{"id":5,"subNodes":[6],"text":"return +(factorial(this, x), n)"},{"id":6,"subNodes":[7,10],"text":"+(factorial(this, x), n)"},{"id":7,"subNodes":[8,9],"text":"factorial(this, x)"},{"id":8,"text":"this"},{"id":9,"text":"x"},{"id":10,"text":"n"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","this":["factorial*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":1,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","this":["factorial*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":2,"description":{"expressions":["n - 1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","this":["factorial*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":3,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","this":["factorial*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":4,"description":{"expressions":["1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","this":["factorial*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":5,"description":"_|_"},{"nodeId":6,"description":"_|_"},{"nodeId":7,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':5:25"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':5:25":"_|_","n":"#TOP#","this":["factorial*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':5:25":"_|_","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":8,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","this":["factorial*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":9,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","this":["factorial*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":10,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':5:25":"_|_","n":"#TOP#","this":["factorial*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':5:25":"_|_","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion1/kdepth/untyped_factorial.main(factorial__this,_untyped_a).json b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion1/kdepth/untyped_factorial.main(factorial__this,_untyped_a).json index 0b827b98e..0a156c322 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion1/kdepth/untyped_factorial.main(factorial__this,_untyped_a).json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion1/kdepth/untyped_factorial.main(factorial__this,_untyped_a).json @@ -1 +1 @@ -{"name":"untyped factorial::main(factorial* this, untyped a)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"w = factorial(this, a)"},{"id":1,"text":"w"},{"id":2,"subNodes":[3,4],"text":"factorial(this, a)"},{"id":3,"text":"this"},{"id":4,"text":"a"},{"id":5,"text":"ret"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["w"],"state":{"heap":"monolith","type":{"a":"#TOP#","this":["factorial*"],"w":["float32","int32","string"]},"value":{"a":"[-Inf, +Inf]","w":"_|_"}}}},{"nodeId":1,"description":{"expressions":["w"],"state":{"heap":"monolith","type":{"a":"#TOP#","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':9:26":["float32","int32","string"],"this":["factorial*"]},"value":{"a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':9:26":"_|_"}}}},{"nodeId":2,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':9:26"],"state":{"heap":"monolith","type":{"a":"#TOP#","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':9:26":["float32","int32","string"],"this":["factorial*"]},"value":{"a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':9:26":"_|_"}}}},{"nodeId":3,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"a":"#TOP#","this":["factorial*"]},"value":{"a":"[-Inf, +Inf]"}}}},{"nodeId":4,"description":{"expressions":["a"],"state":{"heap":"monolith","type":{"a":"#TOP#","this":["factorial*"]},"value":{"a":"[-Inf, +Inf]"}}}},{"nodeId":5,"description":{"expressions":["skip"],"state":{"heap":"monolith","type":{"a":"#TOP#","this":["factorial*"],"w":["float32","int32","string"]},"value":{"a":"[-Inf, +Inf]","w":"_|_"}}}}]} \ No newline at end of file +{"name":"untyped factorial::main(factorial* this, untyped a)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"w = factorial(this, a)"},{"id":1,"text":"w"},{"id":2,"subNodes":[3,4],"text":"factorial(this, a)"},{"id":3,"text":"this"},{"id":4,"text":"a"},{"id":5,"text":"ret"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["w"],"state":{"heap":"monolith","type":"_|_","value":"_|_"}}},{"nodeId":1,"description":{"expressions":["w"],"state":{"heap":"monolith","type":"_|_","value":"_|_"}}},{"nodeId":2,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':9:26"],"state":"_|_"}},{"nodeId":3,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"a":"#TOP#","this":["factorial*"]},"value":{"a":"[-Inf, +Inf]"}}}},{"nodeId":4,"description":{"expressions":["a"],"state":{"heap":"monolith","type":{"a":"#TOP#","this":["factorial*"]},"value":{"a":"[-Inf, +Inf]"}}}},{"nodeId":5,"description":{"expressions":["skip"],"state":{"heap":"monolith","type":"_|_","value":"_|_"}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion1/last/report.json b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion1/last/report.json index 128ac4787..3d113950c 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion1/last/report.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion1/last/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_factorial.factorial(factorial__this,_untyped_n)_344402949.json", "untyped_factorial.main(factorial__this,_untyped_a).json" ], "info" : { "cfgs" : "2", - "duration" : "174ms", - "end" : "2023-04-20T12:45:30.652+02:00", + "duration" : "13ms", + "end" : "2023-09-29T15:00:14.816+02:00", "expressions" : "13", "files" : "2", "globals" : "0", "members" : "2", "programs" : "1", - "start" : "2023-04-20T12:45:30.478+02:00", + "start" : "2023-09-29T15:00:14.803+02:00", "statements" : "4", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/interprocedural/infiniteRecursion1/last" } diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion1/last/untyped_factorial.factorial(factorial__this,_untyped_n)_344402949.json b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion1/last/untyped_factorial.factorial(factorial__this,_untyped_n)_344402949.json index 2c9e7b67b..60d824f95 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion1/last/untyped_factorial.factorial(factorial__this,_untyped_n)_344402949.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion1/last/untyped_factorial.factorial(factorial__this,_untyped_n)_344402949.json @@ -1 +1 @@ -{"name":"untyped factorial::factorial(factorial* this, untyped n)","description":"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]","nodes":[{"id":0,"subNodes":[1,2],"text":"x = -(n, 1)"},{"id":1,"text":"x"},{"id":2,"subNodes":[3,4],"text":"-(n, 1)"},{"id":3,"text":"n"},{"id":4,"text":"1"},{"id":5,"subNodes":[6],"text":"return +(factorial(this, x), n)"},{"id":6,"subNodes":[7,10],"text":"+(factorial(this, x), n)"},{"id":7,"subNodes":[8,9],"text":"factorial(this, x)"},{"id":8,"text":"this"},{"id":9,"text":"x"},{"id":10,"text":"n"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","this":["factorial*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":1,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","this":["factorial*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":2,"description":{"expressions":["n - 1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","this":["factorial*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":3,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","this":["factorial*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":4,"description":{"expressions":["1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","this":["factorial*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":5,"description":{"expressions":["ret_value@factorial"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","ret_value@factorial":["float32","int32","string"],"this":["factorial*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","ret_value@factorial":"_|_","x":"[-Inf, +Inf]"}}}},{"nodeId":6,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':5:25 + n","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':5:25 strcat n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':5:25":["float32","int32","string"],"n":"#TOP#","this":["factorial*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':5:25":"_|_","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":7,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':5:25"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':5:25":["float32","int32","string"],"n":"#TOP#","this":["factorial*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':5:25":"_|_","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":8,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","this":["factorial*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":9,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","this":["factorial*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":10,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':5:25":["float32","int32","string"],"n":"#TOP#","this":["factorial*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':5:25":"_|_","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}}]} \ No newline at end of file +{"name":"untyped factorial::factorial(factorial* this, untyped n)","description":"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]","nodes":[{"id":0,"subNodes":[1,2],"text":"x = -(n, 1)"},{"id":1,"text":"x"},{"id":2,"subNodes":[3,4],"text":"-(n, 1)"},{"id":3,"text":"n"},{"id":4,"text":"1"},{"id":5,"subNodes":[6],"text":"return +(factorial(this, x), n)"},{"id":6,"subNodes":[7,10],"text":"+(factorial(this, x), n)"},{"id":7,"subNodes":[8,9],"text":"factorial(this, x)"},{"id":8,"text":"this"},{"id":9,"text":"x"},{"id":10,"text":"n"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","this":["factorial*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":1,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","this":["factorial*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":2,"description":{"expressions":["n - 1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","this":["factorial*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":3,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","this":["factorial*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":4,"description":{"expressions":["1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","this":["factorial*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":5,"description":"_|_"},{"nodeId":6,"description":"_|_"},{"nodeId":7,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':5:25"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':5:25":"_|_","n":"#TOP#","this":["factorial*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':5:25":"_|_","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":8,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","this":["factorial*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":9,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"n":"#TOP#","this":["factorial*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":10,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:this":["factorial*"],"call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':5:25":"_|_","n":"#TOP#","this":["factorial*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion1.imp':9:26]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':5:25":"_|_","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion1/last/untyped_factorial.main(factorial__this,_untyped_a).json b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion1/last/untyped_factorial.main(factorial__this,_untyped_a).json index 0b827b98e..0a156c322 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion1/last/untyped_factorial.main(factorial__this,_untyped_a).json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion1/last/untyped_factorial.main(factorial__this,_untyped_a).json @@ -1 +1 @@ -{"name":"untyped factorial::main(factorial* this, untyped a)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"w = factorial(this, a)"},{"id":1,"text":"w"},{"id":2,"subNodes":[3,4],"text":"factorial(this, a)"},{"id":3,"text":"this"},{"id":4,"text":"a"},{"id":5,"text":"ret"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["w"],"state":{"heap":"monolith","type":{"a":"#TOP#","this":["factorial*"],"w":["float32","int32","string"]},"value":{"a":"[-Inf, +Inf]","w":"_|_"}}}},{"nodeId":1,"description":{"expressions":["w"],"state":{"heap":"monolith","type":{"a":"#TOP#","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':9:26":["float32","int32","string"],"this":["factorial*"]},"value":{"a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':9:26":"_|_"}}}},{"nodeId":2,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':9:26"],"state":{"heap":"monolith","type":{"a":"#TOP#","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':9:26":["float32","int32","string"],"this":["factorial*"]},"value":{"a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':9:26":"_|_"}}}},{"nodeId":3,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"a":"#TOP#","this":["factorial*"]},"value":{"a":"[-Inf, +Inf]"}}}},{"nodeId":4,"description":{"expressions":["a"],"state":{"heap":"monolith","type":{"a":"#TOP#","this":["factorial*"]},"value":{"a":"[-Inf, +Inf]"}}}},{"nodeId":5,"description":{"expressions":["skip"],"state":{"heap":"monolith","type":{"a":"#TOP#","this":["factorial*"],"w":["float32","int32","string"]},"value":{"a":"[-Inf, +Inf]","w":"_|_"}}}}]} \ No newline at end of file +{"name":"untyped factorial::main(factorial* this, untyped a)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"w = factorial(this, a)"},{"id":1,"text":"w"},{"id":2,"subNodes":[3,4],"text":"factorial(this, a)"},{"id":3,"text":"this"},{"id":4,"text":"a"},{"id":5,"text":"ret"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["w"],"state":{"heap":"monolith","type":"_|_","value":"_|_"}}},{"nodeId":1,"description":{"expressions":["w"],"state":{"heap":"monolith","type":"_|_","value":"_|_"}}},{"nodeId":2,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/infiniteRecursion1.imp':9:26"],"state":"_|_"}},{"nodeId":3,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"a":"#TOP#","this":["factorial*"]},"value":{"a":"[-Inf, +Inf]"}}}},{"nodeId":4,"description":{"expressions":["a"],"state":{"heap":"monolith","type":{"a":"#TOP#","this":["factorial*"]},"value":{"a":"[-Inf, +Inf]"}}}},{"nodeId":5,"description":{"expressions":["skip"],"state":{"heap":"monolith","type":"_|_","value":"_|_"}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/full/report.json b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/full/report.json index 1733a0bd7..36b6f38a8 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/full/report.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/full/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_infiniteRecursion.infiniteRecursion(infiniteRecursion__this,_untyped_n)_345334468.json", "untyped_infiniteRecursion.infiniteRecursionAux1(infiniteRecursion__this,_untyped_n)_-1834196494.json", "untyped_infiniteRecursion.infiniteRecursionAux2(infiniteRecursion__this,_untyped_n)_-680179425.json", "untyped_infiniteRecursion.main(infiniteRecursion__this,_untyped_a).json" ], "info" : { "cfgs" : "4", - "duration" : "67ms", - "end" : "2023-04-20T12:45:30.910+02:00", + "duration" : "27ms", + "end" : "2023-09-29T16:42:37.627+02:00", "expressions" : "25", "files" : "4", "globals" : "0", "members" : "4", "programs" : "1", - "start" : "2023-04-20T12:45:30.843+02:00", + "start" : "2023-09-29T16:42:37.600+02:00", "statements" : "8", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/interprocedural/infiniteRecursion2/full" } diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/full/untyped_infiniteRecursion.infiniteRecursion(infiniteRecursion__this,_untyped_n)_345334468.json b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/full/untyped_infiniteRecursion.infiniteRecursion(infiniteRecursion__this,_untyped_n)_345334468.json index db10ef82a..4ae7de0ef 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/full/untyped_infiniteRecursion.infiniteRecursion(infiniteRecursion__this,_untyped_n)_345334468.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/full/untyped_infiniteRecursion.infiniteRecursion(infiniteRecursion__this,_untyped_n)_345334468.json @@ -1 +1 @@ -{"name":"untyped infiniteRecursion::infiniteRecursion(infiniteRecursion* this, untyped n)","description":"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]","nodes":[{"id":0,"subNodes":[1,2],"text":"x = -(n, 1)"},{"id":1,"text":"x"},{"id":2,"subNodes":[3,4],"text":"-(n, 1)"},{"id":3,"text":"n"},{"id":4,"text":"1"},{"id":5,"subNodes":[6],"text":"return infiniteRecursionAux1(this, x)"},{"id":6,"subNodes":[7,8],"text":"infiniteRecursionAux1(this, x)"},{"id":7,"text":"this"},{"id":8,"text":"x"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":1,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":2,"description":{"expressions":["n - 1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":3,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":4,"description":{"expressions":["1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":5,"description":{"expressions":["ret_value@infiniteRecursion"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","ret_value@infiniteRecursion":"#TOP#","this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","ret_value@infiniteRecursion":"_|_","x":"[-Inf, +Inf]"}}}},{"nodeId":6,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':5:37"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':5:37":"#TOP#","n":"#TOP#","this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':5:37":"_|_","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":7,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":8,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}}]} \ No newline at end of file +{"name":"untyped infiniteRecursion::infiniteRecursion(infiniteRecursion* this, untyped n)","description":"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]","nodes":[{"id":0,"subNodes":[1,2],"text":"x = -(n, 1)"},{"id":1,"text":"x"},{"id":2,"subNodes":[3,4],"text":"-(n, 1)"},{"id":3,"text":"n"},{"id":4,"text":"1"},{"id":5,"subNodes":[6],"text":"return infiniteRecursionAux1(this, x)"},{"id":6,"subNodes":[7,8],"text":"infiniteRecursionAux1(this, x)"},{"id":7,"text":"this"},{"id":8,"text":"x"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":1,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":2,"description":{"expressions":["n - 1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":3,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":4,"description":{"expressions":["1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":5,"description":{"expressions":["ret_value@infiniteRecursion"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","ret_value@infiniteRecursion":"_|_","this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","ret_value@infiniteRecursion":"_|_","x":"[-Inf, +Inf]"}}}},{"nodeId":6,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':5:37"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':5:37":"_|_","n":"#TOP#","this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':5:37":"_|_","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":7,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":8,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/full/untyped_infiniteRecursion.infiniteRecursionAux1(infiniteRecursion__this,_untyped_n)_-1834196494.json b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/full/untyped_infiniteRecursion.infiniteRecursionAux1(infiniteRecursion__this,_untyped_n)_-1834196494.json index 0522e3287..05f346805 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/full/untyped_infiniteRecursion.infiniteRecursionAux1(infiniteRecursion__this,_untyped_n)_-1834196494.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/full/untyped_infiniteRecursion.infiniteRecursionAux1(infiniteRecursion__this,_untyped_n)_-1834196494.json @@ -1 +1 @@ -{"name":"untyped infiniteRecursion::infiniteRecursionAux1(infiniteRecursion* this, untyped n)","description":"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34, 'imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]","nodes":[{"id":0,"subNodes":[1,2],"text":"x = -(n, 2)"},{"id":1,"text":"x"},{"id":2,"subNodes":[3,4],"text":"-(n, 2)"},{"id":3,"text":"n"},{"id":4,"text":"2"},{"id":5,"subNodes":[6],"text":"return infiniteRecursionAux2(this, x)"},{"id":6,"subNodes":[7,8],"text":"infiniteRecursionAux2(this, x)"},{"id":7,"text":"this"},{"id":8,"text":"x"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":1,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":2,"description":{"expressions":["n - 2"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":3,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":4,"description":{"expressions":["2"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":5,"description":{"expressions":["ret_value@infiniteRecursionAux1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"ret_value@infiniteRecursionAux1":"#TOP#","this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","ret_value@infiniteRecursionAux1":"_|_","x":"[-Inf, +Inf]"}}}},{"nodeId":6,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':10:37"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':10:37":"#TOP#","n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':10:37":"_|_","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":7,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":8,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}}]} \ No newline at end of file +{"name":"untyped infiniteRecursion::infiniteRecursionAux1(infiniteRecursion* this, untyped n)","description":"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34, 'imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]","nodes":[{"id":0,"subNodes":[1,2],"text":"x = -(n, 2)"},{"id":1,"text":"x"},{"id":2,"subNodes":[3,4],"text":"-(n, 2)"},{"id":3,"text":"n"},{"id":4,"text":"2"},{"id":5,"subNodes":[6],"text":"return infiniteRecursionAux2(this, x)"},{"id":6,"subNodes":[7,8],"text":"infiniteRecursionAux2(this, x)"},{"id":7,"text":"this"},{"id":8,"text":"x"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":1,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":2,"description":{"expressions":["n - 2"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":3,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":4,"description":{"expressions":["2"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":5,"description":{"expressions":["ret_value@infiniteRecursionAux1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"ret_value@infiniteRecursionAux1":"_|_","this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","ret_value@infiniteRecursionAux1":"_|_","x":"[-Inf, +Inf]"}}}},{"nodeId":6,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':10:37"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':10:37":"_|_","n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':10:37":"_|_","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":7,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":8,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/full/untyped_infiniteRecursion.infiniteRecursionAux2(infiniteRecursion__this,_untyped_n)_-680179425.json b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/full/untyped_infiniteRecursion.infiniteRecursionAux2(infiniteRecursion__this,_untyped_n)_-680179425.json index 114014d29..d27b4c2ed 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/full/untyped_infiniteRecursion.infiniteRecursionAux2(infiniteRecursion__this,_untyped_n)_-680179425.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/full/untyped_infiniteRecursion.infiniteRecursionAux2(infiniteRecursion__this,_untyped_n)_-680179425.json @@ -1 +1 @@ -{"name":"untyped infiniteRecursion::infiniteRecursionAux2(infiniteRecursion* this, untyped n)","description":"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34, 'imp-testcases/interprocedural/infiniteRecursion2.imp':5:37, 'imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]","nodes":[{"id":0,"subNodes":[1,2],"text":"x = +(n, 1)"},{"id":1,"text":"x"},{"id":2,"subNodes":[3,4],"text":"+(n, 1)"},{"id":3,"text":"n"},{"id":4,"text":"1"},{"id":5,"subNodes":[6],"text":"return infiniteRecursion(this, x)"},{"id":6,"subNodes":[7,8],"text":"infiniteRecursion(this, x)"},{"id":7,"text":"this"},{"id":8,"text":"x"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":1,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":2,"description":{"expressions":["n + 1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":3,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":4,"description":{"expressions":["1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":5,"description":{"expressions":["ret_value@infiniteRecursionAux2"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"ret_value@infiniteRecursionAux2":"#TOP#","this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","ret_value@infiniteRecursionAux2":"_|_","x":"[-Inf, +Inf]"}}}},{"nodeId":6,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':15:33"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':15:33":"#TOP#","n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':15:33":"_|_","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":7,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":8,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}}]} \ No newline at end of file +{"name":"untyped infiniteRecursion::infiniteRecursionAux2(infiniteRecursion* this, untyped n)","description":"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34, 'imp-testcases/interprocedural/infiniteRecursion2.imp':5:37, 'imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]","nodes":[{"id":0,"subNodes":[1,2],"text":"x = +(n, 1)"},{"id":1,"text":"x"},{"id":2,"subNodes":[3,4],"text":"+(n, 1)"},{"id":3,"text":"n"},{"id":4,"text":"1"},{"id":5,"subNodes":[6],"text":"return infiniteRecursion(this, x)"},{"id":6,"subNodes":[7,8],"text":"infiniteRecursion(this, x)"},{"id":7,"text":"this"},{"id":8,"text":"x"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":1,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":2,"description":{"expressions":["n + 1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":3,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":4,"description":{"expressions":["1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":5,"description":{"expressions":["ret_value@infiniteRecursionAux2"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"ret_value@infiniteRecursionAux2":"_|_","this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","ret_value@infiniteRecursionAux2":"_|_","x":"[-Inf, +Inf]"}}}},{"nodeId":6,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':15:33"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':15:33":"_|_","n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':15:33":"_|_","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":7,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":8,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/full/untyped_infiniteRecursion.main(infiniteRecursion__this,_untyped_a).json b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/full/untyped_infiniteRecursion.main(infiniteRecursion__this,_untyped_a).json index 457d3218e..a0ecf4b9b 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/full/untyped_infiniteRecursion.main(infiniteRecursion__this,_untyped_a).json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/full/untyped_infiniteRecursion.main(infiniteRecursion__this,_untyped_a).json @@ -1 +1 @@ -{"name":"untyped infiniteRecursion::main(infiniteRecursion* this, untyped a)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"k = infiniteRecursion(this, a)"},{"id":1,"text":"k"},{"id":2,"subNodes":[3,4],"text":"infiniteRecursion(this, a)"},{"id":3,"text":"this"},{"id":4,"text":"a"},{"id":5,"text":"ret"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["k"],"state":{"heap":"monolith","type":{"a":"#TOP#","k":"#TOP#","this":["infiniteRecursion*"]},"value":{"a":"[-Inf, +Inf]","k":"_|_"}}}},{"nodeId":1,"description":{"expressions":["k"],"state":{"heap":"monolith","type":{"a":"#TOP#","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':19:34":"#TOP#","this":["infiniteRecursion*"]},"value":{"a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':19:34":"_|_"}}}},{"nodeId":2,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':19:34"],"state":{"heap":"monolith","type":{"a":"#TOP#","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':19:34":"#TOP#","this":["infiniteRecursion*"]},"value":{"a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':19:34":"_|_"}}}},{"nodeId":3,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"a":"#TOP#","this":["infiniteRecursion*"]},"value":{"a":"[-Inf, +Inf]"}}}},{"nodeId":4,"description":{"expressions":["a"],"state":{"heap":"monolith","type":{"a":"#TOP#","this":["infiniteRecursion*"]},"value":{"a":"[-Inf, +Inf]"}}}},{"nodeId":5,"description":{"expressions":["skip"],"state":{"heap":"monolith","type":{"a":"#TOP#","k":"#TOP#","this":["infiniteRecursion*"]},"value":{"a":"[-Inf, +Inf]","k":"_|_"}}}}]} \ No newline at end of file +{"name":"untyped infiniteRecursion::main(infiniteRecursion* this, untyped a)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"k = infiniteRecursion(this, a)"},{"id":1,"text":"k"},{"id":2,"subNodes":[3,4],"text":"infiniteRecursion(this, a)"},{"id":3,"text":"this"},{"id":4,"text":"a"},{"id":5,"text":"ret"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["k"],"state":{"heap":"monolith","type":{"a":"#TOP#","k":"_|_","this":["infiniteRecursion*"]},"value":{"a":"[-Inf, +Inf]","k":"_|_"}}}},{"nodeId":1,"description":{"expressions":["k"],"state":{"heap":"monolith","type":{"a":"#TOP#","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':19:34":"_|_","this":["infiniteRecursion*"]},"value":{"a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':19:34":"_|_"}}}},{"nodeId":2,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':19:34"],"state":{"heap":"monolith","type":{"a":"#TOP#","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':19:34":"_|_","this":["infiniteRecursion*"]},"value":{"a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':19:34":"_|_"}}}},{"nodeId":3,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"a":"#TOP#","this":["infiniteRecursion*"]},"value":{"a":"[-Inf, +Inf]"}}}},{"nodeId":4,"description":{"expressions":["a"],"state":{"heap":"monolith","type":{"a":"#TOP#","this":["infiniteRecursion*"]},"value":{"a":"[-Inf, +Inf]"}}}},{"nodeId":5,"description":{"expressions":["skip"],"state":{"heap":"monolith","type":{"a":"#TOP#","k":"_|_","this":["infiniteRecursion*"]},"value":{"a":"[-Inf, +Inf]","k":"_|_"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/insensitive/report.json b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/insensitive/report.json index 3eb40a38e..f52b8e9ae 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/insensitive/report.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/insensitive/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_infiniteRecursion.infiniteRecursion(infiniteRecursion__this,_untyped_n).json", "untyped_infiniteRecursion.infiniteRecursionAux1(infiniteRecursion__this,_untyped_n).json", "untyped_infiniteRecursion.infiniteRecursionAux2(infiniteRecursion__this,_untyped_n).json", "untyped_infiniteRecursion.main(infiniteRecursion__this,_untyped_a).json" ], "info" : { "cfgs" : "4", - "duration" : "70ms", - "end" : "2023-04-20T12:45:31.167+02:00", + "duration" : "26ms", + "end" : "2023-09-29T16:42:37.759+02:00", "expressions" : "25", "files" : "4", "globals" : "0", "members" : "4", "programs" : "1", - "start" : "2023-04-20T12:45:31.097+02:00", + "start" : "2023-09-29T16:42:37.733+02:00", "statements" : "8", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/interprocedural/infiniteRecursion2/insensitive" } diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/insensitive/untyped_infiniteRecursion.infiniteRecursion(infiniteRecursion__this,_untyped_n).json b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/insensitive/untyped_infiniteRecursion.infiniteRecursion(infiniteRecursion__this,_untyped_n).json index ffb9ef6c3..380e6d8c5 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/insensitive/untyped_infiniteRecursion.infiniteRecursion(infiniteRecursion__this,_untyped_n).json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/insensitive/untyped_infiniteRecursion.infiniteRecursion(infiniteRecursion__this,_untyped_n).json @@ -1 +1 @@ -{"name":"untyped infiniteRecursion::infiniteRecursion(infiniteRecursion* this, untyped n)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"x = -(n, 1)"},{"id":1,"text":"x"},{"id":2,"subNodes":[3,4],"text":"-(n, 1)"},{"id":3,"text":"n"},{"id":4,"text":"1"},{"id":5,"subNodes":[6],"text":"return infiniteRecursionAux1(this, x)"},{"id":6,"subNodes":[7,8],"text":"infiniteRecursionAux1(this, x)"},{"id":7,"text":"this"},{"id":8,"text":"x"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":1,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":2,"description":{"expressions":["n - 1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":3,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":4,"description":{"expressions":["1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":5,"description":{"expressions":["ret_value@infiniteRecursion"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","ret_value@infiniteRecursion":"#TOP#","this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","ret_value@infiniteRecursion":"_|_","x":"[-Inf, +Inf]"}}}},{"nodeId":6,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':5:37"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':5:37":"#TOP#","n":"#TOP#","this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':5:37":"_|_","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":7,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":8,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}}]} \ No newline at end of file +{"name":"untyped infiniteRecursion::infiniteRecursion(infiniteRecursion* this, untyped n)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"x = -(n, 1)"},{"id":1,"text":"x"},{"id":2,"subNodes":[3,4],"text":"-(n, 1)"},{"id":3,"text":"n"},{"id":4,"text":"1"},{"id":5,"subNodes":[6],"text":"return infiniteRecursionAux1(this, x)"},{"id":6,"subNodes":[7,8],"text":"infiniteRecursionAux1(this, x)"},{"id":7,"text":"this"},{"id":8,"text":"x"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":1,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":2,"description":{"expressions":["n - 1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":3,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":4,"description":{"expressions":["1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":5,"description":{"expressions":["ret_value@infiniteRecursion"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","ret_value@infiniteRecursion":"_|_","this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","ret_value@infiniteRecursion":"_|_","x":"[-Inf, +Inf]"}}}},{"nodeId":6,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':5:37"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':5:37":"_|_","n":"#TOP#","this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':5:37":"_|_","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":7,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":8,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/insensitive/untyped_infiniteRecursion.infiniteRecursionAux1(infiniteRecursion__this,_untyped_n).json b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/insensitive/untyped_infiniteRecursion.infiniteRecursionAux1(infiniteRecursion__this,_untyped_n).json index b566fd5f3..3b9f9f61e 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/insensitive/untyped_infiniteRecursion.infiniteRecursionAux1(infiniteRecursion__this,_untyped_n).json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/insensitive/untyped_infiniteRecursion.infiniteRecursionAux1(infiniteRecursion__this,_untyped_n).json @@ -1 +1 @@ -{"name":"untyped infiniteRecursion::infiniteRecursionAux1(infiniteRecursion* this, untyped n)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"x = -(n, 2)"},{"id":1,"text":"x"},{"id":2,"subNodes":[3,4],"text":"-(n, 2)"},{"id":3,"text":"n"},{"id":4,"text":"2"},{"id":5,"subNodes":[6],"text":"return infiniteRecursionAux2(this, x)"},{"id":6,"subNodes":[7,8],"text":"infiniteRecursionAux2(this, x)"},{"id":7,"text":"this"},{"id":8,"text":"x"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":1,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":2,"description":{"expressions":["n - 2"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":3,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":4,"description":{"expressions":["2"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":5,"description":{"expressions":["ret_value@infiniteRecursionAux1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"ret_value@infiniteRecursionAux1":"#TOP#","this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","ret_value@infiniteRecursionAux1":"_|_","x":"[-Inf, +Inf]"}}}},{"nodeId":6,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':10:37"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':10:37":"#TOP#","n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':10:37":"_|_","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":7,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":8,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}}]} \ No newline at end of file +{"name":"untyped infiniteRecursion::infiniteRecursionAux1(infiniteRecursion* this, untyped n)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"x = -(n, 2)"},{"id":1,"text":"x"},{"id":2,"subNodes":[3,4],"text":"-(n, 2)"},{"id":3,"text":"n"},{"id":4,"text":"2"},{"id":5,"subNodes":[6],"text":"return infiniteRecursionAux2(this, x)"},{"id":6,"subNodes":[7,8],"text":"infiniteRecursionAux2(this, x)"},{"id":7,"text":"this"},{"id":8,"text":"x"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":1,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":2,"description":{"expressions":["n - 2"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":3,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":4,"description":{"expressions":["2"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":5,"description":{"expressions":["ret_value@infiniteRecursionAux1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"ret_value@infiniteRecursionAux1":"_|_","this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","ret_value@infiniteRecursionAux1":"_|_","x":"[-Inf, +Inf]"}}}},{"nodeId":6,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':10:37"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':10:37":"_|_","n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':10:37":"_|_","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":7,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":8,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/insensitive/untyped_infiniteRecursion.infiniteRecursionAux2(infiniteRecursion__this,_untyped_n).json b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/insensitive/untyped_infiniteRecursion.infiniteRecursionAux2(infiniteRecursion__this,_untyped_n).json index f7628507a..20a2e841d 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/insensitive/untyped_infiniteRecursion.infiniteRecursionAux2(infiniteRecursion__this,_untyped_n).json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/insensitive/untyped_infiniteRecursion.infiniteRecursionAux2(infiniteRecursion__this,_untyped_n).json @@ -1 +1 @@ -{"name":"untyped infiniteRecursion::infiniteRecursionAux2(infiniteRecursion* this, untyped n)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"x = +(n, 1)"},{"id":1,"text":"x"},{"id":2,"subNodes":[3,4],"text":"+(n, 1)"},{"id":3,"text":"n"},{"id":4,"text":"1"},{"id":5,"subNodes":[6],"text":"return infiniteRecursion(this, x)"},{"id":6,"subNodes":[7,8],"text":"infiniteRecursion(this, x)"},{"id":7,"text":"this"},{"id":8,"text":"x"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":1,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":2,"description":{"expressions":["n + 1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":3,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":4,"description":{"expressions":["1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":5,"description":{"expressions":["ret_value@infiniteRecursionAux2"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"ret_value@infiniteRecursionAux2":"#TOP#","this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","ret_value@infiniteRecursionAux2":"_|_","x":"[-Inf, +Inf]"}}}},{"nodeId":6,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':15:33"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':15:33":"#TOP#","n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':15:33":"_|_","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":7,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":8,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}}]} \ No newline at end of file +{"name":"untyped infiniteRecursion::infiniteRecursionAux2(infiniteRecursion* this, untyped n)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"x = +(n, 1)"},{"id":1,"text":"x"},{"id":2,"subNodes":[3,4],"text":"+(n, 1)"},{"id":3,"text":"n"},{"id":4,"text":"1"},{"id":5,"subNodes":[6],"text":"return infiniteRecursion(this, x)"},{"id":6,"subNodes":[7,8],"text":"infiniteRecursion(this, x)"},{"id":7,"text":"this"},{"id":8,"text":"x"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":1,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":2,"description":{"expressions":["n + 1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":3,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":4,"description":{"expressions":["1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":5,"description":{"expressions":["ret_value@infiniteRecursionAux2"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"ret_value@infiniteRecursionAux2":"_|_","this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","ret_value@infiniteRecursionAux2":"_|_","x":"[-Inf, +Inf]"}}}},{"nodeId":6,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':15:33"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':15:33":"_|_","n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':15:33":"_|_","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":7,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":8,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/insensitive/untyped_infiniteRecursion.main(infiniteRecursion__this,_untyped_a).json b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/insensitive/untyped_infiniteRecursion.main(infiniteRecursion__this,_untyped_a).json index 457d3218e..a0ecf4b9b 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/insensitive/untyped_infiniteRecursion.main(infiniteRecursion__this,_untyped_a).json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/insensitive/untyped_infiniteRecursion.main(infiniteRecursion__this,_untyped_a).json @@ -1 +1 @@ -{"name":"untyped infiniteRecursion::main(infiniteRecursion* this, untyped a)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"k = infiniteRecursion(this, a)"},{"id":1,"text":"k"},{"id":2,"subNodes":[3,4],"text":"infiniteRecursion(this, a)"},{"id":3,"text":"this"},{"id":4,"text":"a"},{"id":5,"text":"ret"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["k"],"state":{"heap":"monolith","type":{"a":"#TOP#","k":"#TOP#","this":["infiniteRecursion*"]},"value":{"a":"[-Inf, +Inf]","k":"_|_"}}}},{"nodeId":1,"description":{"expressions":["k"],"state":{"heap":"monolith","type":{"a":"#TOP#","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':19:34":"#TOP#","this":["infiniteRecursion*"]},"value":{"a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':19:34":"_|_"}}}},{"nodeId":2,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':19:34"],"state":{"heap":"monolith","type":{"a":"#TOP#","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':19:34":"#TOP#","this":["infiniteRecursion*"]},"value":{"a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':19:34":"_|_"}}}},{"nodeId":3,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"a":"#TOP#","this":["infiniteRecursion*"]},"value":{"a":"[-Inf, +Inf]"}}}},{"nodeId":4,"description":{"expressions":["a"],"state":{"heap":"monolith","type":{"a":"#TOP#","this":["infiniteRecursion*"]},"value":{"a":"[-Inf, +Inf]"}}}},{"nodeId":5,"description":{"expressions":["skip"],"state":{"heap":"monolith","type":{"a":"#TOP#","k":"#TOP#","this":["infiniteRecursion*"]},"value":{"a":"[-Inf, +Inf]","k":"_|_"}}}}]} \ No newline at end of file +{"name":"untyped infiniteRecursion::main(infiniteRecursion* this, untyped a)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"k = infiniteRecursion(this, a)"},{"id":1,"text":"k"},{"id":2,"subNodes":[3,4],"text":"infiniteRecursion(this, a)"},{"id":3,"text":"this"},{"id":4,"text":"a"},{"id":5,"text":"ret"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["k"],"state":{"heap":"monolith","type":{"a":"#TOP#","k":"_|_","this":["infiniteRecursion*"]},"value":{"a":"[-Inf, +Inf]","k":"_|_"}}}},{"nodeId":1,"description":{"expressions":["k"],"state":{"heap":"monolith","type":{"a":"#TOP#","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':19:34":"_|_","this":["infiniteRecursion*"]},"value":{"a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':19:34":"_|_"}}}},{"nodeId":2,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':19:34"],"state":{"heap":"monolith","type":{"a":"#TOP#","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':19:34":"_|_","this":["infiniteRecursion*"]},"value":{"a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':19:34":"_|_"}}}},{"nodeId":3,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"a":"#TOP#","this":["infiniteRecursion*"]},"value":{"a":"[-Inf, +Inf]"}}}},{"nodeId":4,"description":{"expressions":["a"],"state":{"heap":"monolith","type":{"a":"#TOP#","this":["infiniteRecursion*"]},"value":{"a":"[-Inf, +Inf]"}}}},{"nodeId":5,"description":{"expressions":["skip"],"state":{"heap":"monolith","type":{"a":"#TOP#","k":"_|_","this":["infiniteRecursion*"]},"value":{"a":"[-Inf, +Inf]","k":"_|_"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/kdepth/report.json b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/kdepth/report.json index 3b65f29ee..29196f5cb 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/kdepth/report.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/kdepth/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_infiniteRecursion.infiniteRecursion(infiniteRecursion__this,_untyped_n)_345334468.json", "untyped_infiniteRecursion.infiniteRecursionAux1(infiniteRecursion__this,_untyped_n)_-1834196494.json", "untyped_infiniteRecursion.infiniteRecursionAux2(infiniteRecursion__this,_untyped_n)_-680179425.json", "untyped_infiniteRecursion.main(infiniteRecursion__this,_untyped_a).json" ], "info" : { "cfgs" : "4", - "duration" : "120ms", - "end" : "2023-04-20T12:45:31.443+02:00", + "duration" : "20ms", + "end" : "2023-09-29T16:42:37.868+02:00", "expressions" : "25", "files" : "4", "globals" : "0", "members" : "4", "programs" : "1", - "start" : "2023-04-20T12:45:31.323+02:00", + "start" : "2023-09-29T16:42:37.848+02:00", "statements" : "8", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/interprocedural/infiniteRecursion2/kdepth" } diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/kdepth/untyped_infiniteRecursion.infiniteRecursion(infiniteRecursion__this,_untyped_n)_345334468.json b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/kdepth/untyped_infiniteRecursion.infiniteRecursion(infiniteRecursion__this,_untyped_n)_345334468.json index db10ef82a..4ae7de0ef 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/kdepth/untyped_infiniteRecursion.infiniteRecursion(infiniteRecursion__this,_untyped_n)_345334468.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/kdepth/untyped_infiniteRecursion.infiniteRecursion(infiniteRecursion__this,_untyped_n)_345334468.json @@ -1 +1 @@ -{"name":"untyped infiniteRecursion::infiniteRecursion(infiniteRecursion* this, untyped n)","description":"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]","nodes":[{"id":0,"subNodes":[1,2],"text":"x = -(n, 1)"},{"id":1,"text":"x"},{"id":2,"subNodes":[3,4],"text":"-(n, 1)"},{"id":3,"text":"n"},{"id":4,"text":"1"},{"id":5,"subNodes":[6],"text":"return infiniteRecursionAux1(this, x)"},{"id":6,"subNodes":[7,8],"text":"infiniteRecursionAux1(this, x)"},{"id":7,"text":"this"},{"id":8,"text":"x"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":1,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":2,"description":{"expressions":["n - 1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":3,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":4,"description":{"expressions":["1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":5,"description":{"expressions":["ret_value@infiniteRecursion"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","ret_value@infiniteRecursion":"#TOP#","this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","ret_value@infiniteRecursion":"_|_","x":"[-Inf, +Inf]"}}}},{"nodeId":6,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':5:37"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':5:37":"#TOP#","n":"#TOP#","this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':5:37":"_|_","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":7,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":8,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}}]} \ No newline at end of file +{"name":"untyped infiniteRecursion::infiniteRecursion(infiniteRecursion* this, untyped n)","description":"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]","nodes":[{"id":0,"subNodes":[1,2],"text":"x = -(n, 1)"},{"id":1,"text":"x"},{"id":2,"subNodes":[3,4],"text":"-(n, 1)"},{"id":3,"text":"n"},{"id":4,"text":"1"},{"id":5,"subNodes":[6],"text":"return infiniteRecursionAux1(this, x)"},{"id":6,"subNodes":[7,8],"text":"infiniteRecursionAux1(this, x)"},{"id":7,"text":"this"},{"id":8,"text":"x"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":1,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":2,"description":{"expressions":["n - 1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":3,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":4,"description":{"expressions":["1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":5,"description":{"expressions":["ret_value@infiniteRecursion"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","ret_value@infiniteRecursion":"_|_","this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","ret_value@infiniteRecursion":"_|_","x":"[-Inf, +Inf]"}}}},{"nodeId":6,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':5:37"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':5:37":"_|_","n":"#TOP#","this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':5:37":"_|_","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":7,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":8,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/kdepth/untyped_infiniteRecursion.infiniteRecursionAux1(infiniteRecursion__this,_untyped_n)_-1834196494.json b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/kdepth/untyped_infiniteRecursion.infiniteRecursionAux1(infiniteRecursion__this,_untyped_n)_-1834196494.json index 0522e3287..05f346805 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/kdepth/untyped_infiniteRecursion.infiniteRecursionAux1(infiniteRecursion__this,_untyped_n)_-1834196494.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/kdepth/untyped_infiniteRecursion.infiniteRecursionAux1(infiniteRecursion__this,_untyped_n)_-1834196494.json @@ -1 +1 @@ -{"name":"untyped infiniteRecursion::infiniteRecursionAux1(infiniteRecursion* this, untyped n)","description":"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34, 'imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]","nodes":[{"id":0,"subNodes":[1,2],"text":"x = -(n, 2)"},{"id":1,"text":"x"},{"id":2,"subNodes":[3,4],"text":"-(n, 2)"},{"id":3,"text":"n"},{"id":4,"text":"2"},{"id":5,"subNodes":[6],"text":"return infiniteRecursionAux2(this, x)"},{"id":6,"subNodes":[7,8],"text":"infiniteRecursionAux2(this, x)"},{"id":7,"text":"this"},{"id":8,"text":"x"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":1,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":2,"description":{"expressions":["n - 2"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":3,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":4,"description":{"expressions":["2"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":5,"description":{"expressions":["ret_value@infiniteRecursionAux1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"ret_value@infiniteRecursionAux1":"#TOP#","this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","ret_value@infiniteRecursionAux1":"_|_","x":"[-Inf, +Inf]"}}}},{"nodeId":6,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':10:37"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':10:37":"#TOP#","n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':10:37":"_|_","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":7,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":8,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}}]} \ No newline at end of file +{"name":"untyped infiniteRecursion::infiniteRecursionAux1(infiniteRecursion* this, untyped n)","description":"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34, 'imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]","nodes":[{"id":0,"subNodes":[1,2],"text":"x = -(n, 2)"},{"id":1,"text":"x"},{"id":2,"subNodes":[3,4],"text":"-(n, 2)"},{"id":3,"text":"n"},{"id":4,"text":"2"},{"id":5,"subNodes":[6],"text":"return infiniteRecursionAux2(this, x)"},{"id":6,"subNodes":[7,8],"text":"infiniteRecursionAux2(this, x)"},{"id":7,"text":"this"},{"id":8,"text":"x"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":1,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":2,"description":{"expressions":["n - 2"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":3,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":4,"description":{"expressions":["2"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":5,"description":{"expressions":["ret_value@infiniteRecursionAux1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"ret_value@infiniteRecursionAux1":"_|_","this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","ret_value@infiniteRecursionAux1":"_|_","x":"[-Inf, +Inf]"}}}},{"nodeId":6,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':10:37"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':10:37":"_|_","n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':10:37":"_|_","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":7,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":8,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/kdepth/untyped_infiniteRecursion.infiniteRecursionAux2(infiniteRecursion__this,_untyped_n)_-680179425.json b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/kdepth/untyped_infiniteRecursion.infiniteRecursionAux2(infiniteRecursion__this,_untyped_n)_-680179425.json index 114014d29..d27b4c2ed 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/kdepth/untyped_infiniteRecursion.infiniteRecursionAux2(infiniteRecursion__this,_untyped_n)_-680179425.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/kdepth/untyped_infiniteRecursion.infiniteRecursionAux2(infiniteRecursion__this,_untyped_n)_-680179425.json @@ -1 +1 @@ -{"name":"untyped infiniteRecursion::infiniteRecursionAux2(infiniteRecursion* this, untyped n)","description":"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34, 'imp-testcases/interprocedural/infiniteRecursion2.imp':5:37, 'imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]","nodes":[{"id":0,"subNodes":[1,2],"text":"x = +(n, 1)"},{"id":1,"text":"x"},{"id":2,"subNodes":[3,4],"text":"+(n, 1)"},{"id":3,"text":"n"},{"id":4,"text":"1"},{"id":5,"subNodes":[6],"text":"return infiniteRecursion(this, x)"},{"id":6,"subNodes":[7,8],"text":"infiniteRecursion(this, x)"},{"id":7,"text":"this"},{"id":8,"text":"x"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":1,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":2,"description":{"expressions":["n + 1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":3,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":4,"description":{"expressions":["1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":5,"description":{"expressions":["ret_value@infiniteRecursionAux2"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"ret_value@infiniteRecursionAux2":"#TOP#","this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","ret_value@infiniteRecursionAux2":"_|_","x":"[-Inf, +Inf]"}}}},{"nodeId":6,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':15:33"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':15:33":"#TOP#","n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':15:33":"_|_","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":7,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":8,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}}]} \ No newline at end of file +{"name":"untyped infiniteRecursion::infiniteRecursionAux2(infiniteRecursion* this, untyped n)","description":"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34, 'imp-testcases/interprocedural/infiniteRecursion2.imp':5:37, 'imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]","nodes":[{"id":0,"subNodes":[1,2],"text":"x = +(n, 1)"},{"id":1,"text":"x"},{"id":2,"subNodes":[3,4],"text":"+(n, 1)"},{"id":3,"text":"n"},{"id":4,"text":"1"},{"id":5,"subNodes":[6],"text":"return infiniteRecursion(this, x)"},{"id":6,"subNodes":[7,8],"text":"infiniteRecursion(this, x)"},{"id":7,"text":"this"},{"id":8,"text":"x"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":1,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":2,"description":{"expressions":["n + 1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":3,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":4,"description":{"expressions":["1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":5,"description":{"expressions":["ret_value@infiniteRecursionAux2"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"ret_value@infiniteRecursionAux2":"_|_","this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","ret_value@infiniteRecursionAux2":"_|_","x":"[-Inf, +Inf]"}}}},{"nodeId":6,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':15:33"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':15:33":"_|_","n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':15:33":"_|_","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":7,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":8,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/kdepth/untyped_infiniteRecursion.main(infiniteRecursion__this,_untyped_a).json b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/kdepth/untyped_infiniteRecursion.main(infiniteRecursion__this,_untyped_a).json index 457d3218e..a0ecf4b9b 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/kdepth/untyped_infiniteRecursion.main(infiniteRecursion__this,_untyped_a).json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/kdepth/untyped_infiniteRecursion.main(infiniteRecursion__this,_untyped_a).json @@ -1 +1 @@ -{"name":"untyped infiniteRecursion::main(infiniteRecursion* this, untyped a)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"k = infiniteRecursion(this, a)"},{"id":1,"text":"k"},{"id":2,"subNodes":[3,4],"text":"infiniteRecursion(this, a)"},{"id":3,"text":"this"},{"id":4,"text":"a"},{"id":5,"text":"ret"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["k"],"state":{"heap":"monolith","type":{"a":"#TOP#","k":"#TOP#","this":["infiniteRecursion*"]},"value":{"a":"[-Inf, +Inf]","k":"_|_"}}}},{"nodeId":1,"description":{"expressions":["k"],"state":{"heap":"monolith","type":{"a":"#TOP#","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':19:34":"#TOP#","this":["infiniteRecursion*"]},"value":{"a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':19:34":"_|_"}}}},{"nodeId":2,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':19:34"],"state":{"heap":"monolith","type":{"a":"#TOP#","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':19:34":"#TOP#","this":["infiniteRecursion*"]},"value":{"a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':19:34":"_|_"}}}},{"nodeId":3,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"a":"#TOP#","this":["infiniteRecursion*"]},"value":{"a":"[-Inf, +Inf]"}}}},{"nodeId":4,"description":{"expressions":["a"],"state":{"heap":"monolith","type":{"a":"#TOP#","this":["infiniteRecursion*"]},"value":{"a":"[-Inf, +Inf]"}}}},{"nodeId":5,"description":{"expressions":["skip"],"state":{"heap":"monolith","type":{"a":"#TOP#","k":"#TOP#","this":["infiniteRecursion*"]},"value":{"a":"[-Inf, +Inf]","k":"_|_"}}}}]} \ No newline at end of file +{"name":"untyped infiniteRecursion::main(infiniteRecursion* this, untyped a)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"k = infiniteRecursion(this, a)"},{"id":1,"text":"k"},{"id":2,"subNodes":[3,4],"text":"infiniteRecursion(this, a)"},{"id":3,"text":"this"},{"id":4,"text":"a"},{"id":5,"text":"ret"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["k"],"state":{"heap":"monolith","type":{"a":"#TOP#","k":"_|_","this":["infiniteRecursion*"]},"value":{"a":"[-Inf, +Inf]","k":"_|_"}}}},{"nodeId":1,"description":{"expressions":["k"],"state":{"heap":"monolith","type":{"a":"#TOP#","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':19:34":"_|_","this":["infiniteRecursion*"]},"value":{"a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':19:34":"_|_"}}}},{"nodeId":2,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':19:34"],"state":{"heap":"monolith","type":{"a":"#TOP#","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':19:34":"_|_","this":["infiniteRecursion*"]},"value":{"a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':19:34":"_|_"}}}},{"nodeId":3,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"a":"#TOP#","this":["infiniteRecursion*"]},"value":{"a":"[-Inf, +Inf]"}}}},{"nodeId":4,"description":{"expressions":["a"],"state":{"heap":"monolith","type":{"a":"#TOP#","this":["infiniteRecursion*"]},"value":{"a":"[-Inf, +Inf]"}}}},{"nodeId":5,"description":{"expressions":["skip"],"state":{"heap":"monolith","type":{"a":"#TOP#","k":"_|_","this":["infiniteRecursion*"]},"value":{"a":"[-Inf, +Inf]","k":"_|_"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/last/report.json b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/last/report.json index e25040c1f..ba5bd3b1a 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/last/report.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/last/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_infiniteRecursion.infiniteRecursion(infiniteRecursion__this,_untyped_n)_345334468.json", "untyped_infiniteRecursion.infiniteRecursionAux1(infiniteRecursion__this,_untyped_n)_345336917.json", "untyped_infiniteRecursion.infiniteRecursionAux2(infiniteRecursion__this,_untyped_n)_345337072.json", "untyped_infiniteRecursion.main(infiniteRecursion__this,_untyped_a).json" ], "info" : { "cfgs" : "4", - "duration" : "71ms", - "end" : "2023-04-20T12:45:31.680+02:00", + "duration" : "18ms", + "end" : "2023-09-29T16:42:37.951+02:00", "expressions" : "25", "files" : "4", "globals" : "0", "members" : "4", "programs" : "1", - "start" : "2023-04-20T12:45:31.609+02:00", + "start" : "2023-09-29T16:42:37.933+02:00", "statements" : "8", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/interprocedural/infiniteRecursion2/last" } diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/last/untyped_infiniteRecursion.infiniteRecursion(infiniteRecursion__this,_untyped_n)_345334468.json b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/last/untyped_infiniteRecursion.infiniteRecursion(infiniteRecursion__this,_untyped_n)_345334468.json index db10ef82a..4ae7de0ef 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/last/untyped_infiniteRecursion.infiniteRecursion(infiniteRecursion__this,_untyped_n)_345334468.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/last/untyped_infiniteRecursion.infiniteRecursion(infiniteRecursion__this,_untyped_n)_345334468.json @@ -1 +1 @@ -{"name":"untyped infiniteRecursion::infiniteRecursion(infiniteRecursion* this, untyped n)","description":"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]","nodes":[{"id":0,"subNodes":[1,2],"text":"x = -(n, 1)"},{"id":1,"text":"x"},{"id":2,"subNodes":[3,4],"text":"-(n, 1)"},{"id":3,"text":"n"},{"id":4,"text":"1"},{"id":5,"subNodes":[6],"text":"return infiniteRecursionAux1(this, x)"},{"id":6,"subNodes":[7,8],"text":"infiniteRecursionAux1(this, x)"},{"id":7,"text":"this"},{"id":8,"text":"x"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":1,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":2,"description":{"expressions":["n - 1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":3,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":4,"description":{"expressions":["1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":5,"description":{"expressions":["ret_value@infiniteRecursion"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","ret_value@infiniteRecursion":"#TOP#","this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","ret_value@infiniteRecursion":"_|_","x":"[-Inf, +Inf]"}}}},{"nodeId":6,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':5:37"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':5:37":"#TOP#","n":"#TOP#","this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':5:37":"_|_","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":7,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":8,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}}]} \ No newline at end of file +{"name":"untyped infiniteRecursion::infiniteRecursion(infiniteRecursion* this, untyped n)","description":"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]","nodes":[{"id":0,"subNodes":[1,2],"text":"x = -(n, 1)"},{"id":1,"text":"x"},{"id":2,"subNodes":[3,4],"text":"-(n, 1)"},{"id":3,"text":"n"},{"id":4,"text":"1"},{"id":5,"subNodes":[6],"text":"return infiniteRecursionAux1(this, x)"},{"id":6,"subNodes":[7,8],"text":"infiniteRecursionAux1(this, x)"},{"id":7,"text":"this"},{"id":8,"text":"x"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":1,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":2,"description":{"expressions":["n - 1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":3,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":4,"description":{"expressions":["1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":5,"description":{"expressions":["ret_value@infiniteRecursion"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","ret_value@infiniteRecursion":"_|_","this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","ret_value@infiniteRecursion":"_|_","x":"[-Inf, +Inf]"}}}},{"nodeId":6,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':5:37"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':5:37":"_|_","n":"#TOP#","this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':5:37":"_|_","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":7,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":8,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"n":"#TOP#","this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/last/untyped_infiniteRecursion.infiniteRecursionAux1(infiniteRecursion__this,_untyped_n)_345336917.json b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/last/untyped_infiniteRecursion.infiniteRecursionAux1(infiniteRecursion__this,_untyped_n)_345336917.json index faabc3237..1948786a8 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/last/untyped_infiniteRecursion.infiniteRecursionAux1(infiniteRecursion__this,_untyped_n)_345336917.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/last/untyped_infiniteRecursion.infiniteRecursionAux1(infiniteRecursion__this,_untyped_n)_345336917.json @@ -1 +1 @@ -{"name":"untyped infiniteRecursion::infiniteRecursionAux1(infiniteRecursion* this, untyped n)","description":"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]","nodes":[{"id":0,"subNodes":[1,2],"text":"x = -(n, 2)"},{"id":1,"text":"x"},{"id":2,"subNodes":[3,4],"text":"-(n, 2)"},{"id":3,"text":"n"},{"id":4,"text":"2"},{"id":5,"subNodes":[6],"text":"return infiniteRecursionAux2(this, x)"},{"id":6,"subNodes":[7,8],"text":"infiniteRecursionAux2(this, x)"},{"id":7,"text":"this"},{"id":8,"text":"x"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":1,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":2,"description":{"expressions":["n - 2"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":3,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":4,"description":{"expressions":["2"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":5,"description":{"expressions":["ret_value@infiniteRecursionAux1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"ret_value@infiniteRecursionAux1":"#TOP#","this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","ret_value@infiniteRecursionAux1":"_|_","x":"[-Inf, +Inf]"}}}},{"nodeId":6,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':10:37"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':10:37":"#TOP#","n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':10:37":"_|_","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":7,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":8,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}}]} \ No newline at end of file +{"name":"untyped infiniteRecursion::infiniteRecursionAux1(infiniteRecursion* this, untyped n)","description":"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]","nodes":[{"id":0,"subNodes":[1,2],"text":"x = -(n, 2)"},{"id":1,"text":"x"},{"id":2,"subNodes":[3,4],"text":"-(n, 2)"},{"id":3,"text":"n"},{"id":4,"text":"2"},{"id":5,"subNodes":[6],"text":"return infiniteRecursionAux2(this, x)"},{"id":6,"subNodes":[7,8],"text":"infiniteRecursionAux2(this, x)"},{"id":7,"text":"this"},{"id":8,"text":"x"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":1,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":2,"description":{"expressions":["n - 2"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":3,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":4,"description":{"expressions":["2"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":5,"description":{"expressions":["ret_value@infiniteRecursionAux1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"ret_value@infiniteRecursionAux1":"_|_","this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","ret_value@infiniteRecursionAux1":"_|_","x":"[-Inf, +Inf]"}}}},{"nodeId":6,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':10:37"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':10:37":"_|_","n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':10:37":"_|_","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":7,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":8,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/last/untyped_infiniteRecursion.infiniteRecursionAux2(infiniteRecursion__this,_untyped_n)_345337072.json b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/last/untyped_infiniteRecursion.infiniteRecursionAux2(infiniteRecursion__this,_untyped_n)_345337072.json index 06634a99e..8c8961793 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/last/untyped_infiniteRecursion.infiniteRecursionAux2(infiniteRecursion__this,_untyped_n)_345337072.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/last/untyped_infiniteRecursion.infiniteRecursionAux2(infiniteRecursion__this,_untyped_n)_345337072.json @@ -1 +1 @@ -{"name":"untyped infiniteRecursion::infiniteRecursionAux2(infiniteRecursion* this, untyped n)","description":"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]","nodes":[{"id":0,"subNodes":[1,2],"text":"x = +(n, 1)"},{"id":1,"text":"x"},{"id":2,"subNodes":[3,4],"text":"+(n, 1)"},{"id":3,"text":"n"},{"id":4,"text":"1"},{"id":5,"subNodes":[6],"text":"return infiniteRecursion(this, x)"},{"id":6,"subNodes":[7,8],"text":"infiniteRecursion(this, x)"},{"id":7,"text":"this"},{"id":8,"text":"x"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":1,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":2,"description":{"expressions":["n + 1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":3,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":4,"description":{"expressions":["1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":5,"description":{"expressions":["ret_value@infiniteRecursionAux2"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"ret_value@infiniteRecursionAux2":"#TOP#","this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","ret_value@infiniteRecursionAux2":"_|_","x":"[-Inf, +Inf]"}}}},{"nodeId":6,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':15:33"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':15:33":"#TOP#","n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':15:33":"_|_","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":7,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":8,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}}]} \ No newline at end of file +{"name":"untyped infiniteRecursion::infiniteRecursionAux2(infiniteRecursion* this, untyped n)","description":"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]","nodes":[{"id":0,"subNodes":[1,2],"text":"x = +(n, 1)"},{"id":1,"text":"x"},{"id":2,"subNodes":[3,4],"text":"+(n, 1)"},{"id":3,"text":"n"},{"id":4,"text":"1"},{"id":5,"subNodes":[6],"text":"return infiniteRecursion(this, x)"},{"id":6,"subNodes":[7,8],"text":"infiniteRecursion(this, x)"},{"id":7,"text":"this"},{"id":8,"text":"x"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":1,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":2,"description":{"expressions":["n + 1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":3,"description":{"expressions":["n"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":4,"description":{"expressions":["1"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]"}}}},{"nodeId":5,"description":{"expressions":["ret_value@infiniteRecursionAux2"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"ret_value@infiniteRecursionAux2":"_|_","this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","ret_value@infiniteRecursionAux2":"_|_","x":"[-Inf, +Inf]"}}}},{"nodeId":6,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':15:33"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':15:33":"_|_","n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':15:33":"_|_","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":7,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}},{"nodeId":8,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"#TOP#","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":["float32","int32"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:this":["infiniteRecursion*"],"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":["float32","int32"],"n":["float32","int32"],"this":["infiniteRecursion*"],"x":["float32","int32"]},"value":{"['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':19:34]:a":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:['imp-testcases/interprocedural/infiniteRecursion2.imp':5:37]:x":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:n":"[-Inf, +Inf]","['imp-testcases/interprocedural/infiniteRecursion2.imp':10:37]:x":"[-Inf, +Inf]","n":"[-Inf, +Inf]","x":"[-Inf, +Inf]"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/last/untyped_infiniteRecursion.main(infiniteRecursion__this,_untyped_a).json b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/last/untyped_infiniteRecursion.main(infiniteRecursion__this,_untyped_a).json index 457d3218e..a0ecf4b9b 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/last/untyped_infiniteRecursion.main(infiniteRecursion__this,_untyped_a).json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/infiniteRecursion2/last/untyped_infiniteRecursion.main(infiniteRecursion__this,_untyped_a).json @@ -1 +1 @@ -{"name":"untyped infiniteRecursion::main(infiniteRecursion* this, untyped a)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"k = infiniteRecursion(this, a)"},{"id":1,"text":"k"},{"id":2,"subNodes":[3,4],"text":"infiniteRecursion(this, a)"},{"id":3,"text":"this"},{"id":4,"text":"a"},{"id":5,"text":"ret"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["k"],"state":{"heap":"monolith","type":{"a":"#TOP#","k":"#TOP#","this":["infiniteRecursion*"]},"value":{"a":"[-Inf, +Inf]","k":"_|_"}}}},{"nodeId":1,"description":{"expressions":["k"],"state":{"heap":"monolith","type":{"a":"#TOP#","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':19:34":"#TOP#","this":["infiniteRecursion*"]},"value":{"a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':19:34":"_|_"}}}},{"nodeId":2,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':19:34"],"state":{"heap":"monolith","type":{"a":"#TOP#","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':19:34":"#TOP#","this":["infiniteRecursion*"]},"value":{"a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':19:34":"_|_"}}}},{"nodeId":3,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"a":"#TOP#","this":["infiniteRecursion*"]},"value":{"a":"[-Inf, +Inf]"}}}},{"nodeId":4,"description":{"expressions":["a"],"state":{"heap":"monolith","type":{"a":"#TOP#","this":["infiniteRecursion*"]},"value":{"a":"[-Inf, +Inf]"}}}},{"nodeId":5,"description":{"expressions":["skip"],"state":{"heap":"monolith","type":{"a":"#TOP#","k":"#TOP#","this":["infiniteRecursion*"]},"value":{"a":"[-Inf, +Inf]","k":"_|_"}}}}]} \ No newline at end of file +{"name":"untyped infiniteRecursion::main(infiniteRecursion* this, untyped a)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"k = infiniteRecursion(this, a)"},{"id":1,"text":"k"},{"id":2,"subNodes":[3,4],"text":"infiniteRecursion(this, a)"},{"id":3,"text":"this"},{"id":4,"text":"a"},{"id":5,"text":"ret"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["k"],"state":{"heap":"monolith","type":{"a":"#TOP#","k":"_|_","this":["infiniteRecursion*"]},"value":{"a":"[-Inf, +Inf]","k":"_|_"}}}},{"nodeId":1,"description":{"expressions":["k"],"state":{"heap":"monolith","type":{"a":"#TOP#","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':19:34":"_|_","this":["infiniteRecursion*"]},"value":{"a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':19:34":"_|_"}}}},{"nodeId":2,"description":{"expressions":["call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':19:34"],"state":{"heap":"monolith","type":{"a":"#TOP#","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':19:34":"_|_","this":["infiniteRecursion*"]},"value":{"a":"[-Inf, +Inf]","call_ret_value@'imp-testcases/interprocedural/infiniteRecursion2.imp':19:34":"_|_"}}}},{"nodeId":3,"description":{"expressions":["this"],"state":{"heap":"monolith","type":{"a":"#TOP#","this":["infiniteRecursion*"]},"value":{"a":"[-Inf, +Inf]"}}}},{"nodeId":4,"description":{"expressions":["a"],"state":{"heap":"monolith","type":{"a":"#TOP#","this":["infiniteRecursion*"]},"value":{"a":"[-Inf, +Inf]"}}}},{"nodeId":5,"description":{"expressions":["skip"],"state":{"heap":"monolith","type":{"a":"#TOP#","k":"_|_","this":["infiniteRecursion*"]},"value":{"a":"[-Inf, +Inf]","k":"_|_"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/nestedRecursions/full/report.json b/lisa/lisa-analyses/imp-testcases/interprocedural/nestedRecursions/full/report.json index 774b6c8ca..7180cce00 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/nestedRecursions/full/report.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/nestedRecursions/full/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_tests.aux1(tests__this,_untyped_x,_untyped_b,_untyped_n)_1643451971.json", "untyped_tests.aux2(tests__this,_untyped_x,_untyped_b,_untyped_n)_1643452064.json", "untyped_tests.inner(tests__this,_untyped_n,_untyped_b)_948286696.json", "untyped_tests.main(tests__this,_untyped_a,_untyped_b).json", "untyped_tests.outer(tests__this,_untyped_n,_untyped_b)_-1983631984.json" ], "info" : { "cfgs" : "5", - "duration" : "99ms", - "end" : "2023-04-20T12:45:31.945+02:00", + "duration" : "117ms", + "end" : "2023-09-07T11:45:50.257+02:00", "expressions" : "56", "files" : "5", "globals" : "0", "members" : "5", "programs" : "1", - "start" : "2023-04-20T12:45:31.846+02:00", + "start" : "2023-09-07T11:45:50.140+02:00", "statements" : "15", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/interprocedural/nestedRecursions/full" } diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/nestedRecursions/insensitive/report.json b/lisa/lisa-analyses/imp-testcases/interprocedural/nestedRecursions/insensitive/report.json index 8167b9c93..5e7dc140b 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/nestedRecursions/insensitive/report.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/nestedRecursions/insensitive/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_tests.aux1(tests__this,_untyped_x,_untyped_b,_untyped_n).json", "untyped_tests.aux2(tests__this,_untyped_x,_untyped_b,_untyped_n).json", "untyped_tests.inner(tests__this,_untyped_n,_untyped_b).json", "untyped_tests.main(tests__this,_untyped_a,_untyped_b).json", "untyped_tests.outer(tests__this,_untyped_n,_untyped_b).json" ], "info" : { "cfgs" : "5", - "duration" : "112ms", - "end" : "2023-04-20T12:45:32.279+02:00", + "duration" : "69ms", + "end" : "2023-09-07T11:45:50.565+02:00", "expressions" : "56", "files" : "5", "globals" : "0", "members" : "5", "programs" : "1", - "start" : "2023-04-20T12:45:32.167+02:00", + "start" : "2023-09-07T11:45:50.496+02:00", "statements" : "15", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/interprocedural/nestedRecursions/insensitive" } diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/nestedRecursions/kdepth/report.json b/lisa/lisa-analyses/imp-testcases/interprocedural/nestedRecursions/kdepth/report.json index 433d230bc..bc59e7346 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/nestedRecursions/kdepth/report.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/nestedRecursions/kdepth/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_tests.aux1(tests__this,_untyped_x,_untyped_b,_untyped_n)_1643451971.json", "untyped_tests.aux2(tests__this,_untyped_x,_untyped_b,_untyped_n)_1643452064.json", "untyped_tests.inner(tests__this,_untyped_n,_untyped_b)_948286696.json", "untyped_tests.main(tests__this,_untyped_a,_untyped_b).json", "untyped_tests.outer(tests__this,_untyped_n,_untyped_b)_-1983631984.json" ], "info" : { "cfgs" : "5", - "duration" : "109ms", - "end" : "2023-04-20T12:45:32.672+02:00", + "duration" : "86ms", + "end" : "2023-09-07T11:45:50.923+02:00", "expressions" : "56", "files" : "5", "globals" : "0", "members" : "5", "programs" : "1", - "start" : "2023-04-20T12:45:32.563+02:00", + "start" : "2023-09-07T11:45:50.837+02:00", "statements" : "15", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/interprocedural/nestedRecursions/kdepth" } diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/nestedRecursions/last/report.json b/lisa/lisa-analyses/imp-testcases/interprocedural/nestedRecursions/last/report.json index d0e0d8116..63818b3ae 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/nestedRecursions/last/report.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/nestedRecursions/last/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_tests.aux1(tests__this,_untyped_x,_untyped_b,_untyped_n)_-1983631798.json", "untyped_tests.aux2(tests__this,_untyped_x,_untyped_b,_untyped_n)_-1983631705.json", "untyped_tests.inner(tests__this,_untyped_n,_untyped_b)_-1983631209.json", "untyped_tests.main(tests__this,_untyped_a,_untyped_b).json", "untyped_tests.outer(tests__this,_untyped_n,_untyped_b)_-1983631984.json" ], "info" : { "cfgs" : "5", - "duration" : "96ms", - "end" : "2023-04-20T12:45:32.994+02:00", + "duration" : "41ms", + "end" : "2023-09-07T11:45:51.343+02:00", "expressions" : "56", "files" : "5", "globals" : "0", "members" : "5", "programs" : "1", - "start" : "2023-04-20T12:45:32.898+02:00", + "start" : "2023-09-07T11:45:51.302+02:00", "statements" : "15", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/interprocedural/nestedRecursions/last" } diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/twoRecursions/full/report.json b/lisa/lisa-analyses/imp-testcases/interprocedural/twoRecursions/full/report.json index 3cd39a9e2..7b9a7b424 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/twoRecursions/full/report.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/twoRecursions/full/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_tests.aux1(tests__this,_untyped_x,_untyped_b,_untyped_n)_-1670307468.json", "untyped_tests.aux2(tests__this,_untyped_x,_untyped_b,_untyped_n)_-1670307375.json", "untyped_tests.main(tests__this,_untyped_a,_untyped_b).json", "untyped_tests.rec(tests__this,_untyped_n,_untyped_b)_-186414910.json" ], "info" : { "cfgs" : "4", - "duration" : "80ms", - "end" : "2023-04-20T12:45:33.329+02:00", + "duration" : "99ms", + "end" : "2023-09-07T11:45:51.799+02:00", "expressions" : "40", "files" : "4", "globals" : "0", "members" : "4", "programs" : "1", - "start" : "2023-04-20T12:45:33.249+02:00", + "start" : "2023-09-07T11:45:51.700+02:00", "statements" : "11", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/interprocedural/twoRecursions/full" } diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/twoRecursions/insensitive/report.json b/lisa/lisa-analyses/imp-testcases/interprocedural/twoRecursions/insensitive/report.json index 2ed09383c..890fa4779 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/twoRecursions/insensitive/report.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/twoRecursions/insensitive/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_tests.aux1(tests__this,_untyped_x,_untyped_b,_untyped_n).json", "untyped_tests.aux2(tests__this,_untyped_x,_untyped_b,_untyped_n).json", "untyped_tests.main(tests__this,_untyped_a,_untyped_b).json", "untyped_tests.rec(tests__this,_untyped_n,_untyped_b).json" ], "info" : { "cfgs" : "4", - "duration" : "92ms", - "end" : "2023-04-20T12:45:33.663+02:00", + "duration" : "42ms", + "end" : "2023-09-07T11:45:52.051+02:00", "expressions" : "40", "files" : "4", "globals" : "0", "members" : "4", "programs" : "1", - "start" : "2023-04-20T12:45:33.571+02:00", + "start" : "2023-09-07T11:45:52.009+02:00", "statements" : "11", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/interprocedural/twoRecursions/insensitive" } diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/twoRecursions/kdepth/report.json b/lisa/lisa-analyses/imp-testcases/interprocedural/twoRecursions/kdepth/report.json index c09a36de8..d7fd97fc8 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/twoRecursions/kdepth/report.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/twoRecursions/kdepth/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_tests.aux1(tests__this,_untyped_x,_untyped_b,_untyped_n)_-1670307468.json", "untyped_tests.aux2(tests__this,_untyped_x,_untyped_b,_untyped_n)_-1670307375.json", "untyped_tests.main(tests__this,_untyped_a,_untyped_b).json", "untyped_tests.rec(tests__this,_untyped_n,_untyped_b)_-186414910.json" ], "info" : { "cfgs" : "4", - "duration" : "68ms", - "end" : "2023-04-20T12:45:33.927+02:00", + "duration" : "28ms", + "end" : "2023-09-07T11:45:52.256+02:00", "expressions" : "40", "files" : "4", "globals" : "0", "members" : "4", "programs" : "1", - "start" : "2023-04-20T12:45:33.859+02:00", + "start" : "2023-09-07T11:45:52.228+02:00", "statements" : "11", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/interprocedural/twoRecursions/kdepth" } diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/twoRecursions/last/report.json b/lisa/lisa-analyses/imp-testcases/interprocedural/twoRecursions/last/report.json index 1ea17b53e..c590e7086 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/twoRecursions/last/report.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/twoRecursions/last/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_tests.aux1(tests__this,_untyped_x,_untyped_b,_untyped_n)_-186412523.json", "untyped_tests.aux2(tests__this,_untyped_x,_untyped_b,_untyped_n)_-186412430.json", "untyped_tests.main(tests__this,_untyped_a,_untyped_b).json", "untyped_tests.rec(tests__this,_untyped_n,_untyped_b)_-186414910.json" ], "info" : { "cfgs" : "4", - "duration" : "87ms", - "end" : "2023-04-20T12:45:34.232+02:00", + "duration" : "77ms", + "end" : "2023-09-07T11:45:52.498+02:00", "expressions" : "40", "files" : "4", "globals" : "0", "members" : "4", "programs" : "1", - "start" : "2023-04-20T12:45:34.145+02:00", + "start" : "2023-09-07T11:45:52.421+02:00", "statements" : "11", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/interprocedural/twoRecursions/last" } diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/unreachableBaseCase/full/report.json b/lisa/lisa-analyses/imp-testcases/interprocedural/unreachableBaseCase/full/report.json index 2fea94301..68fcde3e0 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/unreachableBaseCase/full/report.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/unreachableBaseCase/full/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_tests.init(tests__this,_untyped_x)_1748710429.json", "untyped_tests.main(tests__this,_untyped_x).json", "untyped_tests.rec(tests__this,_untyped_n)_124157764.json" ], "info" : { "cfgs" : "3", - "duration" : "63ms", - "end" : "2023-04-20T12:45:34.521+02:00", + "duration" : "60ms", + "end" : "2023-09-07T11:45:52.845+02:00", "expressions" : "22", "files" : "3", "globals" : "0", "members" : "3", "programs" : "1", - "start" : "2023-04-20T12:45:34.458+02:00", + "start" : "2023-09-07T11:45:52.785+02:00", "statements" : "9", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/interprocedural/unreachableBaseCase/full" } diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/unreachableBaseCase/insensitive/report.json b/lisa/lisa-analyses/imp-testcases/interprocedural/unreachableBaseCase/insensitive/report.json index 888e2a03f..12123c8a2 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/unreachableBaseCase/insensitive/report.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/unreachableBaseCase/insensitive/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_tests.init(tests__this,_untyped_x).json", "untyped_tests.main(tests__this,_untyped_x).json", "untyped_tests.rec(tests__this,_untyped_n).json" ], "info" : { "cfgs" : "3", - "duration" : "51ms", - "end" : "2023-04-20T12:45:34.764+02:00", + "duration" : "59ms", + "end" : "2023-09-07T11:45:53.079+02:00", "expressions" : "22", "files" : "3", "globals" : "0", "members" : "3", "programs" : "1", - "start" : "2023-04-20T12:45:34.713+02:00", + "start" : "2023-09-07T11:45:53.020+02:00", "statements" : "9", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/interprocedural/unreachableBaseCase/insensitive" } diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/unreachableBaseCase/kdepth/report.json b/lisa/lisa-analyses/imp-testcases/interprocedural/unreachableBaseCase/kdepth/report.json index 34bcf0371..054db8d08 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/unreachableBaseCase/kdepth/report.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/unreachableBaseCase/kdepth/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_tests.init(tests__this,_untyped_x)_1748710429.json", "untyped_tests.main(tests__this,_untyped_x).json", "untyped_tests.rec(tests__this,_untyped_n)_124157764.json" ], "info" : { "cfgs" : "3", - "duration" : "59ms", - "end" : "2023-04-20T12:45:34.959+02:00", + "duration" : "60ms", + "end" : "2023-09-07T11:45:53.275+02:00", "expressions" : "22", "files" : "3", "globals" : "0", "members" : "3", "programs" : "1", - "start" : "2023-04-20T12:45:34.900+02:00", + "start" : "2023-09-07T11:45:53.215+02:00", "statements" : "9", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/interprocedural/unreachableBaseCase/kdepth" } diff --git a/lisa/lisa-analyses/imp-testcases/interprocedural/unreachableBaseCase/last/report.json b/lisa/lisa-analyses/imp-testcases/interprocedural/unreachableBaseCase/last/report.json index ef283467f..5acb86ab2 100644 --- a/lisa/lisa-analyses/imp-testcases/interprocedural/unreachableBaseCase/last/report.json +++ b/lisa/lisa-analyses/imp-testcases/interprocedural/unreachableBaseCase/last/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_tests.init(tests__this,_untyped_x)_1748710429.json", "untyped_tests.main(tests__this,_untyped_x).json", "untyped_tests.rec(tests__this,_untyped_n)_1748709344.json" ], "info" : { "cfgs" : "3", - "duration" : "90ms", - "end" : "2023-04-20T12:45:35.209+02:00", + "duration" : "47ms", + "end" : "2023-09-07T11:45:53.478+02:00", "expressions" : "22", "files" : "3", "globals" : "0", "members" : "3", "programs" : "1", - "start" : "2023-04-20T12:45:35.119+02:00", + "start" : "2023-09-07T11:45:53.431+02:00", "statements" : "9", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/interprocedural/unreachableBaseCase/last" } diff --git a/lisa/lisa-analyses/imp-testcases/interval/report.json b/lisa/lisa-analyses/imp-testcases/interval/report.json index 977d7ce4c..dd562990a 100644 --- a/lisa/lisa-analyses/imp-testcases/interval/report.json +++ b/lisa/lisa-analyses/imp-testcases/interval/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_tutorial.constants(tutorial__this).json", "untyped_tutorial.div(tutorial__this,_untyped_i,_untyped_j).json", "untyped_tutorial.gcd(tutorial__this,_untyped_a,_untyped_b).json", "untyped_tutorial.glb(tutorial__this,_untyped_x,_untyped_y).json", "untyped_tutorial.intv_dec(tutorial__this).json", "untyped_tutorial.sat(tutorial__this,_untyped_x,_untyped_y).json", "untyped_tutorial.sign_parity_example(tutorial__this).json", "untyped_tutorial.ub_example(tutorial__this,_untyped_y,_untyped_z).json" ], "info" : { "cfgs" : "8", - "duration" : "156ms", - "end" : "2023-04-20T12:45:38.467+02:00", + "duration" : "105ms", + "end" : "2023-09-07T11:45:56.514+02:00", "expressions" : "110", "files" : "8", "globals" : "0", "members" : "8", "programs" : "1", - "start" : "2023-04-20T12:45:38.311+02:00", + "start" : "2023-09-07T11:45:56.409+02:00", "statements" : "45", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/interval" } diff --git a/lisa/lisa-analyses/imp-testcases/liveness/liveness.imp b/lisa/lisa-analyses/imp-testcases/liveness/liveness.imp new file mode 100644 index 000000000..5e5da15a3 --- /dev/null +++ b/lisa/lisa-analyses/imp-testcases/liveness/liveness.imp @@ -0,0 +1,53 @@ +class ae { + + f0(a, b) { + def x = a + b; + def y = a * b; + def z = x * y; + def d = y + 7; + def w = x + y; + + return; + } + + f1(a, b) { + def x = a + b; + def y = a * b; + + while (y > a) { + a = a + 1; + x = a + b; + } + + return x; + } + + f2(c) { + def a = 0; + + while (a < 10) { + def b = a + 1; + c = c + b; + a = b * 2; + } + + return c; + } + + + f3() { + def x = 2; + def y = 4; + x = 1; + def z = 0; + + if (y > 0) { + z = x; + } else { + z = y * y; + } + + x = z; + return x; + } +} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/liveness/report.json b/lisa/lisa-analyses/imp-testcases/liveness/report.json new file mode 100644 index 000000000..79365e4ef --- /dev/null +++ b/lisa/lisa-analyses/imp-testcases/liveness/report.json @@ -0,0 +1,38 @@ +{ + "warnings" : [ ], + "files" : [ "report.json", "untyped_ae.f0(ae__this,_untyped_a,_untyped_b).json", "untyped_ae.f1(ae__this,_untyped_a,_untyped_b).json", "untyped_ae.f2(ae__this,_untyped_c).json", "untyped_ae.f3(ae__this).json" ], + "info" : { + "cfgs" : "4", + "duration" : "445ms", + "end" : "2023-10-06T17:11:36.375+02:00", + "expressions" : "75", + "files" : "4", + "globals" : "0", + "members" : "4", + "programs" : "1", + "start" : "2023-10-06T17:11:35.930+02:00", + "statements" : "27", + "units" : "1", + "version" : "0.1b8", + "warnings" : "0" + }, + "configuration" : { + "analysisGraphs" : "NONE", + "descendingPhaseType" : "NONE", + "dumpForcesUnwinding" : "false", + "fixpointWorkingSet" : "DuplicateFreeFIFOWorkingSet", + "glbThreshold" : "5", + "hotspots" : "unset", + "jsonOutput" : "true", + "openCallPolicy" : "WorstCasePolicy", + "optimize" : "false", + "recursionWideningThreshold" : "5", + "semanticChecks" : "", + "serializeInputs" : "false", + "serializeResults" : "true", + "syntacticChecks" : "", + "useWideningPoints" : "true", + "wideningThreshold" : "5", + "workdir" : "test-outputs/liveness" + } +} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/liveness/untyped_ae.f0(ae__this,_untyped_a,_untyped_b).json b/lisa/lisa-analyses/imp-testcases/liveness/untyped_ae.f0(ae__this,_untyped_a,_untyped_b).json new file mode 100644 index 000000000..d2a40c0b3 --- /dev/null +++ b/lisa/lisa-analyses/imp-testcases/liveness/untyped_ae.f0(ae__this,_untyped_a,_untyped_b).json @@ -0,0 +1 @@ +{"name":"untyped ae::f0(ae* this, untyped a, untyped b)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"x = +(a, b)"},{"id":1,"text":"x"},{"id":2,"subNodes":[3,4],"text":"+(a, b)"},{"id":3,"text":"a"},{"id":4,"text":"b"},{"id":5,"subNodes":[6,7],"text":"y = *(a, b)"},{"id":6,"text":"y"},{"id":7,"subNodes":[8,9],"text":"*(a, b)"},{"id":8,"text":"a"},{"id":9,"text":"b"},{"id":10,"subNodes":[11,12],"text":"z = *(x, y)"},{"id":11,"text":"z"},{"id":12,"subNodes":[13,14],"text":"*(x, y)"},{"id":13,"text":"x"},{"id":14,"text":"y"},{"id":15,"subNodes":[16,17],"text":"d = +(y, 7)"},{"id":16,"text":"d"},{"id":17,"subNodes":[18,19],"text":"+(y, 7)"},{"id":18,"text":"y"},{"id":19,"text":"7"},{"id":20,"subNodes":[21,22],"text":"w = +(x, y)"},{"id":21,"text":"w"},{"id":22,"subNodes":[23,24],"text":"+(x, y)"},{"id":23,"text":"x"},{"id":24,"text":"y"},{"id":25,"text":"ret"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"},{"sourceId":5,"destId":10,"kind":"SequentialEdge"},{"sourceId":10,"destId":15,"kind":"SequentialEdge"},{"sourceId":15,"destId":20,"kind":"SequentialEdge"},{"sourceId":20,"destId":25,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"x":["float32","int32","string"]},"value":["a","b"]}}},{"nodeId":1,"description":{"expressions":["x"],"state":{"heap":"monolith","type":"#TOP#","value":["a","b","x"]}}},{"nodeId":2,"description":{"expressions":["a + b","a strcat b"],"state":{"heap":"monolith","type":"#TOP#","value":["a","b","x"]}}},{"nodeId":3,"description":{"expressions":["a"],"state":{"heap":"monolith","type":"#TOP#","value":["a","b","x"]}}},{"nodeId":4,"description":{"expressions":["b"],"state":{"heap":"monolith","type":"#TOP#","value":["a","b","x"]}}},{"nodeId":5,"description":{"expressions":["y"],"state":{"heap":"monolith","type":{"y":["float32","int32"]},"value":["a","b","x"]}}},{"nodeId":6,"description":{"expressions":["y"],"state":{"heap":"monolith","type":"#TOP#","value":["x","y"]}}},{"nodeId":7,"description":{"expressions":["a * b"],"state":{"heap":"monolith","type":"#TOP#","value":["a","b","x","y"]}}},{"nodeId":8,"description":{"expressions":["a"],"state":{"heap":"monolith","type":"#TOP#","value":["a","b","x","y"]}}},{"nodeId":9,"description":{"expressions":["b"],"state":{"heap":"monolith","type":"#TOP#","value":["b","x","y"]}}},{"nodeId":10,"description":{"expressions":["z"],"state":{"heap":"monolith","type":{"z":["float32","int32"]},"value":["x","y"]}}},{"nodeId":11,"description":{"expressions":["z"],"state":{"heap":"monolith","type":"#TOP#","value":["x","y","z"]}}},{"nodeId":12,"description":{"expressions":["x * y"],"state":{"heap":"monolith","type":"#TOP#","value":["x","y","z"]}}},{"nodeId":13,"description":{"expressions":["x"],"state":{"heap":"monolith","type":"#TOP#","value":["x","y","z"]}}},{"nodeId":14,"description":{"expressions":["y"],"state":{"heap":"monolith","type":"#TOP#","value":["x","y","z"]}}},{"nodeId":15,"description":{"expressions":["d"],"state":{"heap":"monolith","type":{"d":["float32","int32"]},"value":["x","y"]}}},{"nodeId":16,"description":{"expressions":["d"],"state":{"heap":"monolith","type":"#TOP#","value":["d","x","y"]}}},{"nodeId":17,"description":{"expressions":["y + 7"],"state":{"heap":"monolith","type":"#TOP#","value":["d","x","y"]}}},{"nodeId":18,"description":{"expressions":["y"],"state":{"heap":"monolith","type":"#TOP#","value":["d","x","y"]}}},{"nodeId":19,"description":{"expressions":["7"],"state":{"heap":"monolith","type":"#TOP#","value":["d","x","y"]}}},{"nodeId":20,"description":{"expressions":["w"],"state":{"heap":"monolith","type":{"w":["float32","int32","string"]},"value":["x","y"]}}},{"nodeId":21,"description":{"expressions":["w"],"state":{"heap":"monolith","type":"#TOP#","value":["w"]}}},{"nodeId":22,"description":{"expressions":["x + y","x strcat y"],"state":{"heap":"monolith","type":"#TOP#","value":["w","x","y"]}}},{"nodeId":23,"description":{"expressions":["x"],"state":{"heap":"monolith","type":"#TOP#","value":["w","x","y"]}}},{"nodeId":24,"description":{"expressions":["y"],"state":{"heap":"monolith","type":"#TOP#","value":["w","y"]}}},{"nodeId":25,"description":{"expressions":["skip"],"state":{"heap":"monolith","type":"#TOP#","value":[]}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/liveness/untyped_ae.f1(ae__this,_untyped_a,_untyped_b).json b/lisa/lisa-analyses/imp-testcases/liveness/untyped_ae.f1(ae__this,_untyped_a,_untyped_b).json new file mode 100644 index 000000000..23b1be3e2 --- /dev/null +++ b/lisa/lisa-analyses/imp-testcases/liveness/untyped_ae.f1(ae__this,_untyped_a,_untyped_b).json @@ -0,0 +1 @@ +{"name":"untyped ae::f1(ae* this, untyped a, untyped b)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"x = +(a, b)"},{"id":1,"text":"x"},{"id":2,"subNodes":[3,4],"text":"+(a, b)"},{"id":3,"text":"a"},{"id":4,"text":"b"},{"id":5,"subNodes":[6,7],"text":"y = *(a, b)"},{"id":6,"text":"y"},{"id":7,"subNodes":[8,9],"text":"*(a, b)"},{"id":8,"text":"a"},{"id":9,"text":"b"},{"id":10,"subNodes":[11,12],"text":">(y, a)"},{"id":11,"text":"y"},{"id":12,"text":"a"},{"id":13,"subNodes":[14,15],"text":"a = +(a, 1)"},{"id":14,"text":"a"},{"id":15,"subNodes":[16,17],"text":"+(a, 1)"},{"id":16,"text":"a"},{"id":17,"text":"1"},{"id":18,"subNodes":[19,20],"text":"x = +(a, b)"},{"id":19,"text":"x"},{"id":20,"subNodes":[21,22],"text":"+(a, b)"},{"id":21,"text":"a"},{"id":22,"text":"b"},{"id":23,"subNodes":[24],"text":"return x"},{"id":24,"text":"x"}],"edges":[{"sourceId":0,"destId":5,"kind":"SequentialEdge"},{"sourceId":5,"destId":10,"kind":"SequentialEdge"},{"sourceId":10,"destId":13,"kind":"TrueEdge"},{"sourceId":10,"destId":23,"kind":"FalseEdge"},{"sourceId":13,"destId":18,"kind":"SequentialEdge"},{"sourceId":18,"destId":10,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"ret_value@f1":"#TOP#","x":["float32","int32","string"]},"value":["a","b"]}}},{"nodeId":1,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"ret_value@f1":"#TOP#"},"value":["a","b","x"]}}},{"nodeId":2,"description":{"expressions":["a + b","a strcat b"],"state":{"heap":"monolith","type":{"ret_value@f1":"#TOP#"},"value":["a","b","x"]}}},{"nodeId":3,"description":{"expressions":["a"],"state":{"heap":"monolith","type":{"ret_value@f1":"#TOP#"},"value":["a","b","x"]}}},{"nodeId":4,"description":{"expressions":["b"],"state":{"heap":"monolith","type":{"ret_value@f1":"#TOP#"},"value":["a","b","x"]}}},{"nodeId":5,"description":{"expressions":["y"],"state":{"heap":"monolith","type":{"a":["float32","int32"],"ret_value@f1":"#TOP#","x":["float32","int32","string"],"y":["float32","int32"]},"value":["a","b","x"]}}},{"nodeId":6,"description":{"expressions":["y"],"state":{"heap":"monolith","type":{"a":["float32","int32"],"ret_value@f1":"#TOP#","x":["float32","int32","string"]},"value":["a","b","x","y"]}}},{"nodeId":7,"description":{"expressions":["a * b"],"state":{"heap":"monolith","type":{"a":["float32","int32"],"ret_value@f1":"#TOP#","x":["float32","int32","string"]},"value":["a","b","x","y"]}}},{"nodeId":8,"description":{"expressions":["a"],"state":{"heap":"monolith","type":{"a":["float32","int32"],"ret_value@f1":"#TOP#","x":["float32","int32","string"]},"value":["a","b","x","y"]}}},{"nodeId":9,"description":{"expressions":["b"],"state":{"heap":"monolith","type":{"a":["float32","int32"],"ret_value@f1":"#TOP#","x":["float32","int32","string"]},"value":["a","b","x","y"]}}},{"nodeId":10,"description":{"expressions":["y > a"],"state":{"heap":"monolith","type":{"a":["float32","int32"],"ret_value@f1":"#TOP#","x":["float32","int32","string"]},"value":["a","b","x","y"]}}},{"nodeId":11,"description":{"expressions":["y"],"state":{"heap":"monolith","type":{"a":["float32","int32"],"ret_value@f1":"#TOP#","x":["float32","int32","string"]},"value":["a","b","x","y"]}}},{"nodeId":12,"description":{"expressions":["a"],"state":{"heap":"monolith","type":{"a":["float32","int32"],"ret_value@f1":"#TOP#","x":["float32","int32","string"]},"value":["a","b","x","y"]}}},{"nodeId":13,"description":{"expressions":["a"],"state":{"heap":"monolith","type":{"a":["float32","int32"],"ret_value@f1":"#TOP#","x":["float32","int32","string"]},"value":["a","b","y"]}}},{"nodeId":14,"description":{"expressions":["a"],"state":{"heap":"monolith","type":{"ret_value@f1":"#TOP#","x":["float32","int32","string"]},"value":["a","b","y"]}}},{"nodeId":15,"description":{"expressions":["a + 1"],"state":{"heap":"monolith","type":{"ret_value@f1":"#TOP#","x":["float32","int32","string"]},"value":["a","b","y"]}}},{"nodeId":16,"description":{"expressions":["a"],"state":{"heap":"monolith","type":{"ret_value@f1":"#TOP#","x":["float32","int32","string"]},"value":["a","b","y"]}}},{"nodeId":17,"description":{"expressions":["1"],"state":{"heap":"monolith","type":{"ret_value@f1":"#TOP#","x":["float32","int32","string"]},"value":["a","b","y"]}}},{"nodeId":18,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"a":["float32","int32"],"ret_value@f1":"#TOP#","x":["float32","int32","string"]},"value":["a","b","y"]}}},{"nodeId":19,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"a":["float32","int32"],"ret_value@f1":"#TOP#","x":["float32","int32","string"]},"value":["a","b","x","y"]}}},{"nodeId":20,"description":{"expressions":["a + b","a strcat b"],"state":{"heap":"monolith","type":{"a":["float32","int32"],"ret_value@f1":"#TOP#","x":["float32","int32","string"]},"value":["a","b","x","y"]}}},{"nodeId":21,"description":{"expressions":["a"],"state":{"heap":"monolith","type":{"a":["float32","int32"],"ret_value@f1":"#TOP#","x":["float32","int32","string"]},"value":["a","b","x","y"]}}},{"nodeId":22,"description":{"expressions":["b"],"state":{"heap":"monolith","type":{"a":["float32","int32"],"ret_value@f1":"#TOP#","x":["float32","int32","string"]},"value":["a","b","x","y"]}}},{"nodeId":23,"description":{"expressions":["ret_value@f1"],"state":{"heap":"monolith","type":{"ret_value@f1":"#TOP#"},"value":["x"]}}},{"nodeId":24,"description":{"expressions":["x"],"state":{"heap":"monolith","type":"#TOP#","value":["x"]}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/liveness/untyped_ae.f2(ae__this,_untyped_c).json b/lisa/lisa-analyses/imp-testcases/liveness/untyped_ae.f2(ae__this,_untyped_c).json new file mode 100644 index 000000000..6b186e2e9 --- /dev/null +++ b/lisa/lisa-analyses/imp-testcases/liveness/untyped_ae.f2(ae__this,_untyped_c).json @@ -0,0 +1 @@ +{"name":"untyped ae::f2(ae* this, untyped c)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"a = 0"},{"id":1,"text":"a"},{"id":2,"text":"0"},{"id":3,"subNodes":[4,5],"text":"<(a, 10)"},{"id":4,"text":"a"},{"id":5,"text":"10"},{"id":6,"subNodes":[7,8],"text":"b = +(a, 1)"},{"id":7,"text":"b"},{"id":8,"subNodes":[9,10],"text":"+(a, 1)"},{"id":9,"text":"a"},{"id":10,"text":"1"},{"id":11,"subNodes":[12,13],"text":"c = +(c, b)"},{"id":12,"text":"c"},{"id":13,"subNodes":[14,15],"text":"+(c, b)"},{"id":14,"text":"c"},{"id":15,"text":"b"},{"id":16,"subNodes":[17,18],"text":"a = *(b, 2)"},{"id":17,"text":"a"},{"id":18,"subNodes":[19,20],"text":"*(b, 2)"},{"id":19,"text":"b"},{"id":20,"text":"2"},{"id":21,"subNodes":[22],"text":"return c"},{"id":22,"text":"c"}],"edges":[{"sourceId":0,"destId":3,"kind":"SequentialEdge"},{"sourceId":3,"destId":6,"kind":"TrueEdge"},{"sourceId":3,"destId":21,"kind":"FalseEdge"},{"sourceId":6,"destId":11,"kind":"SequentialEdge"},{"sourceId":11,"destId":16,"kind":"SequentialEdge"},{"sourceId":16,"destId":3,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["a"],"state":{"heap":"monolith","type":{"a":["int32"],"ret_value@f2":"#TOP#"},"value":["c"]}}},{"nodeId":1,"description":{"expressions":["a"],"state":{"heap":"monolith","type":{"ret_value@f2":"#TOP#"},"value":["a","c"]}}},{"nodeId":2,"description":{"expressions":["0"],"state":{"heap":"monolith","type":{"ret_value@f2":"#TOP#"},"value":["a","c"]}}},{"nodeId":3,"description":{"expressions":["a < 10"],"state":{"heap":"monolith","type":{"a":["float32","int32"],"c":["float32","int32","string"],"ret_value@f2":"#TOP#"},"value":["a","c"]}}},{"nodeId":4,"description":{"expressions":["a"],"state":{"heap":"monolith","type":{"a":["float32","int32"],"c":["float32","int32","string"],"ret_value@f2":"#TOP#"},"value":["a","c"]}}},{"nodeId":5,"description":{"expressions":["10"],"state":{"heap":"monolith","type":{"a":["float32","int32"],"c":["float32","int32","string"],"ret_value@f2":"#TOP#"},"value":["a","c"]}}},{"nodeId":6,"description":{"expressions":["b"],"state":{"heap":"monolith","type":{"a":["float32","int32"],"b":["float32","int32"],"c":["float32","int32","string"],"ret_value@f2":"#TOP#"},"value":["a","c"]}}},{"nodeId":7,"description":{"expressions":["b"],"state":{"heap":"monolith","type":{"a":["float32","int32"],"c":["float32","int32","string"],"ret_value@f2":"#TOP#"},"value":["b","c"]}}},{"nodeId":8,"description":{"expressions":["a + 1"],"state":{"heap":"monolith","type":{"a":["float32","int32"],"c":["float32","int32","string"],"ret_value@f2":"#TOP#"},"value":["a","b","c"]}}},{"nodeId":9,"description":{"expressions":["a"],"state":{"heap":"monolith","type":{"a":["float32","int32"],"c":["float32","int32","string"],"ret_value@f2":"#TOP#"},"value":["a","b","c"]}}},{"nodeId":10,"description":{"expressions":["1"],"state":{"heap":"monolith","type":{"a":["float32","int32"],"c":["float32","int32","string"],"ret_value@f2":"#TOP#"},"value":["b","c"]}}},{"nodeId":11,"description":{"expressions":["c"],"state":{"heap":"monolith","type":{"a":["float32","int32"],"c":["float32","int32","string"],"ret_value@f2":"#TOP#"},"value":["b","c"]}}},{"nodeId":12,"description":{"expressions":["c"],"state":{"heap":"monolith","type":{"a":["float32","int32"],"ret_value@f2":"#TOP#"},"value":["b","c"]}}},{"nodeId":13,"description":{"expressions":["c + b","c strcat b"],"state":{"heap":"monolith","type":{"a":["float32","int32"],"ret_value@f2":"#TOP#"},"value":["b","c"]}}},{"nodeId":14,"description":{"expressions":["c"],"state":{"heap":"monolith","type":{"a":["float32","int32"],"ret_value@f2":"#TOP#"},"value":["b","c"]}}},{"nodeId":15,"description":{"expressions":["b"],"state":{"heap":"monolith","type":{"a":["float32","int32"],"ret_value@f2":"#TOP#"},"value":["b","c"]}}},{"nodeId":16,"description":{"expressions":["a"],"state":{"heap":"monolith","type":{"a":["float32","int32"],"ret_value@f2":"#TOP#"},"value":["b","c"]}}},{"nodeId":17,"description":{"expressions":["a"],"state":{"heap":"monolith","type":{"ret_value@f2":"#TOP#"},"value":["a","c"]}}},{"nodeId":18,"description":{"expressions":["b * 2"],"state":{"heap":"monolith","type":{"ret_value@f2":"#TOP#"},"value":["a","b","c"]}}},{"nodeId":19,"description":{"expressions":["b"],"state":{"heap":"monolith","type":{"ret_value@f2":"#TOP#"},"value":["a","b","c"]}}},{"nodeId":20,"description":{"expressions":["2"],"state":{"heap":"monolith","type":{"ret_value@f2":"#TOP#"},"value":["a","c"]}}},{"nodeId":21,"description":{"expressions":["ret_value@f2"],"state":{"heap":"monolith","type":{"ret_value@f2":"#TOP#"},"value":["c"]}}},{"nodeId":22,"description":{"expressions":["c"],"state":{"heap":"monolith","type":"#TOP#","value":["c"]}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/liveness/untyped_ae.f3(ae__this).json b/lisa/lisa-analyses/imp-testcases/liveness/untyped_ae.f3(ae__this).json new file mode 100644 index 000000000..eb457b249 --- /dev/null +++ b/lisa/lisa-analyses/imp-testcases/liveness/untyped_ae.f3(ae__this).json @@ -0,0 +1 @@ +{"name":"untyped ae::f3(ae* this)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"x = 2"},{"id":1,"text":"x"},{"id":2,"text":"2"},{"id":3,"subNodes":[4,5],"text":"y = 4"},{"id":4,"text":"y"},{"id":5,"text":"4"},{"id":6,"subNodes":[7,8],"text":"x = 1"},{"id":7,"text":"x"},{"id":8,"text":"1"},{"id":9,"subNodes":[10,11],"text":"z = 0"},{"id":10,"text":"z"},{"id":11,"text":"0"},{"id":12,"subNodes":[13,14],"text":">(y, 0)"},{"id":13,"text":"y"},{"id":14,"text":"0"},{"id":15,"subNodes":[16,17],"text":"z = x"},{"id":16,"text":"z"},{"id":17,"text":"x"},{"id":18,"subNodes":[19,20],"text":"z = *(y, y)"},{"id":19,"text":"z"},{"id":20,"subNodes":[21,22],"text":"*(y, y)"},{"id":21,"text":"y"},{"id":22,"text":"y"},{"id":23,"subNodes":[24,25],"text":"x = z"},{"id":24,"text":"x"},{"id":25,"text":"z"},{"id":26,"subNodes":[27],"text":"return x"},{"id":27,"text":"x"}],"edges":[{"sourceId":0,"destId":3,"kind":"SequentialEdge"},{"sourceId":3,"destId":6,"kind":"SequentialEdge"},{"sourceId":6,"destId":9,"kind":"SequentialEdge"},{"sourceId":9,"destId":12,"kind":"SequentialEdge"},{"sourceId":12,"destId":15,"kind":"TrueEdge"},{"sourceId":12,"destId":18,"kind":"FalseEdge"},{"sourceId":15,"destId":23,"kind":"SequentialEdge"},{"sourceId":18,"destId":23,"kind":"SequentialEdge"},{"sourceId":23,"destId":26,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"ret_value@f3":"#TOP#","x":["int32"]},"value":[]}}},{"nodeId":1,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"ret_value@f3":"#TOP#","x":["int32"]},"value":["x"]}}},{"nodeId":2,"description":{"expressions":["2"],"state":{"heap":"monolith","type":{"ret_value@f3":"#TOP#","x":["int32"]},"value":["x"]}}},{"nodeId":3,"description":{"expressions":["y"],"state":{"heap":"monolith","type":{"ret_value@f3":"#TOP#","x":["int32"],"y":["int32"]},"value":[]}}},{"nodeId":4,"description":{"expressions":["y"],"state":{"heap":"monolith","type":{"ret_value@f3":"#TOP#","x":["int32"]},"value":["y"]}}},{"nodeId":5,"description":{"expressions":["4"],"state":{"heap":"monolith","type":{"ret_value@f3":"#TOP#","x":["int32"]},"value":["y"]}}},{"nodeId":6,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"ret_value@f3":"#TOP#","x":["int32"]},"value":["y"]}}},{"nodeId":7,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"ret_value@f3":"#TOP#","x":"#TOP#"},"value":["x","y"]}}},{"nodeId":8,"description":{"expressions":["1"],"state":{"heap":"monolith","type":{"ret_value@f3":"#TOP#","x":"#TOP#"},"value":["x","y"]}}},{"nodeId":9,"description":{"expressions":["z"],"state":{"heap":"monolith","type":{"ret_value@f3":"#TOP#","x":"#TOP#","z":["int32"]},"value":["x","y"]}}},{"nodeId":10,"description":{"expressions":["z"],"state":{"heap":"monolith","type":{"ret_value@f3":"#TOP#","x":"#TOP#","z":"#TOP#"},"value":["x","y","z"]}}},{"nodeId":11,"description":{"expressions":["0"],"state":{"heap":"monolith","type":{"ret_value@f3":"#TOP#","x":"#TOP#","z":"#TOP#"},"value":["x","y","z"]}}},{"nodeId":12,"description":{"expressions":["y > 0"],"state":{"heap":"monolith","type":{"ret_value@f3":"#TOP#","x":"#TOP#","z":"#TOP#"},"value":["x","y"]}}},{"nodeId":13,"description":{"expressions":["y"],"state":{"heap":"monolith","type":{"ret_value@f3":"#TOP#","x":"#TOP#","z":"#TOP#"},"value":["x","y"]}}},{"nodeId":14,"description":{"expressions":["0"],"state":{"heap":"monolith","type":{"ret_value@f3":"#TOP#","x":"#TOP#","z":"#TOP#"},"value":["x","y"]}}},{"nodeId":15,"description":{"expressions":["z"],"state":{"heap":"monolith","type":{"ret_value@f3":"#TOP#","x":"#TOP#","z":"#TOP#"},"value":["x"]}}},{"nodeId":16,"description":{"expressions":["z"],"state":{"heap":"monolith","type":{"ret_value@f3":"#TOP#","x":"#TOP#"},"value":["z"]}}},{"nodeId":17,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"ret_value@f3":"#TOP#","x":"#TOP#"},"value":["x","z"]}}},{"nodeId":18,"description":{"expressions":["z"],"state":{"heap":"monolith","type":{"ret_value@f3":"#TOP#","x":"#TOP#","z":["float32","int32"]},"value":["y"]}}},{"nodeId":19,"description":{"expressions":["z"],"state":{"heap":"monolith","type":{"ret_value@f3":"#TOP#","x":"#TOP#"},"value":["z"]}}},{"nodeId":20,"description":{"expressions":["y * y"],"state":{"heap":"monolith","type":{"ret_value@f3":"#TOP#","x":"#TOP#"},"value":["y","z"]}}},{"nodeId":21,"description":{"expressions":["y"],"state":{"heap":"monolith","type":{"ret_value@f3":"#TOP#","x":"#TOP#"},"value":["y","z"]}}},{"nodeId":22,"description":{"expressions":["y"],"state":{"heap":"monolith","type":{"ret_value@f3":"#TOP#","x":"#TOP#"},"value":["y","z"]}}},{"nodeId":23,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"ret_value@f3":"#TOP#","x":"#TOP#"},"value":["z"]}}},{"nodeId":24,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"ret_value@f3":"#TOP#"},"value":["x"]}}},{"nodeId":25,"description":{"expressions":["z"],"state":{"heap":"monolith","type":{"ret_value@f3":"#TOP#"},"value":["x","z"]}}},{"nodeId":26,"description":{"expressions":["ret_value@f3"],"state":{"heap":"monolith","type":{"ret_value@f3":"#TOP#"},"value":["x"]}}},{"nodeId":27,"description":{"expressions":["x"],"state":{"heap":"monolith","type":"#TOP#","value":["x"]}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/non-interference/confidentiality/report.json b/lisa/lisa-analyses/imp-testcases/non-interference/confidentiality/report.json index e700be670..49e367fba 100644 --- a/lisa/lisa-analyses/imp-testcases/non-interference/confidentiality/report.json +++ b/lisa/lisa-analyses/imp-testcases/non-interference/confidentiality/report.json @@ -23,17 +23,17 @@ "files" : [ "report.json", "untyped_Confidentiality.confidentiality_lec16(Confidentiality__this).json", "untyped_Confidentiality.confidentiality_lec17(Confidentiality__this).json", "untyped_Confidentiality.confidentiality_lec18ex1(Confidentiality__this).json", "untyped_Confidentiality.confidentiality_lec18ex2(Confidentiality__this).json", "untyped_Confidentiality.confidentiality_lec19ex1(Confidentiality__this).json", "untyped_Confidentiality.confidentiality_lec19ex2(Confidentiality__this).json", "untyped_Confidentiality.confidentiality_lec19ex3(Confidentiality__this).json", "untyped_Confidentiality.confidentiality_lec19ex4(Confidentiality__this).json", "untyped_Confidentiality.confidentiality_lec19ex5(Confidentiality__this).json", "untyped_Confidentiality.confidentiality_lec5ex1(Confidentiality__this).json", "untyped_Confidentiality.confidentiality_lec5ex2(Confidentiality__this).json", "untyped_Confidentiality.confidentiality_lec6(Confidentiality__this).json", "untyped_Confidentiality.confidentiality_lec7(Confidentiality__this).json", "untyped_Confidentiality.confidentiality_lec8(Confidentiality__this).json" ], "info" : { "cfgs" : "14", - "duration" : "232ms", - "end" : "2023-04-20T12:45:36.562+02:00", + "duration" : "88ms", + "end" : "2023-09-07T11:45:54.614+02:00", "expressions" : "130", "files" : "14", "globals" : "0", "members" : "14", "programs" : "1", - "start" : "2023-04-20T12:45:36.330+02:00", + "start" : "2023-09-07T11:45:54.526+02:00", "statements" : "70", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "10" }, "configuration" : { @@ -51,6 +51,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/non-interference/confidentiality" } diff --git a/lisa/lisa-analyses/imp-testcases/non-interference/integrity/report.json b/lisa/lisa-analyses/imp-testcases/non-interference/integrity/report.json index 4f99e9ae4..98362d8f3 100644 --- a/lisa/lisa-analyses/imp-testcases/non-interference/integrity/report.json +++ b/lisa/lisa-analyses/imp-testcases/non-interference/integrity/report.json @@ -23,17 +23,17 @@ "files" : [ "report.json", "untyped_Integrity.integrity_lec16(Integrity__this).json", "untyped_Integrity.integrity_lec17(Integrity__this).json", "untyped_Integrity.integrity_lec18ex1(Integrity__this).json", "untyped_Integrity.integrity_lec18ex2(Integrity__this).json", "untyped_Integrity.integrity_lec19ex1(Integrity__this).json", "untyped_Integrity.integrity_lec19ex2(Integrity__this).json", "untyped_Integrity.integrity_lec19ex3(Integrity__this).json", "untyped_Integrity.integrity_lec19ex4(Integrity__this).json", "untyped_Integrity.integrity_lec19ex5(Integrity__this).json", "untyped_Integrity.integrity_lec5ex1(Integrity__this).json", "untyped_Integrity.integrity_lec5ex2(Integrity__this).json", "untyped_Integrity.integrity_lec6(Integrity__this).json", "untyped_Integrity.integrity_lec7(Integrity__this).json", "untyped_Integrity.integrity_lec8(Integrity__this).json" ], "info" : { "cfgs" : "14", - "duration" : "311ms", - "end" : "2023-04-20T12:45:35.788+02:00", + "duration" : "168ms", + "end" : "2023-09-07T11:45:53.865+02:00", "expressions" : "130", "files" : "14", "globals" : "0", "members" : "14", "programs" : "1", - "start" : "2023-04-20T12:45:35.477+02:00", + "start" : "2023-09-07T11:45:53.697+02:00", "statements" : "70", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "10" }, "configuration" : { @@ -51,6 +51,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/non-interference/integrity" } diff --git a/lisa/lisa-analyses/imp-testcases/non-interference/interproc/report.json b/lisa/lisa-analyses/imp-testcases/non-interference/interproc/report.json index b770e77d2..16a3bd2f0 100644 --- a/lisa/lisa-analyses/imp-testcases/non-interference/interproc/report.json +++ b/lisa/lisa-analyses/imp-testcases/non-interference/interproc/report.json @@ -9,17 +9,17 @@ "files" : [ "report.json", "untyped_Integrity.confidentiality_lec5ex1_declassified(Integrity__this)_-791177979.json", "untyped_Integrity.confidentiality_lec6_declassified(Integrity__this)_-791180831.json", "untyped_Integrity.declassify(Integrity__this,_untyped_y)_451999607.json", "untyped_Integrity.declassify(Integrity__this,_untyped_y)_452087709.json", "untyped_Integrity.main(Integrity__this).json" ], "info" : { "cfgs" : "4", - "duration" : "71ms", - "end" : "2023-04-20T12:45:37.108+02:00", + "duration" : "31ms", + "end" : "2023-09-07T11:45:55.211+02:00", "expressions" : "29", "files" : "5", "globals" : "0", "members" : "4", "programs" : "1", - "start" : "2023-04-20T12:45:37.037+02:00", + "start" : "2023-09-07T11:45:55.180+02:00", "statements" : "17", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "3" }, "configuration" : { @@ -37,6 +37,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/non-interference/interproc" } diff --git a/lisa/lisa-analyses/imp-testcases/non-redundant-set-interval/report.json b/lisa/lisa-analyses/imp-testcases/non-redundant-set-interval/report.json index 1a78aff87..dc8d6bf9e 100644 --- a/lisa/lisa-analyses/imp-testcases/non-redundant-set-interval/report.json +++ b/lisa/lisa-analyses/imp-testcases/non-redundant-set-interval/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_tutorial.div(tutorial__this,_untyped_i,_untyped_j).json", "untyped_tutorial.doublewhile(tutorial__this,_untyped_t).json", "untyped_tutorial.gcd(tutorial__this,_untyped_a,_untyped_b).json", "untyped_tutorial.glb(tutorial__this,_untyped_x,_untyped_y).json", "untyped_tutorial.intv_dec(tutorial__this).json", "untyped_tutorial.sat(tutorial__this).json", "untyped_tutorial.sat2(tutorial__this).json" ], "info" : { "cfgs" : "7", - "duration" : "234ms", - "end" : "2023-04-20T12:45:37.520+02:00", + "duration" : "248ms", + "end" : "2023-09-07T11:45:55.638+02:00", "expressions" : "85", "files" : "7", "globals" : "0", "members" : "7", "programs" : "1", - "start" : "2023-04-20T12:45:37.286+02:00", + "start" : "2023-09-07T11:45:55.390+02:00", "statements" : "34", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/non-redundant-set-interval" } diff --git a/lisa/lisa-analyses/imp-testcases/parity/report.json b/lisa/lisa-analyses/imp-testcases/parity/report.json index c1a357899..bb23154e0 100644 --- a/lisa/lisa-analyses/imp-testcases/parity/report.json +++ b/lisa/lisa-analyses/imp-testcases/parity/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_tutorial.constants(tutorial__this).json", "untyped_tutorial.div(tutorial__this,_untyped_i,_untyped_j).json", "untyped_tutorial.gcd(tutorial__this,_untyped_a,_untyped_b).json", "untyped_tutorial.intv_dec(tutorial__this).json", "untyped_tutorial.sign_parity_example(tutorial__this).json", "untyped_tutorial.ub_example(tutorial__this,_untyped_y,_untyped_z).json" ], "info" : { "cfgs" : "6", - "duration" : "110ms", - "end" : "2023-04-20T12:45:38.955+02:00", + "duration" : "49ms", + "end" : "2023-09-07T11:45:56.997+02:00", "expressions" : "68", "files" : "6", "globals" : "0", "members" : "6", "programs" : "1", - "start" : "2023-04-20T12:45:38.845+02:00", + "start" : "2023-09-07T11:45:56.948+02:00", "statements" : "28", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/parity" } diff --git a/lisa/lisa-analyses/imp-testcases/prefix/report.json b/lisa/lisa-analyses/imp-testcases/prefix/report.json index e0b06abe5..a8c57efd1 100644 --- a/lisa/lisa-analyses/imp-testcases/prefix/report.json +++ b/lisa/lisa-analyses/imp-testcases/prefix/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_prefix.m1(prefix__this).json", "untyped_prefix.m2(prefix__this,_untyped_x).json", "untyped_prefix.m3(prefix__this,_untyped_x).json" ], "info" : { "cfgs" : "3", - "duration" : "85ms", - "end" : "2023-04-20T12:45:40.253+02:00", + "duration" : "8ms", + "end" : "2023-09-07T11:45:58.175+02:00", "expressions" : "24", "files" : "3", "globals" : "0", "members" : "3", "programs" : "1", - "start" : "2023-04-20T12:45:40.168+02:00", + "start" : "2023-09-07T11:45:58.167+02:00", "statements" : "13", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/prefix" } diff --git a/lisa/lisa-analyses/imp-testcases/reaching-definitions/report.json b/lisa/lisa-analyses/imp-testcases/reaching-definitions/report.json index f54e8ff8f..66850d597 100644 --- a/lisa/lisa-analyses/imp-testcases/reaching-definitions/report.json +++ b/lisa/lisa-analyses/imp-testcases/reaching-definitions/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_reachingDefinitions.test1(reachingDefinitions__this).json", "untyped_reachingDefinitions.test2(reachingDefinitions__this).json", "untyped_reachingDefinitions.test3(reachingDefinitions__this).json" ], "info" : { "cfgs" : "3", - "duration" : "126ms", - "end" : "2023-04-20T12:45:19.332+02:00", + "duration" : "107ms", + "end" : "2023-09-07T11:45:39.702+02:00", "expressions" : "26", "files" : "3", "globals" : "0", "members" : "3", "programs" : "1", - "start" : "2023-04-20T12:45:19.206+02:00", + "start" : "2023-09-07T11:45:39.595+02:00", "statements" : "15", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/reaching-definitions" } diff --git a/lisa/lisa-analyses/imp-testcases/sign/report.json b/lisa/lisa-analyses/imp-testcases/sign/report.json index 0decf98f0..40ec429d7 100644 --- a/lisa/lisa-analyses/imp-testcases/sign/report.json +++ b/lisa/lisa-analyses/imp-testcases/sign/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_tutorial.constants(tutorial__this).json", "untyped_tutorial.div(tutorial__this,_untyped_i,_untyped_j).json", "untyped_tutorial.gcd(tutorial__this,_untyped_a,_untyped_b).json", "untyped_tutorial.intv_dec(tutorial__this).json", "untyped_tutorial.sign_parity_example(tutorial__this).json", "untyped_tutorial.ub_example(tutorial__this,_untyped_y,_untyped_z).json" ], "info" : { "cfgs" : "6", - "duration" : "88ms", - "end" : "2023-04-20T12:45:37.714+02:00", + "duration" : "45ms", + "end" : "2023-09-07T11:45:55.830+02:00", "expressions" : "68", "files" : "6", "globals" : "0", "members" : "6", "programs" : "1", - "start" : "2023-04-20T12:45:37.626+02:00", + "start" : "2023-09-07T11:45:55.785+02:00", "statements" : "28", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/sign" } diff --git a/lisa/lisa-analyses/imp-testcases/suffix/report.json b/lisa/lisa-analyses/imp-testcases/suffix/report.json index 307639a54..28e374071 100644 --- a/lisa/lisa-analyses/imp-testcases/suffix/report.json +++ b/lisa/lisa-analyses/imp-testcases/suffix/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_suffix.m1(suffix__this).json", "untyped_suffix.m2(suffix__this,_untyped_x).json", "untyped_suffix.m3(suffix__this,_untyped_x).json" ], "info" : { "cfgs" : "3", - "duration" : "60ms", - "end" : "2023-04-20T12:45:40.479+02:00", + "duration" : "9ms", + "end" : "2023-09-07T11:45:58.250+02:00", "expressions" : "24", "files" : "3", "globals" : "0", "members" : "3", "programs" : "1", - "start" : "2023-04-20T12:45:40.419+02:00", + "start" : "2023-09-07T11:45:58.241+02:00", "statements" : "13", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/suffix" } diff --git a/lisa/lisa-analyses/imp-testcases/syntactic/report.json b/lisa/lisa-analyses/imp-testcases/syntactic/report.json index 829c395cb..cb053b8c7 100644 --- a/lisa/lisa-analyses/imp-testcases/syntactic/report.json +++ b/lisa/lisa-analyses/imp-testcases/syntactic/report.json @@ -21,14 +21,14 @@ "files" : [ "report.json" ], "info" : { "cfgs" : "9", - "duration" : "909ms", - "end" : "2023-04-20T12:44:49.939+02:00", + "duration" : "1s 285ms", + "end" : "2023-09-07T11:43:52.735+02:00", "expressions" : "34", "files" : "0", "globals" : "0", "members" : "9", "programs" : "1", - "start" : "2023-04-20T12:44:49.030+02:00", + "start" : "2023-09-07T11:43:51.450+02:00", "statements" : "16", "units" : "1", "version" : "0.1b7", @@ -49,6 +49,7 @@ "serializeInputs" : "false", "serializeResults" : "false", "syntacticChecks" : "VariableI", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/syntactic" } diff --git a/lisa/lisa-analyses/imp-testcases/taint/2val/report.json b/lisa/lisa-analyses/imp-testcases/taint/2val/report.json index 1e9052fd4..847e197bd 100644 --- a/lisa/lisa-analyses/imp-testcases/taint/2val/report.json +++ b/lisa/lisa-analyses/imp-testcases/taint/2val/report.json @@ -67,17 +67,17 @@ "files" : [ "report.json", "untyped_main.main(main__this).json", "untyped_main.sink(main__this,_untyped_v)_1997455120.json", "untyped_main.sink(main__this,_untyped_v)_1997455151.json", "untyped_main.sink(main__this,_untyped_v)_1997455182.json", "untyped_main.sink(main__this,_untyped_v)_1997455337.json", "untyped_main.sink(main__this,_untyped_v)_1997455368.json", "untyped_main.sink(main__this,_untyped_v)_1997455492.json", "untyped_main.sink(main__this,_untyped_v)_1997455554.json", "untyped_main.sink(main__this,_untyped_v)_1997455616.json", "untyped_main.sink(main__this,_untyped_v)_1997455740.json", "untyped_main.sink(main__this,_untyped_v)_1997455802.json", "untyped_main.sink(main__this,_untyped_v)_1997455864.json", "untyped_main.sink(main__this,_untyped_v)_1997455926.json", "untyped_main.sink(main__this,_untyped_v)_1997455988.json", "untyped_main.sink(main__this,_untyped_v)_1997456050.json", "untyped_main.sink(main__this,_untyped_v)_1997456112.json", "untyped_main.sink(main__this,_untyped_v)_1997456174.json", "untyped_main.sink(main__this,_untyped_v)_1997456236.json", "untyped_main.sink(main__this,_untyped_v)_1997456360.json", "untyped_main.sink(main__this,_untyped_v)_1997456422.json", "untyped_main.sink(main__this,_untyped_v)_1997456484.json", "untyped_main.sink(main__this,_untyped_v)_1997456546.json", "untyped_main.sink(main__this,_untyped_v)_1997456608.json", "untyped_main.sink(main__this,_untyped_v)_1997456670.json", "untyped_main.sink(main__this,_untyped_v)_1997456732.json", "untyped_main.sink(main__this,_untyped_v)_1997456794.json", "untyped_main.sink(main__this,_untyped_v)_1997456856.json", "untyped_main.sink(main__this,_untyped_v)_1997456918.json", "untyped_main.sink(main__this,_untyped_v)_1997456980.json", "untyped_main.sink(main__this,_untyped_v)_1997457042.json", "untyped_main.sink(main__this,_untyped_v)_1997457104.json", "untyped_main.sink(main__this,_untyped_v)_1997457166.json", "untyped_main.sink(main__this,_untyped_v)_1997457228.json", "untyped_main.sink(main__this,_untyped_v)_1997457290.json", "untyped_main.sink(main__this,_untyped_v)_1997457352.json", "untyped_main.sink(main__this,_untyped_v)_1997457414.json", "untyped_main.sink(main__this,_untyped_v)_1997457476.json", "untyped_main.sink(main__this,_untyped_v)_1997457538.json", "untyped_main.sink(main__this,_untyped_v)_1997457600.json", "untyped_main.source(main__this)_1997461041.json", "untyped_main.source(main__this)_1997463738.json" ], "info" : { "cfgs" : "3", - "duration" : "1s 162ms", - "end" : "2023-04-20T12:45:42.236+02:00", + "duration" : "211ms", + "end" : "2023-09-07T11:45:58.847+02:00", "expressions" : "237", "files" : "41", "globals" : "0", "members" : "3", "programs" : "1", - "start" : "2023-04-20T12:45:41.074+02:00", + "start" : "2023-09-07T11:45:58.636+02:00", "statements" : "79", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "32" }, "configuration" : { @@ -95,6 +95,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/taint/2val" } diff --git a/lisa/lisa-analyses/imp-testcases/taint/3val/report.json b/lisa/lisa-analyses/imp-testcases/taint/3val/report.json index 917c51bac..64e000d25 100644 --- a/lisa/lisa-analyses/imp-testcases/taint/3val/report.json +++ b/lisa/lisa-analyses/imp-testcases/taint/3val/report.json @@ -67,17 +67,17 @@ "files" : [ "report.json", "untyped_main.main(main__this).json", "untyped_main.sink(main__this,_untyped_v)_1997455120.json", "untyped_main.sink(main__this,_untyped_v)_1997455151.json", "untyped_main.sink(main__this,_untyped_v)_1997455182.json", "untyped_main.sink(main__this,_untyped_v)_1997455337.json", "untyped_main.sink(main__this,_untyped_v)_1997455368.json", "untyped_main.sink(main__this,_untyped_v)_1997455492.json", "untyped_main.sink(main__this,_untyped_v)_1997455554.json", "untyped_main.sink(main__this,_untyped_v)_1997455616.json", "untyped_main.sink(main__this,_untyped_v)_1997455740.json", "untyped_main.sink(main__this,_untyped_v)_1997455802.json", "untyped_main.sink(main__this,_untyped_v)_1997455864.json", "untyped_main.sink(main__this,_untyped_v)_1997455926.json", "untyped_main.sink(main__this,_untyped_v)_1997455988.json", "untyped_main.sink(main__this,_untyped_v)_1997456050.json", "untyped_main.sink(main__this,_untyped_v)_1997456112.json", "untyped_main.sink(main__this,_untyped_v)_1997456174.json", "untyped_main.sink(main__this,_untyped_v)_1997456236.json", "untyped_main.sink(main__this,_untyped_v)_1997456360.json", "untyped_main.sink(main__this,_untyped_v)_1997456422.json", "untyped_main.sink(main__this,_untyped_v)_1997456484.json", "untyped_main.sink(main__this,_untyped_v)_1997456546.json", "untyped_main.sink(main__this,_untyped_v)_1997456608.json", "untyped_main.sink(main__this,_untyped_v)_1997456670.json", "untyped_main.sink(main__this,_untyped_v)_1997456732.json", "untyped_main.sink(main__this,_untyped_v)_1997456794.json", "untyped_main.sink(main__this,_untyped_v)_1997456856.json", "untyped_main.sink(main__this,_untyped_v)_1997456918.json", "untyped_main.sink(main__this,_untyped_v)_1997456980.json", "untyped_main.sink(main__this,_untyped_v)_1997457042.json", "untyped_main.sink(main__this,_untyped_v)_1997457104.json", "untyped_main.sink(main__this,_untyped_v)_1997457166.json", "untyped_main.sink(main__this,_untyped_v)_1997457228.json", "untyped_main.sink(main__this,_untyped_v)_1997457290.json", "untyped_main.sink(main__this,_untyped_v)_1997457352.json", "untyped_main.sink(main__this,_untyped_v)_1997457414.json", "untyped_main.sink(main__this,_untyped_v)_1997457476.json", "untyped_main.sink(main__this,_untyped_v)_1997457538.json", "untyped_main.sink(main__this,_untyped_v)_1997457600.json", "untyped_main.source(main__this)_1997461041.json", "untyped_main.source(main__this)_1997463738.json" ], "info" : { "cfgs" : "3", - "duration" : "693ms", - "end" : "2023-04-20T12:45:44.329+02:00", + "duration" : "142ms", + "end" : "2023-09-07T11:45:59.927+02:00", "expressions" : "237", "files" : "41", "globals" : "0", "members" : "3", "programs" : "1", - "start" : "2023-04-20T12:45:43.636+02:00", + "start" : "2023-09-07T11:45:59.785+02:00", "statements" : "79", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "32" }, "configuration" : { @@ -95,6 +95,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/taint/3val" } diff --git a/lisa/lisa-analyses/imp-testcases/tarsis/report.json b/lisa/lisa-analyses/imp-testcases/tarsis/report.json index 88a1eccbc..28876f067 100644 --- a/lisa/lisa-analyses/imp-testcases/tarsis/report.json +++ b/lisa/lisa-analyses/imp-testcases/tarsis/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_tarsis.branching(tarsis__this,_untyped_x).json", "untyped_tarsis.constants(tarsis__this).json", "untyped_tarsis.loops(tarsis__this,_untyped_x).json" ], "info" : { "cfgs" : "3", - "duration" : "162ms", - "end" : "2023-04-20T12:45:40.808+02:00", + "duration" : "143ms", + "end" : "2023-09-07T11:45:58.493+02:00", "expressions" : "20", "files" : "3", "globals" : "0", "members" : "3", "programs" : "1", - "start" : "2023-04-20T12:45:40.646+02:00", + "start" : "2023-09-07T11:45:58.350+02:00", "statements" : "12", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/tarsis" } diff --git a/lisa/lisa-analyses/imp-testcases/traces/report.json b/lisa/lisa-analyses/imp-testcases/traces/report.json index 3a5f83b84..2420b8558 100644 --- a/lisa/lisa-analyses/imp-testcases/traces/report.json +++ b/lisa/lisa-analyses/imp-testcases/traces/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_tutorial.branching1(tutorial__this,_untyped_b).json", "untyped_tutorial.branching2(tutorial__this,_untyped_b).json", "untyped_tutorial.loop0(tutorial__this).json", "untyped_tutorial.loop2(tutorial__this).json", "untyped_tutorial.loopN(tutorial__this,_untyped_b).json", "untyped_tutorial.nesting(tutorial__this,_untyped_b).json", "untyped_tutorial.sequential(tutorial__this).json" ], "info" : { "cfgs" : "7", - "duration" : "345ms", - "end" : "2023-04-20T12:45:45.736+02:00", + "duration" : "766ms", + "end" : "2023-09-29T11:30:37.445+02:00", "expressions" : "69", "files" : "7", "globals" : "0", "members" : "7", "programs" : "1", - "start" : "2023-04-20T12:45:45.391+02:00", + "start" : "2023-09-29T11:30:36.679+02:00", "statements" : "32", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/traces" } diff --git a/lisa/lisa-analyses/imp-testcases/traces/untyped_tutorial.loop0(tutorial__this).json b/lisa/lisa-analyses/imp-testcases/traces/untyped_tutorial.loop0(tutorial__this).json index d39d1504c..297ac30cb 100644 --- a/lisa/lisa-analyses/imp-testcases/traces/untyped_tutorial.loop0(tutorial__this).json +++ b/lisa/lisa-analyses/imp-testcases/traces/untyped_tutorial.loop0(tutorial__this).json @@ -1 +1 @@ -{"name":"untyped tutorial::loop0(tutorial* this)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"x = 0"},{"id":1,"text":"x"},{"id":2,"text":"0"},{"id":3,"subNodes":[4,5],"text":">(x, 10)"},{"id":4,"text":"x"},{"id":5,"text":"10"},{"id":6,"subNodes":[7,8],"text":"x = +(x, 1)"},{"id":7,"text":"x"},{"id":8,"subNodes":[9,10],"text":"+(x, 1)"},{"id":9,"text":"x"},{"id":10,"text":"1"},{"id":11,"subNodes":[12],"text":"return x"},{"id":12,"text":"x"}],"edges":[{"sourceId":0,"destId":3,"kind":"SequentialEdge"},{"sourceId":3,"destId":6,"kind":"TrueEdge"},{"sourceId":3,"destId":11,"kind":"FalseEdge"},{"sourceId":6,"destId":3,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["x"],"state":{"<>":{"heap":"monolith","type":{"this":["tutorial*"],"x":["int32"]},"value":{"x":"[0, 0]"}}}}},{"nodeId":1,"description":{"expressions":["x"],"state":{"<>":{"heap":"monolith","type":{"this":["tutorial*"]},"value":"#TOP#"}}}},{"nodeId":2,"description":{"expressions":["0"],"state":{"<>":{"heap":"monolith","type":{"this":["tutorial*"]},"value":"#TOP#"}}}},{"nodeId":3,"description":{"expressions":["x > 10"],"state":{"<>":{"heap":"monolith","type":{"this":["tutorial*"],"x":["int32"]},"value":{"x":"[0, 0]"}}}}},{"nodeId":4,"description":{"expressions":["x"],"state":{"<>":{"heap":"monolith","type":{"this":["tutorial*"],"x":["int32"]},"value":{"x":"[0, 0]"}}}}},{"nodeId":5,"description":{"expressions":["10"],"state":{"<>":{"heap":"monolith","type":{"this":["tutorial*"],"x":["int32"]},"value":{"x":"[0, 0]"}}}}},{"nodeId":6,"description":{"expressions":["x"],"state":"_|_"}},{"nodeId":7,"description":{"expressions":["x"],"state":"_|_"}},{"nodeId":8,"description":{"expressions":["x + 1"],"state":"_|_"}},{"nodeId":9,"description":{"expressions":["x"],"state":"_|_"}},{"nodeId":10,"description":{"expressions":["1"],"state":"_|_"}},{"nodeId":11,"description":{"expressions":["ret_value@loop0"],"state":{"<>":{"heap":"monolith","type":{"ret_value@loop0":["int32"],"this":["tutorial*"],"x":["int32"]},"value":{"ret_value@loop0":"[0, 0]","x":"[0, 0]"}}}}},{"nodeId":12,"description":{"expressions":["x"],"state":{"<>":{"heap":"monolith","type":{"this":["tutorial*"],"x":["int32"]},"value":{"x":"[0, 0]"}}}}}]} \ No newline at end of file +{"name":"untyped tutorial::loop0(tutorial* this)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"x = 0"},{"id":1,"text":"x"},{"id":2,"text":"0"},{"id":3,"subNodes":[4,5],"text":">(x, 10)"},{"id":4,"text":"x"},{"id":5,"text":"10"},{"id":6,"subNodes":[7,8],"text":"x = +(x, 1)"},{"id":7,"text":"x"},{"id":8,"subNodes":[9,10],"text":"+(x, 1)"},{"id":9,"text":"x"},{"id":10,"text":"1"},{"id":11,"subNodes":[12],"text":"return x"},{"id":12,"text":"x"}],"edges":[{"sourceId":0,"destId":3,"kind":"SequentialEdge"},{"sourceId":3,"destId":6,"kind":"TrueEdge"},{"sourceId":3,"destId":11,"kind":"FalseEdge"},{"sourceId":6,"destId":3,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["x"],"state":{"<>":{"heap":"monolith","type":{"this":["tutorial*"],"x":["int32"]},"value":{"x":"[0, 0]"}}}}},{"nodeId":1,"description":{"expressions":["x"],"state":{"<>":{"heap":"monolith","type":{"this":["tutorial*"]},"value":"#TOP#"}}}},{"nodeId":2,"description":{"expressions":["0"],"state":{"<>":{"heap":"monolith","type":{"this":["tutorial*"]},"value":"#TOP#"}}}},{"nodeId":3,"description":{"expressions":["x > 10"],"state":{"<>":{"heap":"monolith","type":{"this":["tutorial*"],"x":["int32"]},"value":{"x":"[0, 0]"}}}}},{"nodeId":4,"description":{"expressions":["x"],"state":{"<>":{"heap":"monolith","type":{"this":["tutorial*"],"x":["int32"]},"value":{"x":"[0, 0]"}}}}},{"nodeId":5,"description":{"expressions":["10"],"state":{"<>":{"heap":"monolith","type":{"this":["tutorial*"],"x":["int32"]},"value":{"x":"[0, 0]"}}}}},{"nodeId":6,"description":"_|_"},{"nodeId":7,"description":{"expressions":["x"],"state":"_|_"}},{"nodeId":8,"description":"_|_"},{"nodeId":9,"description":{"expressions":["x"],"state":"_|_"}},{"nodeId":10,"description":{"expressions":["1"],"state":"_|_"}},{"nodeId":11,"description":{"expressions":["ret_value@loop0"],"state":{"<>":{"heap":"monolith","type":{"ret_value@loop0":["int32"],"this":["tutorial*"],"x":["int32"]},"value":{"ret_value@loop0":"[0, 0]","x":"[0, 0]"}}}}},{"nodeId":12,"description":{"expressions":["x"],"state":{"<>":{"heap":"monolith","type":{"this":["tutorial*"],"x":["int32"]},"value":{"x":"[0, 0]"}}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/type-inference/report.json b/lisa/lisa-analyses/imp-testcases/type-inference/report.json index b0d5f06e9..ecffa1d86 100644 --- a/lisa/lisa-analyses/imp-testcases/type-inference/report.json +++ b/lisa/lisa-analyses/imp-testcases/type-inference/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_typing.test1(typing__this).json", "untyped_typing.test2(typing__this,_untyped_i).json", "untyped_typing.test3(typing__this,_untyped_i).json", "untyped_typing.test4(typing__this,_untyped_i).json", "untyped_typing.test5(typing__this,_untyped_i).json", "untyped_typing.test6(typing__this,_untyped_i).json", "untyped_typing.test7(typing__this).json" ], "info" : { "cfgs" : "7", - "duration" : "100ms", - "end" : "2023-04-20T12:45:46.649+02:00", + "duration" : "550ms", + "end" : "2023-09-13T14:07:05.718+02:00", "expressions" : "68", "files" : "7", "globals" : "0", "members" : "7", "programs" : "1", - "start" : "2023-04-20T12:45:46.549+02:00", + "start" : "2023-09-13T14:07:05.168+02:00", "statements" : "32", "units" : "1", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "true", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/type-inference" } diff --git a/lisa/lisa-analyses/imp-testcases/type-inference/untyped_typing.test7(typing__this).json b/lisa/lisa-analyses/imp-testcases/type-inference/untyped_typing.test7(typing__this).json index 214fcbc56..2aa69cebd 100644 --- a/lisa/lisa-analyses/imp-testcases/type-inference/untyped_typing.test7(typing__this).json +++ b/lisa/lisa-analyses/imp-testcases/type-inference/untyped_typing.test7(typing__this).json @@ -1 +1 @@ -{"name":"untyped typing::test7(typing* this)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"x = new int32[](6)"},{"id":1,"text":"x"},{"id":2,"subNodes":[3],"text":"new int32[](6)"},{"id":3,"text":"6"},{"id":4,"subNodes":[5,6],"text":"y = x"},{"id":5,"text":"y"},{"id":6,"text":"x"},{"id":7,"text":"ret"}],"edges":[{"sourceId":0,"destId":4,"kind":"SequentialEdge"},{"sourceId":4,"destId":7,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"heap[w]:heap":["int32[]"],"this":["typing*"],"x":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":1,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"heap[w]:heap":["int32[]"],"this":["typing*"]},"value":"#TOP#"}}},{"nodeId":2,"description":{"expressions":["ref$new int32[]"],"state":{"heap":"monolith","type":{"heap[w]:heap":["int32[]"],"this":["typing*"]},"value":"#TOP#"}}},{"nodeId":3,"description":{"expressions":["6"],"state":{"heap":"monolith","type":{"this":["typing*"]},"value":"#TOP#"}}},{"nodeId":4,"description":{"expressions":["y"],"state":{"heap":"monolith","type":{"heap[w]:heap":["int32[]"],"this":["typing*"],"x":["int32[]*"],"y":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":5,"description":{"expressions":["y"],"state":{"heap":"monolith","type":{"heap[w]:heap":["int32[]"],"this":["typing*"],"x":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":6,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"heap[w]:heap":["int32[]"],"this":["typing*"],"x":["int32[]*"]},"value":"#TOP#"}}},{"nodeId":7,"description":{"expressions":["skip"],"state":{"heap":"monolith","type":{"heap[w]:heap":["int32[]"],"this":["typing*"],"x":["int32[]*"],"y":["int32[]*"]},"value":"#TOP#"}}}]} \ No newline at end of file +{"name":"untyped typing::test7(typing* this)","description":null,"nodes":[{"id":0,"subNodes":[1,2],"text":"x = new int32[](6)"},{"id":1,"text":"x"},{"id":2,"subNodes":[3],"text":"new int32[](6)"},{"id":3,"text":"6"},{"id":4,"subNodes":[5,6],"text":"y = x"},{"id":5,"text":"y"},{"id":6,"text":"x"},{"id":7,"text":"ret"}],"edges":[{"sourceId":0,"destId":4,"kind":"SequentialEdge"},{"sourceId":4,"destId":7,"kind":"SequentialEdge"}],"descriptions":[{"nodeId":0,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"heap[w]:heap":["int32","int32[]"],"this":["typing*"],"x":["int32[]*"]},"value":{"heap[w]:heap":"[6, 6]"}}}},{"nodeId":1,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"heap[w]:heap":["int32","int32[]"],"this":["typing*"]},"value":{"heap[w]:heap":"[6, 6]"}}}},{"nodeId":2,"description":{"expressions":["ref$new int32[]"],"state":{"heap":"monolith","type":{"heap[w]:heap":["int32","int32[]"],"this":["typing*"]},"value":{"heap[w]:heap":"[6, 6]"}}}},{"nodeId":3,"description":{"expressions":["6"],"state":{"heap":"monolith","type":{"this":["typing*"]},"value":"#TOP#"}}},{"nodeId":4,"description":{"expressions":["y"],"state":{"heap":"monolith","type":{"heap[w]:heap":["int32","int32[]"],"this":["typing*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[w]:heap":"[6, 6]"}}}},{"nodeId":5,"description":{"expressions":["y"],"state":{"heap":"monolith","type":{"heap[w]:heap":["int32","int32[]"],"this":["typing*"],"x":["int32[]*"]},"value":{"heap[w]:heap":"[6, 6]"}}}},{"nodeId":6,"description":{"expressions":["x"],"state":{"heap":"monolith","type":{"heap[w]:heap":["int32","int32[]"],"this":["typing*"],"x":["int32[]*"]},"value":{"heap[w]:heap":"[6, 6]"}}}},{"nodeId":7,"description":{"expressions":["skip"],"state":{"heap":"monolith","type":{"heap[w]:heap":["int32","int32[]"],"this":["typing*"],"x":["int32[]*"],"y":["int32[]*"]},"value":{"heap[w]:heap":"[6, 6]"}}}}]} \ No newline at end of file diff --git a/lisa/lisa-analyses/imp-testcases/visualization/dot/report.json b/lisa/lisa-analyses/imp-testcases/visualization/dot/report.json index 3c6352523..bd918aaa4 100644 --- a/lisa/lisa-analyses/imp-testcases/visualization/dot/report.json +++ b/lisa/lisa-analyses/imp-testcases/visualization/dot/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_A.A(A__this)_845473647.dot", "untyped_A.getOne(A__this)_845491937.dot", "untyped_A.getPositive(A__this,_untyped_i)_845492898.dot", "untyped_A.identity(A__this,_untyped_i)_1285788509.dot", "untyped_A.identity(A__this,_untyped_i)_845488124.dot", "untyped_A.identity(A__this,_untyped_i)_845492991.dot", "untyped_tests.helper(tests__this,_untyped_i,_untyped_dispatcher)_845487256.dot", "untyped_tests.main(tests__this).dot" ], "info" : { "cfgs" : "6", - "duration" : "218ms", - "end" : "2023-04-20T12:45:48.024+02:00", + "duration" : "172ms", + "end" : "2023-09-07T11:46:04.154+02:00", "expressions" : "49", "files" : "8", "globals" : "0", "members" : "6", "programs" : "1", - "start" : "2023-04-20T12:45:47.806+02:00", + "start" : "2023-09-07T11:46:03.982+02:00", "statements" : "21", "units" : "2", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "false", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/visualization/dot" } diff --git a/lisa/lisa-analyses/imp-testcases/visualization/graphml-sub/report.json b/lisa/lisa-analyses/imp-testcases/visualization/graphml-sub/report.json index 4e9277e2b..8260a0039 100644 --- a/lisa/lisa-analyses/imp-testcases/visualization/graphml-sub/report.json +++ b/lisa/lisa-analyses/imp-testcases/visualization/graphml-sub/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_A.A(A__this)_845473647.graphml", "untyped_A.getOne(A__this)_845491937.graphml", "untyped_A.getPositive(A__this,_untyped_i)_845492898.graphml", "untyped_A.identity(A__this,_untyped_i)_1285788509.graphml", "untyped_A.identity(A__this,_untyped_i)_845488124.graphml", "untyped_A.identity(A__this,_untyped_i)_845492991.graphml", "untyped_tests.helper(tests__this,_untyped_i,_untyped_dispatcher)_845487256.graphml", "untyped_tests.main(tests__this).graphml" ], "info" : { "cfgs" : "6", - "duration" : "444ms", - "end" : "2023-04-20T12:45:47.321+02:00", + "duration" : "534ms", + "end" : "2023-09-07T11:46:03.830+02:00", "expressions" : "49", "files" : "8", "globals" : "0", "members" : "6", "programs" : "1", - "start" : "2023-04-20T12:45:46.877+02:00", + "start" : "2023-09-07T11:46:03.296+02:00", "statements" : "21", "units" : "2", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "false", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/visualization/graphml-sub" } diff --git a/lisa/lisa-analyses/imp-testcases/visualization/graphml/report.json b/lisa/lisa-analyses/imp-testcases/visualization/graphml/report.json index 2ec3276ed..412f5f110 100644 --- a/lisa/lisa-analyses/imp-testcases/visualization/graphml/report.json +++ b/lisa/lisa-analyses/imp-testcases/visualization/graphml/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_A.A(A__this)_845473647.graphml", "untyped_A.getOne(A__this)_845491937.graphml", "untyped_A.getPositive(A__this,_untyped_i)_845492898.graphml", "untyped_A.identity(A__this,_untyped_i)_1285788509.graphml", "untyped_A.identity(A__this,_untyped_i)_845488124.graphml", "untyped_A.identity(A__this,_untyped_i)_845492991.graphml", "untyped_tests.helper(tests__this,_untyped_i,_untyped_dispatcher)_845487256.graphml", "untyped_tests.main(tests__this).graphml" ], "info" : { "cfgs" : "6", - "duration" : "139ms", - "end" : "2023-04-20T12:45:49.881+02:00", + "duration" : "227ms", + "end" : "2023-09-07T11:46:05.019+02:00", "expressions" : "49", "files" : "8", "globals" : "0", "members" : "6", "programs" : "1", - "start" : "2023-04-20T12:45:49.742+02:00", + "start" : "2023-09-07T11:46:04.792+02:00", "statements" : "21", "units" : "2", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "false", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/visualization/graphml" } diff --git a/lisa/lisa-analyses/imp-testcases/visualization/html-sub/report.json b/lisa/lisa-analyses/imp-testcases/visualization/html-sub/report.json index 0f49c18ac..c28ba65ed 100644 --- a/lisa/lisa-analyses/imp-testcases/visualization/html-sub/report.json +++ b/lisa/lisa-analyses/imp-testcases/visualization/html-sub/report.json @@ -3,17 +3,17 @@ "files" : [ "js/cose-base.js", "js/cytoscape-3.21.1.min.js", "js/cytoscape-expand-collapse.js", "js/cytoscape-fcose.js", "js/cytoscape-graphml-1.0.6-hier.js", "js/jquery-3.0.0.min.js", "js/layout-base.js", "report.json", "untyped_A.A(A__this)_845473647.html", "untyped_A.getOne(A__this)_845491937.html", "untyped_A.getPositive(A__this,_untyped_i)_845492898.html", "untyped_A.identity(A__this,_untyped_i)_1285788509.html", "untyped_A.identity(A__this,_untyped_i)_845488124.html", "untyped_A.identity(A__this,_untyped_i)_845492991.html", "untyped_tests.helper(tests__this,_untyped_i,_untyped_dispatcher)_845487256.html", "untyped_tests.main(tests__this).html" ], "info" : { "cfgs" : "6", - "duration" : "483ms", - "end" : "2023-04-20T12:45:50.580+02:00", + "duration" : "99ms", + "end" : "2023-09-07T11:46:05.218+02:00", "expressions" : "49", "files" : "15", "globals" : "0", "members" : "6", "programs" : "1", - "start" : "2023-04-20T12:45:50.097+02:00", + "start" : "2023-09-07T11:46:05.119+02:00", "statements" : "21", "units" : "2", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "false", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/visualization/html-sub" } diff --git a/lisa/lisa-analyses/imp-testcases/visualization/html/report.json b/lisa/lisa-analyses/imp-testcases/visualization/html/report.json index cc870e61f..8fd57c103 100644 --- a/lisa/lisa-analyses/imp-testcases/visualization/html/report.json +++ b/lisa/lisa-analyses/imp-testcases/visualization/html/report.json @@ -3,17 +3,17 @@ "files" : [ "js/cytoscape-3.21.1.min.js", "js/cytoscape-graphml-1.0.6-hier.js", "js/jquery-3.0.0.min.js", "report.json", "untyped_A.A(A__this)_845473647.html", "untyped_A.getOne(A__this)_845491937.html", "untyped_A.getPositive(A__this,_untyped_i)_845492898.html", "untyped_A.identity(A__this,_untyped_i)_1285788509.html", "untyped_A.identity(A__this,_untyped_i)_845488124.html", "untyped_A.identity(A__this,_untyped_i)_845492991.html", "untyped_tests.helper(tests__this,_untyped_i,_untyped_dispatcher)_845487256.html", "untyped_tests.main(tests__this).html" ], "info" : { "cfgs" : "6", - "duration" : "655ms", - "end" : "2023-04-20T12:45:49.094+02:00", + "duration" : "268ms", + "end" : "2023-09-07T11:46:04.582+02:00", "expressions" : "49", "files" : "11", "globals" : "0", "members" : "6", "programs" : "1", - "start" : "2023-04-20T12:45:48.439+02:00", + "start" : "2023-09-07T11:46:04.314+02:00", "statements" : "21", "units" : "2", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "false", "serializeResults" : "false", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/visualization/html" } diff --git a/lisa/lisa-analyses/imp-testcases/visualization/inputs/report.json b/lisa/lisa-analyses/imp-testcases/visualization/inputs/report.json index efe43bccc..600d3c889 100644 --- a/lisa/lisa-analyses/imp-testcases/visualization/inputs/report.json +++ b/lisa/lisa-analyses/imp-testcases/visualization/inputs/report.json @@ -3,17 +3,17 @@ "files" : [ "report.json", "untyped_A.A(A__this)_cfg.json", "untyped_A.getOne(A__this)_cfg.json", "untyped_A.getPositive(A__this,_untyped_i)_cfg.json", "untyped_A.identity(A__this,_untyped_i)_cfg.json", "untyped_tests.helper(tests__this,_untyped_i,_untyped_dispatcher)_cfg.json", "untyped_tests.main(tests__this)_cfg.json" ], "info" : { "cfgs" : "6", - "duration" : "77ms", - "end" : "2023-04-20T12:45:51.226+02:00", + "duration" : "71ms", + "end" : "2023-09-07T11:46:05.522+02:00", "expressions" : "49", "files" : "6", "globals" : "0", "members" : "6", "programs" : "1", - "start" : "2023-04-20T12:45:51.149+02:00", + "start" : "2023-09-07T11:46:05.451+02:00", "statements" : "21", "units" : "2", - "version" : "0.1b7", + "version" : "0.1b8", "warnings" : "0" }, "configuration" : { @@ -31,6 +31,7 @@ "serializeInputs" : "true", "serializeResults" : "false", "syntacticChecks" : "", + "useWideningPoints" : "true", "wideningThreshold" : "5", "workdir" : "test-outputs/visualization/inputs" } diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/DefaultConfiguration.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/DefaultConfiguration.java new file mode 100644 index 000000000..30c59e5a6 --- /dev/null +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/DefaultConfiguration.java @@ -0,0 +1,119 @@ +package it.unive.lisa; + +import it.unive.lisa.analysis.AbstractState; +import it.unive.lisa.analysis.SimpleAbstractState; +import it.unive.lisa.analysis.heap.HeapDomain; +import it.unive.lisa.analysis.heap.MonolithicHeap; +import it.unive.lisa.analysis.nonrelational.value.TypeEnvironment; +import it.unive.lisa.analysis.nonrelational.value.ValueEnvironment; +import it.unive.lisa.analysis.numeric.Interval; +import it.unive.lisa.analysis.type.TypeDomain; +import it.unive.lisa.analysis.types.InferredTypes; +import it.unive.lisa.analysis.value.ValueDomain; +import it.unive.lisa.conf.LiSAConfiguration; +import it.unive.lisa.interprocedural.InterproceduralAnalysis; +import it.unive.lisa.interprocedural.ModularWorstCaseAnalysis; +import it.unive.lisa.interprocedural.callgraph.CallGraph; +import it.unive.lisa.interprocedural.callgraph.RTACallGraph; + +/** + * A default {@link LiSAConfiguration} that already has a {@link CallGraph} and + * {@link InterproceduralAnalysis} set. This class also has static methods to + * instantiate default implementations of other analysis components. + * + * @author Luca Negrini + */ +public class DefaultConfiguration extends LiSAConfiguration { + + /** + * Yields a default {@link CallGraph} that can be used to run analyses. + * + * @return the call graph + */ + public static RTACallGraph defaultCallGraph() { + return new RTACallGraph(); + } + + /** + * Yields a default {@link InterproceduralAnalysis} that can be used to run + * analyses. + * + * @param the kind of {@link AbstractState} to run during the analysis + * + * @return the interprocedural analysis + */ + public static > ModularWorstCaseAnalysis defaultInterproceduralAnalysis() { + return new ModularWorstCaseAnalysis<>(); + } + + /** + * Yields a default {@link TypeDomain} that can be used to run analyses. + * + * @return the typedomain + */ + public static TypeEnvironment defaultTypeDomain() { + return new TypeEnvironment<>(new InferredTypes()); + } + + /** + * Yields a default {@link ValueDomain} that can be used to run analyses. + * + * @return the value domain + */ + public static ValueEnvironment defaultValueDomain() { + return new ValueEnvironment<>(new Interval()); + } + + /** + * Yields a default {@link HeapDomain} that can be used to run analyses. + * + * @return the heap domain + */ + public static MonolithicHeap defaultHeapDomain() { + return new MonolithicHeap(); + } + + /** + * Yields an instance of {@link SimpleAbstractState} uilt using the given + * sub-domains. + * + * @param the type of {@link HeapDomain} + * @param the type of {@link ValueDomain} + * @param the type of {@link TypeDomain} + * @param heap the {@link HeapDomain} to embed in the returned state + * @param value the {@link ValueDomain} to embed in the returned state + * @param type the {@link TypeDomain} to embed in the returned state + * + * @return the abstract state + */ + public static , + V extends ValueDomain, + T extends TypeDomain> SimpleAbstractState simpleState( + H heap, + V value, + T type) { + return new SimpleAbstractState<>(heap, value, type); + } + + /** + * Yields a default {@link AbstractState} that can be used to run analyses. + * + * @return the abstract state + */ + public static SimpleAbstractState< + MonolithicHeap, + ValueEnvironment, + TypeEnvironment> defaultAbstractState() { + return simpleState(defaultHeapDomain(), defaultValueDomain(), defaultTypeDomain()); + } + + /** + * Builds a default configuration, having {@link #defaultCallGraph()} as + * {@link CallGraph} and {@link #defaultInterproceduralAnalysis()} as + * {@link InterproceduralAnalysis}. + */ + public DefaultConfiguration() { + this.callGraph = defaultCallGraph(); + this.interproceduralAnalysis = defaultInterproceduralAnalysis(); + } +} diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/LiSAFactory.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/LiSAFactory.java new file mode 100644 index 000000000..f4c31e1e0 --- /dev/null +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/LiSAFactory.java @@ -0,0 +1,320 @@ +package it.unive.lisa; + +import it.unive.lisa.analysis.AbstractState; +import it.unive.lisa.analysis.dataflow.DataflowElement; +import it.unive.lisa.analysis.dataflow.DefiniteDataflowDomain; +import it.unive.lisa.analysis.dataflow.PossibleDataflowDomain; +import it.unive.lisa.analysis.heap.HeapDomain; +import it.unive.lisa.analysis.nonrelational.heap.HeapEnvironment; +import it.unive.lisa.analysis.nonrelational.heap.NonRelationalHeapDomain; +import it.unive.lisa.analysis.nonrelational.inference.InferenceSystem; +import it.unive.lisa.analysis.nonrelational.inference.InferredValue; +import it.unive.lisa.analysis.nonrelational.value.NonRelationalTypeDomain; +import it.unive.lisa.analysis.nonrelational.value.NonRelationalValueDomain; +import it.unive.lisa.analysis.nonrelational.value.TypeEnvironment; +import it.unive.lisa.analysis.nonrelational.value.ValueEnvironment; +import it.unive.lisa.analysis.type.TypeDomain; +import it.unive.lisa.analysis.value.ValueDomain; +import it.unive.lisa.interprocedural.InterproceduralAnalysis; +import it.unive.lisa.interprocedural.callgraph.CallGraph; +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.lang.reflect.Modifier; +import java.lang.reflect.ParameterizedType; +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.HashSet; +import java.util.IdentityHashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; +import org.apache.commons.lang3.ArrayUtils; +import org.apache.commons.lang3.StringUtils; +import org.reflections.Reflections; +import org.reflections.scanners.SubTypesScanner; + +/** + * An utility class for instantiating analysis components, that is, modular + * pieces of the analysis that have several implementations. A specific instance + * can be retrieved through {@link #getInstance(Class, Object...)}. Moreover, + * {@link #configurableComponents()} yields a list of each modular LiSA + * component. + * + * @author Luca Negrini + */ +public final class LiSAFactory { + + private LiSAFactory() { + // this class is just a static holder + } + + @SuppressWarnings("unchecked") + private static T construct( + Class component, + Class[] argTypes, + Object[] params) + throws AnalysisSetupException { + if (argTypes.length == 0) + try { + // tokens use the getSingleton() pattern for construction + Method method = component.getMethod("getSingleton"); + if (method != null && Modifier.isStatic(method.getModifiers())) + return (T) method.invoke(null); + } catch (NoSuchMethodException e) { + // we don't do anything: the class does not have a + // getSingleton() + } catch (SecurityException | IllegalAccessException | IllegalArgumentException + | InvocationTargetException e) { + throw new AnalysisSetupException("Unable to instantiate " + component.getSimpleName(), e); + } + + try { + Constructor constructor = component.getConstructor(argTypes); + return constructor.newInstance(params); + } catch (NoSuchMethodException | SecurityException | InstantiationException | IllegalAccessException + | IllegalArgumentException | InvocationTargetException e) { + throw new AnalysisSetupException("Unable to instantiate " + component.getSimpleName(), e); + } + } + + private static Class[] findConstructorSignature( + Class component, + Object[] params) + throws AnalysisSetupException { + Map, List> candidates = new IdentityHashMap<>(); + Class[] types; + outer: for (Constructor constructor : component.getConstructors()) { + types = constructor.getParameterTypes(); + if (params.length != types.length) + continue; + + List toWrap = new ArrayList<>(); + for (int i = 0; i < types.length; i++) + if (needsWrapping(params[i].getClass(), types[i])) + toWrap.add(i); + else if (!types[i].isAssignableFrom(params[i].getClass())) + continue outer; + + candidates.put(constructor, toWrap); + } + + if (candidates.isEmpty()) + throw new AnalysisSetupException( + "No suitable constructor of " + component.getSimpleName() + " found for argument types " + + Arrays.toString(Arrays.stream(params).map(Object::getClass).toArray(Class[]::new))); + + if (candidates.size() > 1) + throw new AnalysisSetupException( + "Constructor call of " + component.getSimpleName() + " is ambiguous for argument types " + + Arrays.toString(Arrays.stream(params).map(Object::getClass).toArray(Class[]::new))); + + for (int p : candidates.values().iterator().next()) + params[p] = wrapParam(params[p]); + + return candidates.keySet().iterator().next().getParameterTypes(); + } + + private static boolean needsWrapping( + Class actual, + Class desired) { + if (NonRelationalHeapDomain.class.isAssignableFrom(actual) && desired.isAssignableFrom(HeapDomain.class)) + return true; + else if (NonRelationalValueDomain.class.isAssignableFrom(actual) && desired.isAssignableFrom(ValueDomain.class)) + return true; + else if (NonRelationalTypeDomain.class.isAssignableFrom(actual) && desired.isAssignableFrom(TypeDomain.class)) + return true; + else if (InferredValue.class.isAssignableFrom(actual) && desired.isAssignableFrom(ValueDomain.class)) + return true; + else if (DataflowElement.class.isAssignableFrom(actual) && desired.isAssignableFrom(ValueDomain.class)) + return true; + else + return false; + } + + @SuppressWarnings({ "rawtypes", "unchecked" }) + private static Object wrapParam( + Object param) { + if (NonRelationalHeapDomain.class.isAssignableFrom(param.getClass())) + return new HeapEnvironment((NonRelationalHeapDomain) param); + else if (NonRelationalValueDomain.class.isAssignableFrom(param.getClass())) + return new ValueEnvironment((NonRelationalValueDomain) param); + else if (NonRelationalTypeDomain.class.isAssignableFrom(param.getClass())) + return new TypeEnvironment((NonRelationalTypeDomain) param); + else if (InferredValue.class.isAssignableFrom(param.getClass())) + return new InferenceSystem((InferredValue) param); + else if (DataflowElement.class.isAssignableFrom(param.getClass())) { + Class elem = (Class) param.getClass(); + if (elem.getGenericInterfaces().length == 0) + return param; + + for (Type gi : elem.getGenericInterfaces()) + if (gi instanceof ParameterizedType && ((ParameterizedType) gi).getRawType() == DataflowElement.class) { + Type domain = ((ParameterizedType) gi).getActualTypeArguments()[0]; + if (((ParameterizedType) domain).getRawType() == PossibleDataflowDomain.class) + return new PossibleDataflowDomain((DataflowElement) param); + else if (((ParameterizedType) domain).getRawType() == DefiniteDataflowDomain.class) + return new DefiniteDataflowDomain((DataflowElement) param); + else + return param; + } + } + return param; + } + + /** + * Creates an instance of the given {@code component}. If {@code params} are + * provided, a suitable (and not ambiguous) constructor must exist in + * {@code component}'s class. Otherwise, the nullary constructor of + * {@code component} is invoked. + * + * @param the type of the component + * @param component the component to instantiate + * @param params the parameters for the creation + * + * @return an instance of the given component + * + * @throws AnalysisSetupException if the component cannot be created + */ + public static T getInstance( + Class component, + Object... params) + throws AnalysisSetupException { + try { + if (params != null && params.length != 0) + return construct(component, findConstructorSignature(component, params), params); + + return construct(component, ArrayUtils.EMPTY_CLASS_ARRAY, ArrayUtils.EMPTY_OBJECT_ARRAY); + } catch (NullPointerException e) { + throw new AnalysisSetupException("Unable to instantiate default " + component.getSimpleName(), e); + } + } + + /** + * An analysis component that can be configured, that is, it has more than + * one implementation that can be modularly integrated into the analysis. + * {@link #getComponent()} yields the component itself, i.e. the interface + * or abstract class that defines the analysis component. + * {@link #getAlternatives()} yields all the concrete implementations of the + * component.
+ *
+ * Note that all information present in instances of this class reflect the + * information known to LiSA when this component is created, that is, what + * is present inside the classpath and already loaded by the JVM. + * + * @author Luca Negrini + */ + public static final class ConfigurableComponent { + private static final Reflections scanner = new Reflections("", new SubTypesScanner()); + + private final Class component; + private final Set> alternatives; + + private ConfigurableComponent( + Class component) { + this.component = component; + this.alternatives = new HashSet<>(); + + @SuppressWarnings("rawtypes") + Set subtypes = scanner.getSubTypesOf(component); + for (Object sub : subtypes) { + Class subtype = (Class) sub; + if (Modifier.isAbstract(subtype.getModifiers()) || subtype.isInterface()) + continue; + + alternatives.add(subtype); + } + } + + /** + * Yields the component represented by this + * {@link ConfigurableComponent}. + * + * @return the analysis component + */ + public Class getComponent() { + return component; + } + + /** + * Yields the alternatives for this component, that is, the concrete + * classes that implements it. Each alternative is mapped to its default + * parameters, if any. + * + * @return the alternatives for this component + */ + public Set> getAlternatives() { + return alternatives; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((alternatives == null) ? 0 : alternatives.hashCode()); + result = prime * result + ((component == null) ? 0 : component.hashCode()); + return result; + } + + @Override + public boolean equals( + Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + ConfigurableComponent other = (ConfigurableComponent) obj; + if (component == null) { + if (other.component != null) + return false; + } else if (!component.equals(other.component)) + return false; + if (alternatives == null) { + if (other.alternatives != null) + return false; + } else if (!alternatives.equals(other.alternatives)) + return false; + return true; + } + + @Override + public String toString() { + String result = component.getName(); + String[] alternatives = this.alternatives.stream() + .map(e -> e.getName()) + .toArray(String[]::new); + result += " possible implementations: " + StringUtils.join(alternatives, ", "); + return result; + } + } + + /** + * Yields the collection of {@link ConfigurableComponent}s that can be used + * to customize the analysis.
+ *
+ * Note that all information present in the returned instances reflect the + * information known to LiSA when this component is created, that is, what + * is present inside the classpath and already loaded by the JVM. + * + * @return the components that can be configured + */ + public static Collection configurableComponents() { + Collection in = new ArrayList<>(); + in.add(new ConfigurableComponent(InterproceduralAnalysis.class)); + in.add(new ConfigurableComponent(CallGraph.class)); + in.add(new ConfigurableComponent(AbstractState.class)); + in.add(new ConfigurableComponent(HeapDomain.class)); + in.add(new ConfigurableComponent(ValueDomain.class)); + in.add(new ConfigurableComponent(TypeDomain.class)); + in.add(new ConfigurableComponent(NonRelationalHeapDomain.class)); + in.add(new ConfigurableComponent(NonRelationalValueDomain.class)); + in.add(new ConfigurableComponent(NonRelationalTypeDomain.class)); + in.add(new ConfigurableComponent(InferredValue.class)); + in.add(new ConfigurableComponent(DataflowElement.class)); + return in; + } +} diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/SimpleAbstractState.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/SimpleAbstractState.java index 56cfc9e98..bb9daecfe 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/SimpleAbstractState.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/SimpleAbstractState.java @@ -1,16 +1,10 @@ package it.unive.lisa.analysis; -import it.unive.lisa.DefaultParameters; -import it.unive.lisa.FallbackImplementation; import it.unive.lisa.analysis.heap.HeapDomain; import it.unive.lisa.analysis.heap.HeapSemanticOperation.HeapReplacement; -import it.unive.lisa.analysis.heap.MonolithicHeap; import it.unive.lisa.analysis.lattices.ExpressionSet; -import it.unive.lisa.analysis.numeric.Interval; -import it.unive.lisa.analysis.representation.DomainRepresentation; -import it.unive.lisa.analysis.representation.ObjectRepresentation; -import it.unive.lisa.analysis.types.InferredTypes; -import it.unive.lisa.analysis.value.TypeDomain; +import it.unive.lisa.analysis.lattices.Satisfiability; +import it.unive.lisa.analysis.type.TypeDomain; import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.program.cfg.ProgramPoint; import it.unive.lisa.symbolic.SymbolicExpression; @@ -18,16 +12,24 @@ import it.unive.lisa.symbolic.value.Identifier; import it.unive.lisa.symbolic.value.ValueExpression; import it.unive.lisa.type.Type; +import it.unive.lisa.util.representation.ObjectRepresentation; +import it.unive.lisa.util.representation.StructuredRepresentation; import java.util.Collection; -import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Set; import java.util.function.Predicate; /** * An abstract state of the analysis, composed by a heap state modeling the - * memory layout and a value state modeling values of program variables and - * memory locations. + * memory layout, a value state modeling values of program variables and memory + * locations, and a type state that can give types to expressions knowing the + * ones of variables.
+ *
+ * The interaction between heap and value/type domains follows the one defined + * in this + * paper. * * @author Luca Negrini * @@ -35,12 +37,33 @@ * @param the type of {@link ValueDomain} embedded in this state * @param the type of {@link TypeDomain} embedded in this state */ -@FallbackImplementation -@DefaultParameters({ MonolithicHeap.class, Interval.class, InferredTypes.class }) public class SimpleAbstractState, V extends ValueDomain, T extends TypeDomain> - implements BaseLattice>, AbstractState, H, V, T> { + implements + BaseLattice>, + AbstractState> { + + /** + * The key that should be used to store the instance of {@link HeapDomain} + * inside the {@link StructuredRepresentation} returned by + * {@link #representation()}. + */ + public static final String HEAP_REPRESENTATION_KEY = "heap"; + + /** + * The key that should be used to store the instance of {@link TypeDomain} + * inside the {@link StructuredRepresentation} returned by + * {@link #representation()}. + */ + public static final String TYPE_REPRESENTATION_KEY = "type"; + + /** + * The key that should be used to store the instance of {@link ValueDomain} + * inside the {@link StructuredRepresentation} returned by + * {@link #representation()}. + */ + public static final String VALUE_REPRESENTATION_KEY = "value"; /** * The domain containing information regarding heap structures @@ -70,164 +93,277 @@ public class SimpleAbstractState, * types of program variables and concretized memory * locations */ - public SimpleAbstractState(H heapState, V valueState, T typeState) { + public SimpleAbstractState( + H heapState, + V valueState, + T typeState) { this.heapState = heapState; this.valueState = valueState; this.typeState = typeState; } - @Override + /** + * Yields the {@link HeapDomain} contained in this state. + * + * @return the heap domain + */ public H getHeapState() { return heapState; } - @Override + /** + * Yields the {@link ValueDomain} contained in this state. + * + * @return the value domain + */ public V getValueState() { return valueState; } - @Override + /** + * Yields the {@link TypeDomain} contained in this state. + * + * @return the type domain + */ public T getTypeState() { return typeState; } @Override - public SimpleAbstractState assign(Identifier id, SymbolicExpression expression, ProgramPoint pp) + public SimpleAbstractState assign( + Identifier id, + SymbolicExpression expression, + ProgramPoint pp, + SemanticOracle oracle) throws SemanticException { - H heap = heapState.assign(id, expression, pp); - ExpressionSet exprs = heap.rewrite(expression, pp); + if (!expression.mightNeedRewriting()) { + ValueExpression ve = (ValueExpression) expression; + return new SimpleAbstractState<>( + heapState.assign(id, expression, pp, this), + valueState.assign(id, ve, pp, this), + typeState.assign(id, ve, pp, this)); + } - SimpleAbstractState as = applySubstitution(heap, valueState, typeState, pp); - T type = as.getTypeState(); - V value = as.getValueState(); + MutableOracle mo = new MutableOracle<>(heapState, valueState, typeState); + mo.heap = mo.heap.assign(id, expression, pp, mo); + ExpressionSet exprs = mo.heap.rewrite(expression, pp, mo); + if (exprs.isEmpty()) + return bottom(); - T typeRes = type.bottom(); - V valueRes = value.bottom(); - for (ValueExpression expr : exprs) { - T tmp = type.assign(id, expr, pp); + applySubstitution(mo, pp); - Set rt = tmp.getRuntimeTypesOf(expr, pp); - id.setRuntimeTypes(rt); - expr.setRuntimeTypes(rt); + if (exprs.elements.size() == 1) { + SymbolicExpression expr = exprs.elements.iterator().next(); + if (!(expr instanceof ValueExpression)) + throw new SemanticException("Rewriting failed for expression " + expr); + ValueExpression ve = (ValueExpression) expr; + T t = mo.type.assign(id, ve, pp, mo); + V v = mo.value.assign(id, ve, pp, mo); + return new SimpleAbstractState<>(mo.heap, v, t); + } - typeRes = typeRes.lub(tmp); - valueRes = valueRes.lub(value.assign(id, expr, pp)); + T typeRes = mo.type.bottom(); + V valueRes = mo.value.bottom(); + for (SymbolicExpression expr : exprs) { + if (!(expr instanceof ValueExpression)) + throw new SemanticException("Rewriting failed for expression " + expr); + ValueExpression ve = (ValueExpression) expr; + T t = mo.type.assign(id, ve, pp, mo); + V v = mo.value.assign(id, ve, pp, mo); + typeRes = typeRes.lub(t); + valueRes = valueRes.lub(v); } - return new SimpleAbstractState<>(heap, valueRes, typeRes); + return new SimpleAbstractState<>(mo.heap, valueRes, typeRes); } @Override - public SimpleAbstractState smallStepSemantics(SymbolicExpression expression, ProgramPoint pp) + public SimpleAbstractState smallStepSemantics( + SymbolicExpression expression, + ProgramPoint pp, + SemanticOracle oracle) throws SemanticException { - H heap = heapState.smallStepSemantics(expression, pp); - ExpressionSet exprs = heap.rewrite(expression, pp); - - SimpleAbstractState as = applySubstitution(heap, valueState, typeState, pp); - T type = as.getTypeState(); - V value = as.getValueState(); + if (!expression.mightNeedRewriting()) { + ValueExpression ve = (ValueExpression) expression; + return new SimpleAbstractState<>( + heapState.smallStepSemantics(expression, pp, this), + valueState.smallStepSemantics(ve, pp, this), + typeState.smallStepSemantics(ve, pp, this)); + } - T typeRes = type.bottom(); - V valueRes = value.bottom(); - for (ValueExpression expr : exprs) { - T tmp = type.smallStepSemantics(expr, pp); + MutableOracle mo = new MutableOracle<>(heapState, valueState, typeState); + mo.heap = mo.heap.smallStepSemantics(expression, pp, mo); + ExpressionSet exprs = mo.heap.rewrite(expression, pp, mo); + if (exprs.isEmpty()) + return bottom(); - Set rt = tmp.getRuntimeTypesOf(expr, pp); - expr.setRuntimeTypes(rt); + applySubstitution(mo, pp); - // if the expression is a memory allocation, its type is registered - // in the type domain + if (exprs.elements.size() == 1) { + SymbolicExpression expr = exprs.elements.iterator().next(); + if (!(expr instanceof ValueExpression)) + throw new SemanticException("Rewriting failed for expression " + expr); + ValueExpression ve = (ValueExpression) expr; + T t = mo.type.smallStepSemantics(ve, pp, mo); if (expression instanceof MemoryAllocation && expr instanceof Identifier) - tmp = tmp.assign((Identifier) expr, expr, pp); + // if the expression is a memory allocation, its type is + // registered in the type domain + t = t.assign((Identifier) ve, ve, pp, mo); + V v = mo.value.smallStepSemantics(ve, pp, mo); + return new SimpleAbstractState<>(mo.heap, v, t); + } - typeRes = typeRes.lub(tmp); - valueRes = valueRes.lub(value.smallStepSemantics(expr, pp)); + T typeRes = mo.type.bottom(); + V valueRes = mo.value.bottom(); + for (SymbolicExpression expr : exprs) { + if (!(expr instanceof ValueExpression)) + throw new SemanticException("Rewriting failed for expression " + expr); + ValueExpression ve = (ValueExpression) expr; + T t = mo.type.smallStepSemantics(ve, pp, mo); + if (expression instanceof MemoryAllocation && expr instanceof Identifier) + // if the expression is a memory allocation, its type is + // registered in the type domain + t = t.assign((Identifier) ve, ve, pp, mo); + V v = mo.value.smallStepSemantics(ve, pp, mo); + typeRes = typeRes.lub(t); + valueRes = valueRes.lub(v); } - return new SimpleAbstractState<>(heap, valueRes, typeRes); + return new SimpleAbstractState<>(mo.heap, valueRes, typeRes); } - private SimpleAbstractState applySubstitution(H heap, V value, T type, ProgramPoint pp) - throws SemanticException { - if (heap.getSubstitution() != null && !heap.getSubstitution().isEmpty()) { - for (HeapReplacement repl : heap.getSubstitution()) { - Set runtimeTypes; - Set allTypes = new HashSet(); - for (Identifier source : repl.getSources()) { - runtimeTypes = type.smallStepSemantics(source, pp).getRuntimeTypesOf(source, pp); - source.setRuntimeTypes(runtimeTypes); - allTypes.addAll(runtimeTypes); - } - - for (Identifier target : repl.getTargets()) - target.setRuntimeTypes(allTypes); - - if (repl.getSources().isEmpty()) - continue; - T lub = type.bottom(); - for (Identifier source : repl.getSources()) { - T partial = type; - for (Identifier target : repl.getTargets()) - partial = partial.assign(target, source, pp); - lub = lub.lub(partial); - } - type = lub.forgetIdentifiers(repl.getIdsToForget()); - value = value.applyReplacement(repl, pp); + private static , + V extends ValueDomain, + T extends TypeDomain> void applySubstitution( + MutableOracle mo, + ProgramPoint pp) + throws SemanticException { + List subs = mo.heap.getSubstitution(); + if (subs != null) + for (HeapReplacement repl : subs) { + T t = mo.type.applyReplacement(repl, pp, mo); + V v = mo.value.applyReplacement(repl, pp, mo); + // we update the oracle after both replacements have been + // applied to not lose info on the sources that will be removed + mo.type = t; + mo.value = v; } - } - - return new SimpleAbstractState<>(heap, value, type); } @Override - public SimpleAbstractState assume(SymbolicExpression expression, ProgramPoint src, ProgramPoint dest) + public SimpleAbstractState assume( + SymbolicExpression expression, + ProgramPoint src, + ProgramPoint dest, + SemanticOracle oracle) throws SemanticException { - H heap = heapState.assume(expression, src, dest); - if (heap.isBottom()) - return bottom(); + if (!expression.mightNeedRewriting()) { + ValueExpression ve = (ValueExpression) expression; + H h = heapState.assume(expression, src, dest, this); + if (h.isBottom()) + return bottom(); + T t = typeState.assume(ve, src, dest, this); + if (t.isBottom()) + return bottom(); + V v = valueState.assume(ve, src, dest, this); + if (v.isBottom()) + return bottom(); + return new SimpleAbstractState<>(h, v, t); + } - ExpressionSet exprs = heap.rewrite(expression, src); - SimpleAbstractState as = applySubstitution(heap, valueState, typeState, src); - T type = as.getTypeState(); - V value = as.getValueState(); + MutableOracle mo = new MutableOracle<>(heapState, valueState, typeState); + mo.heap = mo.heap.assume(expression, src, dest, mo); + if (mo.heap.isBottom()) + return bottom(); + ExpressionSet exprs = mo.heap.rewrite(expression, src, mo); + if (exprs.isEmpty()) + return bottom(); - T typeRes = type.bottom(); - V valueRes = value.bottom(); - for (ValueExpression expr : exprs) { - T tmp = type.smallStepSemantics(expr, src); - Set rt = tmp.getRuntimeTypesOf(expr, src); - expr.setRuntimeTypes(rt); + applySubstitution(mo, src); + + if (exprs.elements.size() == 1) { + SymbolicExpression expr = exprs.elements.iterator().next(); + if (!(expr instanceof ValueExpression)) + throw new SemanticException("Rewriting failed for expression " + expr); + ValueExpression ve = (ValueExpression) expr; + T t = mo.type.assume(ve, src, dest, mo); + if (t.isBottom()) + return bottom(); + V v = mo.value.assume(ve, src, dest, mo); + if (v.isBottom()) + return bottom(); + return new SimpleAbstractState<>(mo.heap, v, t); + } - typeRes = typeRes.lub(type.assume(expr, src, dest)); - valueRes = valueRes.lub(value.assume(expr, src, dest)); + T typeRes = mo.type.bottom(); + V valueRes = mo.value.bottom(); + for (SymbolicExpression expr : exprs) { + if (!(expr instanceof ValueExpression)) + throw new SemanticException("Rewriting failed for expression " + expr); + ValueExpression ve = (ValueExpression) expr; + T t = mo.type.assume(ve, src, dest, mo); + V v = mo.value.assume(ve, src, dest, mo); + typeRes = typeRes.lub(t); + valueRes = valueRes.lub(v); } if (typeRes.isBottom() || valueRes.isBottom()) return bottom(); - return new SimpleAbstractState<>(heap, valueRes, typeRes); + return new SimpleAbstractState<>(mo.heap, valueRes, typeRes); } @Override - public Satisfiability satisfies(SymbolicExpression expression, ProgramPoint pp) throws SemanticException { - Satisfiability heapsat = heapState.satisfies(expression, pp); + public Satisfiability satisfies( + SymbolicExpression expression, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + Satisfiability heapsat = heapState.satisfies(expression, pp, this); if (heapsat == Satisfiability.BOTTOM) return Satisfiability.BOTTOM; - ExpressionSet rewritten = heapState.rewrite(expression, pp); + if (!expression.mightNeedRewriting()) { + ValueExpression ve = (ValueExpression) expression; + Satisfiability typesat = typeState.satisfies(ve, pp, this); + if (typesat == Satisfiability.BOTTOM) + return Satisfiability.BOTTOM; + Satisfiability valuesat = valueState.satisfies(ve, pp, this); + if (valuesat == Satisfiability.BOTTOM) + return Satisfiability.BOTTOM; + return heapsat.glb(typesat).glb(valuesat); + } + + ExpressionSet exprs = heapState.rewrite(expression, pp, this); + if (exprs.isEmpty()) + return Satisfiability.BOTTOM; + + if (exprs.elements.size() == 1) { + SymbolicExpression expr = exprs.elements.iterator().next(); + if (!(expr instanceof ValueExpression)) + throw new SemanticException("Rewriting failed for expression " + expr); + ValueExpression ve = (ValueExpression) expression; + Satisfiability typesat = typeState.satisfies(ve, pp, this); + if (typesat == Satisfiability.BOTTOM) + return Satisfiability.BOTTOM; + Satisfiability valuesat = valueState.satisfies(ve, pp, this); + if (valuesat == Satisfiability.BOTTOM) + return Satisfiability.BOTTOM; + return heapsat.glb(typesat).glb(valuesat); + } + Satisfiability typesat = Satisfiability.BOTTOM; Satisfiability valuesat = Satisfiability.BOTTOM; - for (ValueExpression expr : rewritten) { - T tmp = typeState.smallStepSemantics(expr, pp); - Set rt = tmp.getRuntimeTypesOf(expr, pp); - expr.setRuntimeTypes(rt); - - Satisfiability sat = typeState.satisfies(expr, pp); + for (SymbolicExpression expr : exprs) { + if (!(expr instanceof ValueExpression)) + throw new SemanticException("Rewriting failed for expression " + expr); + ValueExpression ve = (ValueExpression) expr; + Satisfiability sat = typeState.satisfies(ve, pp, this); if (sat == Satisfiability.BOTTOM) return sat; typesat = typesat.lub(sat); - sat = valueState.satisfies(expr, pp); + sat = valueState.satisfies(ve, pp, this); if (sat == Satisfiability.BOTTOM) return sat; valuesat = valuesat.lub(sat); @@ -236,7 +372,9 @@ public Satisfiability satisfies(SymbolicExpression expression, ProgramPoint pp) } @Override - public SimpleAbstractState pushScope(ScopeToken scope) throws SemanticException { + public SimpleAbstractState pushScope( + ScopeToken scope) + throws SemanticException { return new SimpleAbstractState<>( heapState.pushScope(scope), valueState.pushScope(scope), @@ -244,7 +382,9 @@ public SimpleAbstractState pushScope(ScopeToken scope) throws SemanticE } @Override - public SimpleAbstractState popScope(ScopeToken scope) throws SemanticException { + public SimpleAbstractState popScope( + ScopeToken scope) + throws SemanticException { return new SimpleAbstractState<>( heapState.popScope(scope), valueState.popScope(scope), @@ -252,7 +392,9 @@ public SimpleAbstractState popScope(ScopeToken scope) throws SemanticEx } @Override - public SimpleAbstractState lubAux(SimpleAbstractState other) throws SemanticException { + public SimpleAbstractState lubAux( + SimpleAbstractState other) + throws SemanticException { return new SimpleAbstractState<>( heapState.lub(other.heapState), valueState.lub(other.valueState), @@ -260,7 +402,9 @@ public SimpleAbstractState lubAux(SimpleAbstractState other) t } @Override - public SimpleAbstractState glbAux(SimpleAbstractState other) throws SemanticException { + public SimpleAbstractState glbAux( + SimpleAbstractState other) + throws SemanticException { return new SimpleAbstractState<>( heapState.glb(other.heapState), valueState.glb(other.valueState), @@ -268,7 +412,9 @@ public SimpleAbstractState glbAux(SimpleAbstractState other) t } @Override - public SimpleAbstractState wideningAux(SimpleAbstractState other) throws SemanticException { + public SimpleAbstractState wideningAux( + SimpleAbstractState other) + throws SemanticException { return new SimpleAbstractState<>( heapState.widening(other.heapState), valueState.widening(other.valueState), @@ -276,7 +422,9 @@ public SimpleAbstractState wideningAux(SimpleAbstractState oth } @Override - public SimpleAbstractState narrowingAux(SimpleAbstractState other) throws SemanticException { + public SimpleAbstractState narrowingAux( + SimpleAbstractState other) + throws SemanticException { return new SimpleAbstractState<>( heapState.narrowing(other.heapState), valueState.narrowing(other.valueState), @@ -284,7 +432,9 @@ public SimpleAbstractState narrowingAux(SimpleAbstractState ot } @Override - public boolean lessOrEqualAux(SimpleAbstractState other) throws SemanticException { + public boolean lessOrEqualAux( + SimpleAbstractState other) + throws SemanticException { return heapState.lessOrEqual(other.heapState) && valueState.lessOrEqual(other.valueState) && typeState.lessOrEqual(other.typeState); @@ -311,7 +461,9 @@ public boolean isBottom() { } @Override - public SimpleAbstractState forgetIdentifier(Identifier id) throws SemanticException { + public SimpleAbstractState forgetIdentifier( + Identifier id) + throws SemanticException { return new SimpleAbstractState<>( heapState.forgetIdentifier(id), valueState.forgetIdentifier(id), @@ -319,7 +471,9 @@ public SimpleAbstractState forgetIdentifier(Identifier id) throws Seman } @Override - public SimpleAbstractState forgetIdentifiersIf(Predicate test) throws SemanticException { + public SimpleAbstractState forgetIdentifiersIf( + Predicate test) + throws SemanticException { return new SimpleAbstractState<>( heapState.forgetIdentifiersIf(test), valueState.forgetIdentifiersIf(test), @@ -337,7 +491,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -364,15 +519,15 @@ public boolean equals(Object obj) { } @Override - public DomainRepresentation representation() { + public StructuredRepresentation representation() { if (isBottom()) return Lattice.bottomRepresentation(); if (isTop()) return Lattice.topRepresentation(); - DomainRepresentation h = heapState.representation(); - DomainRepresentation t = typeState.representation(); - DomainRepresentation v = valueState.representation(); + StructuredRepresentation h = heapState.representation(); + StructuredRepresentation t = typeState.representation(); + StructuredRepresentation v = valueState.representation(); return new ObjectRepresentation(Map.of( HEAP_REPRESENTATION_KEY, h, TYPE_REPRESENTATION_KEY, t, @@ -385,7 +540,8 @@ public String toString() { } @Override - public > Collection getAllDomainInstances(Class domain) { + public > Collection getAllDomainInstances( + Class domain) { Collection result = AbstractState.super.getAllDomainInstances(domain); result.addAll(heapState.getAllDomainInstances(domain)); result.addAll(typeState.getAllDomainInstances(domain)); @@ -394,17 +550,164 @@ public String toString() { } @Override - public SimpleAbstractState withTopHeap() { + public ExpressionSet rewrite( + SymbolicExpression expression, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + if (!expression.mightNeedRewriting()) + return new ExpressionSet(expression); + return heapState.rewrite(expression, pp, oracle); + } + + @Override + public ExpressionSet rewrite( + ExpressionSet expressions, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + return heapState.rewrite(expressions, pp, oracle); + } + + @Override + public Set getRuntimeTypesOf( + SymbolicExpression e, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + return typeState.getRuntimeTypesOf(e, pp, oracle); + } + + @Override + public Type getDynamicTypeOf( + SymbolicExpression e, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + return typeState.getDynamicTypeOf(e, pp, oracle); + } + + @Override + public boolean knowsIdentifier( + Identifier id) { + return heapState.knowsIdentifier(id) || valueState.knowsIdentifier(id) || typeState.knowsIdentifier(id); + } + + @Override + public SimpleAbstractState withTopMemory() { return new SimpleAbstractState<>(heapState.top(), valueState, typeState); } @Override - public SimpleAbstractState withTopValue() { + public SimpleAbstractState withTopValues() { return new SimpleAbstractState<>(heapState, valueState.top(), typeState); } @Override - public SimpleAbstractState withTopType() { + public SimpleAbstractState withTopTypes() { return new SimpleAbstractState<>(heapState, valueState, typeState.top()); } + + private static class MutableOracle, + V extends ValueDomain, + T extends TypeDomain> implements SemanticOracle { + + private H heap; + private V value; + private T type; + + public MutableOracle( + H heap, + V value, + T type) { + this.heap = heap; + this.value = value; + this.type = type; + } + + @Override + public ExpressionSet rewrite( + SymbolicExpression expression, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + if (!expression.mightNeedRewriting()) + return new ExpressionSet(expression); + return heap.rewrite(expression, pp, this); + } + + @Override + public Set getRuntimeTypesOf( + SymbolicExpression e, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + return type.getRuntimeTypesOf(e, pp, this); + } + + @Override + public Type getDynamicTypeOf( + SymbolicExpression e, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + return type.getDynamicTypeOf(e, pp, this); + } + + @Override + public String toString() { + if (heap.isBottom() || type.isBottom() || value.isBottom()) + return Lattice.bottomRepresentation().toString(); + if (heap.isTop() && type.isTop() && value.isTop()) + return Lattice.topRepresentation().toString(); + + StructuredRepresentation h = heap.representation(); + StructuredRepresentation t = type.representation(); + StructuredRepresentation v = value.representation(); + return new ObjectRepresentation(Map.of( + HEAP_REPRESENTATION_KEY, h, + TYPE_REPRESENTATION_KEY, t, + VALUE_REPRESENTATION_KEY, v)).toString(); + } + + @Override + public Satisfiability alias( + SymbolicExpression x, + SymbolicExpression y, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + return heap.alias(x, y, pp, oracle); + } + + @Override + public Satisfiability isReachableFrom( + SymbolicExpression x, + SymbolicExpression y, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + return heap.isReachableFrom(x, y, pp, oracle); + } + } + + @Override + public Satisfiability alias( + SymbolicExpression x, + SymbolicExpression y, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + return heapState.alias(x, y, pp, oracle); + } + + @Override + public Satisfiability isReachableFrom( + SymbolicExpression x, + SymbolicExpression y, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + return heapState.isReachableFrom(x, y, pp, oracle); + } } diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/combination/CartesianProduct.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/combination/CartesianProduct.java index 26458bfb7..a1c350593 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/combination/CartesianProduct.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/combination/CartesianProduct.java @@ -4,12 +4,14 @@ import it.unive.lisa.analysis.ScopeToken; import it.unive.lisa.analysis.SemanticDomain; import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.SemanticOracle; +import it.unive.lisa.analysis.lattices.Satisfiability; import it.unive.lisa.analysis.nonrelational.Environment; -import it.unive.lisa.analysis.representation.DomainRepresentation; -import it.unive.lisa.analysis.representation.ListRepresentation; import it.unive.lisa.program.cfg.ProgramPoint; import it.unive.lisa.symbolic.SymbolicExpression; import it.unive.lisa.symbolic.value.Identifier; +import it.unive.lisa.util.representation.ListRepresentation; +import it.unive.lisa.util.representation.StructuredRepresentation; import java.util.Collection; import java.util.function.Predicate; @@ -53,7 +55,9 @@ public abstract class CartesianProduct test) throws SemanticException { + public C forgetIdentifiersIf( + Predicate test) + throws SemanticException { T1 newLeft = left.forgetIdentifiersIf(test); T2 newRight = right.forgetIdentifiersIf(test); return mk(newLeft, newRight); } @Override - public C pushScope(ScopeToken scope) throws SemanticException { + public C pushScope( + ScopeToken scope) + throws SemanticException { T1 newLeft = left.pushScope(scope); T2 newRight = right.pushScope(scope); return mk(newLeft, newRight); } @Override - public C popScope(ScopeToken scope) throws SemanticException { + public C popScope( + ScopeToken scope) + throws SemanticException { T1 newLeft = left.popScope(scope); T2 newRight = right.popScope(scope); return mk(newLeft, newRight); @@ -186,22 +215,32 @@ public C popScope(ScopeToken scope) throws SemanticException { } @Override - public Satisfiability satisfies(E expression, ProgramPoint pp) throws SemanticException { - return left.satisfies(expression, pp).and(right.satisfies(expression, pp)); + public Satisfiability satisfies( + E expression, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + return left.satisfies(expression, pp, oracle).and(right.satisfies(expression, pp, oracle)); } @Override - public C lub(C other) throws SemanticException { + public C lub( + C other) + throws SemanticException { return mk(left.lub(other.left), right.lub(other.right)); } @Override - public C widening(C other) throws SemanticException { + public C widening( + C other) + throws SemanticException { return mk(left.widening(other.left), right.widening(other.right)); } @Override - public boolean lessOrEqual(C other) throws SemanticException { + public boolean lessOrEqual( + C other) + throws SemanticException { return left.lessOrEqual(other.left) && right.lessOrEqual(other.right); } @@ -226,7 +265,8 @@ public boolean isBottom() { } @Override - public > Collection getAllDomainInstances(Class domain) { + public > Collection getAllDomainInstances( + Class domain) { Collection result = SemanticDomain.super.getAllDomainInstances(domain); result.addAll(left.getAllDomainInstances(domain)); result.addAll(right.getAllDomainInstances(domain)); diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/combination/NonRelationalValueCartesianProduct.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/combination/NonRelationalValueCartesianProduct.java index 511260812..19fbb78e5 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/combination/NonRelationalValueCartesianProduct.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/combination/NonRelationalValueCartesianProduct.java @@ -1,16 +1,17 @@ package it.unive.lisa.analysis.combination; -import it.unive.lisa.analysis.SemanticDomain.Satisfiability; import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.SemanticOracle; +import it.unive.lisa.analysis.lattices.Satisfiability; import it.unive.lisa.analysis.nonrelational.value.BaseNonRelationalValueDomain; import it.unive.lisa.analysis.nonrelational.value.NonRelationalValueDomain; import it.unive.lisa.analysis.nonrelational.value.ValueEnvironment; -import it.unive.lisa.analysis.representation.DomainRepresentation; -import it.unive.lisa.analysis.representation.ListRepresentation; import it.unive.lisa.program.cfg.ProgramPoint; import it.unive.lisa.symbolic.SymbolicExpression; import it.unive.lisa.symbolic.value.Identifier; import it.unive.lisa.symbolic.value.ValueExpression; +import it.unive.lisa.util.representation.ListRepresentation; +import it.unive.lisa.util.representation.StructuredRepresentation; import java.util.Map.Entry; /** @@ -30,7 +31,8 @@ public abstract class NonRelationalValueCartesianProduct, T1 extends NonRelationalValueDomain, T2 extends NonRelationalValueDomain> - implements BaseNonRelationalValueDomain { + implements + BaseNonRelationalValueDomain { /** * The left-hand side abstract domain. @@ -48,7 +50,9 @@ public abstract class NonRelationalValueCartesianProduct environment, ProgramPoint pp) + public C eval( + ValueExpression expression, + ValueEnvironment environment, + ProgramPoint pp, + SemanticOracle oracle) throws SemanticException { ValueEnvironment lenv = new ValueEnvironment<>(left); ValueEnvironment renv = new ValueEnvironment<>(right); @@ -144,11 +161,15 @@ public C eval(ValueExpression expression, ValueEnvironment environment, Progr renv = renv.putState(entry.getKey(), entry.getValue().right); } - return mk(left.eval(expression, lenv, pp), right.eval(expression, renv, pp)); + return mk(left.eval(expression, lenv, pp, oracle), right.eval(expression, renv, pp, oracle)); } @Override - public Satisfiability satisfies(ValueExpression expression, ValueEnvironment environment, ProgramPoint pp) + public Satisfiability satisfies( + ValueExpression expression, + ValueEnvironment environment, + ProgramPoint pp, + SemanticOracle oracle) throws SemanticException { ValueEnvironment lenv = new ValueEnvironment<>(left); ValueEnvironment renv = new ValueEnvironment<>(right); @@ -157,12 +178,17 @@ public Satisfiability satisfies(ValueExpression expression, ValueEnvironment renv = renv.putState(entry.getKey(), entry.getValue().right); } - return left.satisfies(expression, lenv, pp).glb(right.satisfies(expression, renv, pp)); + return left.satisfies(expression, lenv, pp, oracle).glb(right.satisfies(expression, renv, pp, oracle)); } @Override - public ValueEnvironment assume(ValueEnvironment environment, ValueExpression expression, ProgramPoint src, - ProgramPoint dest) throws SemanticException { + public ValueEnvironment assume( + ValueEnvironment environment, + ValueExpression expression, + ProgramPoint src, + ProgramPoint dest, + SemanticOracle oracle) + throws SemanticException { ValueEnvironment lenv = new ValueEnvironment<>(left); ValueEnvironment renv = new ValueEnvironment<>(right); for (Entry entry : environment) { @@ -170,8 +196,8 @@ public ValueEnvironment assume(ValueEnvironment environment, ValueExpressi renv = renv.putState(entry.getKey(), entry.getValue().right); } - ValueEnvironment lassume = left.assume(lenv, expression, src, dest); - ValueEnvironment rassume = right.assume(renv, expression, src, dest); + ValueEnvironment lassume = left.assume(lenv, expression, src, dest, oracle); + ValueEnvironment rassume = right.assume(renv, expression, src, dest, oracle); @SuppressWarnings("unchecked") ValueEnvironment res = new ValueEnvironment<>((C) this); @@ -185,22 +211,26 @@ public ValueEnvironment assume(ValueEnvironment environment, ValueExpressi } @Override - public C glb(C other) throws SemanticException { + public C glb( + C other) + throws SemanticException { return mk(left.glb(other.left), right.glb(other.right)); } @Override - public C variable(Identifier id, ProgramPoint pp) throws SemanticException { - return mk(left.variable(id, pp), right.variable(id, pp)); - } - - @Override - public boolean canProcess(SymbolicExpression expression) { - return left.canProcess(expression) || right.canProcess(expression); + public C fixedVariable( + Identifier id, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + return mk(left.fixedVariable(id, pp, oracle), right.fixedVariable(id, pp, oracle)); } @Override - public boolean tracksIdentifiers(Identifier id) { - return left.tracksIdentifiers(id) || right.tracksIdentifiers(id); + public boolean canProcess( + SymbolicExpression expression, + ProgramPoint pp, + SemanticOracle oracle) { + return left.canProcess(expression, pp, oracle) || right.canProcess(expression, pp, oracle); } } diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/combination/ValueCartesianProduct.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/combination/ValueCartesianProduct.java index b9d7770ac..b9ae21e55 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/combination/ValueCartesianProduct.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/combination/ValueCartesianProduct.java @@ -17,8 +17,10 @@ * domain of the Cartesian product */ public class ValueCartesianProduct, T2 extends ValueDomain> - extends CartesianProduct, T1, T2, ValueExpression, Identifier> - implements ValueDomain> { + extends + CartesianProduct, T1, T2, ValueExpression, Identifier> + implements + ValueDomain> { /** * Builds the value Cartesian product. @@ -26,12 +28,16 @@ public class ValueCartesianProduct, T2 extends ValueD * @param left the left-hand side of the value Cartesian product * @param right the right-hand side of the value Cartesian product */ - public ValueCartesianProduct(T1 left, T2 right) { + public ValueCartesianProduct( + T1 left, + T2 right) { super(left, right); } @Override - public ValueCartesianProduct mk(T1 left, T2 right) { + public ValueCartesianProduct mk( + T1 left, + T2 right) { return new ValueCartesianProduct<>(left, right); } @@ -39,4 +45,10 @@ public ValueCartesianProduct mk(T1 left, T2 right) { public boolean isBottom() { return left.isBottom() && right.isBottom(); } + + @Override + public boolean knowsIdentifier( + Identifier id) { + return left.knowsIdentifier(id) || right.knowsIdentifier(id); + } } diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/dataflow/AvailableExpressions.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/dataflow/AvailableExpressions.java index 6c34a3636..8b0ce967c 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/dataflow/AvailableExpressions.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/dataflow/AvailableExpressions.java @@ -2,8 +2,6 @@ import it.unive.lisa.analysis.ScopeToken; import it.unive.lisa.analysis.SemanticException; -import it.unive.lisa.analysis.representation.DomainRepresentation; -import it.unive.lisa.analysis.representation.StringRepresentation; import it.unive.lisa.program.cfg.ProgramPoint; import it.unive.lisa.symbolic.value.BinaryExpression; import it.unive.lisa.symbolic.value.Constant; @@ -13,6 +11,8 @@ import it.unive.lisa.symbolic.value.TernaryExpression; import it.unive.lisa.symbolic.value.UnaryExpression; import it.unive.lisa.symbolic.value.ValueExpression; +import it.unive.lisa.util.representation.StringRepresentation; +import it.unive.lisa.util.representation.StructuredRepresentation; import java.util.Collection; import java.util.Collections; import java.util.HashSet; @@ -24,7 +24,8 @@ * @author Luca Negrini */ public class AvailableExpressions - implements DataflowElement, AvailableExpressions> { + implements + DataflowElement, AvailableExpressions> { private final ValueExpression expression; @@ -40,7 +41,8 @@ public AvailableExpressions() { * * @param expression the expression of this element */ - public AvailableExpressions(ValueExpression expression) { + public AvailableExpressions( + ValueExpression expression) { this.expression = expression; } @@ -54,7 +56,8 @@ public Collection getInvolvedIdentifiers() { return getIdentifierOperands(expression); } - private static Collection getIdentifierOperands(ValueExpression expression) { + private static Collection getIdentifierOperands( + ValueExpression expression) { Collection result = new HashSet<>(); if (expression == null) @@ -83,8 +86,11 @@ private static Collection getIdentifierOperands(ValueExpression expr } @Override - public Collection gen(Identifier id, ValueExpression expression, ProgramPoint pp, - DefiniteForwardDataflowDomain domain) { + public Collection gen( + Identifier id, + ValueExpression expression, + ProgramPoint pp, + DefiniteDataflowDomain domain) { Collection result = new HashSet<>(); AvailableExpressions ae = new AvailableExpressions(expression); if (!ae.getInvolvedIdentifiers().contains(id) && filter(expression)) @@ -93,8 +99,10 @@ public Collection gen(Identifier id, ValueExpression expre } @Override - public Collection gen(ValueExpression expression, ProgramPoint pp, - DefiniteForwardDataflowDomain domain) { + public Collection gen( + ValueExpression expression, + ProgramPoint pp, + DefiniteDataflowDomain domain) { Collection result = new HashSet<>(); AvailableExpressions ae = new AvailableExpressions(expression); if (filter(expression)) @@ -102,7 +110,8 @@ public Collection gen(ValueExpression expression, ProgramP return result; } - private static boolean filter(ValueExpression expression) { + private static boolean filter( + ValueExpression expression) { if (expression instanceof Identifier) return false; if (expression instanceof Constant) @@ -115,8 +124,11 @@ private static boolean filter(ValueExpression expression) { } @Override - public Collection kill(Identifier id, ValueExpression expression, ProgramPoint pp, - DefiniteForwardDataflowDomain domain) { + public Collection kill( + Identifier id, + ValueExpression expression, + ProgramPoint pp, + DefiniteDataflowDomain domain) { Collection result = new HashSet<>(); for (AvailableExpressions ae : domain.getDataflowElements()) { @@ -130,8 +142,10 @@ public Collection kill(Identifier id, ValueExpression expr } @Override - public Collection kill(ValueExpression expression, ProgramPoint pp, - DefiniteForwardDataflowDomain domain) { + public Collection kill( + ValueExpression expression, + ProgramPoint pp, + DefiniteDataflowDomain domain) { return Collections.emptyList(); } @@ -144,7 +158,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -161,17 +176,21 @@ public boolean equals(Object obj) { } @Override - public DomainRepresentation representation() { + public StructuredRepresentation representation() { return new StringRepresentation(expression); } @Override - public AvailableExpressions pushScope(ScopeToken scope) throws SemanticException { + public AvailableExpressions pushScope( + ScopeToken scope) + throws SemanticException { return new AvailableExpressions((ValueExpression) expression.pushScope(scope)); } @Override - public AvailableExpressions popScope(ScopeToken scope) throws SemanticException { + public AvailableExpressions popScope( + ScopeToken scope) + throws SemanticException { return new AvailableExpressions((ValueExpression) expression.popScope(scope)); } } diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/dataflow/ConstantPropagation.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/dataflow/ConstantPropagation.java index 826487949..127de3326 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/dataflow/ConstantPropagation.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/dataflow/ConstantPropagation.java @@ -2,9 +2,6 @@ import it.unive.lisa.analysis.ScopeToken; import it.unive.lisa.analysis.SemanticException; -import it.unive.lisa.analysis.representation.DomainRepresentation; -import it.unive.lisa.analysis.representation.ListRepresentation; -import it.unive.lisa.analysis.representation.StringRepresentation; import it.unive.lisa.program.cfg.ProgramPoint; import it.unive.lisa.symbolic.SymbolicExpression; import it.unive.lisa.symbolic.value.BinaryExpression; @@ -19,6 +16,9 @@ import it.unive.lisa.symbolic.value.operator.MultiplicationOperator; import it.unive.lisa.symbolic.value.operator.SubtractionOperator; import it.unive.lisa.symbolic.value.operator.unary.NumericNegation; +import it.unive.lisa.util.representation.ListRepresentation; +import it.unive.lisa.util.representation.StringRepresentation; +import it.unive.lisa.util.representation.StructuredRepresentation; import java.util.Collection; import java.util.Collections; import java.util.HashSet; @@ -31,7 +31,8 @@ * @author Luca Negrini */ public class ConstantPropagation - implements DataflowElement, ConstantPropagation> { + implements + DataflowElement, ConstantPropagation> { private final Identifier id; private final Integer constant; @@ -49,7 +50,9 @@ public ConstantPropagation() { * @param id the constant variable * @param v the constant value */ - public ConstantPropagation(Identifier id, Integer v) { + public ConstantPropagation( + Identifier id, + Integer v) { this.id = id; this.constant = v; } @@ -64,7 +67,9 @@ public Collection getInvolvedIdentifiers() { return Collections.singleton(id); } - private static Integer eval(SymbolicExpression e, DefiniteForwardDataflowDomain domain) { + private static Integer eval( + SymbolicExpression e, + DefiniteDataflowDomain domain) { if (e instanceof Constant) { Constant c = (Constant) e; @@ -114,8 +119,11 @@ private static Integer eval(SymbolicExpression e, DefiniteForwardDataflowDomain< } @Override - public Collection gen(Identifier id, ValueExpression expression, ProgramPoint pp, - DefiniteForwardDataflowDomain domain) { + public Collection gen( + Identifier id, + ValueExpression expression, + ProgramPoint pp, + DefiniteDataflowDomain domain) { Set gen = new HashSet<>(); Integer v = eval(expression, domain); @@ -126,14 +134,19 @@ public Collection gen(Identifier id, ValueExpression expres } @Override - public Collection gen(ValueExpression expression, ProgramPoint pp, - DefiniteForwardDataflowDomain domain) { + public Collection gen( + ValueExpression expression, + ProgramPoint pp, + DefiniteDataflowDomain domain) { return Collections.emptyList(); } @Override - public Collection kill(Identifier id, ValueExpression expression, ProgramPoint pp, - DefiniteForwardDataflowDomain domain) { + public Collection kill( + Identifier id, + ValueExpression expression, + ProgramPoint pp, + DefiniteDataflowDomain domain) { Collection result = new HashSet<>(); for (ConstantPropagation cp : domain.getDataflowElements()) @@ -144,8 +157,10 @@ public Collection kill(Identifier id, ValueExpression expre } @Override - public Collection kill(ValueExpression expression, ProgramPoint pp, - DefiniteForwardDataflowDomain domain) { + public Collection kill( + ValueExpression expression, + ProgramPoint pp, + DefiniteDataflowDomain domain) { return Collections.emptyList(); } @@ -159,7 +174,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -181,17 +197,21 @@ public boolean equals(Object obj) { } @Override - public DomainRepresentation representation() { + public StructuredRepresentation representation() { return new ListRepresentation(new StringRepresentation(id), new StringRepresentation(constant)); } @Override - public ConstantPropagation pushScope(ScopeToken scope) throws SemanticException { + public ConstantPropagation pushScope( + ScopeToken scope) + throws SemanticException { return new ConstantPropagation((Identifier) id.pushScope(scope), constant); } @Override - public ConstantPropagation popScope(ScopeToken scope) throws SemanticException { + public ConstantPropagation popScope( + ScopeToken scope) + throws SemanticException { if (!(id instanceof OutOfScopeIdentifier)) return this; diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/dataflow/Liveness.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/dataflow/Liveness.java new file mode 100644 index 000000000..2a628683c --- /dev/null +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/dataflow/Liveness.java @@ -0,0 +1,163 @@ +package it.unive.lisa.analysis.dataflow; + +import it.unive.lisa.analysis.ScopeToken; +import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.program.cfg.ProgramPoint; +import it.unive.lisa.symbolic.value.BinaryExpression; +import it.unive.lisa.symbolic.value.Identifier; +import it.unive.lisa.symbolic.value.TernaryExpression; +import it.unive.lisa.symbolic.value.UnaryExpression; +import it.unive.lisa.symbolic.value.ValueExpression; +import it.unive.lisa.util.representation.StringRepresentation; +import it.unive.lisa.util.representation.StructuredRepresentation; +import java.util.Collection; +import java.util.Collections; +import java.util.HashSet; +import java.util.Objects; +import java.util.stream.Collectors; + +/** + * An implementation of the liveness dataflow analysis, that determines which + * values might be used later on in the program. + * + * @author Luca Negrini + */ +public class Liveness + implements + DataflowElement, Liveness> { + + private final Identifier id; + + /** + * Builds an empty liveness element. + */ + public Liveness() { + this(null); + } + + /** + * Builds the liveness element for the specified id. + * + * @param id the id + */ + public Liveness( + Identifier id) { + this.id = id; + } + + private static Collection getIdentifierOperands( + ValueExpression expression) { + Collection result = new HashSet<>(); + + if (expression == null) + return result; + + if (expression instanceof Identifier) + result.add((Identifier) expression); + + if (expression instanceof UnaryExpression) + result.addAll(getIdentifierOperands((ValueExpression) ((UnaryExpression) expression).getExpression())); + + if (expression instanceof BinaryExpression) { + BinaryExpression binary = (BinaryExpression) expression; + result.addAll(getIdentifierOperands((ValueExpression) binary.getLeft())); + result.addAll(getIdentifierOperands((ValueExpression) binary.getRight())); + } + + if (expression instanceof TernaryExpression) { + TernaryExpression ternary = (TernaryExpression) expression; + result.addAll(getIdentifierOperands((ValueExpression) ternary.getLeft())); + result.addAll(getIdentifierOperands((ValueExpression) ternary.getMiddle())); + result.addAll(getIdentifierOperands((ValueExpression) ternary.getRight())); + } + + return result; + } + + @Override + public Liveness pushScope( + ScopeToken token) + throws SemanticException { + return new Liveness((Identifier) id.pushScope(token)); + } + + @Override + public Liveness popScope( + ScopeToken token) + throws SemanticException { + return new Liveness((Identifier) id.popScope(token)); + } + + @Override + public Collection getInvolvedIdentifiers() { + return Collections.singleton(id); + } + + @Override + public StructuredRepresentation representation() { + return new StringRepresentation(id); + } + + @Override + public String toString() { + return representation().toString(); + } + + @Override + public int hashCode() { + return Objects.hash(id); + } + + @Override + public boolean equals( + Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + Liveness other = (Liveness) obj; + return Objects.equals(id, other.id); + } + + @Override + public Collection gen( + Identifier id, + ValueExpression expression, + ProgramPoint pp, + PossibleDataflowDomain domain) + throws SemanticException { + Collection ids = getIdentifierOperands(expression); + return ids.stream().map(Liveness::new).collect(Collectors.toSet()); + } + + @Override + public Collection gen( + ValueExpression expression, + ProgramPoint pp, + PossibleDataflowDomain domain) + throws SemanticException { + Collection ids = getIdentifierOperands(expression); + return ids.stream().map(Liveness::new).collect(Collectors.toSet()); + } + + @Override + public Collection kill( + Identifier id, + ValueExpression expression, + ProgramPoint pp, + PossibleDataflowDomain domain) + throws SemanticException { + return Collections.singleton(new Liveness(id)); + } + + @Override + public Collection kill( + ValueExpression expression, + ProgramPoint pp, + PossibleDataflowDomain domain) + throws SemanticException { + return Collections.emptySet(); + } +} diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/dataflow/ReachingDefinitions.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/dataflow/ReachingDefinitions.java index 8f48b1e81..c1a46f9b0 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/dataflow/ReachingDefinitions.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/dataflow/ReachingDefinitions.java @@ -2,13 +2,13 @@ import it.unive.lisa.analysis.ScopeToken; import it.unive.lisa.analysis.SemanticException; -import it.unive.lisa.analysis.representation.DomainRepresentation; -import it.unive.lisa.analysis.representation.ListRepresentation; -import it.unive.lisa.analysis.representation.StringRepresentation; import it.unive.lisa.program.cfg.ProgramPoint; import it.unive.lisa.symbolic.value.Identifier; import it.unive.lisa.symbolic.value.OutOfScopeIdentifier; import it.unive.lisa.symbolic.value.ValueExpression; +import it.unive.lisa.util.representation.ListRepresentation; +import it.unive.lisa.util.representation.StringRepresentation; +import it.unive.lisa.util.representation.StructuredRepresentation; import java.util.Collection; import java.util.Collections; import java.util.HashSet; @@ -19,7 +19,8 @@ * @author Luca Negrini */ public class ReachingDefinitions - implements DataflowElement, ReachingDefinitions> { + implements + DataflowElement, ReachingDefinitions> { private final Identifier variable; @@ -38,7 +39,9 @@ public ReachingDefinitions() { * @param variable the variable being defined * @param pp the location where the definition happens */ - public ReachingDefinitions(Identifier variable, ProgramPoint pp) { + public ReachingDefinitions( + Identifier variable, + ProgramPoint pp) { this.programPoint = pp; this.variable = variable; } @@ -53,7 +56,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -85,20 +89,28 @@ public Collection getInvolvedIdentifiers() { } @Override - public Collection gen(Identifier id, ValueExpression expression, ProgramPoint pp, - PossibleForwardDataflowDomain domain) { + public Collection gen( + Identifier id, + ValueExpression expression, + ProgramPoint pp, + PossibleDataflowDomain domain) { return Collections.singleton(new ReachingDefinitions(id, pp)); } @Override - public Collection gen(ValueExpression expression, ProgramPoint pp, - PossibleForwardDataflowDomain domain) { + public Collection gen( + ValueExpression expression, + ProgramPoint pp, + PossibleDataflowDomain domain) { return Collections.emptyList(); } @Override - public Collection kill(Identifier id, ValueExpression expression, ProgramPoint pp, - PossibleForwardDataflowDomain domain) { + public Collection kill( + Identifier id, + ValueExpression expression, + ProgramPoint pp, + PossibleDataflowDomain domain) { Collection result = new HashSet<>(); for (ReachingDefinitions rd : domain.getDataflowElements()) @@ -109,23 +121,29 @@ public Collection kill(Identifier id, ValueExpression expre } @Override - public Collection kill(ValueExpression expression, ProgramPoint pp, - PossibleForwardDataflowDomain domain) { + public Collection kill( + ValueExpression expression, + ProgramPoint pp, + PossibleDataflowDomain domain) { return Collections.emptyList(); } @Override - public DomainRepresentation representation() { + public StructuredRepresentation representation() { return new ListRepresentation(new StringRepresentation(variable), new StringRepresentation(programPoint)); } @Override - public ReachingDefinitions pushScope(ScopeToken scope) throws SemanticException { + public ReachingDefinitions pushScope( + ScopeToken scope) + throws SemanticException { return new ReachingDefinitions((Identifier) variable.pushScope(scope), programPoint); } @Override - public ReachingDefinitions popScope(ScopeToken scope) throws SemanticException { + public ReachingDefinitions popScope( + ScopeToken scope) + throws SemanticException { if (!(variable instanceof OutOfScopeIdentifier)) return null; diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/heap/MonolithicHeap.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/heap/MonolithicHeap.java index 66276ac52..d18c636ef 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/heap/MonolithicHeap.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/heap/MonolithicHeap.java @@ -1,11 +1,10 @@ package it.unive.lisa.analysis.heap; -import it.unive.lisa.FallbackImplementation; import it.unive.lisa.analysis.Lattice; import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.SemanticOracle; import it.unive.lisa.analysis.lattices.ExpressionSet; -import it.unive.lisa.analysis.representation.DomainRepresentation; -import it.unive.lisa.analysis.representation.StringRepresentation; +import it.unive.lisa.analysis.lattices.Satisfiability; import it.unive.lisa.program.cfg.ProgramPoint; import it.unive.lisa.symbolic.SymbolicExpression; import it.unive.lisa.symbolic.heap.AccessChild; @@ -16,10 +15,11 @@ import it.unive.lisa.symbolic.value.HeapLocation; import it.unive.lisa.symbolic.value.Identifier; import it.unive.lisa.symbolic.value.MemoryPointer; -import it.unive.lisa.symbolic.value.ValueExpression; import it.unive.lisa.type.ReferenceType; import it.unive.lisa.type.Type; import it.unive.lisa.type.Untyped; +import it.unive.lisa.util.representation.StringRepresentation; +import it.unive.lisa.util.representation.StructuredRepresentation; import java.util.Collections; import java.util.HashSet; import java.util.List; @@ -32,7 +32,6 @@ * * @author Luca Negrini */ -@FallbackImplementation public class MonolithicHeap implements BaseHeapDomain { private static final MonolithicHeap TOP = new MonolithicHeap(); @@ -41,12 +40,15 @@ public class MonolithicHeap implements BaseHeapDomain { private static final String MONOLITH_NAME = "heap"; - private static final DomainRepresentation REPR = new StringRepresentation("monolith"); + private static final StructuredRepresentation REPR = new StringRepresentation("monolith"); @Override - public ExpressionSet rewrite(SymbolicExpression expression, ProgramPoint pp) + public ExpressionSet rewrite( + SymbolicExpression expression, + ProgramPoint pp, + SemanticOracle oracle) throws SemanticException { - return expression.accept(new Rewriter(), pp); + return expression.accept(Rewriter.SINGLETON, pp); } @Override @@ -55,55 +57,81 @@ public List getSubstitution() { } @Override - public MonolithicHeap assign(Identifier id, SymbolicExpression expression, ProgramPoint pp) + public MonolithicHeap assign( + Identifier id, + SymbolicExpression expression, + ProgramPoint pp, + SemanticOracle oracle) throws SemanticException { return this; } @Override - public MonolithicHeap mk(MonolithicHeap reference) { + public MonolithicHeap mk( + MonolithicHeap reference) { return TOP; } @Override - public MonolithicHeap semanticsOf(HeapExpression expression, ProgramPoint pp) { + public MonolithicHeap semanticsOf( + HeapExpression expression, + ProgramPoint pp, + SemanticOracle oracle) { return this; } @Override - public MonolithicHeap assume(SymbolicExpression expression, ProgramPoint src, ProgramPoint dest) + public MonolithicHeap assume( + SymbolicExpression expression, + ProgramPoint src, + ProgramPoint dest, + SemanticOracle oracle) throws SemanticException { return this; } @Override - public Satisfiability satisfies(SymbolicExpression expression, ProgramPoint pp) throws SemanticException { + public Satisfiability satisfies( + SymbolicExpression expression, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { // we leave the decision to the value domain return Satisfiability.UNKNOWN; } @Override - public MonolithicHeap forgetIdentifier(Identifier id) throws SemanticException { + public MonolithicHeap forgetIdentifier( + Identifier id) + throws SemanticException { return this; } @Override - public MonolithicHeap forgetIdentifiersIf(Predicate test) throws SemanticException { + public MonolithicHeap forgetIdentifiersIf( + Predicate test) + throws SemanticException { return this; } @Override - public MonolithicHeap lubAux(MonolithicHeap other) throws SemanticException { + public MonolithicHeap lubAux( + MonolithicHeap other) + throws SemanticException { return TOP; } @Override - public MonolithicHeap glbAux(MonolithicHeap other) throws SemanticException { + public MonolithicHeap glbAux( + MonolithicHeap other) + throws SemanticException { return TOP; } @Override - public boolean lessOrEqualAux(MonolithicHeap other) throws SemanticException { + public boolean lessOrEqualAux( + MonolithicHeap other) + throws SemanticException { return true; } @@ -118,7 +146,7 @@ public MonolithicHeap bottom() { } @Override - public DomainRepresentation representation() { + public StructuredRepresentation representation() { return isBottom() ? Lattice.bottomRepresentation() : REPR; } @@ -128,7 +156,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -147,9 +176,18 @@ public boolean equals(Object obj) { */ public static class Rewriter extends BaseHeapDomain.Rewriter { + /** + * The singleton instance of this rewriter. + */ + public static final Rewriter SINGLETON = new Rewriter(); + @Override - public ExpressionSet visit(AccessChild expression, ExpressionSet receiver, - ExpressionSet child, Object... params) throws SemanticException { + public ExpressionSet visit( + AccessChild expression, + ExpressionSet receiver, + ExpressionSet child, + Object... params) + throws SemanticException { // any expression accessing an area of the heap or instantiating a // new one is modeled through the monolith Set acc = new HashSet<>(); @@ -158,25 +196,25 @@ public ExpressionSet visit(AccessChild expression, ExpressionSe HeapLocation e = new HeapLocation(refType, MONOLITH_NAME, true, expression.getCodeLocation()); - if (expression.hasRuntimeTypes()) - e.setRuntimeTypes(expression.getRuntimeTypes(null)); - return new ExpressionSet<>(e); + return new ExpressionSet(e); } @Override - public ExpressionSet visit(MemoryAllocation expression, Object... params) + public ExpressionSet visit( + MemoryAllocation expression, + Object... params) throws SemanticException { // any expression accessing an area of the heap or instantiating a // new one is modeled through the monolith HeapLocation e = new HeapLocation(expression.getStaticType(), MONOLITH_NAME, true, expression.getCodeLocation()); - if (expression.hasRuntimeTypes()) - e.setRuntimeTypes(expression.getRuntimeTypes(null)); - return new ExpressionSet<>(e); + return new ExpressionSet(e); } @Override - public ExpressionSet visit(HeapReference expression, ExpressionSet ref, + public ExpressionSet visit( + HeapReference expression, + ExpressionSet ref, Object... params) throws SemanticException { // any expression accessing an area of the heap or instantiating a @@ -188,13 +226,13 @@ public ExpressionSet visit(HeapReference expression, Expression HeapLocation loc = new HeapLocation(refType, MONOLITH_NAME, true, expression.getCodeLocation()); MemoryPointer e = new MemoryPointer(new ReferenceType(refType), loc, expression.getCodeLocation()); - if (expression.hasRuntimeTypes()) - e.setRuntimeTypes(expression.getRuntimeTypes(null)); - return new ExpressionSet<>(e); + return new ExpressionSet(e); } @Override - public ExpressionSet visit(HeapDereference expression, ExpressionSet deref, + public ExpressionSet visit( + HeapDereference expression, + ExpressionSet deref, Object... params) throws SemanticException { // any expression accessing an area of the heap or instantiating a @@ -202,4 +240,30 @@ public ExpressionSet visit(HeapDereference expression, Expressi return deref; } } + + @Override + public boolean knowsIdentifier( + Identifier id) { + return false; + } + + @Override + public Satisfiability alias( + SymbolicExpression x, + SymbolicExpression y, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + return Satisfiability.UNKNOWN; + } + + @Override + public Satisfiability isReachableFrom( + SymbolicExpression x, + SymbolicExpression y, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + return Satisfiability.UNKNOWN; + } } diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/heap/TypeBasedHeap.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/heap/TypeBasedHeap.java index f1022dc50..d9282a1a5 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/heap/TypeBasedHeap.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/heap/TypeBasedHeap.java @@ -1,10 +1,9 @@ package it.unive.lisa.analysis.heap; import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.SemanticOracle; import it.unive.lisa.analysis.lattices.ExpressionSet; -import it.unive.lisa.analysis.representation.DomainRepresentation; -import it.unive.lisa.analysis.representation.SetRepresentation; -import it.unive.lisa.analysis.representation.StringRepresentation; +import it.unive.lisa.analysis.lattices.Satisfiability; import it.unive.lisa.program.cfg.ProgramPoint; import it.unive.lisa.symbolic.SymbolicExpression; import it.unive.lisa.symbolic.heap.AccessChild; @@ -15,17 +14,19 @@ import it.unive.lisa.symbolic.value.HeapLocation; import it.unive.lisa.symbolic.value.Identifier; import it.unive.lisa.symbolic.value.MemoryPointer; -import it.unive.lisa.symbolic.value.ValueExpression; import it.unive.lisa.symbolic.value.Variable; import it.unive.lisa.type.ReferenceType; import it.unive.lisa.type.Type; -import it.unive.lisa.type.TypeSystem; import it.unive.lisa.type.Untyped; +import it.unive.lisa.util.representation.SetRepresentation; +import it.unive.lisa.util.representation.StringRepresentation; +import it.unive.lisa.util.representation.StructuredRepresentation; import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Set; import java.util.function.Predicate; +import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.SetUtils; /** @@ -55,7 +56,8 @@ public TypeBasedHeap() { * * @param names the name of the known types */ - public TypeBasedHeap(Set names) { + public TypeBasedHeap( + Set names) { this.names = names; } @@ -69,41 +71,60 @@ public Set getKnownTypes() { } @Override - public ExpressionSet rewrite(SymbolicExpression expression, ProgramPoint pp) + public ExpressionSet rewrite( + SymbolicExpression expression, + ProgramPoint pp, + SemanticOracle oracle) throws SemanticException { - return expression.accept(new Rewriter(), pp); + return expression.accept(Rewriter.SINGLETON, pp, oracle); } @Override - public TypeBasedHeap assign(Identifier id, SymbolicExpression expression, ProgramPoint pp) + public TypeBasedHeap assign( + Identifier id, + SymbolicExpression expression, + ProgramPoint pp, + SemanticOracle oracle) throws SemanticException { return this; } @Override - public TypeBasedHeap assume(SymbolicExpression expression, ProgramPoint src, ProgramPoint dest) + public TypeBasedHeap assume( + SymbolicExpression expression, + ProgramPoint src, + ProgramPoint dest, + SemanticOracle oracle) throws SemanticException { return this; } @Override - public TypeBasedHeap forgetIdentifier(Identifier id) throws SemanticException { + public TypeBasedHeap forgetIdentifier( + Identifier id) + throws SemanticException { return this; } @Override - public TypeBasedHeap forgetIdentifiersIf(Predicate test) throws SemanticException { + public TypeBasedHeap forgetIdentifiersIf( + Predicate test) + throws SemanticException { return this; } @Override - public Satisfiability satisfies(SymbolicExpression expression, ProgramPoint pp) throws SemanticException { + public Satisfiability satisfies( + SymbolicExpression expression, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { // we leave the decision to the value domain return Satisfiability.UNKNOWN; } @Override - public DomainRepresentation representation() { + public StructuredRepresentation representation() { return new SetRepresentation(names, StringRepresentation::new); } @@ -123,21 +144,26 @@ public List getSubstitution() { } @Override - public TypeBasedHeap mk(TypeBasedHeap reference) { + public TypeBasedHeap mk( + TypeBasedHeap reference) { return this; } @Override - public TypeBasedHeap semanticsOf(HeapExpression expression, ProgramPoint pp) throws SemanticException { + public TypeBasedHeap semanticsOf( + HeapExpression expression, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { if (expression instanceof AccessChild) { AccessChild access = (AccessChild) expression; - TypeBasedHeap containerState = smallStepSemantics(access.getContainer(), pp); - return containerState.smallStepSemantics(access.getChild(), pp); + TypeBasedHeap containerState = smallStepSemantics(access.getContainer(), pp, oracle); + return containerState.smallStepSemantics(access.getChild(), pp, oracle); } if (expression instanceof MemoryAllocation) { Set names = new HashSet<>(this.names); - for (Type type : expression.getRuntimeTypes(pp.getProgram().getTypes())) + for (Type type : oracle.getRuntimeTypesOf(expression, pp, oracle)) if (type.isInMemoryType()) names.add(type.toString()); @@ -145,26 +171,32 @@ public TypeBasedHeap semanticsOf(HeapExpression expression, ProgramPoint pp) thr } if (expression instanceof HeapReference) - return smallStepSemantics(((HeapReference) expression).getExpression(), pp); + return smallStepSemantics(((HeapReference) expression).getExpression(), pp, oracle); if (expression instanceof HeapDereference) - return smallStepSemantics(((HeapDereference) expression).getExpression(), pp); + return smallStepSemantics(((HeapDereference) expression).getExpression(), pp, oracle); return top(); } @Override - public TypeBasedHeap lubAux(TypeBasedHeap other) throws SemanticException { + public TypeBasedHeap lubAux( + TypeBasedHeap other) + throws SemanticException { return new TypeBasedHeap(SetUtils.union(names, other.names)); } @Override - public TypeBasedHeap glbAux(TypeBasedHeap other) throws SemanticException { + public TypeBasedHeap glbAux( + TypeBasedHeap other) + throws SemanticException { return new TypeBasedHeap(SetUtils.intersection(names, other.names)); } @Override - public boolean lessOrEqualAux(TypeBasedHeap other) throws SemanticException { + public boolean lessOrEqualAux( + TypeBasedHeap other) + throws SemanticException { return other.names.containsAll(names); } @@ -177,7 +209,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -201,96 +234,143 @@ public boolean equals(Object obj) { */ public static class Rewriter extends BaseHeapDomain.Rewriter { + /** + * The singleton instance of this rewriter. + */ + public static final Rewriter SINGLETON = new Rewriter(); + @Override - public ExpressionSet visit(AccessChild expression, ExpressionSet receiver, - ExpressionSet child, Object... params) throws SemanticException { + public ExpressionSet visit( + AccessChild expression, + ExpressionSet receiver, + ExpressionSet child, + Object... params) + throws SemanticException { // we use the container because we are not field-sensitive - Set result = new HashSet<>(); + Set result = new HashSet<>(); ProgramPoint pp = (ProgramPoint) params[0]; - TypeSystem types = pp.getProgram().getTypes(); + SemanticOracle oracle = (SemanticOracle) params[1]; - for (ValueExpression rec : receiver) + for (SymbolicExpression rec : receiver) if (rec instanceof MemoryPointer) { MemoryPointer pid = (MemoryPointer) rec; - for (Type t : pid.getRuntimeTypes(types)) + for (Type t : oracle.getRuntimeTypesOf(pid, pp, oracle)) if (t.isPointerType()) { Type inner = t.asPointerType().getInnerType(); HeapLocation e = new HeapLocation(inner, inner.toString(), true, expression.getCodeLocation()); - e.setRuntimeTypes(Collections.singleton(inner)); result.add(e); } } - return new ExpressionSet<>(result); + return new ExpressionSet(result); } @Override - public ExpressionSet visit(MemoryAllocation expression, Object... params) + public ExpressionSet visit( + MemoryAllocation expression, + Object... params) throws SemanticException { - Set result = new HashSet<>(); - ProgramPoint pp = (ProgramPoint) params[0]; - TypeSystem types = pp.getProgram().getTypes(); - - for (Type t : expression.getRuntimeTypes(types)) - if (t.isInMemoryType()) { - HeapLocation e = new HeapLocation(t, t.toString(), true, expression.getCodeLocation()); - e.setRuntimeTypes(Collections.singleton(t)); - result.add(e); - } - return new ExpressionSet<>(result); + Set result = new HashSet<>(); + Type t = expression.getStaticType(); + if (t.isInMemoryType()) { + HeapLocation e = new HeapLocation(t, t.toString(), true, expression.getCodeLocation()); + result.add(e); + } + return new ExpressionSet(result); } @Override - public ExpressionSet visit(HeapReference expression, ExpressionSet ref, + public ExpressionSet visit( + HeapReference expression, + ExpressionSet ref, Object... params) throws SemanticException { - Set result = new HashSet<>(); + Set result = new HashSet<>(); ProgramPoint pp = (ProgramPoint) params[0]; + SemanticOracle oracle = (SemanticOracle) params[1]; - TypeSystem types = pp.getProgram().getTypes(); - for (ValueExpression refExp : ref) + for (SymbolicExpression refExp : ref) if (refExp instanceof HeapLocation) { - Set rt = refExp.getRuntimeTypes(types); + Set rt = oracle.getRuntimeTypesOf(refExp, pp, oracle); Type sup = Type.commonSupertype(rt, Untyped.INSTANCE); MemoryPointer e = new MemoryPointer( - new ReferenceType(refExp.hasRuntimeTypes() ? sup : Untyped.INSTANCE), + new ReferenceType(sup), (HeapLocation) refExp, refExp.getCodeLocation()); - if (expression.hasRuntimeTypes()) - e.setRuntimeTypes(expression.getRuntimeTypes(null)); result.add(e); } - return new ExpressionSet<>(result); + return new ExpressionSet(result); } @Override - public ExpressionSet visit(HeapDereference expression, ExpressionSet deref, + public ExpressionSet visit( + HeapDereference expression, + ExpressionSet deref, Object... params) throws SemanticException { - Set result = new HashSet<>(); + Set result = new HashSet<>(); ProgramPoint pp = (ProgramPoint) params[0]; - TypeSystem types = pp.getProgram().getTypes(); + SemanticOracle oracle = (SemanticOracle) params[1]; - for (ValueExpression derefExp : deref) { + for (SymbolicExpression derefExp : deref) { if (derefExp instanceof Variable) { Variable var = (Variable) derefExp; - for (Type t : var.getRuntimeTypes(types)) + for (Type t : oracle.getRuntimeTypesOf(var, pp, oracle)) if (t.isPointerType()) { Type inner = t.asPointerType().getInnerType(); HeapLocation loc = new HeapLocation(inner, inner.toString(), true, var.getCodeLocation()); - loc.setRuntimeTypes(Collections.singleton(inner)); - MemoryPointer pointer = new MemoryPointer(t, loc, var.getCodeLocation()); result.add(pointer); } } } - return new ExpressionSet<>(result); + return new ExpressionSet(result); } } + + @Override + public boolean knowsIdentifier( + Identifier id) { + return false; + } + + @Override + public Satisfiability alias( + SymbolicExpression x, + SymbolicExpression y, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + if (isTop()) + return Satisfiability.UNKNOWN; + if (isBottom()) + return Satisfiability.BOTTOM; + + Set ltypes = new HashSet<>(); + for (SymbolicExpression e : rewrite(x, pp, oracle)) + ltypes.addAll(oracle.getRuntimeTypesOf(e, pp, oracle)); + Set rtypes = new HashSet<>(); + for (SymbolicExpression e : rewrite(y, pp, oracle)) + rtypes.addAll(oracle.getRuntimeTypesOf(e, pp, oracle)); + if (CollectionUtils.intersection(ltypes, rtypes).isEmpty()) + // no common types -> they cannot be "smashed" to the same location + return Satisfiability.NOT_SATISFIED; + + return Satisfiability.UNKNOWN; + } + + @Override + public Satisfiability isReachableFrom( + SymbolicExpression x, + SymbolicExpression y, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + return Satisfiability.UNKNOWN; + } } diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/heap/pointbased/AllocationSite.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/heap/pointbased/AllocationSite.java index 63ba73c38..8bedbcfa7 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/heap/pointbased/AllocationSite.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/heap/pointbased/AllocationSite.java @@ -12,7 +12,7 @@ * * @author Vincenzo Arceri */ -public class AllocationSite extends HeapLocation { +public abstract class AllocationSite extends HeapLocation { private final String locationName; @@ -28,7 +28,10 @@ public class AllocationSite extends HeapLocation { * @param location the code location of the statement that has generated * this expression */ - public AllocationSite(Type staticType, String locationName, CodeLocation location) { + public AllocationSite( + Type staticType, + String locationName, + CodeLocation location) { this(staticType, locationName, false, location); } @@ -44,8 +47,12 @@ public AllocationSite(Type staticType, String locationName, CodeLocation locatio * @param location the code location of the statement that has generated * this expression */ - public AllocationSite(Type staticType, String locationName, boolean isWeak, CodeLocation location) { - this(staticType, locationName, null, isWeak, location); + public AllocationSite( + Type staticType, + String locationName, + boolean isWeak, + CodeLocation location) { + this(staticType, locationName, (String) null, isWeak, location); } /** @@ -59,7 +66,51 @@ public AllocationSite(Type staticType, String locationName, boolean isWeak, Code * @param location the code location of the statement that has generated * this expression */ - public AllocationSite(Type staticType, String locationName, SymbolicExpression field, + public AllocationSite( + Type staticType, + String locationName, + SymbolicExpression field, + CodeLocation location) { + this(staticType, locationName, field == null ? null : field.toString(), false, location); + } + + /** + * Builds an allocation site from its source code location and its field and + * specifying if it is weak. + * + * @param staticType the static type of this allocation site + * @param locationName the source code location string representation where + * this allocation site has been allocated + * @param field the field of this allocation site + * @param isWeak boolean value specifying if this allocation site is + * weak + * @param location the code location of the statement that has generated + * this expression + */ + public AllocationSite( + Type staticType, + String locationName, + SymbolicExpression field, + boolean isWeak, + CodeLocation location) { + this(staticType, locationName, field == null ? null : field.toString(), isWeak, location); + } + + /** + * Builds a strong allocation site from its source code location and its + * field. + * + * @param staticType the static type of this allocation site + * @param locationName the source code location string representation where + * this allocation site has been allocated + * @param field the name of field of this allocation site + * @param location the code location of the statement that has generated + * this expression + */ + public AllocationSite( + Type staticType, + String locationName, + String field, CodeLocation location) { this(staticType, locationName, field, false, location); } @@ -77,7 +128,11 @@ public AllocationSite(Type staticType, String locationName, SymbolicExpression f * @param location the code location of the statement that has generated * this expression */ - public AllocationSite(Type staticType, String locationName, SymbolicExpression field, boolean isWeak, + public AllocationSite( + Type staticType, + String locationName, + String field, + boolean isWeak, CodeLocation location) { super(staticType, "pp@" + locationName + (field == null ? "" : "[" + field + "]"), isWeak, location); this.locationName = locationName; @@ -105,4 +160,23 @@ public String getLocationName() { public String getField() { return field; } + + /** + * Yields a weak copy of this allocation site, that is, a copy where + * {@link #isWeak()} returns {@code true}. + * + * @return the weak copy + */ + public abstract AllocationSite toWeak(); + + /** + * Yields a modified version of this allocation site by accessing the given + * field. + * + * @param field the field to access + * + * @return the modified allocation site + */ + public abstract AllocationSite withField( + SymbolicExpression field); } diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/heap/pointbased/AllocationSiteBasedAnalysis.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/heap/pointbased/AllocationSiteBasedAnalysis.java new file mode 100644 index 000000000..aa7c44fab --- /dev/null +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/heap/pointbased/AllocationSiteBasedAnalysis.java @@ -0,0 +1,588 @@ +package it.unive.lisa.analysis.heap.pointbased; + +import it.unive.lisa.analysis.Lattice; +import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.SemanticOracle; +import it.unive.lisa.analysis.heap.BaseHeapDomain; +import it.unive.lisa.analysis.lattices.ExpressionSet; +import it.unive.lisa.analysis.lattices.Satisfiability; +import it.unive.lisa.analysis.nonrelational.heap.HeapEnvironment; +import it.unive.lisa.program.annotations.Annotation; +import it.unive.lisa.program.cfg.CodeLocation; +import it.unive.lisa.program.cfg.ProgramPoint; +import it.unive.lisa.symbolic.SymbolicExpression; +import it.unive.lisa.symbolic.heap.AccessChild; +import it.unive.lisa.symbolic.heap.HeapDereference; +import it.unive.lisa.symbolic.heap.HeapExpression; +import it.unive.lisa.symbolic.heap.HeapReference; +import it.unive.lisa.symbolic.heap.MemoryAllocation; +import it.unive.lisa.symbolic.value.HeapLocation; +import it.unive.lisa.symbolic.value.Identifier; +import it.unive.lisa.symbolic.value.MemoryPointer; +import it.unive.lisa.symbolic.value.PushAny; +import it.unive.lisa.symbolic.value.Variable; +import it.unive.lisa.type.ReferenceType; +import it.unive.lisa.type.Type; +import it.unive.lisa.util.collections.workset.VisitOnceFIFOWorkingSet; +import it.unive.lisa.util.collections.workset.WorkingSet; +import it.unive.lisa.util.representation.StructuredRepresentation; +import java.util.Collections; +import java.util.HashSet; +import java.util.LinkedList; +import java.util.List; +import java.util.Objects; +import java.util.Set; + +/** + * A base class for heap analyses based on the allocation sites of the objects + * and arrays they track, namely the position of the code where heap locations + * are generated. All heap locations that are generated at the same allocation + * sites are abstracted into a single unique heap identifier. Concrete instances + * have control over their field-sensitivity. + * + * @author Luca Negrini + * + * @param the concrete type of analysis that methods of this class return + */ +public abstract class AllocationSiteBasedAnalysis> + implements + BaseHeapDomain { + + /** + * An heap environment tracking which allocation sites are associated to + * each identifier. + */ + public final HeapEnvironment heapEnv; + + /** + * The replacements to be applied after the generation of this domain + * instance. + */ + public final List replacements; + + /** + * Builds a new instance of allocation site-based heap. + */ + protected AllocationSiteBasedAnalysis() { + this(new HeapEnvironment<>(new AllocationSites())); + } + + /** + * Builds a new instance of allocation site-based heap from its heap + * environment. + * + * @param heapEnv the heap environment that this instance tracks + */ + public AllocationSiteBasedAnalysis( + HeapEnvironment heapEnv) { + this(heapEnv, Collections.emptyList()); + } + + /** + * Builds a new instance of allocation site-based heap from its heap + * environment and replacements. + * + * @param heapEnv the heap environment that this instance tracks + * @param replacements the heap replacements of this instance + */ + public AllocationSiteBasedAnalysis( + HeapEnvironment heapEnv, + List replacements) { + this.heapEnv = heapEnv; + this.replacements = replacements.isEmpty() ? Collections.emptyList() : replacements; + } + + @Override + public A mk( + A reference) { + return mk(reference.heapEnv, Collections.emptyList()); + } + + /** + * Builds a new instance of this class given its components. + * + * @param heapEnv the heap environment that this instance tracks + * + * @return the new instance + */ + protected A mk( + HeapEnvironment heapEnv) { + return mk(heapEnv, Collections.emptyList()); + } + + /** + * Builds a new instance of this class given its components. + * + * @param heapEnv the heap environment that this instance tracks + * @param replacements the heap replacements of this instance + * + * @return the new instance + */ + protected abstract A mk( + HeapEnvironment heapEnv, + List replacements); + + @Override + public A assign( + Identifier id, + SymbolicExpression expression, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + A sss = smallStepSemantics(expression, pp, oracle); + A result = bottom(); + List replacements = new LinkedList<>(); + ExpressionSet rhsExps; + if (expression.mightNeedRewriting()) + rhsExps = rewrite(expression, pp, oracle); + else + rhsExps = new ExpressionSet(expression); + + for (SymbolicExpression rhs : rhsExps) + if (rhs instanceof MemoryPointer) { + HeapLocation rhs_ref = ((MemoryPointer) rhs).getReferencedLocation(); + if (id instanceof MemoryPointer) { + // we have x = y, where both are pointers we perform *x = *y + // so that x and y become aliases + Identifier lhs_ref = ((MemoryPointer) id).getReferencedLocation(); + HeapEnvironment heap = sss.heapEnv.assign(lhs_ref, rhs_ref, pp, oracle); + result = result.lub(mk(heap)); + } else if (rhs_ref instanceof StackAllocationSite + && !getAllocatedAt(((StackAllocationSite) rhs_ref).getLocationName()).isEmpty()) + // for stack elements, assignment works as a shallow copy + // since there are no pointers to alias + result = result.lub(sss.shallowCopy(id, (StackAllocationSite) rhs_ref, replacements, pp, oracle)); + else { + // aliasing: id and star_y points to the same object + HeapEnvironment heap = sss.heapEnv.assign(id, rhs_ref, pp, oracle); + result = result.lub(mk(heap)); + } + } else + result = result.lub(sss); + + return mk(result.heapEnv, replacements); + } + + /** + * Yields an allocation site name {@code id} if it is tracked by this + * domain, {@code null} otherwise. + * + * @param location allocation site's name to be searched + * + * @return an allocation site name {@code id} if it is tracked by this + * domain, {@code null} otherwise + */ + protected Set getAllocatedAt( + String location) { + Set sites = new HashSet<>(); + for (AllocationSites set : heapEnv.getValues()) + for (AllocationSite site : set) + if (site.getLocationName().equals(location)) + sites.add(site); + + return sites; + } + + /** + * Performs the assignment of {@code site} to the identifier {@code id} when + * {@code site} is a static allocation site, thus performing a shallow copy + * instead of aliasing handling the heap replacements. + * + * @param id the identifier to be updated + * @param site the allocation site to be assigned + * @param replacements the list of replacements to be updated + * @param pp the program point where this operation occurs + * @param oracle the oracle for inter-domain communication + * + * @return the point-based heap instance where {@code id} is updated with + * {@code star_y} and the needed heap replacements + * + * @throws SemanticException if something goes wrong during the analysis + */ + public A shallowCopy( + Identifier id, + StackAllocationSite site, + List replacements, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + // no aliasing: star_y must be cloned and the clone must + // be assigned to id + StackAllocationSite clone = new StackAllocationSite(site.getStaticType(), + id.getCodeLocation().toString(), site.isWeak(), id.getCodeLocation()); + HeapEnvironment tmp = heapEnv.assign(id, clone, pp, oracle); + + HeapReplacement replacement = new HeapReplacement(); + replacement.addSource(site); + replacement.addTarget(clone); + replacement.addTarget(site); + replacements.add(replacement); + + return mk(tmp); + } + + @Override + public A assume( + SymbolicExpression expression, + ProgramPoint src, + ProgramPoint dest, + SemanticOracle oracle) + throws SemanticException { + // we just rewrite the expression if needed + return smallStepSemantics(expression, src, oracle); + } + + @Override + public Satisfiability satisfies( + SymbolicExpression expression, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + // we leave the decision to the value domain + return Satisfiability.UNKNOWN; + } + + @Override + public StructuredRepresentation representation() { + if (isTop()) + return Lattice.topRepresentation(); + + if (isBottom()) + return Lattice.bottomRepresentation(); + + return heapEnv.representation(); + } + + @Override + public boolean isTop() { + return heapEnv.isTop(); + } + + @Override + public boolean isBottom() { + return heapEnv.isBottom(); + } + + @Override + public List getSubstitution() { + return replacements; + } + + @Override + public boolean lessOrEqualAux( + A other) + throws SemanticException { + return heapEnv.lessOrEqual(other.heapEnv); + } + + @Override + public int hashCode() { + return Objects.hash(heapEnv, replacements); + } + + @Override + public boolean equals( + Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + @SuppressWarnings("unchecked") + A other = (A) obj; + return Objects.equals(heapEnv, other.heapEnv) && Objects.equals(replacements, other.replacements); + } + + @Override + @SuppressWarnings("unchecked") + public A semanticsOf( + HeapExpression expression, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + return (A) this; + } + + @Override + public ExpressionSet rewrite( + SymbolicExpression expression, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + return expression.accept(new Rewriter(), pp, oracle); + } + + /** + * A {@link it.unive.lisa.analysis.heap.BaseHeapDomain.Rewriter} for the + * {@link AllocationSiteBasedAnalysis} domain. + * + * @author Luca Negrini + */ + public class Rewriter extends BaseHeapDomain.Rewriter { + + /* + * note that all the cases where we are adding a plain expression to the + * result set in these methods is because it could have been already + * rewritten by other rewrite methods to an allocation site + */ + + @Override + public ExpressionSet visit( + AccessChild expression, + ExpressionSet receiver, + ExpressionSet child, + Object... params) + throws SemanticException { + Set result = new HashSet<>(); + for (SymbolicExpression rec : receiver) + if (rec instanceof MemoryPointer) { + MemoryPointer pid = (MemoryPointer) rec; + AllocationSite site = (AllocationSite) pid.getReferencedLocation(); + AllocationSite e; + if (site instanceof StackAllocationSite) + e = new StackAllocationSite( + expression.getStaticType(), + site.getLocationName(), + true, + expression.getCodeLocation()); + else + e = new HeapAllocationSite( + expression.getStaticType(), + site.getLocationName(), + true, + expression.getCodeLocation()); + + // propagates the annotations of the child value expression + // to the newly created allocation site + for (SymbolicExpression f : child) + if (f instanceof Identifier) + for (Annotation ann : e.getAnnotations()) + e.addAnnotation(ann); + + result.add(e); + } else if (rec instanceof AllocationSite) + result.add(rec); + + return new ExpressionSet(result); + } + + @Override + public ExpressionSet visit( + MemoryAllocation expression, + Object... params) + throws SemanticException { + AllocationSite id; + if (expression.isStackAllocation()) + id = new StackAllocationSite( + expression.getStaticType(), + expression.getCodeLocation().getCodeLocation(), + true, + expression.getCodeLocation()); + else + id = new HeapAllocationSite( + expression.getStaticType(), + expression.getCodeLocation().getCodeLocation(), + true, + expression.getCodeLocation()); + + // propagates the annotations of expression + // to the newly created allocation site + for (Annotation ann : expression.getAnnotations()) + id.addAnnotation(ann); + + return new ExpressionSet(id); + } + + @Override + public ExpressionSet visit( + HeapReference expression, + ExpressionSet arg, + Object... params) + throws SemanticException { + Set result = new HashSet<>(); + + for (SymbolicExpression loc : arg) + if (loc instanceof AllocationSite) { + AllocationSite allocSite = (AllocationSite) loc; + MemoryPointer e = new MemoryPointer( + new ReferenceType(loc.getStaticType()), + allocSite, + loc.getCodeLocation()); + + // propagates the annotations of the allocation site + // to the newly created memory pointer + for (Annotation ann : allocSite.getAnnotations()) + e.addAnnotation(ann); + + result.add(e); + } else + result.add(loc); + return new ExpressionSet(result); + } + + @Override + public ExpressionSet visit( + HeapDereference expression, + ExpressionSet arg, + Object... params) + throws SemanticException { + Set result = new HashSet<>(); + + for (SymbolicExpression ref : arg) + if (ref instanceof MemoryPointer) + result.add(((MemoryPointer) ref).getReferencedLocation()); + else if (ref instanceof Identifier) { + // this could be aliasing! + Identifier id = (Identifier) ref; + if (heapEnv.getKeys().contains(id)) + result.addAll(resolveIdentifier(id)); + else if (id instanceof Variable) { + // this is a variable from the program that we know + // nothing about + CodeLocation loc = expression.getCodeLocation(); + AllocationSite site; + if (id.getStaticType().isPointerType()) + site = new HeapAllocationSite(id.getStaticType(), "unknown@" + id.getName(), true, loc); + else if (id.getStaticType().isInMemoryType() || id.getStaticType().isUntyped()) + site = new StackAllocationSite(id.getStaticType(), "unknown@" + id.getName(), true, loc); + else + throw new SemanticException("The type " + id.getStaticType() + + " cannot be allocated by point-based heap domains"); + + // propagates the annotations of the variable + // to the newly created allocation site + for (Annotation ann : id.getAnnotations()) + site.addAnnotation(ann); + + result.add(site); + } + } else + result.add(ref); + + return new ExpressionSet(result); + } + + @Override + public ExpressionSet visit( + Identifier expression, + Object... params) + throws SemanticException { + if (!(expression instanceof MemoryPointer) && heapEnv.getKeys().contains(expression)) + return new ExpressionSet(resolveIdentifier(expression)); + + return new ExpressionSet(expression); + } + + private Set resolveIdentifier( + Identifier v) { + Set result = new HashSet<>(); + for (AllocationSite site : heapEnv.getState(v)) { + MemoryPointer e = new MemoryPointer( + new ReferenceType(site.getStaticType()), + site, + site.getCodeLocation()); + result.add(e); + } + + return result; + } + + @Override + public ExpressionSet visit( + PushAny expression, + Object... params) + throws SemanticException { + if (expression.getStaticType().isPointerType()) { + Type inner = expression.getStaticType().asPointerType().getInnerType(); + CodeLocation loc = expression.getCodeLocation(); + HeapAllocationSite site = new HeapAllocationSite(inner, "unknown@" + loc.getCodeLocation(), false, loc); + return new ExpressionSet(new MemoryPointer(expression.getStaticType(), site, loc)); + } else if (expression.getStaticType().isInMemoryType()) { + Type type = expression.getStaticType(); + CodeLocation loc = expression.getCodeLocation(); + StackAllocationSite site = new StackAllocationSite(type, "unknown@" + loc.getCodeLocation(), false, + loc); + return new ExpressionSet(new MemoryPointer(expression.getStaticType(), site, loc)); + } + return new ExpressionSet(expression); + } + } + + @Override + public boolean knowsIdentifier( + Identifier id) { + return heapEnv.knowsIdentifier(id) || (id instanceof AllocationSite + && heapEnv.getValues().stream().anyMatch(as -> as.contains((AllocationSite) id))); + } + + @Override + public Satisfiability alias( + SymbolicExpression x, + SymbolicExpression y, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + if (isTop()) + return Satisfiability.UNKNOWN; + if (isBottom()) + return Satisfiability.BOTTOM; + + boolean atLeastOne = false; + boolean all = true; + + ExpressionSet xrs = rewrite(x, pp, oracle); + ExpressionSet yrs = rewrite(y, pp, oracle); + + for (SymbolicExpression xr : xrs) + for (SymbolicExpression yr : yrs) + if (xr instanceof MemoryPointer && yr instanceof MemoryPointer) { + HeapLocation xloc = ((MemoryPointer) xr).getReferencedLocation(); + HeapLocation yloc = ((MemoryPointer) yr).getReferencedLocation(); + if (xloc.equals(yloc)) { + atLeastOne = true; + all &= true; + } else + all = false; + } else + // they cannot be alias + all = false; + + if (all && atLeastOne) + return Satisfiability.SATISFIED; + else if (atLeastOne) + return Satisfiability.UNKNOWN; + else + return Satisfiability.NOT_SATISFIED; + } + + @Override + public Satisfiability isReachableFrom( + SymbolicExpression x, + SymbolicExpression y, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + if (isTop()) + return Satisfiability.UNKNOWN; + if (isBottom()) + return Satisfiability.BOTTOM; + + WorkingSet ws = VisitOnceFIFOWorkingSet.mk(); + rewrite(x, pp, oracle).elements().forEach(ws::push); + ExpressionSet targets = rewrite(y, pp, oracle); + + while (!ws.isEmpty()) { + SymbolicExpression current = ws.peek(); + if (targets.elements().contains(current)) + return Satisfiability.SATISFIED; + + if (current instanceof Identifier && heapEnv.knowsIdentifier((Identifier) current)) + heapEnv.getState((Identifier) current).elements().forEach(ws::push); + else + rewrite(current, pp, oracle).elements().forEach(ws::push); + } + + return Satisfiability.NOT_SATISFIED; + } +} diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/heap/pointbased/AllocationSites.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/heap/pointbased/AllocationSites.java index dc8deaaa2..860ffca2c 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/heap/pointbased/AllocationSites.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/heap/pointbased/AllocationSites.java @@ -1,17 +1,16 @@ package it.unive.lisa.analysis.heap.pointbased; -import it.unive.lisa.analysis.SemanticDomain.Satisfiability; import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.SemanticOracle; import it.unive.lisa.analysis.lattices.ExpressionSet; +import it.unive.lisa.analysis.lattices.Satisfiability; import it.unive.lisa.analysis.lattices.SetLattice; import it.unive.lisa.analysis.nonrelational.heap.HeapEnvironment; import it.unive.lisa.analysis.nonrelational.heap.NonRelationalHeapDomain; -import it.unive.lisa.analysis.representation.DomainRepresentation; -import it.unive.lisa.analysis.representation.StringRepresentation; +import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.program.cfg.ProgramPoint; import it.unive.lisa.symbolic.SymbolicExpression; import it.unive.lisa.symbolic.value.Identifier; -import it.unive.lisa.symbolic.value.ValueExpression; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; @@ -27,7 +26,8 @@ * @author Vincenzo Arceri */ public class AllocationSites extends SetLattice - implements NonRelationalHeapDomain { + implements + NonRelationalHeapDomain { private static final AllocationSites TOP = new AllocationSites(new HashSet<>(), true); private static final AllocationSites BOTTOM = new AllocationSites(new HashSet<>(), false); @@ -46,7 +46,9 @@ public AllocationSites() { * @param set the set of {@link AllocationSite}s * @param isTop whether this instance is the top of the lattice */ - AllocationSites(Set set, boolean isTop) { + AllocationSites( + Set set, + boolean isTop) { super(set, isTop); } @@ -61,7 +63,8 @@ public AllocationSites bottom() { } @Override - public AllocationSites mk(Set set) { + public AllocationSites mk( + Set set) { return new AllocationSites(set, false); } @@ -71,29 +74,32 @@ public Iterator iterator() { } @Override - public AllocationSites eval(SymbolicExpression expression, - HeapEnvironment environment, ProgramPoint pp) { + public AllocationSites eval( + SymbolicExpression expression, + HeapEnvironment environment, + ProgramPoint pp, + SemanticOracle oracle) { return new AllocationSites(Collections.singleton((AllocationSite) expression), false); } @Override - public Satisfiability satisfies(SymbolicExpression expression, - HeapEnvironment environment, ProgramPoint pp) { + public Satisfiability satisfies( + SymbolicExpression expression, + HeapEnvironment environment, + ProgramPoint pp, + SemanticOracle oracle) { return Satisfiability.UNKNOWN; } - @Override - public DomainRepresentation representation() { - return new StringRepresentation(toString()); - } - @Override public List getSubstitution() { return Collections.emptyList(); } @Override - public AllocationSites lubAux(AllocationSites other) throws SemanticException { + public AllocationSites lubAux( + AllocationSites other) + throws SemanticException { Map lub = new HashMap<>(); // all weak identifiers are part of the lub @@ -115,24 +121,93 @@ public AllocationSites lubAux(AllocationSites other) throws SemanticException { } @Override - public boolean tracksIdentifiers(Identifier id) { - return id.getDynamicType().isPointerType() || id.getDynamicType().isUntyped(); + public boolean canProcess( + SymbolicExpression expression, + ProgramPoint pp, + SemanticOracle oracle) { + return expression instanceof AllocationSite; } @Override - public boolean canProcess(SymbolicExpression expression) { - return expression instanceof AllocationSite; + public HeapEnvironment assume( + HeapEnvironment environment, + SymbolicExpression expression, + ProgramPoint src, + ProgramPoint dest, + SemanticOracle oracle) + throws SemanticException { + return environment; } @Override - public HeapEnvironment assume(HeapEnvironment environment, - SymbolicExpression expression, ProgramPoint src, ProgramPoint dest) throws SemanticException { - return environment; + public ExpressionSet rewrite( + SymbolicExpression expression, + HeapEnvironment environment, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + return new ExpressionSet(); + } + + /** + * Applies a substitution to the contents of this set of allocation sites, + * similarly to + * {@link ValueDomain#applyReplacement(it.unive.lisa.analysis.heap.HeapSemanticOperation.HeapReplacement, ProgramPoint, SemanticOracle)}. + * + * @param r the substitution + * @param pp the program point where the substitution is applied + * + * @return a copy of this set of sites where the substitution has been + * applied + * + * @throws SemanticException if something goes wrong during the computation + */ + public AllocationSites applyReplacement( + HeapReplacement r, + ProgramPoint pp) + throws SemanticException { + if (isTop() || isBottom() || r.getSources().isEmpty()) + return this; + + Set copy = new HashSet<>(elements); + if (copy.removeAll(r.getSources())) { + r.getTargets().stream() + .filter(AllocationSite.class::isInstance) + .map(AllocationSite.class::cast) + .forEach(copy::add); + return new AllocationSites(copy, false); + } else + return this; + } + + @Override + public AllocationSites unknownVariable( + Identifier id) { + // we use bottom since heap environments track all possible keys: the + // absence of a key means no information (bottom) instead of any + // possible information (top) + return bottom(); } @Override - public ExpressionSet rewrite(SymbolicExpression expression, - HeapEnvironment environment, ProgramPoint pp) throws SemanticException { - return new ExpressionSet<>(); + public Satisfiability alias( + SymbolicExpression x, + SymbolicExpression y, + HeapEnvironment environment, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + return Satisfiability.UNKNOWN; + } + + @Override + public Satisfiability isReachableFrom( + SymbolicExpression x, + SymbolicExpression y, + HeapEnvironment environment, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + return Satisfiability.UNKNOWN; } } diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/heap/pointbased/FieldSensitivePointBasedHeap.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/heap/pointbased/FieldSensitivePointBasedHeap.java index 2bec1a1f2..4ceed70d7 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/heap/pointbased/FieldSensitivePointBasedHeap.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/heap/pointbased/FieldSensitivePointBasedHeap.java @@ -2,52 +2,51 @@ import it.unive.lisa.analysis.ScopeToken; import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.SemanticOracle; import it.unive.lisa.analysis.lattices.ExpressionSet; +import it.unive.lisa.analysis.lattices.GenericMapLattice; import it.unive.lisa.analysis.nonrelational.heap.HeapEnvironment; +import it.unive.lisa.program.annotations.Annotation; import it.unive.lisa.program.cfg.ProgramPoint; import it.unive.lisa.symbolic.SymbolicExpression; import it.unive.lisa.symbolic.heap.AccessChild; import it.unive.lisa.symbolic.heap.MemoryAllocation; import it.unive.lisa.symbolic.value.Identifier; import it.unive.lisa.symbolic.value.MemoryPointer; -import it.unive.lisa.symbolic.value.ValueExpression; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; +import java.util.LinkedList; import java.util.List; import java.util.Map; +import java.util.Map.Entry; import java.util.Objects; import java.util.Set; +import java.util.function.Predicate; /** - * A field-sensitive point-based heap implementation that abstracts heap - * locations depending on their allocation sites, namely the position of the - * code where heap locations are generated. All heap locations that are - * generated at the same allocation sites are abstracted into a single unique - * heap identifier. The analysis is field-sensitive in the sense that all the - * field accesses, with the same field, to a specific allocation site are - * abstracted into a single heap identifier. The implementation follows X. Rival - * and K. Yi, "Introduction to Static Analysis An Abstract Interpretation - * Perspective", Section 8.3.4 + * A field-insensitive program point-based {@link AllocationSiteBasedAnalysis}. + * The implementation follows X. Rival and K. Yi, "Introduction to Static + * Analysis An Abstract Interpretation Perspective", Section 8.3.4 * * @author Vincenzo Arceri * * @see https://mitpress.mit.edu/books/introduction-static-analysis */ -public class FieldSensitivePointBasedHeap extends PointBasedHeap { +public class FieldSensitivePointBasedHeap extends AllocationSiteBasedAnalysis { /** * Tracks the fields of each allocation site. */ - private final Map> fields; + private final GenericMapLattice fields; /** * Builds a new instance of field-sensitive point-based heap. */ public FieldSensitivePointBasedHeap() { super(); - this.fields = Collections.emptyMap(); + this.fields = new GenericMapLattice(new ExpressionSet()).top(); } /** @@ -56,8 +55,9 @@ public FieldSensitivePointBasedHeap() { * * @param heapEnv the heap environment that this instance tracks */ - public FieldSensitivePointBasedHeap(HeapEnvironment heapEnv) { - this(heapEnv, Collections.emptyMap()); + public FieldSensitivePointBasedHeap( + HeapEnvironment heapEnv) { + this(heapEnv, new GenericMapLattice(new ExpressionSet()).top()); } /** @@ -68,8 +68,9 @@ public FieldSensitivePointBasedHeap(HeapEnvironment heapEnv) { * @param fields the mapping between allocation sites and their fields that * this instance tracks */ - public FieldSensitivePointBasedHeap(HeapEnvironment heapEnv, - Map> fields) { + public FieldSensitivePointBasedHeap( + HeapEnvironment heapEnv, + GenericMapLattice fields) { super(heapEnv); this.fields = fields; } @@ -83,36 +84,40 @@ public FieldSensitivePointBasedHeap(HeapEnvironment heapEnv, * @param fields the mapping between allocation sites and their fields * that this instance tracks */ - public FieldSensitivePointBasedHeap(HeapEnvironment heapEnv, List replacements, - Map> fields) { + public FieldSensitivePointBasedHeap( + HeapEnvironment heapEnv, + List replacements, + GenericMapLattice fields) { super(heapEnv, replacements); this.fields = fields; } @Override - protected FieldSensitivePointBasedHeap buildHeapAfterAssignment(PointBasedHeap sss, + protected FieldSensitivePointBasedHeap mk( + HeapEnvironment heapEnv, List replacements) { - return new FieldSensitivePointBasedHeap(sss.heapEnv, replacements, - ((FieldSensitivePointBasedHeap) sss).fields); + return new FieldSensitivePointBasedHeap(heapEnv, replacements, fields); } @Override - public FieldSensitivePointBasedHeap nonAliasedAssignment(Identifier id, StackAllocationSite site, - PointBasedHeap pb, - ProgramPoint pp, List replacements) + public FieldSensitivePointBasedHeap shallowCopy( + Identifier id, + StackAllocationSite site, + List replacements, + ProgramPoint pp, + SemanticOracle oracle) throws SemanticException { // no aliasing: star_y must be cloned and the clone must // be assigned to id StackAllocationSite clone = new StackAllocationSite(site.getStaticType(), id.getCodeLocation().toString(), site.isWeak(), id.getCodeLocation()); - HeapEnvironment heap = pb.heapEnv.assign(id, clone, pp); + HeapEnvironment heap = heapEnv.assign(id, clone, pp, oracle); - Map> newFields = new HashMap<>(((FieldSensitivePointBasedHeap) pb).fields); + Map newFields = new HashMap<>(fields.getMap()); // all the allocation sites fields of star_y - if (((FieldSensitivePointBasedHeap) pb).fields.containsKey(site)) { - for (SymbolicExpression field : ((FieldSensitivePointBasedHeap) pb).fields.get(site)) { + if (fields.getKeys().contains(site)) { + for (SymbolicExpression field : fields.getState(site)) { StackAllocationSite cloneWithField = new StackAllocationSite(field.getStaticType(), id.getCodeLocation().toString(), field, site.isWeak(), id.getCodeLocation()); @@ -139,69 +144,138 @@ public FieldSensitivePointBasedHeap nonAliasedAssignment(Identifier id, StackAll replacement.addTarget(site); replacements.add(replacement); - return new FieldSensitivePointBasedHeap(heap, newFields); + return new FieldSensitivePointBasedHeap(heap, new GenericMapLattice<>(fields.lattice, newFields)); } @Override - public FieldSensitivePointBasedHeap from(PointBasedHeap original) { - return new FieldSensitivePointBasedHeap(original.heapEnv, fields); - } - - @Override - public ExpressionSet rewrite(SymbolicExpression expression, ProgramPoint pp) - throws SemanticException { - return expression.accept(new Rewriter()); - } - - @Override - public FieldSensitivePointBasedHeap smallStepSemantics(SymbolicExpression expression, ProgramPoint pp) + public FieldSensitivePointBasedHeap smallStepSemantics( + SymbolicExpression expression, + ProgramPoint pp, + SemanticOracle oracle) throws SemanticException { if (expression instanceof AccessChild) { - FieldSensitivePointBasedHeap sss = (FieldSensitivePointBasedHeap) super.smallStepSemantics(expression, pp); + FieldSensitivePointBasedHeap sss = (FieldSensitivePointBasedHeap) super.smallStepSemantics( + expression, + pp, + oracle); AccessChild accessChild = (AccessChild) expression; - Map> mapping = new HashMap>(sss.fields); + Map mapping = new HashMap<>(sss.fields.getMap()); + + ExpressionSet exprs; + if (accessChild.getContainer().mightNeedRewriting()) + exprs = rewrite(accessChild.getContainer(), pp, oracle); + else + exprs = new ExpressionSet(accessChild.getContainer()); - ExpressionSet exprs = rewrite(accessChild.getContainer(), pp); - for (ValueExpression rec : exprs) + for (SymbolicExpression rec : exprs) if (rec instanceof MemoryPointer) { AllocationSite site = (AllocationSite) ((MemoryPointer) rec).getReferencedLocation(); - ExpressionSet childs = rewrite(accessChild.getChild(), pp); + ExpressionSet childs = rewrite(accessChild.getChild(), pp, oracle); - for (ValueExpression child : childs) + for (SymbolicExpression child : childs) addField(site, child, mapping); } else if (rec instanceof AllocationSite) { AllocationSite site = (AllocationSite) rec; - ExpressionSet childs = rewrite(accessChild.getChild(), pp); + ExpressionSet childs = rewrite(accessChild.getChild(), pp, oracle); - for (ValueExpression child : childs) + for (SymbolicExpression child : childs) addField(site, child, mapping); } - return new FieldSensitivePointBasedHeap(heapEnv, heapEnv.getSubstitution(), mapping); + return new FieldSensitivePointBasedHeap(heapEnv, heapEnv.getSubstitution(), + new GenericMapLattice<>(fields.lattice, mapping)); + } else if (expression instanceof MemoryAllocation) { + String loc = expression.getCodeLocation().getCodeLocation(); + Set alreadyAllocated = getAllocatedAt(loc); + FieldSensitivePointBasedHeap sss = super.smallStepSemantics(expression, pp, oracle); + HeapEnvironment env = sss.heapEnv; + + if (!alreadyAllocated.isEmpty()) { + // we must turn all these sites to weak ones, including the one + // about fields + List replacements = new LinkedList<>(); + for (AllocationSite site : alreadyAllocated) { + if (!site.isWeak()) { + HeapReplacement replacement = new HeapReplacement(); + replacement.addSource(site); + replacement.addTarget(site.toWeak()); + replacements.add(replacement); + } + if (fields.getKeys().contains(site)) + for (SymbolicExpression field : fields.getState(site)) { + AllocationSite withField = site.withField(field); + if (!withField.isWeak()) { + HeapReplacement replacement = new HeapReplacement(); + replacement.addSource(withField); + replacement.addTarget(withField.toWeak()); + replacements.add(replacement); + } + } + } + + if (!replacements.isEmpty()) { + // we must apply the replacements to our mapping as well + Map map = new HashMap<>(env.getMap()); + for (Entry entry : env) { + Identifier id = entry.getKey(); + AllocationSites sites = entry.getValue(); + for (HeapReplacement repl : replacements) { + if (repl.getSources().contains(id)) + // these are all one-to-one replacements + id = repl.getTargets().iterator().next(); + sites = sites.applyReplacement(repl, pp); + } + map.put(id, sites); + } + env = new HeapEnvironment<>(env.lattice, map); + } + return new FieldSensitivePointBasedHeap(env, replacements, fields); + } } - PointBasedHeap sss = super.smallStepSemantics(expression, pp); + FieldSensitivePointBasedHeap sss = super.smallStepSemantics(expression, pp, oracle); return new FieldSensitivePointBasedHeap(sss.heapEnv, fields); } + private void addField( + AllocationSite site, + SymbolicExpression field, + Map mapping) { + Set tmp = new HashSet<>(mapping.getOrDefault(site, new ExpressionSet()).elements()); + tmp.add(field); + mapping.put(site, new ExpressionSet(tmp)); + } + + @Override + public ExpressionSet rewrite( + SymbolicExpression expression, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + return expression.accept(new Rewriter(), pp, oracle); + } + /** * A {@link it.unive.lisa.analysis.heap.BaseHeapDomain.Rewriter} for the * {@link FieldSensitivePointBasedHeap} domain. * * @author Luca Negrini */ - public class Rewriter extends PointBasedHeap.Rewriter { + public class Rewriter extends AllocationSiteBasedAnalysis.Rewriter { @Override - public ExpressionSet visit(AccessChild expression, ExpressionSet receiver, - ExpressionSet child, Object... params) throws SemanticException { - Set result = new HashSet<>(); + public ExpressionSet visit( + AccessChild expression, + ExpressionSet receiver, + ExpressionSet child, + Object... params) + throws SemanticException { + Set result = new HashSet<>(); - for (ValueExpression rec : receiver) + for (SymbolicExpression rec : receiver) if (rec instanceof MemoryPointer) { AllocationSite site = (AllocationSite) ((MemoryPointer) rec).getReferencedLocation(); populate(expression, child, result, site); @@ -210,11 +284,14 @@ public ExpressionSet visit(AccessChild expression, ExpressionSe populate(expression, child, result, site); } - return new ExpressionSet<>(result); + return new ExpressionSet(result); } - private void populate(AccessChild expression, ExpressionSet child, - Set result, AllocationSite site) { + private void populate( + AccessChild expression, + ExpressionSet child, + Set result, + AllocationSite site) { for (SymbolicExpression target : child) { AllocationSite e; @@ -233,19 +310,25 @@ private void populate(AccessChild expression, ExpressionSet chi site.isWeak(), site.getCodeLocation()); - if (expression.hasRuntimeTypes()) - e.setRuntimeTypes(expression.getRuntimeTypes(null)); + // propagates the annotations of the child value expression to + // the newly created allocation site + if (target instanceof Identifier) + for (Annotation ann : e.getAnnotations()) + e.addAnnotation(ann); + result.add(e); } } @Override - public ExpressionSet visit(MemoryAllocation expression, Object... params) + public ExpressionSet visit( + MemoryAllocation expression, + Object... params) throws SemanticException { String pp = expression.getCodeLocation().getCodeLocation(); boolean weak; - if (alreadyAllocated(pp) != null) + if (!getAllocatedAt(pp).isEmpty()) weak = true; else weak = false; @@ -256,19 +339,13 @@ public ExpressionSet visit(MemoryAllocation expression, Object. else e = new HeapAllocationSite(expression.getStaticType(), pp, weak, expression.getCodeLocation()); - if (expression.hasRuntimeTypes()) - e.setRuntimeTypes(expression.getRuntimeTypes(null)); - return new ExpressionSet<>(e); - } - } + // propagates the annotations of expression + // to the newly created allocation site + for (Annotation ann : expression.getAnnotations()) + e.getAnnotations().addAnnotation(ann); - @Override - public FieldSensitivePointBasedHeap mk(PointBasedHeap reference) { - if (reference instanceof FieldSensitivePointBasedHeap) - return new FieldSensitivePointBasedHeap(reference.heapEnv, - ((FieldSensitivePointBasedHeap) reference).fields); - else - return new FieldSensitivePointBasedHeap(reference.heapEnv); + return new ExpressionSet(e); + } } @Override @@ -280,7 +357,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (!super.equals(obj)) @@ -291,20 +369,76 @@ public boolean equals(Object obj) { return Objects.equals(fields, other.fields); } - private void addField(AllocationSite site, SymbolicExpression field, - Map> mapping) { - if (!mapping.containsKey(site)) - mapping.put(site, new HashSet<>()); - mapping.get(site).add(field); - } - @Override - public FieldSensitivePointBasedHeap popScope(ScopeToken scope) throws SemanticException { + public FieldSensitivePointBasedHeap popScope( + ScopeToken scope) + throws SemanticException { return new FieldSensitivePointBasedHeap(heapEnv.popScope(scope), fields); } @Override - public FieldSensitivePointBasedHeap pushScope(ScopeToken scope) throws SemanticException { + public FieldSensitivePointBasedHeap pushScope( + ScopeToken scope) + throws SemanticException { return new FieldSensitivePointBasedHeap(heapEnv.pushScope(scope), fields); } + + @Override + public FieldSensitivePointBasedHeap top() { + return new FieldSensitivePointBasedHeap(heapEnv.top(), Collections.emptyList(), fields.top()); + } + + @Override + public boolean isTop() { + return heapEnv.isTop() && fields.isTop(); + } + + @Override + public FieldSensitivePointBasedHeap bottom() { + return new FieldSensitivePointBasedHeap(heapEnv.bottom(), Collections.emptyList(), fields.bottom()); + } + + @Override + public boolean isBottom() { + return heapEnv.isBottom() && fields.isBottom(); + } + + @Override + public FieldSensitivePointBasedHeap lubAux( + FieldSensitivePointBasedHeap other) + throws SemanticException { + return new FieldSensitivePointBasedHeap(heapEnv.lub(other.heapEnv), + Collections.emptyList(), + fields.lub(other.fields)); + } + + @Override + public FieldSensitivePointBasedHeap glbAux( + FieldSensitivePointBasedHeap other) + throws SemanticException { + return new FieldSensitivePointBasedHeap(heapEnv.glb(other.heapEnv), + Collections.emptyList(), + fields.glb(other.fields)); + } + + @Override + public boolean lessOrEqualAux( + FieldSensitivePointBasedHeap other) + throws SemanticException { + return heapEnv.lessOrEqual(other.heapEnv) && fields.lessOrEqual(other.fields); + } + + @Override + public FieldSensitivePointBasedHeap forgetIdentifier( + Identifier id) + throws SemanticException { + return new FieldSensitivePointBasedHeap(heapEnv.forgetIdentifier(id), fields); + } + + @Override + public FieldSensitivePointBasedHeap forgetIdentifiersIf( + Predicate test) + throws SemanticException { + return new FieldSensitivePointBasedHeap(heapEnv.forgetIdentifiersIf(test), fields); + } } diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/heap/pointbased/HeapAllocationSite.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/heap/pointbased/HeapAllocationSite.java index 5274901b2..ceab14071 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/heap/pointbased/HeapAllocationSite.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/heap/pointbased/HeapAllocationSite.java @@ -22,8 +22,12 @@ public class HeapAllocationSite extends AllocationSite { * @param location the code location of the statement that has generated * this expression */ - public HeapAllocationSite(Type staticType, String locationName, boolean isWeak, CodeLocation location) { - this(staticType, locationName, null, isWeak, location); + public HeapAllocationSite( + Type staticType, + String locationName, + boolean isWeak, + CodeLocation location) { + this(staticType, locationName, (String) null, isWeak, location); } /** @@ -37,8 +41,51 @@ public HeapAllocationSite(Type staticType, String locationName, boolean isWeak, * @param location the code location of the statement that has generated * this expression */ - public HeapAllocationSite(Type staticType, String locationName, SymbolicExpression field, boolean isWeak, + public HeapAllocationSite( + Type staticType, + String locationName, + SymbolicExpression field, + boolean isWeak, CodeLocation location) { super(staticType, locationName, field, isWeak, location); } + + /** + * Builds a heap allocation site. + * + * @param staticType the static type of this allocation site + * @param locationName the source code location string representation where + * this allocation site has been allocated + * @param field the name of the field of this allocation site + * @param isWeak if this allocation site is weak + * @param location the code location of the statement that has generated + * this expression + */ + public HeapAllocationSite( + Type staticType, + String locationName, + String field, + boolean isWeak, + CodeLocation location) { + super(staticType, locationName, field, isWeak, location); + } + + @Override + public AllocationSite toWeak() { + return isWeak() ? this + : new HeapAllocationSite( + getStaticType(), + getLocationName(), + getField(), + true, + getCodeLocation()); + } + + @Override + public AllocationSite withField( + SymbolicExpression field) { + if (getField() != null) + throw new IllegalStateException("Cannot add a field to an allocation site that already has one"); + return new HeapAllocationSite(getStaticType(), getLocationName(), field, isWeak(), getCodeLocation()); + } } \ No newline at end of file diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/heap/pointbased/PointBasedHeap.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/heap/pointbased/PointBasedHeap.java index b9a69adf1..5d49b4f55 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/heap/pointbased/PointBasedHeap.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/heap/pointbased/PointBasedHeap.java @@ -1,58 +1,24 @@ package it.unive.lisa.analysis.heap.pointbased; -import it.unive.lisa.analysis.Lattice; import it.unive.lisa.analysis.ScopeToken; import it.unive.lisa.analysis.SemanticException; -import it.unive.lisa.analysis.heap.BaseHeapDomain; -import it.unive.lisa.analysis.lattices.ExpressionSet; import it.unive.lisa.analysis.nonrelational.heap.HeapEnvironment; -import it.unive.lisa.analysis.representation.DomainRepresentation; -import it.unive.lisa.program.cfg.CodeLocation; -import it.unive.lisa.program.cfg.ProgramPoint; -import it.unive.lisa.symbolic.SymbolicExpression; -import it.unive.lisa.symbolic.heap.AccessChild; -import it.unive.lisa.symbolic.heap.HeapDereference; -import it.unive.lisa.symbolic.heap.HeapExpression; -import it.unive.lisa.symbolic.heap.HeapReference; -import it.unive.lisa.symbolic.heap.MemoryAllocation; -import it.unive.lisa.symbolic.value.HeapLocation; import it.unive.lisa.symbolic.value.Identifier; -import it.unive.lisa.symbolic.value.MemoryPointer; -import it.unive.lisa.symbolic.value.PushAny; -import it.unive.lisa.symbolic.value.ValueExpression; -import it.unive.lisa.symbolic.value.Variable; -import it.unive.lisa.type.ReferenceType; -import it.unive.lisa.type.Type; import java.util.Collections; -import java.util.HashSet; -import java.util.LinkedList; import java.util.List; -import java.util.Objects; -import java.util.Set; import java.util.function.Predicate; /** - * A field-insensitive point-based heap implementation that abstracts heap - * locations depending on their allocation sites, namely the position of the - * code where heap locations are generated. All heap locations that are - * generated at the same allocation sites are abstracted into a single unique - * heap identifier. The implementation follows X. Rival and K. Yi, "Introduction - * to Static Analysis An Abstract Interpretation Perspective", Section 8.3.4 + * A field-insensitive program point-based {@link AllocationSiteBasedAnalysis}. + * The implementation follows X. Rival and K. Yi, "Introduction to Static + * Analysis An Abstract Interpretation Perspective", Section 8.3.4 * * @author Vincenzo Arceri * * @see https://mitpress.mit.edu/books/introduction-static-analysis */ -public class PointBasedHeap implements BaseHeapDomain { - - /** - * An heap environment tracking which allocation sites are associated to - * each identifier. - */ - public final HeapEnvironment heapEnv; - - private final List replacements; +public class PointBasedHeap extends AllocationSiteBasedAnalysis { /** * Builds a new instance of field-insensitive point-based heap. @@ -67,7 +33,8 @@ public PointBasedHeap() { * * @param heapEnv the heap environment that this instance tracks */ - public PointBasedHeap(HeapEnvironment heapEnv) { + public PointBasedHeap( + HeapEnvironment heapEnv) { this(heapEnv, Collections.emptyList()); } @@ -78,187 +45,27 @@ public PointBasedHeap(HeapEnvironment heapEnv) { * @param heapEnv the heap environment that this instance tracks * @param replacements the heap replacements of this instance */ - public PointBasedHeap(HeapEnvironment heapEnv, List replacements) { - this.heapEnv = heapEnv; - this.replacements = replacements.isEmpty() ? Collections.emptyList() : replacements; - } - - /** - * Builds a point-based heap from a reference one. - * - * @param original reference point-based heap - * - * @return a point-based heap build from the original one - */ - public PointBasedHeap from(PointBasedHeap original) { - return original; - } - - @Override - public PointBasedHeap assign(Identifier id, SymbolicExpression expression, ProgramPoint pp) - throws SemanticException { - - PointBasedHeap sss = smallStepSemantics(expression, pp); - ExpressionSet rewrittenExp = sss.rewrite(expression, pp); - - PointBasedHeap result = bottom(); - List replacements = new LinkedList<>(); - for (ValueExpression exp : rewrittenExp) - if (exp instanceof MemoryPointer) { - MemoryPointer pid = (MemoryPointer) exp; - HeapLocation star_y = pid.getReferencedLocation(); - if (id instanceof MemoryPointer) { - // we have x = y, where both are pointers - // we perform *x = *y so that x and y - // become aliases - Identifier star_x = ((MemoryPointer) id).getReferencedLocation(); - HeapEnvironment heap = sss.heapEnv.assign(star_x, star_y, pp); - result = result.lub(from(new PointBasedHeap(heap))); - } else { - if (star_y instanceof StackAllocationSite - && alreadyAllocated(((StackAllocationSite) star_y).getLocationName()) != null) - result = result - .lub(nonAliasedAssignment(id, (StackAllocationSite) star_y, sss, pp, replacements)); - else { - // aliasing: id and star_y points to the same object - HeapEnvironment heap = sss.heapEnv.assign(id, star_y, pp); - result = result.lub(from(new PointBasedHeap(heap))); - } - } - } else - result = result.lub(sss); - - return buildHeapAfterAssignment(result, replacements); - } - - /** - * Yields an allocation site name {@code id} if it is tracked by this - * domain, {@code null} otherwise. - * - * @param id allocation site's name to be searched - * - * @return an allocation site name {@code id} if it is tracked by this - * domain, {@code null} otherwise - */ - protected AllocationSite alreadyAllocated(String id) { - for (AllocationSites set : heapEnv.getValues()) - for (AllocationSite site : set) - if (site.getLocationName().equals(id)) - return site; - - return null; - } - - /** - * Builds an instance of the heap domain after an assignment, from the heap - * instance obtained from the small step semantics of the right-hand side of - * the assignment and the replacements. - * - * @param sss the point-based heap instance obtained from the small - * step semantics of the right-hand side of the - * assignment - * @param replacements the list of replacements to be updated - * - * @return an instance of the point-based heap domain after an assignment, - * from the resulting heap domain, the heap instance obtained - * from the small step semantics of the right-hand side of the - * assignment, and the replacements - */ - protected PointBasedHeap buildHeapAfterAssignment(PointBasedHeap sss, + public PointBasedHeap( + HeapEnvironment heapEnv, List replacements) { - return from(new PointBasedHeap(sss.heapEnv, replacements)); - } - - /** - * Given the point-based heap instance {@code pb}, perform the assignment of - * {@code site} to the identifier {@code id} when {@code site} is a static - * allocation site, thus handling the heap replacements. - * - * @param id the identifier to be updated - * @param site the allocation site to be assigned - * @param pb the starting point-based heap instance - * @param pp the program point where this operation occurs - * @param replacements the list of replacements to be updated - * - * @return the point-based heap instance where {@code id} is updated with - * {@code star_y} and the needed heap replacements - * - * @throws SemanticException if something goes wrong during the analysis - */ - public PointBasedHeap nonAliasedAssignment(Identifier id, StackAllocationSite site, PointBasedHeap pb, - ProgramPoint pp, List replacements) - throws SemanticException { - // no aliasing: star_y must be cloned and the clone must - // be assigned to id - StackAllocationSite clone = new StackAllocationSite(site.getStaticType(), - id.getCodeLocation().toString(), site.isWeak(), id.getCodeLocation()); - // also runtime types are inherited, if already inferred - if (site.hasRuntimeTypes()) - clone.setRuntimeTypes(site.getRuntimeTypes(null)); - - HeapEnvironment tmp = pb.heapEnv.assign(id, clone, pp); - - HeapReplacement replacement = new HeapReplacement(); - replacement.addSource(site); - replacement.addTarget(clone); - replacement.addTarget(site); - replacements.add(replacement); - - return from(new PointBasedHeap(tmp)); - } - - @Override - public PointBasedHeap assume(SymbolicExpression expression, ProgramPoint src, ProgramPoint dest) - throws SemanticException { - // we just rewrite the expression if needed - return smallStepSemantics(expression, src); - } - - @Override - public PointBasedHeap forgetIdentifier(Identifier id) throws SemanticException { - return from(new PointBasedHeap(heapEnv.forgetIdentifier(id))); - } - - @Override - public PointBasedHeap forgetIdentifiersIf(Predicate test) throws SemanticException { - return from(new PointBasedHeap(heapEnv.forgetIdentifiersIf(test))); + super(heapEnv, replacements.isEmpty() ? Collections.emptyList() : replacements); } @Override - public Satisfiability satisfies(SymbolicExpression expression, ProgramPoint pp) throws SemanticException { - // we leave the decision to the value domain - return Satisfiability.UNKNOWN; - } - - @Override - public DomainRepresentation representation() { - if (isTop()) - return Lattice.topRepresentation(); - - if (isBottom()) - return Lattice.bottomRepresentation(); - - return heapEnv.representation(); + protected PointBasedHeap mk( + HeapEnvironment heapEnv, + List replacements) { + return new PointBasedHeap(heapEnv, replacements); } @Override public PointBasedHeap top() { - return from(new PointBasedHeap(heapEnv.top())); - } - - @Override - public boolean isTop() { - return heapEnv.isTop(); + return new PointBasedHeap(heapEnv.top()); } @Override public PointBasedHeap bottom() { - return from(new PointBasedHeap(heapEnv.bottom())); - } - - @Override - public boolean isBottom() { - return heapEnv.isBottom(); + return new PointBasedHeap(heapEnv.bottom()); } @Override @@ -267,232 +74,51 @@ public List getSubstitution() { } @Override - public PointBasedHeap mk(PointBasedHeap reference) { - return from(new PointBasedHeap(reference.heapEnv)); - } - - @Override - public PointBasedHeap lubAux(PointBasedHeap other) throws SemanticException { - return from(new PointBasedHeap(heapEnv.lub(other.heapEnv))); + public PointBasedHeap lubAux( + PointBasedHeap other) + throws SemanticException { + return new PointBasedHeap(heapEnv.lub(other.heapEnv)); } @Override - public PointBasedHeap glbAux(PointBasedHeap other) throws SemanticException { - return from(new PointBasedHeap(heapEnv.glb(other.heapEnv))); + public PointBasedHeap glbAux( + PointBasedHeap other) + throws SemanticException { + return new PointBasedHeap(heapEnv.glb(other.heapEnv)); } @Override - public boolean lessOrEqualAux(PointBasedHeap other) throws SemanticException { + public boolean lessOrEqualAux( + PointBasedHeap other) + throws SemanticException { return heapEnv.lessOrEqual(other.heapEnv); } @Override - public int hashCode() { - return Objects.hash(heapEnv, replacements); - } - - @Override - public boolean equals(Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - PointBasedHeap other = (PointBasedHeap) obj; - return Objects.equals(heapEnv, other.heapEnv) && Objects.equals(replacements, other.replacements); - } - - @Override - public PointBasedHeap semanticsOf(HeapExpression expression, ProgramPoint pp) throws SemanticException { - return this; + public PointBasedHeap popScope( + ScopeToken scope) + throws SemanticException { + return new PointBasedHeap(heapEnv.popScope(scope)); } @Override - public ExpressionSet rewrite(SymbolicExpression expression, ProgramPoint pp) + public PointBasedHeap pushScope( + ScopeToken scope) throws SemanticException { - return expression.accept(new Rewriter()); + return new PointBasedHeap(heapEnv.pushScope(scope)); } @Override - public PointBasedHeap popScope(ScopeToken scope) throws SemanticException { - return from(new PointBasedHeap(heapEnv.popScope(scope))); + public PointBasedHeap forgetIdentifier( + Identifier id) + throws SemanticException { + return new PointBasedHeap(heapEnv.forgetIdentifier(id)); } @Override - public PointBasedHeap pushScope(ScopeToken scope) throws SemanticException { - return from(new PointBasedHeap(heapEnv.pushScope(scope))); - } - - /** - * A {@link it.unive.lisa.analysis.heap.BaseHeapDomain.Rewriter} for the - * {@link PointBasedHeap} domain. - * - * @author Luca Negrini - */ - public class Rewriter extends BaseHeapDomain.Rewriter { - - /* - * note that all the cases where we are adding a plain expression to the - * result set in these methods is because it could have been already - * rewritten by other rewrite methods to an allocation site - */ - - @Override - public ExpressionSet visit(AccessChild expression, ExpressionSet receiver, - ExpressionSet child, Object... params) throws SemanticException { - Set result = new HashSet<>(); - for (ValueExpression rec : receiver) - if (rec instanceof MemoryPointer) { - MemoryPointer pid = (MemoryPointer) rec; - AllocationSite site = (AllocationSite) pid.getReferencedLocation(); - AllocationSite e; - if (site instanceof StackAllocationSite) - e = new StackAllocationSite( - expression.getStaticType(), - site.getLocationName(), - true, - expression.getCodeLocation()); - else - e = new HeapAllocationSite( - expression.getStaticType(), - site.getLocationName(), - true, - expression.getCodeLocation()); - - Set types = new HashSet<>(); - if (expression.hasRuntimeTypes()) - types.addAll(expression.getRuntimeTypes(null)); - - if (rec.hasRuntimeTypes()) - types.addAll(rec.getRuntimeTypes(null)); - - if (!types.isEmpty()) - e.setRuntimeTypes(types); - - result.add(e); - } else if (rec instanceof AllocationSite) - result.add(rec); - - return new ExpressionSet<>(result); - } - - @Override - public ExpressionSet visit(MemoryAllocation expression, Object... params) - throws SemanticException { - AllocationSite id; - if (expression.isStackAllocation()) - id = new StackAllocationSite( - expression.getStaticType(), - expression.getCodeLocation().getCodeLocation(), - true, - expression.getCodeLocation()); - else - id = new HeapAllocationSite( - expression.getStaticType(), - expression.getCodeLocation().getCodeLocation(), - true, - expression.getCodeLocation()); - - if (expression.hasRuntimeTypes()) - id.setRuntimeTypes(expression.getRuntimeTypes(null)); - return new ExpressionSet<>(id); - } - - @Override - public ExpressionSet visit(HeapReference expression, ExpressionSet arg, - Object... params) - throws SemanticException { - Set result = new HashSet<>(); - - for (ValueExpression loc : arg) - if (loc instanceof AllocationSite) { - MemoryPointer e = new MemoryPointer( - new ReferenceType(loc.getStaticType()), - (AllocationSite) loc, - loc.getCodeLocation()); - if (expression.hasRuntimeTypes()) - e.setRuntimeTypes(expression.getRuntimeTypes(null)); - result.add(e); - } else - result.add(loc); - return new ExpressionSet<>(result); - } - - @Override - public ExpressionSet visit(HeapDereference expression, ExpressionSet arg, - Object... params) - throws SemanticException { - Set result = new HashSet<>(); - - for (ValueExpression ref : arg) - if (ref instanceof MemoryPointer) - result.add(((MemoryPointer) ref).getReferencedLocation()); - else if (ref instanceof Identifier) { - // this could be aliasing! - Identifier id = (Identifier) ref; - if (heapEnv.getKeys().contains(id)) - result.addAll(resolveIdentifier(id)); - else if (id instanceof Variable) { - // this is a variable from the program that we know - // nothing about - CodeLocation loc = expression.getCodeLocation(); - AllocationSite site; - if (id.getStaticType().isPointerType()) - site = new HeapAllocationSite(id.getStaticType(), "unknown@" + id.getName(), true, loc); - else if (id.getStaticType().isInMemoryType() || id.getStaticType().isUntyped()) - site = new StackAllocationSite(id.getStaticType(), "unknown@" + id.getName(), true, loc); - else - throw new SemanticException("The type " + id.getStaticType() - + " cannot be allocated by point-based heap domains"); - result.add(site); - } - } else - result.add(ref); - - return new ExpressionSet<>(result); - } - - @Override - public ExpressionSet visit(Identifier expression, Object... params) - throws SemanticException { - if (!(expression instanceof MemoryPointer) && heapEnv.getKeys().contains(expression)) - return new ExpressionSet<>(resolveIdentifier(expression)); - - return new ExpressionSet<>(expression); - } - - private Set resolveIdentifier(Identifier v) { - Set result = new HashSet<>(); - for (AllocationSite site : heapEnv.getState(v)) { - MemoryPointer e = new MemoryPointer( - new ReferenceType(site.getStaticType()), - site, - site.getCodeLocation()); - if (v.hasRuntimeTypes()) - e.setRuntimeTypes(v.getRuntimeTypes(null)); - result.add(e); - } - - return result; - } - - @Override - public ExpressionSet visit(PushAny expression, Object... params) - throws SemanticException { - if (expression.getStaticType().isPointerType()) { - Type inner = expression.getStaticType().asPointerType().getInnerType(); - CodeLocation loc = expression.getCodeLocation(); - HeapAllocationSite site = new HeapAllocationSite(inner, "unknown@" + loc.getCodeLocation(), false, loc); - return new ExpressionSet<>(new MemoryPointer(expression.getStaticType(), site, loc)); - } else if (expression.getStaticType().isInMemoryType()) { - Type type = expression.getStaticType(); - CodeLocation loc = expression.getCodeLocation(); - StackAllocationSite site = new StackAllocationSite(type, "unknown@" + loc.getCodeLocation(), false, - loc); - return new ExpressionSet<>(new MemoryPointer(expression.getStaticType(), site, loc)); - } - return new ExpressionSet<>(expression); - } + public PointBasedHeap forgetIdentifiersIf( + Predicate test) + throws SemanticException { + return new PointBasedHeap(heapEnv.forgetIdentifiersIf(test)); } } diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/heap/pointbased/StackAllocationSite.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/heap/pointbased/StackAllocationSite.java index 2e66d047e..5eac7631b 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/heap/pointbased/StackAllocationSite.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/heap/pointbased/StackAllocationSite.java @@ -22,8 +22,12 @@ public class StackAllocationSite extends AllocationSite { * @param location the code location of the statement that has generated * this expression */ - public StackAllocationSite(Type staticType, String locationName, boolean isWeak, CodeLocation location) { - this(staticType, locationName, null, isWeak, location); + public StackAllocationSite( + Type staticType, + String locationName, + boolean isWeak, + CodeLocation location) { + this(staticType, locationName, (String) null, isWeak, location); } /** @@ -37,9 +41,51 @@ public StackAllocationSite(Type staticType, String locationName, boolean isWeak, * @param location the code location of the statement that has generated * this expression */ - public StackAllocationSite(Type staticType, String locationName, SymbolicExpression field, boolean isWeak, + public StackAllocationSite( + Type staticType, + String locationName, + SymbolicExpression field, + boolean isWeak, + CodeLocation location) { + super(staticType, locationName, field, isWeak, location); + } + + /** + * Builds a stack allocation site. + * + * @param staticType the static type of this allocation site + * @param locationName the source code location string representation where + * this allocation site has been allocated + * @param field the name of the field of this allocation site + * @param isWeak if this allocation site is weak + * @param location the code location of the statement that has generated + * this expression + */ + public StackAllocationSite( + Type staticType, + String locationName, + String field, + boolean isWeak, CodeLocation location) { super(staticType, locationName, field, isWeak, location); } + @Override + public AllocationSite toWeak() { + return isWeak() ? this + : new StackAllocationSite( + getStaticType(), + getLocationName(), + getField(), + true, + getCodeLocation()); + } + + @Override + public AllocationSite withField( + SymbolicExpression field) { + if (getField() != null) + throw new IllegalStateException("Cannot add a field to an allocation site that already has one"); + return new StackAllocationSite(getStaticType(), getLocationName(), field, isWeak(), getCodeLocation()); + } } diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/nonInterference/NonInterference.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/nonInterference/NonInterference.java index 993f4cc4b..36dbbd635 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/nonInterference/NonInterference.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/nonInterference/NonInterference.java @@ -2,10 +2,9 @@ import it.unive.lisa.analysis.Lattice; import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.SemanticOracle; import it.unive.lisa.analysis.nonrelational.inference.BaseInferredValue; import it.unive.lisa.analysis.nonrelational.inference.InferenceSystem; -import it.unive.lisa.analysis.representation.DomainRepresentation; -import it.unive.lisa.analysis.representation.StringRepresentation; import it.unive.lisa.program.annotations.Annotation; import it.unive.lisa.program.annotations.Annotations; import it.unive.lisa.program.annotations.matcher.AnnotationMatcher; @@ -20,6 +19,8 @@ import it.unive.lisa.symbolic.value.operator.binary.BinaryOperator; import it.unive.lisa.symbolic.value.operator.ternary.TernaryOperator; import it.unive.lisa.symbolic.value.operator.unary.UnaryOperator; +import it.unive.lisa.util.representation.StringRepresentation; +import it.unive.lisa.util.representation.StructuredRepresentation; import java.util.IdentityHashMap; import java.util.Map; import java.util.Map.Entry; @@ -91,7 +92,9 @@ public NonInterference() { * @param confidentiality the confidentiality value * @param integrity the integrity value */ - public NonInterference(byte confidentiality, byte integrity) { + public NonInterference( + byte confidentiality, + byte integrity) { this.confidentiality = confidentiality; this.integrity = integrity; this.guards = null; @@ -158,13 +161,16 @@ public boolean isLowIntegrity() { } @Override - public NonInterference lubAux(NonInterference other) throws SemanticException { + public NonInterference lubAux( + NonInterference other) + throws SemanticException { NonInterference ni = combine(other); addGuards(other, ni); return ni; } - private NonInterference combine(NonInterference other) { + private NonInterference combine( + NonInterference other) { // HL // | \ // HH LL @@ -178,7 +184,10 @@ private NonInterference combine(NonInterference other) { return ni; } - private void addGuards(NonInterference other, NonInterference ni) throws SemanticException { + private void addGuards( + NonInterference other, + NonInterference ni) + throws SemanticException { if (guards != null) ni.guards = new IdentityHashMap<>(guards); if (other.guards != null) @@ -191,11 +200,14 @@ private void addGuards(NonInterference other, NonInterference ni) throws Semanti } @Override - public boolean lessOrEqualAux(NonInterference other) throws SemanticException { + public boolean lessOrEqualAux( + NonInterference other) + throws SemanticException { return compare(other) && compareGuards(other); } - private boolean compare(NonInterference other) { + private boolean compare( + NonInterference other) { // HL // | \ // HH LL @@ -208,7 +220,9 @@ private boolean compare(NonInterference other) { return confidentiality && integrity; } - private boolean compareGuards(NonInterference other) throws SemanticException { + private boolean compareGuards( + NonInterference other) + throws SemanticException { if (guards == null) return true; if (other.guards == null) @@ -232,7 +246,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -258,13 +273,16 @@ public String toString() { } @Override - public DomainRepresentation representation() { + public StructuredRepresentation representation() { if (isBottom()) return Lattice.bottomRepresentation(); return new StringRepresentation((isHighConfidentiality() ? "H" : "L") + (isHighIntegrity() ? "H" : "L")); } - private NonInterference state(NonInterference state, ProgramPoint pp) throws SemanticException { + private NonInterference state( + NonInterference state, + ProgramPoint pp) + throws SemanticException { if (state.guards == null || state.guards.isEmpty()) // we return LH since that is the lowest non-error state return mkLowHigh(); @@ -303,68 +321,119 @@ private NonInterference mkHighLow() { } @Override - public InferredPair evalSkip(Skip skip, NonInterference state, ProgramPoint pp) + public InferredPair evalSkip( + Skip skip, + NonInterference state, + ProgramPoint pp, + SemanticOracle oracle) throws SemanticException { return new InferredPair<>(this, bottom(), state(state, pp)); } @Override - public InferredPair evalPushAny(PushAny pushAny, NonInterference state, ProgramPoint pp) + public InferredPair evalPushAny( + PushAny pushAny, + NonInterference state, + ProgramPoint pp, + SemanticOracle oracle) throws SemanticException { return new InferredPair<>(this, top(), state(state, pp)); } @Override - public InferredPair evalTypeConv(BinaryExpression conv, NonInterference left, - NonInterference right, NonInterference state, ProgramPoint pp) throws SemanticException { + public InferredPair evalTypeConv( + BinaryExpression conv, + NonInterference left, + NonInterference right, + NonInterference state, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { return new InferredPair<>(this, left, state(state, pp)); } @Override - public InferredPair evalTypeCast(BinaryExpression cast, NonInterference left, - NonInterference right, NonInterference state, ProgramPoint pp) throws SemanticException { + public InferredPair evalTypeCast( + BinaryExpression cast, + NonInterference left, + NonInterference right, + NonInterference state, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { return new InferredPair<>(this, left, state(state, pp)); } @Override - public InferredPair evalNullConstant(NonInterference state, ProgramPoint pp) + public InferredPair evalNullConstant( + NonInterference state, + ProgramPoint pp, + SemanticOracle oracle) throws SemanticException { return new InferredPair<>(this, mkLowHigh(), state(state, pp)); } @Override - public InferredPair evalNonNullConstant(Constant constant, NonInterference state, - ProgramPoint pp) throws SemanticException { + public InferredPair evalNonNullConstant( + Constant constant, + NonInterference state, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { return new InferredPair<>(this, mkLowHigh(), state(state, pp)); } @Override - public InferredPair evalUnaryExpression(UnaryOperator operator, NonInterference arg, - NonInterference state, ProgramPoint pp) throws SemanticException { + public InferredPair evalUnaryExpression( + UnaryOperator operator, + NonInterference arg, + NonInterference state, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { return new InferredPair<>(this, arg, state(state, pp)); } @Override - public InferredPair evalBinaryExpression(BinaryOperator operator, NonInterference left, - NonInterference right, NonInterference state, ProgramPoint pp) throws SemanticException { + public InferredPair evalBinaryExpression( + BinaryOperator operator, + NonInterference left, + NonInterference right, + NonInterference state, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { return new InferredPair<>(this, left.lub(right), state(state, pp)); } @Override - public InferredPair evalTernaryExpression(TernaryOperator operator, NonInterference left, - NonInterference middle, NonInterference right, NonInterference state, ProgramPoint pp) + public InferredPair evalTernaryExpression( + TernaryOperator operator, + NonInterference left, + NonInterference middle, + NonInterference right, + NonInterference state, + ProgramPoint pp, + SemanticOracle oracle) throws SemanticException { return new InferredPair<>(this, left.lub(middle).lub(right), state(state, pp)); } @Override - public InferredPair evalIdentifier(Identifier id, - InferenceSystem environment, ProgramPoint pp) throws SemanticException { - return new InferredPair<>(this, variable(id, pp), state(environment.getExecutionState(), pp)); + public InferredPair evalIdentifier( + Identifier id, + InferenceSystem environment, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + return new InferredPair<>(this, fixedVariable(id, pp, oracle), state(environment.getExecutionState(), pp)); } @Override - public NonInterference variable(Identifier id, ProgramPoint pp) { + public NonInterference fixedVariable( + Identifier id, + ProgramPoint pp, + SemanticOracle oracle) { Annotations annots = id.getAnnotations(); if (annots.isEmpty()) return mkHighLow(); @@ -383,14 +452,14 @@ else if (highInt) } @Override - public boolean tracksIdentifiers(Identifier id) { - return true; - } - - @Override - public InferenceSystem assume(InferenceSystem environment, - ValueExpression expression, ProgramPoint src, ProgramPoint dest) throws SemanticException { - InferredPair eval = eval(expression, environment, src); + public InferenceSystem assume( + InferenceSystem environment, + ValueExpression expression, + ProgramPoint src, + ProgramPoint dest, + SemanticOracle oracle) + throws SemanticException { + InferredPair eval = eval(expression, environment, src, oracle); NonInterference inf = eval.getInferred(); inf.guards = new IdentityHashMap<>(); if (eval.getState().guards != null) diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/nonRedundantSet/NonRedundantPowerset.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/nonRedundantSet/NonRedundantPowerset.java index cd3924d8a..70ae4f6e3 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/nonRedundantSet/NonRedundantPowerset.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/nonRedundantSet/NonRedundantPowerset.java @@ -4,12 +4,14 @@ import it.unive.lisa.analysis.ScopeToken; import it.unive.lisa.analysis.SemanticDomain; import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.SemanticOracle; +import it.unive.lisa.analysis.lattices.Satisfiability; import it.unive.lisa.analysis.lattices.SetLattice; -import it.unive.lisa.analysis.representation.DomainRepresentation; -import it.unive.lisa.analysis.representation.StringRepresentation; import it.unive.lisa.program.cfg.ProgramPoint; import it.unive.lisa.symbolic.SymbolicExpression; import it.unive.lisa.symbolic.value.Identifier; +import it.unive.lisa.util.representation.StringRepresentation; +import it.unive.lisa.util.representation.StructuredRepresentation; import java.util.HashSet; import java.util.Set; import java.util.SortedSet; @@ -52,7 +54,10 @@ public abstract class NonRedundantPowerset elements, boolean isTop, T valueDomain) { + public NonRedundantPowerset( + SortedSet elements, + boolean isTop, + T valueDomain) { super(elements, isTop); this.valueDomain = valueDomain; } @@ -112,7 +117,8 @@ public boolean isTop() { * removed of redundancy. */ @Override - public C lubAux(C other) + public C lubAux( + C other) throws SemanticException { Set lubSet = new HashSet(this.elements); lubSet.addAll(other.elements); @@ -120,7 +126,8 @@ public C lubAux(C other) } @Override - public C glbAux(C other) + public C glbAux( + C other) throws SemanticException { Set glbSet = new TreeSet<>(); for (T s1 : this.elements) @@ -145,7 +152,9 @@ public C glbAux(C other) * * @throws SemanticException if an error occurs during the computation */ - protected C EgliMilnerConnector(C other) throws SemanticException { + protected C EgliMilnerConnector( + C other) + throws SemanticException { Set unionSet = new HashSet(this.elements); unionSet.addAll(other.elements); T completeLub = valueDomain.bottom(); @@ -190,7 +199,9 @@ protected C EgliMilnerConnector(C other) throws SemanticException { * * @throws SemanticException if an error occurs during the computation */ - protected C extrapolationHeuristic(C other) throws SemanticException { + protected C extrapolationHeuristic( + C other) + throws SemanticException { Set extrapolatedSet = new TreeSet<>(); for (T s1 : this.elements) { for (T s2 : other.elements) { @@ -209,9 +220,8 @@ protected C extrapolationHeuristic(C other) throws SemanticException { * Given two subset S1 and S2 of the domain of a * lattice widening(S1, S2) = * h(S1, T2), where - * h is a - * {@link #extrapolationHeuristic(NonRedundantPowerset) widenining-connected - * extrapolation heuristic} and T2 is equal to: + * h is a widenining-connected extrapolation heuristic and + * T2 is equal to: *
    *
  • S2         if * S1EM S2
  • @@ -219,11 +229,12 @@ protected C extrapolationHeuristic(C other) throws SemanticException { *
* where ≤EM is the * {@link #lessOrEqualEgliMilner(NonRedundantPowerset) Egli-Milner relation} - * and +EM is an - * {@link #EgliMilnerConnector(NonRedundantPowerset) Egli-Milner connector}. + * and +EM is an Egli-Milner connector. */ @Override - public C wideningAux(C other) throws SemanticException { + public C wideningAux( + C other) + throws SemanticException { if (lessOrEqualEgliMilner(other)) { return extrapolationHeuristic(other).removeRedundancy(); } else { @@ -238,7 +249,9 @@ public C wideningAux(C other) throws SemanticException { * s1 ≤ s2. */ @Override - public boolean lessOrEqualAux(C other) throws SemanticException { + public boolean lessOrEqualAux( + C other) + throws SemanticException { for (T s1 : this.elements) { boolean existsGreaterElement = false; for (T s2 : other.elements) { @@ -270,7 +283,9 @@ public boolean lessOrEqualAux(C other) throws SemanticException { * * @throws SemanticException if an error occurs during the computation */ - public boolean lessOrEqualEgliMilner(C other) throws SemanticException { + public boolean lessOrEqualEgliMilner( + C other) + throws SemanticException { if (lessOrEqual(other)) { if (!isBottom()) { for (T s2 : other.elements) { @@ -291,34 +306,50 @@ public boolean lessOrEqualEgliMilner(C other) throws SemanticException { } @Override - public C assign(I id, E expression, ProgramPoint pp) throws SemanticException { + public C assign( + I id, + E expression, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { Set newElements = new TreeSet<>(); for (T elem : this.elements) { - newElements.add(elem.assign(id, expression, pp)); + newElements.add(elem.assign(id, expression, pp, oracle)); } return mk(newElements).removeRedundancy(); } @Override - public C smallStepSemantics(E expression, ProgramPoint pp) throws SemanticException { + public C smallStepSemantics( + E expression, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { Set newElements = new TreeSet<>(); for (T elem : this.elements) { - newElements.add(elem.smallStepSemantics(expression, pp)); + newElements.add(elem.smallStepSemantics(expression, pp, oracle)); } return mk(newElements).removeRedundancy(); } @Override - public C assume(E expression, ProgramPoint src, ProgramPoint dest) throws SemanticException { + public C assume( + E expression, + ProgramPoint src, + ProgramPoint dest, + SemanticOracle oracle) + throws SemanticException { Set newElements = new TreeSet<>(); for (T elem : this.elements) { - newElements.add(elem.assume(expression, src, dest)); + newElements.add(elem.assume(expression, src, dest, oracle)); } return mk(newElements).removeRedundancy(); } @Override - public C forgetIdentifier(Identifier id) throws SemanticException { + public C forgetIdentifier( + Identifier id) + throws SemanticException { Set newElements = new TreeSet<>(); for (T elem : this.elements) { newElements.add(elem.forgetIdentifier(id)); @@ -327,7 +358,9 @@ public C forgetIdentifier(Identifier id) throws SemanticException { } @Override - public C forgetIdentifiersIf(Predicate test) throws SemanticException { + public C forgetIdentifiersIf( + Predicate test) + throws SemanticException { Set newElements = new TreeSet<>(); for (T elem : this.elements) { newElements.add(elem.forgetIdentifiersIf(test)); @@ -336,7 +369,9 @@ public C forgetIdentifiersIf(Predicate test) throws SemanticExceptio } @Override - public C pushScope(ScopeToken token) throws SemanticException { + public C pushScope( + ScopeToken token) + throws SemanticException { Set newElements = new TreeSet<>(); for (T elem : this.elements) { newElements.add(elem.pushScope(token)); @@ -345,7 +380,9 @@ public C pushScope(ScopeToken token) throws SemanticException { } @Override - public C popScope(ScopeToken token) throws SemanticException { + public C popScope( + ScopeToken token) + throws SemanticException { Set newElements = new TreeSet<>(); for (T elem : this.elements) { newElements.add(elem.popScope(token)); @@ -354,7 +391,7 @@ public C popScope(ScopeToken token) throws SemanticException { } @Override - public DomainRepresentation representation() { + public StructuredRepresentation representation() { if (isBottom()) return Lattice.bottomRepresentation(); @@ -376,7 +413,8 @@ public DomainRepresentation representation() { } @Override - public C mk(Set set) { + public C mk( + Set set) { SortedSet sorted = set instanceof SortedSet ? (SortedSet) set : new TreeSet<>(set); if (set.isEmpty()) return mk(sorted, false, this.valueDomain); @@ -400,16 +438,21 @@ public C mk(Set set) { * @return a new concrete instance of {@link NonRedundantPowerset} with the * given configuration passed */ - public abstract C mk(SortedSet set, boolean isTop, T valueDomain); + public abstract C mk( + SortedSet set, + boolean isTop, + T valueDomain); @Override - public Satisfiability satisfies(E expression, ProgramPoint pp) throws SemanticException { - + public Satisfiability satisfies( + E expression, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { Set setSatisf = new HashSet(); - for (T element : this.elements) { - setSatisf.add(element.satisfies(expression, pp)); - } + for (T element : this.elements) + setSatisf.add(element.satisfies(expression, pp, oracle)); if ((setSatisf.contains(Satisfiability.SATISFIED) && setSatisf.contains(Satisfiability.NOT_SATISFIED)) || setSatisf.contains(Satisfiability.UNKNOWN)) @@ -433,7 +476,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/nonRedundantSet/NonRedundantPowersetOfBaseNonRelationalValueDomain.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/nonRedundantSet/NonRedundantPowersetOfBaseNonRelationalValueDomain.java index 7ffd551b4..f2ea3eb70 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/nonRedundantSet/NonRedundantPowersetOfBaseNonRelationalValueDomain.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/nonRedundantSet/NonRedundantPowersetOfBaseNonRelationalValueDomain.java @@ -2,16 +2,17 @@ import it.unive.lisa.analysis.BaseLattice; import it.unive.lisa.analysis.Lattice; -import it.unive.lisa.analysis.SemanticDomain.Satisfiability; import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.SemanticOracle; +import it.unive.lisa.analysis.lattices.Satisfiability; import it.unive.lisa.analysis.nonrelational.value.BaseNonRelationalValueDomain; import it.unive.lisa.analysis.nonrelational.value.NonRelationalValueDomain; -import it.unive.lisa.analysis.representation.DomainRepresentation; -import it.unive.lisa.analysis.representation.SetRepresentation; import it.unive.lisa.program.cfg.ProgramPoint; import it.unive.lisa.symbolic.value.Constant; import it.unive.lisa.symbolic.value.operator.binary.BinaryOperator; import it.unive.lisa.symbolic.value.operator.unary.UnaryOperator; +import it.unive.lisa.util.representation.SetRepresentation; +import it.unive.lisa.util.representation.StructuredRepresentation; import java.util.Collections; import java.util.SortedSet; import java.util.TreeSet; @@ -35,7 +36,8 @@ public abstract class NonRedundantPowersetOfBaseNonRelationalValueDomain< C extends NonRedundantPowersetOfBaseNonRelationalValueDomain, E extends BaseNonRelationalValueDomain> - implements BaseNonRelationalValueDomain { + implements + BaseNonRelationalValueDomain { /** * The set that containing the elements. @@ -55,7 +57,9 @@ public abstract class NonRedundantPowersetOfBaseNonRelationalValueDomain< * @param elements the set of elements in the set * @param element the underlying {@link BaseNonRelationalValueDomain} */ - protected NonRedundantPowersetOfBaseNonRelationalValueDomain(SortedSet elements, E element) { + protected NonRedundantPowersetOfBaseNonRelationalValueDomain( + SortedSet elements, + E element) { elementsSet = new TreeSet<>(elements); valueDomain = element.bottom(); } @@ -70,7 +74,8 @@ protected NonRedundantPowersetOfBaseNonRelationalValueDomain(SortedSet elemen * @return a new concrete instance of {@link NonRedundantPowerset} * containing the elements of the given set */ - protected abstract C mk(SortedSet elements); + protected abstract C mk( + SortedSet elements); /** * Yields a new concrete set of elements equivalent to this but that is not @@ -150,7 +155,10 @@ protected C removeOverlapping() throws SemanticException { * * @throws SemanticException if an error occurs during the computation */ - protected E removeOverlappingBetweenElements(E e1, E e2) throws SemanticException { + protected E removeOverlappingBetweenElements( + E e1, + E e2) + throws SemanticException { return e1.lub(e2); } @@ -171,7 +179,9 @@ protected E removeOverlappingBetweenElements(E e1, E e2) throws SemanticExceptio * * @throws SemanticException if an error occurs during the computation */ - protected C EgliMilnerConnector(C other) throws SemanticException { + protected C EgliMilnerConnector( + C other) + throws SemanticException { SortedSet newSet = new TreeSet<>(); if (elementsSet.isEmpty() && other.elementsSet.isEmpty()) return mk(newSet); @@ -185,7 +195,7 @@ protected C EgliMilnerConnector(C other) throws SemanticException { } @Override - public DomainRepresentation representation() { + public StructuredRepresentation representation() { if (isBottom()) return Lattice.bottomRepresentation(); @@ -207,7 +217,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -234,14 +245,18 @@ public boolean equals(Object obj) { * removed of redundancy. */ @Override - public C lubAux(C other) throws SemanticException { + public C lubAux( + C other) + throws SemanticException { SortedSet lubSet = new TreeSet<>(elementsSet); lubSet.addAll(other.elementsSet); return mk(lubSet).removeRedundancy().removeOverlapping(); } @Override - public C glbAux(C other) throws SemanticException { + public C glbAux( + C other) + throws SemanticException { SortedSet glbSet = new TreeSet<>(); for (E s1 : elementsSet) for (E s2 : other.elementsSet) @@ -280,7 +295,9 @@ public C glbAux(C other) throws SemanticException { * * @throws SemanticException if an error occurs during the computation */ - protected C extrapolationHeuristic(C other) throws SemanticException { + protected C extrapolationHeuristic( + C other) + throws SemanticException { SortedSet extrapolatedSet = new TreeSet<>(); for (E s1 : elementsSet) for (E s2 : other.elementsSet) @@ -297,10 +314,8 @@ protected C extrapolationHeuristic(C other) throws SemanticException { * Given two subset S1 and S2 of the domain of a * lattice widening(S1, S2) = * h(S1, T2), where - * h is a - * {@link #extrapolationHeuristic(NonRedundantPowersetOfBaseNonRelationalValueDomain) - * widenining-connected extrapolation heuristic} and T2 is equal - * to: + * h is a widenining-connected extrapolation heuristic and + * T2 is equal to: *
    *
  • S2         if * S1EM S2
  • @@ -308,12 +323,12 @@ protected C extrapolationHeuristic(C other) throws SemanticException { *
* where ≤EM is the * {@link #lessOrEqualEgliMilner(NonRedundantPowersetOfBaseNonRelationalValueDomain) - * Egli-Milner relation} and +EM is an - * {@link #EgliMilnerConnector(NonRedundantPowersetOfBaseNonRelationalValueDomain) - * Egli-Milner connector}. + * Egli-Milner relation} and +EM is an Egli-Milner connector. */ @Override - public C wideningAux(C other) throws SemanticException { + public C wideningAux( + C other) + throws SemanticException { C arg = lessOrEqualEgliMilner(other) ? other : EgliMilnerConnector(other); return extrapolationHeuristic(arg).removeRedundancy().removeOverlapping(); } @@ -336,7 +351,9 @@ public C wideningAux(C other) throws SemanticException { * * @throws SemanticException if an error occurs during the computation */ - public boolean lessOrEqualEgliMilner(C other) throws SemanticException { + public boolean lessOrEqualEgliMilner( + C other) + throws SemanticException { if (!lessOrEqual(other)) return false; if (isBottom()) @@ -361,7 +378,9 @@ public boolean lessOrEqualEgliMilner(C other) throws SemanticException { * s1 ≤ s2. */ @Override - public boolean lessOrEqualAux(C other) throws SemanticException { + public boolean lessOrEqualAux( + C other) + throws SemanticException { for (E s1 : elementsSet) { boolean existsGreaterElement = false; for (E s2 : other.elementsSet) @@ -376,37 +395,52 @@ public boolean lessOrEqualAux(C other) throws SemanticException { } @Override - public C evalNonNullConstant(Constant constant, ProgramPoint pp) throws SemanticException { + public C evalNonNullConstant( + Constant constant, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { SortedSet newSet = new TreeSet<>(); - newSet.add(valueDomain.evalNonNullConstant(constant, pp)); + newSet.add(valueDomain.evalNonNullConstant(constant, pp, oracle)); return mk(newSet).removeRedundancy().removeOverlapping(); } @Override - public C evalUnaryExpression(UnaryOperator operator, C arg, ProgramPoint pp) throws SemanticException { + public C evalUnaryExpression( + UnaryOperator operator, + C arg, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { SortedSet newSet = new TreeSet<>(); for (E s : arg.elementsSet) - newSet.add(valueDomain.evalUnaryExpression(operator, s, pp)); + newSet.add(valueDomain.evalUnaryExpression(operator, s, pp, oracle)); return mk(newSet).removeRedundancy().removeOverlapping(); } @Override - public C evalBinaryExpression(BinaryOperator operator, + public C evalBinaryExpression( + BinaryOperator operator, C left, C right, - ProgramPoint pp) throws SemanticException { + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { SortedSet newSet = new TreeSet<>(); for (E sLeft : left.elementsSet) for (E sRight : right.elementsSet) - newSet.add(valueDomain.evalBinaryExpression(operator, sLeft, sRight, pp)); + newSet.add(valueDomain.evalBinaryExpression(operator, sLeft, sRight, pp, oracle)); return mk(newSet).removeRedundancy().removeOverlapping(); } @Override - public Satisfiability satisfiesBinaryExpression(BinaryOperator operator, + public Satisfiability satisfiesBinaryExpression( + BinaryOperator operator, C left, C right, - ProgramPoint pp) throws SemanticException { + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { if (left.isTop() || right.isTop()) return Satisfiability.UNKNOWN; @@ -414,7 +448,7 @@ public Satisfiability satisfiesBinaryExpression(BinaryOperator operator, Satisfiability sat = Satisfiability.BOTTOM; for (E sLeft : left.elementsSet) for (E sRight : right.elementsSet) - sat = sat.lub(valueDomain.satisfiesBinaryExpression(operator, sLeft, sRight, pp)); + sat = sat.lub(valueDomain.satisfiesBinaryExpression(operator, sLeft, sRight, pp, oracle)); return sat; } diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/nonRedundantSet/NonRedundantPowersetOfInterval.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/nonRedundantSet/NonRedundantPowersetOfInterval.java index 5edda304a..849b8f050 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/nonRedundantSet/NonRedundantPowersetOfInterval.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/nonRedundantSet/NonRedundantPowersetOfInterval.java @@ -1,6 +1,7 @@ package it.unive.lisa.analysis.nonRedundantSet; import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.SemanticOracle; import it.unive.lisa.analysis.nonrelational.value.ValueEnvironment; import it.unive.lisa.analysis.numeric.Interval; import it.unive.lisa.program.cfg.ProgramPoint; @@ -27,7 +28,8 @@ * widening} and others operations needed to calculate the previous ones). */ public class NonRedundantPowersetOfInterval - extends NonRedundantPowersetOfBaseNonRelationalValueDomain { + extends + NonRedundantPowersetOfBaseNonRelationalValueDomain { /** * Constructs an empty non redundant set of intervals. @@ -41,7 +43,8 @@ public NonRedundantPowersetOfInterval() { * * @param elements the set of intervals */ - public NonRedundantPowersetOfInterval(SortedSet elements) { + public NonRedundantPowersetOfInterval( + SortedSet elements) { super(elements, Interval.BOTTOM); } @@ -62,7 +65,8 @@ public NonRedundantPowersetOfInterval(SortedSet elements) { * {@link #middlePoint(Interval) middle point}). */ @Override - protected NonRedundantPowersetOfInterval EgliMilnerConnector(NonRedundantPowersetOfInterval other) + protected NonRedundantPowersetOfInterval EgliMilnerConnector( + NonRedundantPowersetOfInterval other) throws SemanticException { SortedSet newElementsSet = new TreeSet<>(); SortedSet notCoverSet = new TreeSet<>(); @@ -117,7 +121,8 @@ protected NonRedundantPowersetOfInterval EgliMilnerConnector(NonRedundantPowerse * * @return the middle point of the interval */ - protected MathNumber middlePoint(Interval interval) { + protected MathNumber middlePoint( + Interval interval) { if (interval.interval.isFinite()) return interval.interval.getLow().add(interval.interval.getHigh()).divide(new MathNumber(2)); else if (interval.interval.getHigh().isFinite() && !interval.interval.getLow().isFinite()) @@ -135,17 +140,18 @@ public ValueEnvironment assumeBinaryExpression( ValueExpression left, ValueExpression right, ProgramPoint src, - ProgramPoint dest) + ProgramPoint dest, + SemanticOracle oracle) throws SemanticException { Identifier id; NonRedundantPowersetOfInterval eval; boolean rightIsExpr; if (left instanceof Identifier) { - eval = eval(right, environment, src); + eval = eval(right, environment, src, oracle); id = (Identifier) left; rightIsExpr = true; } else if (right instanceof Identifier) { - eval = eval(left, environment, src); + eval = eval(left, environment, src, oracle); id = (Identifier) right; rightIsExpr = false; } else @@ -210,7 +216,8 @@ else if (lowIsMinusInfinity) } @Override - protected NonRedundantPowersetOfInterval mk(SortedSet elements) { + protected NonRedundantPowersetOfInterval mk( + SortedSet elements) { return new NonRedundantPowersetOfInterval(elements); } diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/nonRedundantSet/ValueNonRedundantSet.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/nonRedundantSet/ValueNonRedundantSet.java index afe05665f..8351ac779 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/nonRedundantSet/ValueNonRedundantSet.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/nonRedundantSet/ValueNonRedundantSet.java @@ -15,7 +15,8 @@ * @param the concrete type of the elements in the sets */ public class ValueNonRedundantSet> - extends NonRedundantPowerset, T, ValueExpression, Identifier> { + extends + NonRedundantPowerset, T, ValueExpression, Identifier> { /** * Builds the value non redundant set. @@ -25,12 +26,18 @@ public class ValueNonRedundantSet> * @param valueDomain an element representing the types of elements in the * set */ - public ValueNonRedundantSet(SortedSet elements, boolean isTop, T valueDomain) { + public ValueNonRedundantSet( + SortedSet elements, + boolean isTop, + T valueDomain) { super(elements, isTop, valueDomain); } @Override - public ValueNonRedundantSet mk(SortedSet set, boolean isTop, T valueDomain) { + public ValueNonRedundantSet mk( + SortedSet set, + boolean isTop, + T valueDomain) { return new ValueNonRedundantSet<>(set, isTop, valueDomain); } @@ -44,4 +51,9 @@ public boolean isTop() { return this.isTop && this.elements.isEmpty(); } + @Override + public boolean knowsIdentifier( + Identifier id) { + return elements.stream().anyMatch(e -> e.knowsIdentifier(id)); + } } diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/numeric/IntegerConstantPropagation.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/numeric/IntegerConstantPropagation.java index 7f592a9a4..4daabecb7 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/numeric/IntegerConstantPropagation.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/numeric/IntegerConstantPropagation.java @@ -2,12 +2,11 @@ import it.unive.lisa.analysis.BaseLattice; import it.unive.lisa.analysis.Lattice; -import it.unive.lisa.analysis.SemanticDomain.Satisfiability; import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.SemanticOracle; +import it.unive.lisa.analysis.lattices.Satisfiability; import it.unive.lisa.analysis.nonrelational.value.BaseNonRelationalValueDomain; import it.unive.lisa.analysis.nonrelational.value.ValueEnvironment; -import it.unive.lisa.analysis.representation.DomainRepresentation; -import it.unive.lisa.analysis.representation.StringRepresentation; import it.unive.lisa.program.cfg.ProgramPoint; import it.unive.lisa.symbolic.value.Constant; import it.unive.lisa.symbolic.value.Identifier; @@ -28,6 +27,8 @@ import it.unive.lisa.symbolic.value.operator.ternary.TernaryOperator; import it.unive.lisa.symbolic.value.operator.unary.NumericNegation; import it.unive.lisa.symbolic.value.operator.unary.UnaryOperator; +import it.unive.lisa.util.representation.StringRepresentation; +import it.unive.lisa.util.representation.StructuredRepresentation; /** * The overflow-insensitive basic integer constant propagation abstract domain, @@ -57,7 +58,10 @@ public IntegerConstantPropagation() { this(null, true, false); } - private IntegerConstantPropagation(Integer value, boolean isTop, boolean isBottom) { + private IntegerConstantPropagation( + Integer value, + boolean isTop, + boolean isBottom) { this.value = value; this.isTop = isTop; this.isBottom = isBottom; @@ -68,11 +72,14 @@ private IntegerConstantPropagation(Integer value, boolean isTop, boolean isBotto * * @param value the constant */ - public IntegerConstantPropagation(Integer value) { + public IntegerConstantPropagation( + Integer value) { this(value, false, false); } - private IntegerConstantPropagation(boolean isTop, boolean isBottom) { + private IntegerConstantPropagation( + boolean isTop, + boolean isBottom) { this(null, isTop, isBottom); } @@ -92,7 +99,7 @@ public IntegerConstantPropagation bottom() { } @Override - public DomainRepresentation representation() { + public StructuredRepresentation representation() { if (isBottom()) return Lattice.bottomRepresentation(); if (isTop()) @@ -102,20 +109,28 @@ public DomainRepresentation representation() { } @Override - public IntegerConstantPropagation evalNullConstant(ProgramPoint pp) { + public IntegerConstantPropagation evalNullConstant( + ProgramPoint pp, + SemanticOracle oracle) { return top(); } @Override - public IntegerConstantPropagation evalNonNullConstant(Constant constant, ProgramPoint pp) { + public IntegerConstantPropagation evalNonNullConstant( + Constant constant, + ProgramPoint pp, + SemanticOracle oracle) { if (constant.getValue() instanceof Integer) return new IntegerConstantPropagation((Integer) constant.getValue()); return top(); } @Override - public IntegerConstantPropagation evalUnaryExpression(UnaryOperator operator, IntegerConstantPropagation arg, - ProgramPoint pp) { + public IntegerConstantPropagation evalUnaryExpression( + UnaryOperator operator, + IntegerConstantPropagation arg, + ProgramPoint pp, + SemanticOracle oracle) { if (arg.isTop()) return top(); @@ -127,8 +142,12 @@ public IntegerConstantPropagation evalUnaryExpression(UnaryOperator operator, In } @Override - public IntegerConstantPropagation evalBinaryExpression(BinaryOperator operator, IntegerConstantPropagation left, - IntegerConstantPropagation right, ProgramPoint pp) { + public IntegerConstantPropagation evalBinaryExpression( + BinaryOperator operator, + IntegerConstantPropagation left, + IntegerConstantPropagation right, + ProgramPoint pp, + SemanticOracle oracle) { if (operator instanceof AdditionOperator) return left.isTop() || right.isTop() ? top() : new IntegerConstantPropagation(left.value + right.value); @@ -158,19 +177,27 @@ else if (operator instanceof SubtractionOperator) } @Override - public IntegerConstantPropagation evalTernaryExpression(TernaryOperator operator, + public IntegerConstantPropagation evalTernaryExpression( + TernaryOperator operator, IntegerConstantPropagation left, - IntegerConstantPropagation middle, IntegerConstantPropagation right, ProgramPoint pp) { + IntegerConstantPropagation middle, + IntegerConstantPropagation right, + ProgramPoint pp, + SemanticOracle oracle) { return top(); } @Override - public IntegerConstantPropagation lubAux(IntegerConstantPropagation other) throws SemanticException { + public IntegerConstantPropagation lubAux( + IntegerConstantPropagation other) + throws SemanticException { return TOP; } @Override - public boolean lessOrEqualAux(IntegerConstantPropagation other) throws SemanticException { + public boolean lessOrEqualAux( + IntegerConstantPropagation other) + throws SemanticException { return false; } @@ -185,7 +212,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -206,8 +234,12 @@ public boolean equals(Object obj) { } @Override - public Satisfiability satisfiesBinaryExpression(BinaryOperator operator, IntegerConstantPropagation left, - IntegerConstantPropagation right, ProgramPoint pp) { + public Satisfiability satisfiesBinaryExpression( + BinaryOperator operator, + IntegerConstantPropagation left, + IntegerConstantPropagation right, + ProgramPoint pp, + SemanticOracle oracle) { if (left.isTop() || right.isTop()) return Satisfiability.UNKNOWN; @@ -237,16 +269,17 @@ public ValueEnvironment assumeBinaryExpression( ValueExpression left, ValueExpression right, ProgramPoint src, - ProgramPoint dest) + ProgramPoint dest, + SemanticOracle oracle) throws SemanticException { if (operator == ComparisonEq.INSTANCE) if (left instanceof Identifier) { - IntegerConstantPropagation eval = eval(right, environment, src); + IntegerConstantPropagation eval = eval(right, environment, src, oracle); if (eval.isBottom()) return environment.bottom(); return environment.putState((Identifier) left, eval); } else if (right instanceof Identifier) { - IntegerConstantPropagation eval = eval(left, environment, src); + IntegerConstantPropagation eval = eval(left, environment, src, oracle); if (eval.isBottom()) return environment.bottom(); return environment.putState((Identifier) right, eval); diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/numeric/Interval.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/numeric/Interval.java index 473837dba..2c4502f93 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/numeric/Interval.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/numeric/Interval.java @@ -1,14 +1,12 @@ package it.unive.lisa.analysis.numeric; -import it.unive.lisa.FallbackImplementation; import it.unive.lisa.analysis.BaseLattice; import it.unive.lisa.analysis.Lattice; -import it.unive.lisa.analysis.SemanticDomain.Satisfiability; import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.SemanticOracle; +import it.unive.lisa.analysis.lattices.Satisfiability; import it.unive.lisa.analysis.nonrelational.value.BaseNonRelationalValueDomain; import it.unive.lisa.analysis.nonrelational.value.ValueEnvironment; -import it.unive.lisa.analysis.representation.DomainRepresentation; -import it.unive.lisa.analysis.representation.StringRepresentation; import it.unive.lisa.program.cfg.ProgramPoint; import it.unive.lisa.symbolic.value.Constant; import it.unive.lisa.symbolic.value.Identifier; @@ -31,6 +29,8 @@ import it.unive.lisa.symbolic.value.operator.unary.UnaryOperator; import it.unive.lisa.util.numeric.IntInterval; import it.unive.lisa.util.numeric.MathNumber; +import it.unive.lisa.util.representation.StringRepresentation; +import it.unive.lisa.util.representation.StructuredRepresentation; /** * The overflow-insensitive interval abstract domain, approximating integer @@ -44,7 +44,6 @@ * * @author Vincenzo Arceri */ -@FallbackImplementation public class Interval implements BaseNonRelationalValueDomain, Comparable { /** @@ -72,7 +71,8 @@ public class Interval implements BaseNonRelationalValueDomain, Compara * * @param interval the underlying {@link IntInterval} */ - public Interval(IntInterval interval) { + public Interval( + IntInterval interval) { this.interval = interval; } @@ -82,7 +82,9 @@ public Interval(IntInterval interval) { * @param low the lower bound * @param high the higher bound */ - public Interval(MathNumber low, MathNumber high) { + public Interval( + MathNumber low, + MathNumber high) { this(new IntInterval(low, high)); } @@ -92,7 +94,9 @@ public Interval(MathNumber low, MathNumber high) { * @param low the lower bound * @param high the higher bound */ - public Interval(int low, int high) { + public Interval( + int low, + int high) { this(new IntInterval(low, high)); } @@ -124,7 +128,7 @@ public boolean isBottom() { } @Override - public DomainRepresentation representation() { + public StructuredRepresentation representation() { if (isBottom()) return Lattice.bottomRepresentation(); @@ -137,7 +141,10 @@ public String toString() { } @Override - public Interval evalNonNullConstant(Constant constant, ProgramPoint pp) { + public Interval evalNonNullConstant( + Constant constant, + ProgramPoint pp, + SemanticOracle oracle) { if (constant.getValue() instanceof Integer) { Integer i = (Integer) constant.getValue(); return new Interval(new MathNumber(i), new MathNumber(i)); @@ -147,7 +154,11 @@ public Interval evalNonNullConstant(Constant constant, ProgramPoint pp) { } @Override - public Interval evalUnaryExpression(UnaryOperator operator, Interval arg, ProgramPoint pp) { + public Interval evalUnaryExpression( + UnaryOperator operator, + Interval arg, + ProgramPoint pp, + SemanticOracle oracle) { if (operator == NumericNegation.INSTANCE) if (arg.isTop()) return top(); @@ -168,12 +179,18 @@ else if (operator == StringLength.INSTANCE) * * @return {@code true} if that condition holds */ - public boolean is(int n) { + public boolean is( + int n) { return !isBottom() && interval.is(n); } @Override - public Interval evalBinaryExpression(BinaryOperator operator, Interval left, Interval right, ProgramPoint pp) { + public Interval evalBinaryExpression( + BinaryOperator operator, + Interval left, + Interval right, + ProgramPoint pp, + SemanticOracle oracle) { if (!(operator instanceof DivisionOperator) && (left.isTop() || right.isTop())) // with div, we can return zero or bottom even if one of the // operands is top @@ -253,14 +270,17 @@ else if (left.interval.getLow().compareTo(MathNumber.ZERO) > 0) } @Override - public Interval lubAux(Interval other) throws SemanticException { + public Interval lubAux( + Interval other) + throws SemanticException { MathNumber newLow = interval.getLow().min(other.interval.getLow()); MathNumber newHigh = interval.getHigh().max(other.interval.getHigh()); return newLow.isMinusInfinity() && newHigh.isPlusInfinity() ? top() : new Interval(newLow, newHigh); } @Override - public Interval glbAux(Interval other) { + public Interval glbAux( + Interval other) { MathNumber newLow = interval.getLow().max(other.interval.getLow()); MathNumber newHigh = interval.getHigh().min(other.interval.getHigh()); @@ -270,7 +290,9 @@ public Interval glbAux(Interval other) { } @Override - public Interval wideningAux(Interval other) throws SemanticException { + public Interval wideningAux( + Interval other) + throws SemanticException { MathNumber newLow, newHigh; if (other.interval.getHigh().compareTo(interval.getHigh()) > 0) newHigh = MathNumber.PLUS_INFINITY; @@ -286,7 +308,9 @@ public Interval wideningAux(Interval other) throws SemanticException { } @Override - public Interval narrowingAux(Interval other) throws SemanticException { + public Interval narrowingAux( + Interval other) + throws SemanticException { MathNumber newLow, newHigh; newHigh = interval.getHigh().isInfinite() ? other.interval.getHigh() : interval.getHigh(); newLow = interval.getLow().isInfinite() ? other.interval.getLow() : interval.getLow(); @@ -294,14 +318,19 @@ public Interval narrowingAux(Interval other) throws SemanticException { } @Override - public boolean lessOrEqualAux(Interval other) throws SemanticException { + public boolean lessOrEqualAux( + Interval other) + throws SemanticException { return other.interval.includes(interval); } @Override - public Satisfiability satisfiesBinaryExpression(BinaryOperator operator, Interval left, Interval right, - ProgramPoint pp) { - + public Satisfiability satisfiesBinaryExpression( + BinaryOperator operator, + Interval left, + Interval right, + ProgramPoint pp, + SemanticOracle oracle) { if (left.isTop() || right.isTop()) return Satisfiability.UNKNOWN; @@ -319,9 +348,9 @@ else if (left.interval.isSingleton() && left.equals(right)) return Satisfiability.SATISFIED; return Satisfiability.UNKNOWN; } else if (operator == ComparisonGe.INSTANCE) - return satisfiesBinaryExpression(ComparisonLe.INSTANCE, right, left, pp); + return satisfiesBinaryExpression(ComparisonLe.INSTANCE, right, left, pp, oracle); else if (operator == ComparisonGt.INSTANCE) - return satisfiesBinaryExpression(ComparisonLt.INSTANCE, right, left, pp); + return satisfiesBinaryExpression(ComparisonLt.INSTANCE, right, left, pp, oracle); else if (operator == ComparisonLe.INSTANCE) { Interval glb = null; try { @@ -371,7 +400,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -394,17 +424,18 @@ public ValueEnvironment assumeBinaryExpression( ValueExpression left, ValueExpression right, ProgramPoint src, - ProgramPoint dest) + ProgramPoint dest, + SemanticOracle oracle) throws SemanticException { Identifier id; Interval eval; boolean rightIsExpr; if (left instanceof Identifier) { - eval = eval(right, environment, src); + eval = eval(right, environment, src, oracle); id = (Identifier) left; rightIsExpr = true; } else if (right instanceof Identifier) { - eval = eval(left, environment, src); + eval = eval(left, environment, src, oracle); id = (Identifier) right; rightIsExpr = false; } else @@ -453,7 +484,8 @@ else if (update.isBottom()) } @Override - public int compareTo(Interval o) { + public int compareTo( + Interval o) { if (isBottom()) return o.isBottom() ? 0 : -1; if (isTop()) diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/numeric/Parity.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/numeric/Parity.java index a6f40d368..0cda61424 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/numeric/Parity.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/numeric/Parity.java @@ -3,10 +3,9 @@ import it.unive.lisa.analysis.BaseLattice; import it.unive.lisa.analysis.Lattice; import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.SemanticOracle; import it.unive.lisa.analysis.nonrelational.value.BaseNonRelationalValueDomain; import it.unive.lisa.analysis.nonrelational.value.ValueEnvironment; -import it.unive.lisa.analysis.representation.DomainRepresentation; -import it.unive.lisa.analysis.representation.StringRepresentation; import it.unive.lisa.program.cfg.ProgramPoint; import it.unive.lisa.symbolic.value.Constant; import it.unive.lisa.symbolic.value.Identifier; @@ -21,6 +20,8 @@ import it.unive.lisa.symbolic.value.operator.binary.ComparisonEq; import it.unive.lisa.symbolic.value.operator.unary.NumericNegation; import it.unive.lisa.symbolic.value.operator.unary.UnaryOperator; +import it.unive.lisa.util.representation.StringRepresentation; +import it.unive.lisa.util.representation.StructuredRepresentation; /** * The overflow-insensitive Parity abstract domain, tracking if a numeric value @@ -70,7 +71,8 @@ public Parity() { * * @param parity the sign (0 = top, 1 = bottom, 2 = odd, 3 = even) */ - public Parity(byte parity) { + public Parity( + byte parity) { this.parity = parity; } @@ -85,7 +87,7 @@ public Parity bottom() { } @Override - public DomainRepresentation representation() { + public StructuredRepresentation representation() { if (isBottom()) return Lattice.bottomRepresentation(); if (isTop()) @@ -101,12 +103,17 @@ public DomainRepresentation representation() { } @Override - public Parity evalNullConstant(ProgramPoint pp) { + public Parity evalNullConstant( + ProgramPoint pp, + SemanticOracle oracle) { return top(); } @Override - public Parity evalNonNullConstant(Constant constant, ProgramPoint pp) { + public Parity evalNonNullConstant( + Constant constant, + ProgramPoint pp, + SemanticOracle oracle) { if (constant.getValue() instanceof Integer) { Integer i = (Integer) constant.getValue(); return i % 2 == 0 ? EVEN : ODD; @@ -134,14 +141,23 @@ public boolean isOdd() { } @Override - public Parity evalUnaryExpression(UnaryOperator operator, Parity arg, ProgramPoint pp) { + public Parity evalUnaryExpression( + UnaryOperator operator, + Parity arg, + ProgramPoint pp, + SemanticOracle oracle) { if (operator == NumericNegation.INSTANCE) return arg; return top(); } @Override - public Parity evalBinaryExpression(BinaryOperator operator, Parity left, Parity right, ProgramPoint pp) { + public Parity evalBinaryExpression( + BinaryOperator operator, + Parity left, + Parity right, + ProgramPoint pp, + SemanticOracle oracle) { if (left.isTop() || right.isTop()) return top(); @@ -167,12 +183,16 @@ else if (operator instanceof ModuloOperator || operator instanceof RemainderOper } @Override - public Parity lubAux(Parity other) throws SemanticException { + public Parity lubAux( + Parity other) + throws SemanticException { return TOP; } @Override - public boolean lessOrEqualAux(Parity other) throws SemanticException { + public boolean lessOrEqualAux( + Parity other) + throws SemanticException { return false; } @@ -185,7 +205,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -205,16 +226,17 @@ public ValueEnvironment assumeBinaryExpression( ValueExpression left, ValueExpression right, ProgramPoint src, - ProgramPoint dest) + ProgramPoint dest, + SemanticOracle oracle) throws SemanticException { if (operator == ComparisonEq.INSTANCE) if (left instanceof Identifier) { - Parity eval = eval(right, environment, src); + Parity eval = eval(right, environment, src, oracle); if (eval.isBottom()) return environment.bottom(); return environment.putState((Identifier) left, eval); } else if (right instanceof Identifier) { - Parity eval = eval(left, environment, src); + Parity eval = eval(left, environment, src, oracle); if (eval.isBottom()) return environment.bottom(); return environment.putState((Identifier) right, eval); diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/numeric/Sign.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/numeric/Sign.java index 05228fbfe..cc0eef8b7 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/numeric/Sign.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/numeric/Sign.java @@ -2,12 +2,11 @@ import it.unive.lisa.analysis.BaseLattice; import it.unive.lisa.analysis.Lattice; -import it.unive.lisa.analysis.SemanticDomain.Satisfiability; import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.SemanticOracle; +import it.unive.lisa.analysis.lattices.Satisfiability; import it.unive.lisa.analysis.nonrelational.value.BaseNonRelationalValueDomain; import it.unive.lisa.analysis.nonrelational.value.ValueEnvironment; -import it.unive.lisa.analysis.representation.DomainRepresentation; -import it.unive.lisa.analysis.representation.StringRepresentation; import it.unive.lisa.program.cfg.ProgramPoint; import it.unive.lisa.symbolic.value.Constant; import it.unive.lisa.symbolic.value.Identifier; @@ -28,6 +27,8 @@ import it.unive.lisa.symbolic.value.operator.ternary.TernaryOperator; import it.unive.lisa.symbolic.value.operator.unary.NumericNegation; import it.unive.lisa.symbolic.value.operator.unary.UnaryOperator; +import it.unive.lisa.util.representation.StringRepresentation; +import it.unive.lisa.util.representation.StructuredRepresentation; /** * The basic overflow-insensitive Sign abstract domain, tracking zero, strictly @@ -84,7 +85,8 @@ public Sign() { * @param sign the sign (0 = top, 1 = bottom, 2 = zero, 3 = negative, 4 = * positive) */ - public Sign(byte sign) { + public Sign( + byte sign) { this.sign = sign; } @@ -99,7 +101,12 @@ public Sign bottom() { } @Override - public DomainRepresentation representation() { + public String toString() { + return representation().toString(); + } + + @Override + public StructuredRepresentation representation() { if (isBottom()) return Lattice.bottomRepresentation(); if (isTop()) @@ -117,12 +124,17 @@ else if (this == POS) } @Override - public Sign evalNullConstant(ProgramPoint pp) { + public Sign evalNullConstant( + ProgramPoint pp, + SemanticOracle oracle) { return top(); } @Override - public Sign evalNonNullConstant(Constant constant, ProgramPoint pp) { + public Sign evalNonNullConstant( + Constant constant, + ProgramPoint pp, + SemanticOracle oracle) { if (constant.getValue() instanceof Integer) { Integer i = (Integer) constant.getValue(); return i == 0 ? ZERO : i > 0 ? POS : NEG; @@ -171,7 +183,11 @@ public Sign opposite() { } @Override - public Sign evalUnaryExpression(UnaryOperator operator, Sign arg, ProgramPoint pp) { + public Sign evalUnaryExpression( + UnaryOperator operator, + Sign arg, + ProgramPoint pp, + SemanticOracle oracle) { if (operator == NumericNegation.INSTANCE) if (arg.isPositive()) return NEG; @@ -185,7 +201,12 @@ else if (arg.isZero()) } @Override - public Sign evalBinaryExpression(BinaryOperator operator, Sign left, Sign right, ProgramPoint pp) { + public Sign evalBinaryExpression( + BinaryOperator operator, + Sign left, + Sign right, + ProgramPoint pp, + SemanticOracle oracle) { if (operator instanceof AdditionOperator) if (left.isZero()) return right; @@ -236,12 +257,16 @@ else if (left.equals(right)) } @Override - public Sign lubAux(Sign other) throws SemanticException { + public Sign lubAux( + Sign other) + throws SemanticException { return TOP; } @Override - public boolean lessOrEqualAux(Sign other) throws SemanticException { + public boolean lessOrEqualAux( + Sign other) + throws SemanticException { return false; } @@ -254,7 +279,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -268,8 +294,12 @@ public boolean equals(Object obj) { } @Override - public Satisfiability satisfiesBinaryExpression(BinaryOperator operator, Sign left, Sign right, - ProgramPoint pp) { + public Satisfiability satisfiesBinaryExpression( + BinaryOperator operator, + Sign left, + Sign right, + ProgramPoint pp, + SemanticOracle oracle) { if (left.isTop() || right.isTop()) return Satisfiability.UNKNOWN; @@ -299,7 +329,8 @@ else if (operator == ComparisonNe.INSTANCE) * * @return the satisfiability of {@code this = other} */ - public Satisfiability eq(Sign other) { + public Satisfiability eq( + Sign other) { if (!this.equals(other)) return Satisfiability.NOT_SATISFIED; else if (isZero()) @@ -316,7 +347,8 @@ else if (isZero()) * * @return the satisfiability of {@code this > other} */ - public Satisfiability gt(Sign other) { + public Satisfiability gt( + Sign other) { if (this.equals(other)) return this.isZero() ? Satisfiability.NOT_SATISFIED : Satisfiability.UNKNOWN; else if (this.isZero()) @@ -328,8 +360,13 @@ else if (this.isPositive()) } @Override - public Satisfiability satisfiesTernaryExpression(TernaryOperator operator, Sign left, Sign middle, Sign right, - ProgramPoint pp) { + public Satisfiability satisfiesTernaryExpression( + TernaryOperator operator, + Sign left, + Sign middle, + Sign right, + ProgramPoint pp, + SemanticOracle oracle) { return Satisfiability.UNKNOWN; } @@ -340,17 +377,18 @@ public ValueEnvironment assumeBinaryExpression( ValueExpression left, ValueExpression right, ProgramPoint src, - ProgramPoint dest) + ProgramPoint dest, + SemanticOracle oracle) throws SemanticException { Identifier id; Sign eval; boolean rightIsExpr; if (left instanceof Identifier) { - eval = eval(right, environment, src); + eval = eval(right, environment, src, oracle); id = (Identifier) left; rightIsExpr = true; } else if (right instanceof Identifier) { - eval = eval(left, environment, src); + eval = eval(left, environment, src, oracle); id = (Identifier) right; rightIsExpr = false; } else diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/CharInclusion.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/CharInclusion.java index cb618bcba..1b4ded9d8 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/CharInclusion.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/CharInclusion.java @@ -1,11 +1,10 @@ package it.unive.lisa.analysis.string; import it.unive.lisa.analysis.Lattice; -import it.unive.lisa.analysis.SemanticDomain.Satisfiability; import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.SemanticOracle; +import it.unive.lisa.analysis.lattices.Satisfiability; import it.unive.lisa.analysis.nonrelational.value.BaseNonRelationalValueDomain; -import it.unive.lisa.analysis.representation.DomainRepresentation; -import it.unive.lisa.analysis.representation.StringRepresentation; import it.unive.lisa.program.cfg.ProgramPoint; import it.unive.lisa.symbolic.value.Constant; import it.unive.lisa.symbolic.value.operator.binary.BinaryOperator; @@ -19,6 +18,8 @@ import it.unive.lisa.symbolic.value.operator.ternary.TernaryOperator; import it.unive.lisa.util.numeric.IntInterval; import it.unive.lisa.util.numeric.MathNumber; +import it.unive.lisa.util.representation.StringRepresentation; +import it.unive.lisa.util.representation.StructuredRepresentation; import java.util.Objects; import java.util.Set; import java.util.TreeSet; @@ -58,14 +59,17 @@ public CharInclusion() { * @param certainlyContained the set of certainly contained characters * @param maybeContained the set of maybe contained characters */ - public CharInclusion(Set certainlyContained, + public CharInclusion( + Set certainlyContained, Set maybeContained) { this.certainlyContained = certainlyContained; this.maybeContained = maybeContained; } @Override - public CharInclusion lubAux(CharInclusion other) throws SemanticException { + public CharInclusion lubAux( + CharInclusion other) + throws SemanticException { Set lubAuxCertainly = new TreeSet<>(); Set lubAuxMaybe; @@ -85,7 +89,9 @@ public CharInclusion lubAux(CharInclusion other) throws SemanticException { } @Override - public boolean lessOrEqualAux(CharInclusion other) throws SemanticException { + public boolean lessOrEqualAux( + CharInclusion other) + throws SemanticException { if (this.certainlyContained.size() > other.certainlyContained.size()) return false; if (!other.certainlyContained.containsAll(certainlyContained)) @@ -100,7 +106,8 @@ public boolean lessOrEqualAux(CharInclusion other) throws SemanticException { } @Override - public boolean equals(Object o) { + public boolean equals( + Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) @@ -126,7 +133,7 @@ public CharInclusion bottom() { } @Override - public DomainRepresentation representation() { + public StructuredRepresentation representation() { if (isBottom()) return Lattice.bottomRepresentation(); if (isTop()) @@ -162,7 +169,10 @@ private String formatRepresentation() { } @Override - public CharInclusion evalNonNullConstant(Constant constant, ProgramPoint pp) { + public CharInclusion evalNonNullConstant( + Constant constant, + ProgramPoint pp, + SemanticOracle oracle) { if (constant.getValue() instanceof String) { Set charsSet = ((String) constant.getValue()).chars() .mapToObj(e -> (char) e).collect(Collectors.toCollection(TreeSet::new)); @@ -174,8 +184,12 @@ public CharInclusion evalNonNullConstant(Constant constant, ProgramPoint pp) { } @Override - public CharInclusion evalBinaryExpression(BinaryOperator operator, CharInclusion left, CharInclusion right, - ProgramPoint pp) { + public CharInclusion evalBinaryExpression( + BinaryOperator operator, + CharInclusion left, + CharInclusion right, + ProgramPoint pp, + SemanticOracle oracle) { if (operator == StringConcat.INSTANCE) { Set resultCertainlyContained = new TreeSet<>(); resultCertainlyContained.addAll(left.certainlyContained); @@ -205,8 +219,14 @@ else if (operator == StringContains.INSTANCE || } @Override - public CharInclusion evalTernaryExpression(TernaryOperator operator, CharInclusion left, CharInclusion middle, - CharInclusion right, ProgramPoint pp) throws SemanticException { + public CharInclusion evalTernaryExpression( + TernaryOperator operator, + CharInclusion left, + CharInclusion middle, + CharInclusion right, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { if (operator == StringReplace.INSTANCE) { if (!left.certainlyContained.containsAll(middle.certainlyContained)) @@ -238,8 +258,12 @@ public CharInclusion evalTernaryExpression(TernaryOperator operator, CharInclusi } @Override - public Satisfiability satisfiesBinaryExpression(BinaryOperator operator, CharInclusion left, CharInclusion right, - ProgramPoint pp) { + public Satisfiability satisfiesBinaryExpression( + BinaryOperator operator, + CharInclusion left, + CharInclusion right, + ProgramPoint pp, + SemanticOracle oracle) { if (left.isTop() || right.isBottom()) return Satisfiability.UNKNOWN; @@ -272,7 +296,9 @@ private boolean isEmptyString() { * @return the char inclusion abstract value corresponding to the substring * of this char inclusion abstract value between two indexes */ - public CharInclusion substring(long begin, long end) { + public CharInclusion substring( + long begin, + long end) { if (isTop() || isBottom()) return this; return new CharInclusion(new TreeSet<>(), maybeContained); @@ -296,12 +322,14 @@ public IntInterval length() { * * @return the minimum and maximum index of {@code s} in {@code this} */ - public IntInterval indexOf(CharInclusion s) { + public IntInterval indexOf( + CharInclusion s) { return new IntInterval(MathNumber.MINUS_ONE, MathNumber.PLUS_INFINITY); } @Override - public Satisfiability containsChar(char c) { + public Satisfiability containsChar( + char c) { if (isTop()) return Satisfiability.UNKNOWN; if (isBottom()) diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/ContainsCharProvider.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/ContainsCharProvider.java index b26ad85a1..50dc5bc2b 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/ContainsCharProvider.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/ContainsCharProvider.java @@ -1,7 +1,7 @@ package it.unive.lisa.analysis.string; -import it.unive.lisa.analysis.SemanticDomain.Satisfiability; import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.lattices.Satisfiability; /** * Interface for a string analysis that exposes the {@link #containsChar(char)} @@ -21,5 +21,7 @@ public interface ContainsCharProvider { * * @throws SemanticException if something goes wrong during the computation */ - Satisfiability containsChar(char c) throws SemanticException; + Satisfiability containsChar( + char c) + throws SemanticException; } diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/Prefix.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/Prefix.java index f10b734cb..afb53c859 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/Prefix.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/Prefix.java @@ -1,11 +1,10 @@ package it.unive.lisa.analysis.string; import it.unive.lisa.analysis.Lattice; -import it.unive.lisa.analysis.SemanticDomain.Satisfiability; import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.SemanticOracle; +import it.unive.lisa.analysis.lattices.Satisfiability; import it.unive.lisa.analysis.nonrelational.value.BaseNonRelationalValueDomain; -import it.unive.lisa.analysis.representation.DomainRepresentation; -import it.unive.lisa.analysis.representation.StringRepresentation; import it.unive.lisa.program.cfg.ProgramPoint; import it.unive.lisa.symbolic.value.Constant; import it.unive.lisa.symbolic.value.operator.binary.BinaryOperator; @@ -19,6 +18,8 @@ import it.unive.lisa.symbolic.value.operator.ternary.TernaryOperator; import it.unive.lisa.util.numeric.IntInterval; import it.unive.lisa.util.numeric.MathNumber; +import it.unive.lisa.util.representation.StringRepresentation; +import it.unive.lisa.util.representation.StructuredRepresentation; import java.util.Objects; /** @@ -50,12 +51,15 @@ public Prefix() { * * @param prefix the prefix */ - public Prefix(String prefix) { + public Prefix( + String prefix) { this.prefix = prefix; } @Override - public Prefix lubAux(Prefix other) throws SemanticException { + public Prefix lubAux( + Prefix other) + throws SemanticException { String otherPrefixString = other.prefix; StringBuilder result = new StringBuilder(); @@ -74,7 +78,9 @@ public Prefix lubAux(Prefix other) throws SemanticException { } @Override - public boolean lessOrEqualAux(Prefix other) throws SemanticException { + public boolean lessOrEqualAux( + Prefix other) + throws SemanticException { if (other.prefix.length() <= this.prefix.length()) { Prefix lub = this.lubAux(other); @@ -85,7 +91,8 @@ public boolean lessOrEqualAux(Prefix other) throws SemanticException { } @Override - public boolean equals(Object o) { + public boolean equals( + Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) @@ -110,7 +117,7 @@ public Prefix bottom() { } @Override - public DomainRepresentation representation() { + public StructuredRepresentation representation() { if (isBottom()) return Lattice.bottomRepresentation(); if (isTop()) @@ -120,7 +127,10 @@ public DomainRepresentation representation() { } @Override - public Prefix evalNonNullConstant(Constant constant, ProgramPoint pp) { + public Prefix evalNonNullConstant( + Constant constant, + ProgramPoint pp, + SemanticOracle oracle) { if (constant.getValue() instanceof String) { String str = (String) constant.getValue(); if (!str.isEmpty()) @@ -132,7 +142,12 @@ public Prefix evalNonNullConstant(Constant constant, ProgramPoint pp) { } @Override - public Prefix evalBinaryExpression(BinaryOperator operator, Prefix left, Prefix right, ProgramPoint pp) { + public Prefix evalBinaryExpression( + BinaryOperator operator, + Prefix left, + Prefix right, + ProgramPoint pp, + SemanticOracle oracle) { if (operator == StringConcat.INSTANCE) { return left; } else if (operator == StringContains.INSTANCE || @@ -147,8 +162,14 @@ public Prefix evalBinaryExpression(BinaryOperator operator, Prefix left, Prefix } @Override - public Prefix evalTernaryExpression(TernaryOperator operator, Prefix left, Prefix middle, Prefix right, - ProgramPoint pp) throws SemanticException { + public Prefix evalTernaryExpression( + TernaryOperator operator, + Prefix left, + Prefix middle, + Prefix right, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { if (operator == StringReplace.INSTANCE) { String replace = right.getPrefix(); @@ -183,7 +204,9 @@ public String getPrefix() { * @return the prefix corresponding to the substring of this prefix between * two indexes */ - public Prefix substring(long begin, long end) { + public Prefix substring( + long begin, + long end) { if (isTop() || isBottom()) return this; @@ -213,12 +236,14 @@ public IntInterval length() { * * @return the minimum and maximum index of {@code s} in {@code this} */ - public IntInterval indexOf(Prefix s) { + public IntInterval indexOf( + Prefix s) { return new IntInterval(MathNumber.MINUS_ONE, MathNumber.PLUS_INFINITY); } @Override - public Satisfiability containsChar(char c) { + public Satisfiability containsChar( + char c) { if (isTop()) return Satisfiability.UNKNOWN; if (isBottom()) diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/Suffix.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/Suffix.java index df7fc6d7c..96acbd10e 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/Suffix.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/Suffix.java @@ -1,11 +1,10 @@ package it.unive.lisa.analysis.string; import it.unive.lisa.analysis.Lattice; -import it.unive.lisa.analysis.SemanticDomain.Satisfiability; import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.SemanticOracle; +import it.unive.lisa.analysis.lattices.Satisfiability; import it.unive.lisa.analysis.nonrelational.value.BaseNonRelationalValueDomain; -import it.unive.lisa.analysis.representation.DomainRepresentation; -import it.unive.lisa.analysis.representation.StringRepresentation; import it.unive.lisa.program.cfg.ProgramPoint; import it.unive.lisa.symbolic.value.Constant; import it.unive.lisa.symbolic.value.operator.binary.BinaryOperator; @@ -19,6 +18,8 @@ import it.unive.lisa.symbolic.value.operator.ternary.TernaryOperator; import it.unive.lisa.util.numeric.IntInterval; import it.unive.lisa.util.numeric.MathNumber; +import it.unive.lisa.util.representation.StringRepresentation; +import it.unive.lisa.util.representation.StructuredRepresentation; import java.util.Objects; /** @@ -50,12 +51,15 @@ public Suffix() { * * @param suffix the suffix */ - public Suffix(String suffix) { + public Suffix( + String suffix) { this.suffix = suffix; } @Override - public Suffix lubAux(Suffix other) throws SemanticException { + public Suffix lubAux( + Suffix other) + throws SemanticException { String otherSuffix = other.suffix; StringBuilder result = new StringBuilder(); @@ -76,7 +80,9 @@ public Suffix lubAux(Suffix other) throws SemanticException { } @Override - public boolean lessOrEqualAux(Suffix other) throws SemanticException { + public boolean lessOrEqualAux( + Suffix other) + throws SemanticException { if (other.suffix.length() <= this.suffix.length()) { Suffix lub = this.lubAux(other); @@ -87,7 +93,8 @@ public boolean lessOrEqualAux(Suffix other) throws SemanticException { } @Override - public boolean equals(Object o) { + public boolean equals( + Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) @@ -112,7 +119,7 @@ public Suffix bottom() { } @Override - public DomainRepresentation representation() { + public StructuredRepresentation representation() { if (isBottom()) return Lattice.bottomRepresentation(); if (isTop()) @@ -122,7 +129,10 @@ public DomainRepresentation representation() { } @Override - public Suffix evalNonNullConstant(Constant constant, ProgramPoint pp) { + public Suffix evalNonNullConstant( + Constant constant, + ProgramPoint pp, + SemanticOracle oracle) { if (constant.getValue() instanceof String) { String str = (String) constant.getValue(); if (!str.isEmpty()) @@ -133,7 +143,12 @@ public Suffix evalNonNullConstant(Constant constant, ProgramPoint pp) { } @Override - public Suffix evalBinaryExpression(BinaryOperator operator, Suffix left, Suffix right, ProgramPoint pp) { + public Suffix evalBinaryExpression( + BinaryOperator operator, + Suffix left, + Suffix right, + ProgramPoint pp, + SemanticOracle oracle) { if (operator == StringConcat.INSTANCE) { return right; } else if (operator == StringContains.INSTANCE || @@ -148,8 +163,14 @@ public Suffix evalBinaryExpression(BinaryOperator operator, Suffix left, Suffix } @Override - public Suffix evalTernaryExpression(TernaryOperator operator, Suffix left, Suffix middle, Suffix right, - ProgramPoint pp) throws SemanticException { + public Suffix evalTernaryExpression( + TernaryOperator operator, + Suffix left, + Suffix middle, + Suffix right, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { if (operator == StringReplace.INSTANCE) { String replace = right.getSuffix(); @@ -184,7 +205,9 @@ public String getSuffix() { * @return the suffix corresponding to the substring of this suffix between * two indexes */ - public Suffix substring(long begin, long end) { + public Suffix substring( + long begin, + long end) { return new Suffix(""); } @@ -206,12 +229,14 @@ public IntInterval length() { * * @return the minimum and maximum index of {@code s} in {@code this} */ - public IntInterval indexOf(Suffix s) { + public IntInterval indexOf( + Suffix s) { return new IntInterval(MathNumber.MINUS_ONE, MathNumber.PLUS_INFINITY); } @Override - public Satisfiability containsChar(char c) { + public Satisfiability containsChar( + char c) { if (isTop()) return Satisfiability.UNKNOWN; if (isBottom()) diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/bricks/Brick.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/bricks/Brick.java index f1190bb2e..ac0a6adcd 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/bricks/Brick.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/bricks/Brick.java @@ -3,11 +3,11 @@ import it.unive.lisa.analysis.Lattice; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.nonrelational.value.BaseNonRelationalValueDomain; -import it.unive.lisa.analysis.representation.DomainRepresentation; -import it.unive.lisa.analysis.representation.StringRepresentation; import it.unive.lisa.util.numeric.IntInterval; import it.unive.lisa.util.numeric.MathNumber; import it.unive.lisa.util.numeric.MathNumberConversionException; +import it.unive.lisa.util.representation.StringRepresentation; +import it.unive.lisa.util.representation.StructuredRepresentation; import java.util.Objects; import java.util.Set; import java.util.TreeSet; @@ -51,7 +51,10 @@ public Brick() { * * @throws IllegalArgumentException if min or max are negative numbers. */ - public Brick(int min, int max, Set strings) { + public Brick( + int min, + int max, + Set strings) { if (min < 0 || max < 0) throw new IllegalArgumentException(); this.interval = new IntInterval(min, max); @@ -67,7 +70,10 @@ public Brick(int min, int max, Set strings) { * the strings set * @param strings the set of strings */ - public Brick(MathNumber min, MathNumber max, Set strings) { + public Brick( + MathNumber min, + MathNumber max, + Set strings) { this.interval = new IntInterval(min, max); this.strings = strings; } @@ -79,13 +85,17 @@ public Brick(MathNumber min, MathNumber max, Set strings) { * maximum of the brick respectively * @param strings the set of strings */ - public Brick(IntInterval interval, Set strings) { + public Brick( + IntInterval interval, + Set strings) { this.interval = interval; this.strings = strings; } @Override - public Brick lubAux(Brick other) throws SemanticException { + public Brick lubAux( + Brick other) + throws SemanticException { Set resultStrings; if (strings == null || other.strings == null) resultStrings = null; @@ -102,7 +112,9 @@ public Brick lubAux(Brick other) throws SemanticException { } @Override - public boolean lessOrEqualAux(Brick other) throws SemanticException { + public boolean lessOrEqualAux( + Brick other) + throws SemanticException { if (this.getMin().lt(other.getMin())) return false; if (this.getMax().gt(other.getMax())) @@ -118,7 +130,9 @@ public boolean lessOrEqualAux(Brick other) throws SemanticException { } @Override - public Brick wideningAux(Brick other) throws SemanticException { + public Brick wideningAux( + Brick other) + throws SemanticException { MathNumber minOfMins = getMin().min(other.getMin()); MathNumber maxOfMaxs = getMax().max(other.getMax()); @@ -134,7 +148,8 @@ else if (maxOfMaxs.subtract(minOfMins).geq(new MathNumber(Bricks.kI))) { } @Override - public boolean equals(Object o) { + public boolean equals( + Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) @@ -232,7 +247,11 @@ public Set getReps() { // Recursive function that gets all the possible combinations of the set // between min and max - private void recGetReps(Set reps, int min, int numberOfReps, String currentStr) + private void recGetReps( + Set reps, + int min, + int numberOfReps, + String currentStr) throws MathNumberConversionException { if (!isFinite()) throw new IllegalStateException("Brick must be finite."); @@ -255,7 +274,7 @@ public String toString() { } @Override - public DomainRepresentation representation() { + public StructuredRepresentation representation() { if (isBottom()) return Lattice.bottomRepresentation(); if (isTop()) diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/bricks/Bricks.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/bricks/Bricks.java index 60743075b..b983e3a23 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/bricks/Bricks.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/bricks/Bricks.java @@ -1,12 +1,10 @@ package it.unive.lisa.analysis.string.bricks; import it.unive.lisa.analysis.Lattice; -import it.unive.lisa.analysis.SemanticDomain; -import it.unive.lisa.analysis.SemanticDomain.Satisfiability; import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.SemanticOracle; +import it.unive.lisa.analysis.lattices.Satisfiability; import it.unive.lisa.analysis.nonrelational.value.BaseNonRelationalValueDomain; -import it.unive.lisa.analysis.representation.DomainRepresentation; -import it.unive.lisa.analysis.representation.StringRepresentation; import it.unive.lisa.analysis.string.ContainsCharProvider; import it.unive.lisa.program.cfg.ProgramPoint; import it.unive.lisa.symbolic.value.Constant; @@ -19,6 +17,8 @@ import it.unive.lisa.symbolic.value.operator.binary.StringStartsWith; import it.unive.lisa.util.numeric.IntInterval; import it.unive.lisa.util.numeric.MathNumber; +import it.unive.lisa.util.representation.StringRepresentation; +import it.unive.lisa.util.representation.StructuredRepresentation; import java.util.ArrayList; import java.util.List; import java.util.Objects; @@ -70,12 +70,15 @@ public Bricks() { * * @param bricks the list of brick */ - public Bricks(List bricks) { + public Bricks( + List bricks) { this.bricks = bricks; } @Override - public Bricks lubAux(Bricks other) throws SemanticException { + public Bricks lubAux( + Bricks other) + throws SemanticException { List thisPaddedList = this.bricks; List otherPaddedList = other.bricks; @@ -95,7 +98,9 @@ else if (other.bricks.size() < this.bricks.size()) } @Override - public boolean lessOrEqualAux(Bricks other) throws SemanticException { + public boolean lessOrEqualAux( + Bricks other) + throws SemanticException { List thisPaddedList = this.bricks; List otherPaddedList = other.bricks; @@ -115,7 +120,9 @@ else if (other.bricks.size() < this.bricks.size()) } @Override - public Bricks wideningAux(Bricks other) throws SemanticException { + public Bricks wideningAux( + Bricks other) + throws SemanticException { boolean rel = this.lessOrEqual(other); if (!rel && !other.lessOrEqual(this)) return TOP; @@ -129,7 +136,9 @@ public Bricks wideningAux(Bricks other) throws SemanticException { return other.w(this); } - private Bricks w(Bricks other) throws SemanticException { + private Bricks w( + Bricks other) + throws SemanticException { List thisPaddedList = this.bricks; List otherPaddedList = other.bricks; @@ -153,7 +162,12 @@ else if (other.bricks.size() < this.bricks.size()) } @Override - public Bricks evalBinaryExpression(BinaryOperator operator, Bricks left, Bricks right, ProgramPoint pp) + public Bricks evalBinaryExpression( + BinaryOperator operator, + Bricks left, + Bricks right, + ProgramPoint pp, + SemanticOracle oracle) throws SemanticException { if (operator == StringConcat.INSTANCE) { List resultList = new ArrayList<>(left.bricks); @@ -171,7 +185,11 @@ public Bricks evalBinaryExpression(BinaryOperator operator, Bricks left, Bricks } @Override - public Bricks evalNonNullConstant(Constant constant, ProgramPoint pp) throws SemanticException { + public Bricks evalNonNullConstant( + Constant constant, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { if (constant.getValue() instanceof String) { String str = (String) constant.getValue(); @@ -188,10 +206,15 @@ public Bricks evalNonNullConstant(Constant constant, ProgramPoint pp) throws Sem } @Override - public Satisfiability satisfiesBinaryExpression(BinaryOperator operator, Bricks left, Bricks right, ProgramPoint pp) + public Satisfiability satisfiesBinaryExpression( + BinaryOperator operator, + Bricks left, + Bricks right, + ProgramPoint pp, + SemanticOracle oracle) throws SemanticException { if (left.isTop() || right.isBottom()) - return SemanticDomain.Satisfiability.UNKNOWN; + return Satisfiability.UNKNOWN; if (operator == StringContains.INSTANCE) return left.contains(right); @@ -199,7 +222,8 @@ public Satisfiability satisfiesBinaryExpression(BinaryOperator operator, Bricks return Satisfiability.UNKNOWN; } - private Satisfiability contains(Bricks right) { + private Satisfiability contains( + Bricks right) { if (right.bricks.size() != 1) return Satisfiability.UNKNOWN; @@ -232,7 +256,8 @@ private Satisfiability contains(Bricks right) { } @Override - public boolean equals(Object object) { + public boolean equals( + Object object) { if (this == object) return true; if (object == null || getClass() != object.getClass()) @@ -262,7 +287,7 @@ public String toString() { } @Override - public DomainRepresentation representation() { + public StructuredRepresentation representation() { if (isBottom()) return Lattice.bottomRepresentation(); if (isTop()) @@ -271,7 +296,9 @@ public DomainRepresentation representation() { return new StringRepresentation(StringUtils.join(this.bricks, " ")); } - private void rule2(int first, int second) { + private void rule2( + int first, + int second) { Brick firstBrick = this.bricks.get(first); Brick secondBrick = this.bricks.get(second); @@ -288,13 +315,16 @@ private void rule2(int first, int second) { this.bricks.remove(second); } - private void rule3(int index) { + private void rule3( + int index) { Brick brick = this.bricks.get(index); this.bricks.set(index, new Brick(1, 1, brick.getReps())); } - private void rule4(int first, int second) { + private void rule4( + int first, + int second) { Brick firstBrick = this.bricks.get(first); Brick secondBrick = this.bricks.get(second); @@ -305,7 +335,8 @@ private void rule4(int first, int second) { this.bricks.remove(second); } - private void rule5(int index) { + private void rule5( + int index) { Brick brick = this.bricks.get(index); Brick br = new Brick(brick.getMin(), brick.getMin(), brick.getStrings()); @@ -377,7 +408,9 @@ public void normBricks() { * @return A new Bricks with all possible substrings if the conditions are * met or TOP. */ - public Bricks substring(long e, long b) { + public Bricks substring( + long e, + long b) { this.normBricks(); Brick first = this.bricks.get(0); @@ -419,7 +452,8 @@ public Bricks substring(long e, long b) { * @throws IllegalArgumentException if the other brick list is longer or * equal than the caller bricks object */ - public List padList(final Bricks other) { + public List padList( + final Bricks other) { if (this.bricks.size() >= other.bricks.size()) throw new IllegalArgumentException("Other bricks list is longer or equal"); @@ -464,12 +498,15 @@ public IntInterval length() { * * @return the minimum and maximum index of {@code s} in {@code this} */ - public IntInterval indexOf(Bricks s) { + public IntInterval indexOf( + Bricks s) { return new IntInterval(MathNumber.MINUS_ONE, MathNumber.PLUS_INFINITY); } @Override - public Satisfiability containsChar(char c) throws SemanticException { + public Satisfiability containsChar( + char c) + throws SemanticException { if (isTop()) return Satisfiability.UNKNOWN; if (isBottom()) diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/fsa/FSA.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/fsa/FSA.java index 77f7aab7f..650d1aeb4 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/fsa/FSA.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/fsa/FSA.java @@ -1,12 +1,11 @@ package it.unive.lisa.analysis.string.fsa; import it.unive.lisa.analysis.Lattice; -import it.unive.lisa.analysis.SemanticDomain.Satisfiability; import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.SemanticOracle; +import it.unive.lisa.analysis.lattices.Satisfiability; import it.unive.lisa.analysis.nonrelational.value.BaseNonRelationalValueDomain; import it.unive.lisa.analysis.numeric.Interval; -import it.unive.lisa.analysis.representation.DomainRepresentation; -import it.unive.lisa.analysis.representation.StringRepresentation; import it.unive.lisa.analysis.string.ContainsCharProvider; import it.unive.lisa.program.cfg.ProgramPoint; import it.unive.lisa.symbolic.value.Constant; @@ -23,6 +22,8 @@ import it.unive.lisa.util.numeric.IntInterval; import it.unive.lisa.util.numeric.MathNumber; import it.unive.lisa.util.numeric.MathNumberConversionException; +import it.unive.lisa.util.representation.StringRepresentation; +import it.unive.lisa.util.representation.StructuredRepresentation; import java.util.HashSet; import java.util.Objects; import java.util.Set; @@ -66,22 +67,29 @@ public FSA() { * * @param a the {@link SimpleAutomaton} used for object construction. */ - public FSA(SimpleAutomaton a) { + public FSA( + SimpleAutomaton a) { this.a = a; } @Override - public FSA lubAux(FSA other) throws SemanticException { + public FSA lubAux( + FSA other) + throws SemanticException { return new FSA(this.a.union(other.a).minimize()); } @Override - public FSA glbAux(FSA other) throws SemanticException { + public FSA glbAux( + FSA other) + throws SemanticException { return new FSA(this.a.intersection(other.a).minimize()); } @Override - public FSA wideningAux(FSA other) throws SemanticException { + public FSA wideningAux( + FSA other) + throws SemanticException { return new FSA(this.a.union(other.a).widening(getSizeDiffCapped(other))); } @@ -95,7 +103,8 @@ public int size() { return a.getStates().size(); } - private int getSizeDiffCapped(FSA other) { + private int getSizeDiffCapped( + FSA other) { int size = size(); int otherSize = other.size(); if (size > otherSize) @@ -107,12 +116,15 @@ else if (size < otherSize) } @Override - public boolean lessOrEqualAux(FSA other) throws SemanticException { + public boolean lessOrEqualAux( + FSA other) + throws SemanticException { return this.a.isContained(other.a); } @Override - public boolean equals(Object o) { + public boolean equals( + Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) @@ -144,7 +156,7 @@ public FSA bottom() { } @Override - public DomainRepresentation representation() { + public StructuredRepresentation representation() { if (isBottom()) return Lattice.bottomRepresentation(); else if (isTop()) @@ -154,7 +166,11 @@ else if (isTop()) } @Override - public FSA evalNonNullConstant(Constant constant, ProgramPoint pp) throws SemanticException { + public FSA evalNonNullConstant( + Constant constant, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { if (constant.getValue() instanceof String) { return new FSA(new SimpleAutomaton((String) constant.getValue())); } @@ -163,7 +179,12 @@ public FSA evalNonNullConstant(Constant constant, ProgramPoint pp) throws Semant // TODO unary and ternary and all other binary @Override - public FSA evalBinaryExpression(BinaryOperator operator, FSA left, FSA right, ProgramPoint pp) + public FSA evalBinaryExpression( + BinaryOperator operator, + FSA left, + FSA right, + ProgramPoint pp, + SemanticOracle oracle) throws SemanticException { if (operator == StringConcat.INSTANCE) return new FSA(left.a.concat(right.a)); @@ -171,7 +192,13 @@ public FSA evalBinaryExpression(BinaryOperator operator, FSA left, FSA right, Pr } @Override - public FSA evalTernaryExpression(TernaryOperator operator, FSA left, FSA middle, FSA right, ProgramPoint pp) + public FSA evalTernaryExpression( + TernaryOperator operator, + FSA left, + FSA middle, + FSA right, + ProgramPoint pp, + SemanticOracle oracle) throws SemanticException { if (operator == StringReplace.INSTANCE) try { @@ -183,8 +210,13 @@ public FSA evalTernaryExpression(TernaryOperator operator, FSA left, FSA middle, } @Override - public Satisfiability satisfiesBinaryExpression(BinaryOperator operator, FSA left, FSA right, - ProgramPoint pp) throws SemanticException { + public Satisfiability satisfiesBinaryExpression( + BinaryOperator operator, + FSA left, + FSA right, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { if (operator == StringContains.INSTANCE) { return left.contains(right); } @@ -204,7 +236,10 @@ public Satisfiability satisfiesBinaryExpression(BinaryOperator operator, FSA lef * @throws CyclicAutomatonException when the automaton is cyclic and its * language is accessed */ - public FSA substring(long begin, long end) throws CyclicAutomatonException { + public FSA substring( + long begin, + long end) + throws CyclicAutomatonException { if (isTop() || isBottom()) return this; @@ -252,7 +287,9 @@ public IntInterval length() { * @throws CyclicAutomatonException when the automaton is cyclic and its * language is accessed */ - public IntInterval indexOf(FSA s) throws CyclicAutomatonException { + public IntInterval indexOf( + FSA s) + throws CyclicAutomatonException { if (a.hasCycle()) return mkInterval(-1, null); @@ -302,15 +339,20 @@ else if (s.a.recognizesExactlyOneString() && a.recognizesExactlyOneString()) * * @return the concatenation between two automata */ - public FSA concat(FSA other) { + public FSA concat( + FSA other) { return new FSA(this.a.concat(other.a)); } - private IntInterval mkInterval(Integer min, Integer max) { + private IntInterval mkInterval( + Integer min, + Integer max) { return new IntInterval(min, max); } - private IntInterval mkInterval(IntInterval first, IntInterval second) { + private IntInterval mkInterval( + IntInterval first, + IntInterval second) { MathNumber newLow = first.getLow().min(second.getLow()); MathNumber newHigh = first.getHigh().max(second.getHigh()); return new IntInterval(newLow, newHigh); @@ -325,7 +367,8 @@ private IntInterval mkInterval(IntInterval first, IntInterval second) { * @return if this automaton recognizes strings recognized by the other * automaton */ - public Satisfiability contains(FSA other) { + public Satisfiability contains( + FSA other) { if (other.a.isEqualTo(a.emptyString())) return Satisfiability.SATISFIED; @@ -368,7 +411,9 @@ else if (this.a.factors().intersection(other.a).acceptsEmptyLanguage()) * * @return the domain instance containing the replaced automaton */ - public FSA replace(FSA search, FSA repl) { + public FSA replace( + FSA search, + FSA repl) { try { return new FSA(this.a.replace(search.a, repl.a)); } catch (CyclicAutomatonException e) { @@ -377,7 +422,9 @@ public FSA replace(FSA search, FSA repl) { } @Override - public Satisfiability containsChar(char c) throws SemanticException { + public Satisfiability containsChar( + char c) + throws SemanticException { if (isTop()) return Satisfiability.UNKNOWN; if (isBottom()) @@ -445,7 +492,9 @@ public FSA trim() { * @throws MathNumberConversionException if {@code intv} is iterated but is * not finite */ - public FSA repeat(Interval i) throws MathNumberConversionException { + public FSA repeat( + Interval i) + throws MathNumberConversionException { if (isBottom() || isTop()) return this; return new FSA(this.a.repeat(i)); diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/fsa/SimpleAutomaton.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/fsa/SimpleAutomaton.java index bd7cb7962..8c8e54ee9 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/fsa/SimpleAutomaton.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/fsa/SimpleAutomaton.java @@ -30,7 +30,8 @@ public final class SimpleAutomaton extends Automaton { @Override - public SimpleAutomaton singleString(String string) { + public SimpleAutomaton singleString( + String string) { return new SimpleAutomaton(string); } @@ -63,7 +64,9 @@ public SimpleAutomaton emptyString() { } @Override - public SimpleAutomaton from(SortedSet states, SortedSet> transitions) { + public SimpleAutomaton from( + SortedSet states, + SortedSet> transitions) { return new SimpleAutomaton(states, transitions); } @@ -73,12 +76,15 @@ public StringSymbol epsilon() { } @Override - public StringSymbol concat(StringSymbol first, StringSymbol second) { + public StringSymbol concat( + StringSymbol first, + StringSymbol second) { return first.concat(second); } @Override - public RegularExpression symbolToRegex(StringSymbol symbol) { + public RegularExpression symbolToRegex( + StringSymbol symbol) { return new Atom(symbol.getSymbol()); } @@ -88,7 +94,9 @@ public RegularExpression symbolToRegex(StringSymbol symbol) { * @param states the set of states of the new automaton * @param transitions the set of the transitions of the new automaton */ - public SimpleAutomaton(SortedSet states, SortedSet> transitions) { + public SimpleAutomaton( + SortedSet states, + SortedSet> transitions) { super(states, transitions); } @@ -97,7 +105,8 @@ public SimpleAutomaton(SortedSet states, SortedSet currentStates = epsilonClosure(getInitialStates()); @@ -174,7 +184,10 @@ public boolean validateString(String str) { * * @throws CyclicAutomatonException if {@code toReplace} contains loops */ - public SimpleAutomaton replace(SimpleAutomaton toReplace, SimpleAutomaton str) throws CyclicAutomatonException { + public SimpleAutomaton replace( + SimpleAutomaton toReplace, + SimpleAutomaton str) + throws CyclicAutomatonException { if (this.hasCycle() || toReplace.hasCycle() || str.hasCycle()) return unknownString(); @@ -294,7 +307,9 @@ public SimpleAutomaton trim() { * @throws MathNumberConversionException if {@code intv} is iterated but is * not finite */ - public SimpleAutomaton repeat(Interval i) throws MathNumberConversionException { + public SimpleAutomaton repeat( + Interval i) + throws MathNumberConversionException { if (equals(emptyString())) return this; else if (hasCycle()) @@ -359,8 +374,12 @@ else if (hasCycle()) return emptyLanguage(); } - private SimpleAutomaton auxRepeat(IntInterval i, State currentState, SortedSet> delta, - SimpleAutomaton result) throws MathNumberConversionException { + private SimpleAutomaton auxRepeat( + IntInterval i, + State currentState, + SortedSet> delta, + SimpleAutomaton result) + throws MathNumberConversionException { if (currentState.isFinal()) { @@ -400,7 +419,10 @@ private SimpleAutomaton auxRepeat(IntInterval i, State currentState, SortedSet connectOn, boolean b) { + private SimpleAutomaton connectAutomaton( + SimpleAutomaton second, + SortedSet connectOn, + boolean b) { SortedSet> delta = new TreeSet<>(); SortedSet states = new TreeSet<>(); HashMap firstMapping = new HashMap<>(); diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/fsa/StringSymbol.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/fsa/StringSymbol.java index 3c661b61c..d59ad4b90 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/fsa/StringSymbol.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/fsa/StringSymbol.java @@ -24,7 +24,8 @@ public class StringSymbol implements TransitionSymbol { * * @param symbol the string */ - public StringSymbol(String symbol) { + public StringSymbol( + String symbol) { this.symbol = symbol; } @@ -33,12 +34,14 @@ public StringSymbol(String symbol) { * * @param symbol the character */ - public StringSymbol(char symbol) { + public StringSymbol( + char symbol) { this.symbol = Character.toString(symbol); } @Override - public int compareTo(StringSymbol o) { + public int compareTo( + StringSymbol o) { return symbol.compareTo(o.symbol); } @@ -61,7 +64,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -98,7 +102,8 @@ public String getSymbol() { * * @return the merged (joined) symbol */ - public StringSymbol concat(StringSymbol other) { + public StringSymbol concat( + StringSymbol other) { if (isEpsilon()) return other; if (other.isEpsilon()) diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/tarsis/IndexFinder.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/tarsis/IndexFinder.java index 3888ebefd..62def23ac 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/tarsis/IndexFinder.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/tarsis/IndexFinder.java @@ -39,7 +39,9 @@ public class IndexFinder { * * @throws CyclicAutomatonException if {@code search} contains a loop */ - public static Pair findIndexesOf(RegexAutomaton automaton, RegexAutomaton search) + public static Pair findIndexesOf( + RegexAutomaton automaton, + RegexAutomaton search) throws CyclicAutomatonException { RegexAutomaton exploded = automaton.explode(); StringSearcher searcher = new StringSearcher(exploded); diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/tarsis/RegexAutomaton.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/tarsis/RegexAutomaton.java index fafe115a8..cbe54b1b0 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/tarsis/RegexAutomaton.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/tarsis/RegexAutomaton.java @@ -79,7 +79,8 @@ public static RegexAutomaton emptyLang() { * * @return the automaton */ - public static RegexAutomaton string(String string) { + public static RegexAutomaton string( + String string) { State q0 = new State(0, true, false); State q1 = new State(1, false, true); @@ -103,7 +104,8 @@ public static RegexAutomaton string(String string) { * * @return the automaton */ - public static RegexAutomaton string(SymbolicString s) { + public static RegexAutomaton string( + SymbolicString s) { List result = new ArrayList<>(); String collector = ""; for (SymbolicChar ch : s.collapseTopChars()) { @@ -162,7 +164,8 @@ public static RegexAutomaton emptyStr() { * * @return the automaton */ - public static RegexAutomaton strings(String... strings) { + public static RegexAutomaton strings( + String... strings) { RegexAutomaton a = emptyLang(); for (String s : strings) @@ -172,7 +175,8 @@ public static RegexAutomaton strings(String... strings) { } @Override - public RegexAutomaton singleString(String string) { + public RegexAutomaton singleString( + String string) { return string(string); } @@ -192,7 +196,9 @@ public RegexAutomaton emptyString() { } @Override - public RegexAutomaton from(SortedSet states, SortedSet> transitions) { + public RegexAutomaton from( + SortedSet states, + SortedSet> transitions) { return new RegexAutomaton(states, transitions); } @@ -202,12 +208,15 @@ public RegularExpression epsilon() { } @Override - public RegularExpression concat(RegularExpression first, RegularExpression second) { + public RegularExpression concat( + RegularExpression first, + RegularExpression second) { return first.comp(second); } @Override - public RegularExpression symbolToRegex(RegularExpression symbol) { + public RegularExpression symbolToRegex( + RegularExpression symbol) { return symbol; } @@ -217,7 +226,9 @@ public RegularExpression symbolToRegex(RegularExpression symbol) { * @param states the set of states of the new automaton * @param transitions the set of the transitions of the new automaton */ - public RegexAutomaton(SortedSet states, SortedSet> transitions) { + public RegexAutomaton( + SortedSet states, + SortedSet> transitions) { super(states, transitions); } @@ -282,7 +293,8 @@ public RegexAutomaton explode() { } @Override - public RegexAutomaton intersection(RegexAutomaton other) { + public RegexAutomaton intersection( + RegexAutomaton other) { if (this == other) return this; @@ -372,7 +384,8 @@ public RegexAutomaton collapse() { return collapsed.minimize(); } - private Set> findMergableStatesInPath(List v) { + private Set> findMergableStatesInPath( + List v) { Set> collected = new HashSet<>(); if (v.size() == 1) return collected; @@ -435,7 +448,10 @@ private Set> findMergableStatesInPath(List v) { * * @throws CyclicAutomatonException if {@code toReplace} contains loops */ - public RegexAutomaton replace(RegexAutomaton toReplace, RegexAutomaton str) throws CyclicAutomatonException { + public RegexAutomaton replace( + RegexAutomaton toReplace, + RegexAutomaton str) + throws CyclicAutomatonException { Collection automata = new ArrayList<>(); boolean isSingleString = toReplace.getLanguage().size() == 1; for (String s : toReplace.getLanguage()) @@ -447,7 +463,8 @@ public RegexAutomaton replace(RegexAutomaton toReplace, RegexAutomaton str) thro return union(automata.toArray(new RegexAutomaton[automata.size()])); } - private RegexAutomaton union(RegexAutomaton... automata) { + private RegexAutomaton union( + RegexAutomaton... automata) { RegexAutomaton result = emptyLanguage(); for (RegexAutomaton a : automata) @@ -465,7 +482,8 @@ private RegexAutomaton union(RegexAutomaton... automata) { * @return an automaton that corresponds to the {@code n}-time concatenation * of {@code this} */ - public RegexAutomaton repeat(long n) { + public RegexAutomaton repeat( + long n) { if (n == 0) return emptyString(); return toRegex().simplify().repeat(n).toAutomaton(this).minimize(); diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/tarsis/StringReplacer.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/tarsis/StringReplacer.java index 2229c9873..b6ab55438 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/tarsis/StringReplacer.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/tarsis/StringReplacer.java @@ -39,7 +39,8 @@ public class StringReplacer { * * @param origin the target automaton */ - public StringReplacer(RegexAutomaton origin) { + public StringReplacer( + RegexAutomaton origin) { this.origin = origin.explode(); searcher = new StringSearcher(origin); } @@ -57,7 +58,10 @@ public StringReplacer(RegexAutomaton origin) { * * @return the replaced automaton */ - public RegexAutomaton replace(String toReplace, RegexAutomaton str, boolean must) { + public RegexAutomaton replace( + String toReplace, + RegexAutomaton str, + boolean must) { if (toReplace.isEmpty()) return emptyStringReplace(str); @@ -121,7 +125,8 @@ public RegexAutomaton replace(String toReplace, RegexAutomaton str, boolean must return origin; } - private RegexAutomaton emptyStringReplace(RegexAutomaton str) { + private RegexAutomaton emptyStringReplace( + RegexAutomaton str) { int maxId = origin.getStates().stream().mapToInt(s -> s.getId()).max().getAsInt(); AtomicInteger counter = new AtomicInteger(maxId + 1); SortedSet states = new TreeSet<>(); diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/tarsis/StringSearcher.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/tarsis/StringSearcher.java index b0164875a..143393fef 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/tarsis/StringSearcher.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/tarsis/StringSearcher.java @@ -38,7 +38,8 @@ public class StringSearcher { * * @param origin the target automaton */ - public StringSearcher(RegexAutomaton origin) { + public StringSearcher( + RegexAutomaton origin) { automaton = origin; searchString = null; matching = false; @@ -52,7 +53,8 @@ public StringSearcher(RegexAutomaton origin) { * * @return the set of sequences of transitions */ - public Set>> searchInAllPaths(String toSearch) { + public Set>> searchInAllPaths( + String toSearch) { Set>> collected = new HashSet<>(); Set> paths = automaton.getAllPaths(); @@ -67,7 +69,9 @@ public Set>> searchInAllPaths(String toSear } @SuppressWarnings("unchecked") - private Set>> searchInPath(List v, String toSearch) { + private Set>> searchInPath( + List v, + String toSearch) { Set>> collected = new HashSet<>(); if (v.size() == 1 && toSearch.length() == 1) @@ -119,7 +123,8 @@ else if (t.getSymbol().is(searchString.substring(0, 1))) { return collected; } - private Set>> handleSelfLoop(List v, + private Set>> handleSelfLoop( + List v, Set>> collected) { // self loop! Set> transitions = automaton.getAllTransitionsConnecting(v.get(0), v.get(0)); @@ -137,17 +142,23 @@ private Set>> handleSelfLoop(List v, return collected; } - private void advanceSearch(Vector> path, Transition t) { + private void advanceSearch( + Vector> path, + Transition t) { searchString = searchString.substring(1); path.add(t); } - private void startSearch(Vector> path, Transition t) { + private void startSearch( + Vector> path, + Transition t) { matching = true; advanceSearch(path, t); } - private void resetSearchState(Vector> path, String toSearch) { + private void resetSearchState( + Vector> path, + String toSearch) { matching = false; searchString = toSearch; path.clear(); diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/tarsis/Tarsis.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/tarsis/Tarsis.java index 723223a80..61290ee19 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/tarsis/Tarsis.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/string/tarsis/Tarsis.java @@ -1,13 +1,11 @@ package it.unive.lisa.analysis.string.tarsis; import it.unive.lisa.analysis.Lattice; -import it.unive.lisa.analysis.SemanticDomain; -import it.unive.lisa.analysis.SemanticDomain.Satisfiability; import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.SemanticOracle; +import it.unive.lisa.analysis.lattices.Satisfiability; import it.unive.lisa.analysis.nonrelational.value.BaseNonRelationalValueDomain; import it.unive.lisa.analysis.numeric.Interval; -import it.unive.lisa.analysis.representation.DomainRepresentation; -import it.unive.lisa.analysis.representation.StringRepresentation; import it.unive.lisa.analysis.string.ContainsCharProvider; import it.unive.lisa.analysis.string.fsa.FSA; import it.unive.lisa.analysis.string.fsa.SimpleAutomaton; @@ -27,6 +25,8 @@ import it.unive.lisa.util.numeric.IntInterval; import it.unive.lisa.util.numeric.MathNumber; import it.unive.lisa.util.numeric.MathNumberConversionException; +import it.unive.lisa.util.representation.StringRepresentation; +import it.unive.lisa.util.representation.StructuredRepresentation; import java.util.Objects; import java.util.SortedSet; import java.util.TreeSet; @@ -74,7 +74,8 @@ public Tarsis() { * * @param a the {@link SimpleAutomaton} used for object construction. */ - public Tarsis(RegexAutomaton a) { + public Tarsis( + RegexAutomaton a) { this.a = a; } @@ -88,12 +89,16 @@ public RegexAutomaton getAutomaton() { } @Override - public Tarsis lubAux(Tarsis other) throws SemanticException { + public Tarsis lubAux( + Tarsis other) + throws SemanticException { return new Tarsis(this.a.union(other.a)); } @Override - public Tarsis glbAux(Tarsis other) throws SemanticException { + public Tarsis glbAux( + Tarsis other) + throws SemanticException { return new Tarsis(this.a.intersection(other.a)); } @@ -107,7 +112,8 @@ public int size() { return a.getStates().size(); } - private int getSizeDiffCapped(Tarsis other) { + private int getSizeDiffCapped( + Tarsis other) { int size = size(); int otherSize = other.size(); if (size > otherSize) @@ -119,17 +125,22 @@ else if (size < otherSize) } @Override - public Tarsis wideningAux(Tarsis other) throws SemanticException { + public Tarsis wideningAux( + Tarsis other) + throws SemanticException { return new Tarsis(this.a.union(other.a).widening(getSizeDiffCapped(other))); } @Override - public boolean lessOrEqualAux(Tarsis other) throws SemanticException { + public boolean lessOrEqualAux( + Tarsis other) + throws SemanticException { return this.a.isContained(other.a); } @Override - public boolean equals(Object o) { + public boolean equals( + Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) @@ -159,7 +170,7 @@ public boolean isBottom() { } @Override - public DomainRepresentation representation() { + public StructuredRepresentation representation() { if (isBottom()) return Lattice.bottomRepresentation(); else if (isTop()) @@ -169,7 +180,11 @@ else if (isTop()) } @Override - public Tarsis evalNonNullConstant(Constant constant, ProgramPoint pp) throws SemanticException { + public Tarsis evalNonNullConstant( + Constant constant, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { if (constant.getValue() instanceof String) return new Tarsis(RegexAutomaton.string((String) constant.getValue())); return top(); @@ -177,7 +192,12 @@ public Tarsis evalNonNullConstant(Constant constant, ProgramPoint pp) throws Sem // TODO unary and ternary and all other binary @Override - public Tarsis evalBinaryExpression(BinaryOperator operator, Tarsis left, Tarsis right, ProgramPoint pp) + public Tarsis evalBinaryExpression( + BinaryOperator operator, + Tarsis left, + Tarsis right, + ProgramPoint pp, + SemanticOracle oracle) throws SemanticException { if (operator == StringConcat.INSTANCE) return new Tarsis(left.a.concat(right.a)); @@ -185,19 +205,30 @@ public Tarsis evalBinaryExpression(BinaryOperator operator, Tarsis left, Tarsis } @Override - public Tarsis evalTernaryExpression(TernaryOperator operator, Tarsis left, Tarsis middle, Tarsis right, - ProgramPoint pp) throws SemanticException { + public Tarsis evalTernaryExpression( + TernaryOperator operator, + Tarsis left, + Tarsis middle, + Tarsis right, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { if (operator == StringReplace.INSTANCE) return left.replace(middle, right); return TOP; } @Override - public Satisfiability satisfiesBinaryExpression(BinaryOperator operator, Tarsis left, Tarsis right, - ProgramPoint pp) throws SemanticException { + public Satisfiability satisfiesBinaryExpression( + BinaryOperator operator, + Tarsis left, + Tarsis right, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { if (operator == StringContains.INSTANCE) return left.contains(right); - return SemanticDomain.Satisfiability.UNKNOWN; + return Satisfiability.UNKNOWN; } /** @@ -208,7 +239,8 @@ public Satisfiability satisfiesBinaryExpression(BinaryOperator operator, Tarsis * * @return the satisfiability result */ - public Satisfiability contains(Tarsis other) { + public Satisfiability contains( + Tarsis other) { try { if (!a.hasCycle() && !other.a.hasCycle() @@ -261,7 +293,9 @@ public Satisfiability contains(Tarsis other) { return Satisfiability.UNKNOWN; } - private Satisfiability contains(String other, String that) { + private Satisfiability contains( + String other, + String that) { if (!other.contains("Ͳ")) { if (other.contains(that)) return Satisfiability.SATISFIED; @@ -285,7 +319,9 @@ private Satisfiability contains(String other, String that) { * @return the Tarsis automaton corresponding to the substring of this * Tarsis automaton between two indexes */ - public Tarsis substring(long begin, long end) { + public Tarsis substring( + long begin, + long end) { if (isTop() || isBottom()) return this; @@ -323,7 +359,9 @@ public IntInterval length() { * @throws CyclicAutomatonException when the automaton is cyclic and its * language is accessed */ - public IntInterval indexOf(Tarsis s) throws CyclicAutomatonException { + public IntInterval indexOf( + Tarsis s) + throws CyclicAutomatonException { if (contains(s) == Satisfiability.NOT_SATISFIED) return new IntInterval(-1, -1); else if (a.hasCycle() || s.a.hasCycle() || s.a.acceptsTopEventually()) @@ -339,7 +377,8 @@ else if (a.hasCycle() || s.a.hasCycle() || s.a.acceptsTopEventually()) * * @return the concatenation between two automata */ - public Tarsis concat(Tarsis other) { + public Tarsis concat( + Tarsis other) { return new Tarsis(this.a.concat(other.a)); } @@ -353,7 +392,9 @@ public Tarsis concat(Tarsis other) { * * @return the domain instance containing the replaced automaton */ - public Tarsis replace(Tarsis search, Tarsis repl) { + public Tarsis replace( + Tarsis search, + Tarsis repl) { if (isBottom() || search.isBottom() || repl.isBottom()) return bottom(); @@ -400,14 +441,16 @@ public FSA toFSA() { } @Override - public Satisfiability containsChar(char c) throws SemanticException { + public Satisfiability containsChar( + char c) + throws SemanticException { if (isTop()) return Satisfiability.UNKNOWN; if (isBottom()) return Satisfiability.BOTTOM; return satisfiesBinaryExpression(StringContains.INSTANCE, this, - new Tarsis(RegexAutomaton.string(String.valueOf(c))), null); + new Tarsis(RegexAutomaton.string(String.valueOf(c))), null, null); } /** @@ -422,7 +465,9 @@ public Satisfiability containsChar(char c) throws SemanticException { * @throws MathNumberConversionException if {@code intv} is iterated but is * not finite */ - public Tarsis repeat(Interval intv) throws MathNumberConversionException { + public Tarsis repeat( + Interval intv) + throws MathNumberConversionException { if (isBottom()) return this; else if (intv.isTop() || a.hasCycle()) diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/taint/BaseTaint.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/taint/BaseTaint.java index 968362500..d6b7f3353 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/taint/BaseTaint.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/taint/BaseTaint.java @@ -1,7 +1,8 @@ package it.unive.lisa.analysis.taint; -import it.unive.lisa.analysis.SemanticDomain.Satisfiability; import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.SemanticOracle; +import it.unive.lisa.analysis.lattices.Satisfiability; import it.unive.lisa.analysis.nonrelational.value.BaseNonRelationalValueDomain; import it.unive.lisa.analysis.nonrelational.value.ValueEnvironment; import it.unive.lisa.program.annotations.Annotation; @@ -9,7 +10,6 @@ import it.unive.lisa.program.annotations.matcher.AnnotationMatcher; import it.unive.lisa.program.annotations.matcher.BasicAnnotationMatcher; import it.unive.lisa.program.cfg.ProgramPoint; -import it.unive.lisa.symbolic.SymbolicExpression; import it.unive.lisa.symbolic.value.BinaryExpression; import it.unive.lisa.symbolic.value.Constant; import it.unive.lisa.symbolic.value.Identifier; @@ -107,26 +107,31 @@ public boolean isPossiblyClean() { /** * Default approximation for {@link Identifier}s. This method returns the * same as - * {@link BaseNonRelationalValueDomain#variable(Identifier, ProgramPoint)} + * {@link BaseNonRelationalValueDomain#fixedVariable(Identifier, ProgramPoint, SemanticOracle)} * if the given identifier has no annotations. Otherwise, it relies on the * presence if {@link #TAINTED_ANNOTATION} and {@link #CLEAN_ANNOTATION} to * produce abstract values. defaulting to bottom.
*
* If this method does not return bottom, it is used as return value for - * both {@link #variable(Identifier, ProgramPoint)} and - * {@link #evalIdentifier(Identifier, ValueEnvironment, ProgramPoint)}. + * both {@link #fixedVariable(Identifier, ProgramPoint, SemanticOracle)} and + * {@link #evalIdentifier(Identifier, ValueEnvironment, ProgramPoint, SemanticOracle)}. * - * @param id the identifier to evaluate - * @param pp the program point where the evaluation happens + * @param id the identifier to evaluate + * @param pp the program point where the evaluation happens + * @param oracle the oracle for inter-domain communication * * @return a fixed approximation for the given variable, if any * * @throws SemanticException if an exception happens during the evaluation */ - protected T defaultApprox(Identifier id, ProgramPoint pp) throws SemanticException { + protected T defaultApprox( + Identifier id, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { Annotations annots = id.getAnnotations(); if (annots.isEmpty()) - return BaseNonRelationalValueDomain.super.variable(id, pp); + return BaseNonRelationalValueDomain.super.fixedVariable(id, pp, oracle); if (annots.contains(BaseTaint.TAINTED_MATCHER)) return tainted(); @@ -138,83 +143,130 @@ protected T defaultApprox(Identifier id, ProgramPoint pp) throws SemanticExcepti } @Override - public T variable(Identifier id, ProgramPoint pp) throws SemanticException { - T def = defaultApprox(id, pp); + public T fixedVariable( + Identifier id, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + T def = defaultApprox(id, pp, oracle); if (!def.isBottom()) return def; - return BaseNonRelationalValueDomain.super.variable(id, pp); + return BaseNonRelationalValueDomain.super.fixedVariable(id, pp, oracle); } @Override - public T evalIdentifier(Identifier id, ValueEnvironment environment, ProgramPoint pp) + public T evalIdentifier( + Identifier id, + ValueEnvironment environment, + ProgramPoint pp, + SemanticOracle oracle) throws SemanticException { - T def = defaultApprox(id, pp); + T def = defaultApprox(id, pp, oracle); if (!def.isBottom()) return def; - return BaseNonRelationalValueDomain.super.evalIdentifier(id, environment, pp); + return BaseNonRelationalValueDomain.super.evalIdentifier(id, environment, pp, oracle); } @Override - public T evalPushAny(PushAny pushAny, ProgramPoint pp) throws SemanticException { + public T evalPushAny( + PushAny pushAny, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { return top(); } @Override - public T evalNullConstant(ProgramPoint pp) throws SemanticException { + public T evalNullConstant( + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { return clean(); } @Override - public T evalNonNullConstant(Constant constant, ProgramPoint pp) throws SemanticException { + public T evalNonNullConstant( + Constant constant, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { return clean(); } @Override - public T evalUnaryExpression(UnaryOperator operator, T arg, ProgramPoint pp) throws SemanticException { + public T evalUnaryExpression( + UnaryOperator operator, + T arg, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { return arg; } @Override - public T evalBinaryExpression(BinaryOperator operator, T left, T right, ProgramPoint pp) throws SemanticException { + public T evalBinaryExpression( + BinaryOperator operator, + T left, + T right, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { return left.lub(right); } @Override - public T evalTernaryExpression(TernaryOperator operator, T left, T middle, T right, ProgramPoint pp) + public T evalTernaryExpression( + TernaryOperator operator, + T left, + T middle, + T right, + ProgramPoint pp, + SemanticOracle oracle) throws SemanticException { return left.lub(middle).lub(right); } @Override - public T evalTypeCast(BinaryExpression cast, T left, T right, ProgramPoint pp) throws SemanticException { + public T evalTypeCast( + BinaryExpression cast, + T left, + T right, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { return left; } @Override - public T evalTypeConv(BinaryExpression conv, T left, T right, ProgramPoint pp) throws SemanticException { + public T evalTypeConv( + BinaryExpression conv, + T left, + T right, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { return left; } @Override - public boolean tracksIdentifiers(Identifier id) { - return true; - } - - @Override - public boolean canProcess(SymbolicExpression expression) { - return !expression.getDynamicType().isPointerType() && !expression.getDynamicType().isInMemoryType(); - } - - @Override - public Satisfiability satisfies(ValueExpression expression, ValueEnvironment environment, ProgramPoint pp) + public Satisfiability satisfies( + ValueExpression expression, + ValueEnvironment environment, + ProgramPoint pp, + SemanticOracle oracle) throws SemanticException { // quick answer: we cannot do anything return Satisfiability.UNKNOWN; } @Override - public ValueEnvironment assume(ValueEnvironment environment, ValueExpression expression, ProgramPoint src, - ProgramPoint dest) throws SemanticException { + public ValueEnvironment assume( + ValueEnvironment environment, + ValueExpression expression, + ProgramPoint src, + ProgramPoint dest, + SemanticOracle oracle) + throws SemanticException { // quick answer: we cannot do anything return environment; } diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/taint/Taint.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/taint/Taint.java index 4ddf4fe66..cfb9ce958 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/taint/Taint.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/taint/Taint.java @@ -2,8 +2,8 @@ import it.unive.lisa.analysis.Lattice; import it.unive.lisa.analysis.SemanticException; -import it.unive.lisa.analysis.representation.DomainRepresentation; -import it.unive.lisa.analysis.representation.StringRepresentation; +import it.unive.lisa.util.representation.StringRepresentation; +import it.unive.lisa.util.representation.StructuredRepresentation; /** * A {@link BaseTaint} implementation with only two level of taintedness: clean @@ -29,7 +29,8 @@ public Taint() { this(true); } - private Taint(Boolean taint) { + private Taint( + Boolean taint) { this.taint = taint; } @@ -54,7 +55,7 @@ public boolean isAlwaysTainted() { } @Override - public DomainRepresentation representation() { + public StructuredRepresentation representation() { return this == BOTTOM ? Lattice.bottomRepresentation() : this == CLEAN ? new StringRepresentation("_") : new StringRepresentation("#"); } @@ -70,17 +71,23 @@ public Taint bottom() { } @Override - public Taint lubAux(Taint other) throws SemanticException { + public Taint lubAux( + Taint other) + throws SemanticException { return TAINTED; // should never happen } @Override - public Taint wideningAux(Taint other) throws SemanticException { + public Taint wideningAux( + Taint other) + throws SemanticException { return TAINTED; // should never happen } @Override - public boolean lessOrEqualAux(Taint other) throws SemanticException { + public boolean lessOrEqualAux( + Taint other) + throws SemanticException { return false; // should never happen } @@ -93,7 +100,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/taint/ThreeLevelsTaint.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/taint/ThreeLevelsTaint.java index 35c5b593f..9e216c21f 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/taint/ThreeLevelsTaint.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/taint/ThreeLevelsTaint.java @@ -2,11 +2,12 @@ import it.unive.lisa.analysis.Lattice; import it.unive.lisa.analysis.SemanticException; -import it.unive.lisa.analysis.representation.DomainRepresentation; -import it.unive.lisa.analysis.representation.StringRepresentation; +import it.unive.lisa.analysis.SemanticOracle; import it.unive.lisa.program.cfg.ProgramPoint; import it.unive.lisa.symbolic.value.operator.binary.BinaryOperator; import it.unive.lisa.symbolic.value.operator.ternary.TernaryOperator; +import it.unive.lisa.util.representation.StringRepresentation; +import it.unive.lisa.util.representation.StructuredRepresentation; /** * A {@link BaseTaint} implementation with three level of taintedness: clean, @@ -31,7 +32,8 @@ public ThreeLevelsTaint() { this((byte) 3); } - private ThreeLevelsTaint(byte v) { + private ThreeLevelsTaint( + byte v) { this.taint = v; } @@ -56,7 +58,7 @@ public boolean isPossiblyTainted() { } @Override - public DomainRepresentation representation() { + public StructuredRepresentation representation() { return this == BOTTOM ? Lattice.bottomRepresentation() : this == CLEAN ? new StringRepresentation("_") : this == TAINTED ? new StringRepresentation("#") : Lattice.topRepresentation(); @@ -73,8 +75,13 @@ public ThreeLevelsTaint bottom() { } @Override - public ThreeLevelsTaint evalBinaryExpression(BinaryOperator operator, ThreeLevelsTaint left, ThreeLevelsTaint right, - ProgramPoint pp) throws SemanticException { + public ThreeLevelsTaint evalBinaryExpression( + BinaryOperator operator, + ThreeLevelsTaint left, + ThreeLevelsTaint right, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { if (left == TAINTED || right == TAINTED) return TAINTED; @@ -85,8 +92,14 @@ public ThreeLevelsTaint evalBinaryExpression(BinaryOperator operator, ThreeLevel } @Override - public ThreeLevelsTaint evalTernaryExpression(TernaryOperator operator, ThreeLevelsTaint left, - ThreeLevelsTaint middle, ThreeLevelsTaint right, ProgramPoint pp) throws SemanticException { + public ThreeLevelsTaint evalTernaryExpression( + TernaryOperator operator, + ThreeLevelsTaint left, + ThreeLevelsTaint middle, + ThreeLevelsTaint right, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { if (left == TAINTED || right == TAINTED || middle == TAINTED) return TAINTED; @@ -97,19 +110,25 @@ public ThreeLevelsTaint evalTernaryExpression(TernaryOperator operator, ThreeLev } @Override - public ThreeLevelsTaint lubAux(ThreeLevelsTaint other) throws SemanticException { + public ThreeLevelsTaint lubAux( + ThreeLevelsTaint other) + throws SemanticException { // only happens with clean and tainted, that are not comparable return TOP; } @Override - public ThreeLevelsTaint wideningAux(ThreeLevelsTaint other) throws SemanticException { + public ThreeLevelsTaint wideningAux( + ThreeLevelsTaint other) + throws SemanticException { // only happens with clean and tainted, that are not comparable return TOP; } @Override - public boolean lessOrEqualAux(ThreeLevelsTaint other) throws SemanticException { + public boolean lessOrEqualAux( + ThreeLevelsTaint other) + throws SemanticException { // only happens with clean and tainted, that are not comparable return false; } @@ -123,7 +142,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/traces/Branching.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/traces/Branching.java index 41d5fed5a..52a2fba7c 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/traces/Branching.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/traces/Branching.java @@ -19,7 +19,9 @@ public class Branching extends TraceToken { * @param trueBranch whether the condition is traversed to reach the * {@code true} branch or not */ - public Branching(ProgramPoint pp, boolean trueBranch) { + public Branching( + ProgramPoint pp, + boolean trueBranch) { super(pp); this.trueBranch = trueBranch; } @@ -43,7 +45,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (!super.equals(obj)) diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/traces/ExecutionTrace.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/traces/ExecutionTrace.java index f8e3920b8..3982ab610 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/traces/ExecutionTrace.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/traces/ExecutionTrace.java @@ -23,7 +23,8 @@ public ExecutionTrace() { tokens = EMPTY_TRACE; } - private ExecutionTrace(TraceToken[] tokens) { + private ExecutionTrace( + TraceToken[] tokens) { this.tokens = tokens; } @@ -34,7 +35,8 @@ private ExecutionTrace(TraceToken[] tokens) { * * @return the updated trace */ - public ExecutionTrace push(TraceToken token) { + public ExecutionTrace push( + TraceToken token) { int len = this.tokens.length; TraceToken[] tokens = new TraceToken[len + 1]; System.arraycopy(this.tokens, 0, tokens, 0, len); @@ -88,7 +90,8 @@ public int numberOfBranches() { * @return the last (top-most) loop token for the given guard, or * {@code null} if no such token exist */ - public TraceToken lastLoopTokenFor(ProgramPoint guard) { + public TraceToken lastLoopTokenFor( + ProgramPoint guard) { for (int i = tokens.length - 1; i >= 0; i--) { TraceToken tok = tokens[i]; if ((tok instanceof LoopSummary || tok instanceof LoopIteration) && tok.getProgramPoint() == guard) @@ -107,7 +110,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/traces/LoopIteration.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/traces/LoopIteration.java index 2825cc7b7..23c5c8af1 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/traces/LoopIteration.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/traces/LoopIteration.java @@ -18,7 +18,9 @@ public class LoopIteration extends TraceToken { * @param pp the program point associated with the iteration * @param iteration the iteration number */ - public LoopIteration(ProgramPoint pp, int iteration) { + public LoopIteration( + ProgramPoint pp, + int iteration) { super(pp); this.iteration = iteration; } @@ -41,7 +43,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (!super.equals(obj)) diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/traces/LoopSummary.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/traces/LoopSummary.java index 111c32cac..f413f47b8 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/traces/LoopSummary.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/traces/LoopSummary.java @@ -15,7 +15,8 @@ public class LoopSummary extends TraceToken { * * @param pp the program point associated with the summary */ - public LoopSummary(ProgramPoint pp) { + public LoopSummary( + ProgramPoint pp) { super(pp); } @@ -28,7 +29,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (!super.equals(obj)) diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/traces/TracePartitioning.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/traces/TracePartitioning.java index e6a253400..82d7eb6d0 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/traces/TracePartitioning.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/traces/TracePartitioning.java @@ -5,22 +5,26 @@ import it.unive.lisa.analysis.ScopeToken; import it.unive.lisa.analysis.SemanticDomain; import it.unive.lisa.analysis.SemanticException; -import it.unive.lisa.analysis.heap.HeapDomain; +import it.unive.lisa.analysis.SemanticOracle; +import it.unive.lisa.analysis.lattices.ExpressionSet; import it.unive.lisa.analysis.lattices.FunctionalLattice; -import it.unive.lisa.analysis.representation.DomainRepresentation; -import it.unive.lisa.analysis.representation.MapRepresentation; -import it.unive.lisa.analysis.representation.StringRepresentation; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; +import it.unive.lisa.analysis.lattices.Satisfiability; import it.unive.lisa.program.cfg.ProgramPoint; import it.unive.lisa.program.cfg.controlFlow.ControlFlowStructure; import it.unive.lisa.program.cfg.controlFlow.IfThenElse; import it.unive.lisa.program.cfg.controlFlow.Loop; import it.unive.lisa.symbolic.SymbolicExpression; import it.unive.lisa.symbolic.value.Identifier; +import it.unive.lisa.type.Type; +import it.unive.lisa.type.Untyped; +import it.unive.lisa.util.representation.MapRepresentation; +import it.unive.lisa.util.representation.StringRepresentation; +import it.unive.lisa.util.representation.StructuredRepresentation; import java.util.Collection; +import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; +import java.util.Set; import java.util.function.Predicate; /** @@ -44,25 +48,20 @@ * and their approximations using {@link #getKeys()}, {@link #getValues()}, * {@link #getMap()} or by iterating over the instance itself. Approximations of * different traces can instead be collapsed and accessed by querying - * {@link #getHeapState()}, {@link #getValueState()}, and - * {@link #getTypeState()}, or {@link #collapse()}. + * {@link #collapse()}. * * @author Luca Negrini * * @param the type of {@link AbstractState} that this is being partitioned - * @param the type of {@link HeapDomain} embedded in the abstract states - * @param the type of {@link ValueDomain} embedded in the abstract states - * @param the type of {@link TypeDomain} embedded in the abstract states * * @see https://doi.org/10.1145/1275497.1275501 */ -public class TracePartitioning, - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> - extends FunctionalLattice, ExecutionTrace, A> - implements AbstractState, H, V, T> { +public class TracePartitioning> + extends + FunctionalLattice, ExecutionTrace, A> + implements + AbstractState> { /** * The maximum number of {@link LoopIteration} tokens that a trace can @@ -81,16 +80,20 @@ public class TracePartitioning, * * @param lattice a singleton of the underlying abstract states */ - public TracePartitioning(A lattice) { + public TracePartitioning( + A lattice) { super(lattice); } - private TracePartitioning(A lattice, Map function) { + private TracePartitioning( + A lattice, + Map function) { super(lattice, function); } @Override - public > Collection getAllDomainInstances(Class domain) { + public > Collection getAllDomainInstances( + Class domain) { Collection result = AbstractState.super.getAllDomainInstances(domain); if (isTop()) return lattice.top().getAllDomainInstances(domain); @@ -103,47 +106,58 @@ else if (isBottom() || function == null) } @Override - public TracePartitioning top() { + public TracePartitioning top() { return new TracePartitioning<>(lattice.top(), null); } @Override - public TracePartitioning bottom() { + public TracePartitioning bottom() { return new TracePartitioning<>(lattice.bottom(), null); } @Override - public TracePartitioning assign(Identifier id, SymbolicExpression expression, ProgramPoint pp) + public TracePartitioning assign( + Identifier id, + SymbolicExpression expression, + ProgramPoint pp, + SemanticOracle oracle) throws SemanticException { if (isBottom()) return this; Map result = mkNewFunction(null, false); if (isTop() || function == null) - result.put(new ExecutionTrace(), lattice.assign(id, expression, pp)); + result.put(new ExecutionTrace(), lattice.assign(id, expression, pp, oracle)); else for (Entry trace : this) - result.put(trace.getKey(), trace.getValue().assign(id, expression, pp)); + result.put(trace.getKey(), trace.getValue().assign(id, expression, pp, oracle)); return new TracePartitioning<>(lattice, result); } @Override - public TracePartitioning smallStepSemantics(SymbolicExpression expression, ProgramPoint pp) + public TracePartitioning smallStepSemantics( + SymbolicExpression expression, + ProgramPoint pp, + SemanticOracle oracle) throws SemanticException { if (isBottom()) return this; Map result = mkNewFunction(null, false); if (isTop() || function == null) - result.put(new ExecutionTrace(), lattice.smallStepSemantics(expression, pp)); + result.put(new ExecutionTrace(), lattice.smallStepSemantics(expression, pp, oracle)); else for (Entry trace : this) - result.put(trace.getKey(), trace.getValue().smallStepSemantics(expression, pp)); + result.put(trace.getKey(), trace.getValue().smallStepSemantics(expression, pp, oracle)); return new TracePartitioning<>(lattice, result); } @Override - public TracePartitioning assume(SymbolicExpression expression, ProgramPoint src, ProgramPoint dest) + public TracePartitioning assume( + SymbolicExpression expression, + ProgramPoint src, + ProgramPoint dest, + SemanticOracle oracle) throws SemanticException { if (isBottom()) return this; @@ -159,7 +173,7 @@ public TracePartitioning assume(SymbolicExpression expression, Progr for (Entry trace : this) { A state = trace.getValue(); ExecutionTrace tokens = trace.getKey(); - A assume = state.assume(expression, src, dest); + A assume = state.assume(expression, src, dest, oracle); if (assume.isBottom()) // we only keep traces that can escape the loop continue; @@ -178,7 +192,10 @@ public TracePartitioning assume(SymbolicExpression expression, Progr return new TracePartitioning<>(lattice, result); } - private static ExecutionTrace generateTraceFor(ExecutionTrace trace, ControlFlowStructure struct, ProgramPoint src, + private static ExecutionTrace generateTraceFor( + ExecutionTrace trace, + ControlFlowStructure struct, + ProgramPoint src, ProgramPoint dest) { if (struct instanceof Loop && ((Loop) struct).getBody().contains(dest)) { // on loop exits we do not generate new traces @@ -205,7 +222,9 @@ else if (prev instanceof LoopIteration) { } @Override - public TracePartitioning forgetIdentifier(Identifier id) throws SemanticException { + public TracePartitioning forgetIdentifier( + Identifier id) + throws SemanticException { if (isTop() || isBottom() || function == null) return this; @@ -216,7 +235,9 @@ public TracePartitioning forgetIdentifier(Identifier id) throws Sema } @Override - public TracePartitioning forgetIdentifiersIf(Predicate test) throws SemanticException { + public TracePartitioning forgetIdentifiersIf( + Predicate test) + throws SemanticException { if (isTop() || isBottom() || function == null) return this; @@ -227,7 +248,11 @@ public TracePartitioning forgetIdentifiersIf(Predicate t } @Override - public Satisfiability satisfies(SymbolicExpression expression, ProgramPoint pp) throws SemanticException { + public Satisfiability satisfies( + SymbolicExpression expression, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { if (isTop()) return Satisfiability.UNKNOWN; @@ -236,7 +261,7 @@ public Satisfiability satisfies(SymbolicExpression expression, ProgramPoint pp) Satisfiability result = Satisfiability.BOTTOM; for (Entry trace : this) { - Satisfiability sat = trace.getValue().satisfies(expression, pp); + Satisfiability sat = trace.getValue().satisfies(expression, pp, oracle); if (sat == Satisfiability.BOTTOM) return sat; result = result.lub(sat); @@ -245,7 +270,9 @@ public Satisfiability satisfies(SymbolicExpression expression, ProgramPoint pp) } @Override - public TracePartitioning pushScope(ScopeToken token) throws SemanticException { + public TracePartitioning pushScope( + ScopeToken token) + throws SemanticException { if (isTop() || isBottom() || function == null) return this; @@ -256,7 +283,9 @@ public TracePartitioning pushScope(ScopeToken token) throws Semantic } @Override - public TracePartitioning popScope(ScopeToken token) throws SemanticException { + public TracePartitioning popScope( + ScopeToken token) + throws SemanticException { if (isTop() || isBottom() || function == null) return this; @@ -267,7 +296,7 @@ public TracePartitioning popScope(ScopeToken token) throws SemanticE } @Override - public DomainRepresentation representation() { + public StructuredRepresentation representation() { if (isTop()) return Lattice.topRepresentation(); @@ -281,17 +310,29 @@ public DomainRepresentation representation() { } @Override - public H getHeapState() { + public TracePartitioning mk( + A lattice, + Map function) { + return new TracePartitioning<>(lattice, function); + } + + /** + * Collapses all of the traces contained in this domain, returning a unique + * abstract state that over-approximates all of them. + * + * @return the collapsed state + */ + public A collapse() { if (isTop()) - return lattice.getHeapState().top(); + return lattice.top(); - H result = lattice.getHeapState().bottom(); + A result = lattice.bottom(); if (isBottom() || function == null) return result; try { for (Entry trace : this) - result = result.lub(trace.getValue().getHeapState()); + result = result.lub(trace.getValue()); } catch (SemanticException e) { return result.bottom(); } @@ -299,104 +340,175 @@ public H getHeapState() { } @Override - public V getValueState() { + public String toString() { + return representation().toString(); + } + + @Override + public ExpressionSet rewrite( + SymbolicExpression expression, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + if (!expression.mightNeedRewriting()) + return new ExpressionSet(expression); + if (isTop()) - return lattice.getValueState().top(); + return lattice.top().rewrite(expression, pp, oracle); + else if (isBottom() || function == null) + return lattice.bottom().rewrite(expression, pp, oracle); - V result = lattice.getValueState().bottom(); - if (isBottom() || function == null) - return result; + Set result = new HashSet<>(); + for (A dom : getValues()) + result.addAll(dom.rewrite(expression, pp, oracle).elements()); + return new ExpressionSet(result); + } - try { - for (Entry trace : this) - result = result.lub(trace.getValue().getValueState()); - } catch (SemanticException e) { - return result.bottom(); - } + @Override + public ExpressionSet rewrite( + ExpressionSet expressions, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + if (isTop()) + return lattice.top().rewrite(expressions, pp, oracle); + else if (isBottom() || function == null) + return lattice.bottom().rewrite(expressions, pp, oracle); + + Set result = new HashSet<>(); + for (A dom : getValues()) + result.addAll(dom.rewrite(expressions, pp, oracle).elements()); + return new ExpressionSet(result); + } + + @Override + public Set getRuntimeTypesOf( + SymbolicExpression e, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + if (isTop()) + return lattice.top().getRuntimeTypesOf(e, pp, oracle); + else if (isBottom() || function == null) + return lattice.bottom().getRuntimeTypesOf(e, pp, oracle); + + Set result = new HashSet<>(); + for (A dom : getValues()) + result.addAll(dom.getRuntimeTypesOf(e, pp, oracle)); return result; } @Override - public T getTypeState() { + public Type getDynamicTypeOf( + SymbolicExpression e, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { if (isTop()) - return lattice.getTypeState().top(); + return lattice.top().getDynamicTypeOf(e, pp, oracle); + else if (isBottom() || function == null) + return lattice.bottom().getDynamicTypeOf(e, pp, oracle); - T result = lattice.getTypeState().bottom(); - if (isBottom() || function == null) - return result; + Set result = new HashSet<>(); + for (A dom : getValues()) + result.add(dom.getDynamicTypeOf(e, pp, oracle)); + return Type.commonSupertype(result, Untyped.INSTANCE); + } - try { - for (Entry trace : this) - result = result.lub(trace.getValue().getTypeState()); - } catch (SemanticException e) { - return result.bottom(); - } - return result; + @Override + public A stateOfUnknown( + ExecutionTrace key) { + return lattice.bottom(); } @Override - public TracePartitioning withTopHeap() { + public boolean knowsIdentifier( + Identifier id) { + if (isTop() || isBottom() || function == null) + return false; + + for (Entry trace : this) + if (trace.getValue().knowsIdentifier(id)) + return true; + return false; + } + + @Override + public TracePartitioning withTopMemory() { if (isTop() || isBottom() || function == null) return this; Map result = mkNewFunction(null, false); for (Entry trace : this) - result.put(trace.getKey(), trace.getValue().withTopHeap()); + result.put(trace.getKey(), trace.getValue().withTopMemory()); return new TracePartitioning<>(lattice, result); } @Override - public TracePartitioning withTopValue() { + public TracePartitioning withTopValues() { if (isTop() || isBottom() || function == null) return this; Map result = mkNewFunction(null, false); for (Entry trace : this) - result.put(trace.getKey(), trace.getValue().withTopValue()); + result.put(trace.getKey(), trace.getValue().withTopValues()); return new TracePartitioning<>(lattice, result); } @Override - public TracePartitioning withTopType() { + public TracePartitioning withTopTypes() { if (isTop() || isBottom() || function == null) return this; Map result = mkNewFunction(null, false); for (Entry trace : this) - result.put(trace.getKey(), trace.getValue().withTopType()); + result.put(trace.getKey(), trace.getValue().withTopTypes()); return new TracePartitioning<>(lattice, result); } @Override - public TracePartitioning mk(A lattice, Map function) { - return new TracePartitioning<>(lattice, function); - } - - /** - * Collapses all of the traces contained in this domain, returning a unique - * abstract state that over-approximates all of them. - * - * @return the collapsed state - */ - public A collapse() { + public Satisfiability alias( + SymbolicExpression x, + SymbolicExpression y, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { if (isTop()) - return lattice.top(); + return Satisfiability.UNKNOWN; - A result = lattice.bottom(); if (isBottom() || function == null) - return result; + return Satisfiability.BOTTOM; - try { - for (Entry trace : this) - result = result.lub(trace.getValue()); - } catch (SemanticException e) { - return result.bottom(); + Satisfiability result = Satisfiability.BOTTOM; + for (Entry trace : this) { + Satisfiability sat = trace.getValue().alias(x, y, pp, oracle); + if (sat == Satisfiability.BOTTOM) + return sat; + result = result.lub(sat); } return result; } @Override - public String toString() { - return representation().toString(); + public Satisfiability isReachableFrom( + SymbolicExpression x, + SymbolicExpression y, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + if (isTop()) + return Satisfiability.UNKNOWN; + + if (isBottom() || function == null) + return Satisfiability.BOTTOM; + + Satisfiability result = Satisfiability.BOTTOM; + for (Entry trace : this) { + Satisfiability sat = trace.getValue().isReachableFrom(x, y, pp, oracle); + if (sat == Satisfiability.BOTTOM) + return sat; + result = result.lub(sat); + } + return result; } } diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/traces/TraceToken.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/traces/TraceToken.java index 447b2390f..420b4a37b 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/traces/TraceToken.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/traces/TraceToken.java @@ -17,7 +17,8 @@ public abstract class TraceToken { * * @param pp the program point */ - protected TraceToken(ProgramPoint pp) { + protected TraceToken( + ProgramPoint pp) { this.pp = pp; } @@ -39,7 +40,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/types/InferredTypes.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/types/InferredTypes.java index a7fec734b..fed8f168c 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/types/InferredTypes.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/types/InferredTypes.java @@ -2,24 +2,20 @@ import static org.apache.commons.collections4.CollectionUtils.intersection; -import it.unive.lisa.FallbackImplementation; import it.unive.lisa.analysis.Lattice; -import it.unive.lisa.analysis.SemanticDomain.Satisfiability; import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.SemanticOracle; +import it.unive.lisa.analysis.lattices.Satisfiability; import it.unive.lisa.analysis.nonrelational.inference.InferredValue; import it.unive.lisa.analysis.nonrelational.value.BaseNonRelationalTypeDomain; import it.unive.lisa.analysis.nonrelational.value.TypeEnvironment; -import it.unive.lisa.analysis.representation.DomainRepresentation; -import it.unive.lisa.analysis.representation.SetRepresentation; -import it.unive.lisa.analysis.representation.StringRepresentation; import it.unive.lisa.program.cfg.ProgramPoint; import it.unive.lisa.program.cfg.statement.Expression; -import it.unive.lisa.symbolic.SymbolicExpression; import it.unive.lisa.symbolic.value.BinaryExpression; import it.unive.lisa.symbolic.value.Constant; import it.unive.lisa.symbolic.value.Identifier; -import it.unive.lisa.symbolic.value.MemoryPointer; import it.unive.lisa.symbolic.value.PushAny; +import it.unive.lisa.symbolic.value.PushInv; import it.unive.lisa.symbolic.value.operator.binary.BinaryOperator; import it.unive.lisa.symbolic.value.operator.binary.ComparisonEq; import it.unive.lisa.symbolic.value.operator.binary.ComparisonNe; @@ -31,6 +27,9 @@ import it.unive.lisa.type.Type; import it.unive.lisa.type.TypeSystem; import it.unive.lisa.type.TypeTokenType; +import it.unive.lisa.util.representation.SetRepresentation; +import it.unive.lisa.util.representation.StringRepresentation; +import it.unive.lisa.util.representation.StructuredRepresentation; import java.util.Collections; import java.util.HashSet; import java.util.Set; @@ -43,7 +42,6 @@ * * @author Luca Negrini */ -@FallbackImplementation public class InferredTypes implements BaseNonRelationalTypeDomain { private static final InferredTypes BOTTOM = new InferredTypes(null, Collections.emptySet()); @@ -67,7 +65,9 @@ public InferredTypes() { * where this element is created * @param type the type to be included in the set of inferred types */ - public InferredTypes(TypeSystem typeSystem, Type type) { + public InferredTypes( + TypeSystem typeSystem, + Type type) { this(typeSystem, Collections.singleton(type)); } @@ -79,7 +79,9 @@ public InferredTypes(TypeSystem typeSystem, Type type) { * where this element is created * @param types the types to be included in the set of inferred types */ - public InferredTypes(TypeSystem typeSystem, Set types) { + public InferredTypes( + TypeSystem typeSystem, + Set types) { this(typeSystem != null && types.equals(typeSystem.getTypes()), types); } @@ -91,19 +93,17 @@ public InferredTypes(TypeSystem typeSystem, Set types) { * types * @param types the types to be included in the set of inferred types */ - public InferredTypes(boolean isTop, Set types) { + public InferredTypes( + boolean isTop, + Set types) { this.elements = types; this.isTop = isTop; } - /** - * {@inheritDoc}
- *
- * Caution: invoking this method on the top instance obtained through - * {@code new InferredTypes().top()} will return a {@code null} value. - */ @Override public Set getRuntimeTypes() { + if (elements == null) + Collections.emptySet(); return elements; } @@ -133,7 +133,7 @@ public String toString() { } @Override - public DomainRepresentation representation() { + public StructuredRepresentation representation() { if (isTop()) return Lattice.topRepresentation(); @@ -144,36 +144,61 @@ public DomainRepresentation representation() { } @Override - public InferredTypes evalIdentifier(Identifier id, TypeEnvironment environment, - ProgramPoint pp) throws SemanticException { - InferredTypes eval = BaseNonRelationalTypeDomain.super.evalIdentifier(id, environment, pp); - if (!eval.isTop() && !eval.isBottom()) + public InferredTypes evalIdentifier( + Identifier id, + TypeEnvironment environment, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + InferredTypes eval = BaseNonRelationalTypeDomain.super.evalIdentifier(id, environment, pp, oracle); + if (!eval.isTop()) return eval; TypeSystem types = pp.getProgram().getTypes(); - return new InferredTypes(types, id.getRuntimeTypes(types)); + return new InferredTypes(types, id.getStaticType().allInstances(types)); } @Override - public InferredTypes evalPushAny(PushAny pushAny, ProgramPoint pp) { + public InferredTypes evalPushAny( + PushAny pushAny, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { TypeSystem types = pp.getProgram().getTypes(); if (pushAny.getStaticType().isUntyped()) return new InferredTypes(true, types.getTypes()); - return new InferredTypes(types, pushAny.getRuntimeTypes(types)); + return new InferredTypes(types, pushAny.getStaticType().allInstances(types)); } @Override - public InferredTypes evalNullConstant(ProgramPoint pp) { + public InferredTypes evalPushInv( + PushInv pushInv, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + return bottom(); + } + + @Override + public InferredTypes evalNullConstant( + ProgramPoint pp, + SemanticOracle oracle) { return new InferredTypes(pp.getProgram().getTypes(), NullType.INSTANCE); } @Override - public InferredTypes evalNonNullConstant(Constant constant, ProgramPoint pp) { + public InferredTypes evalNonNullConstant( + Constant constant, + ProgramPoint pp, + SemanticOracle oracle) { return new InferredTypes(pp.getProgram().getTypes(), constant.getStaticType()); } @Override - public InferredTypes evalUnaryExpression(UnaryOperator operator, InferredTypes arg, - ProgramPoint pp) { + public InferredTypes evalUnaryExpression( + UnaryOperator operator, + InferredTypes arg, + ProgramPoint pp, + SemanticOracle oracle) { TypeSystem types = pp.getProgram().getTypes(); Set elems = arg.isTop() ? types.getTypes() : arg.elements; Set inferred = operator.typeInference(types, elems); @@ -183,8 +208,12 @@ public InferredTypes evalUnaryExpression(UnaryOperator operator, InferredTypes a } @Override - public InferredTypes evalBinaryExpression(BinaryOperator operator, InferredTypes left, - InferredTypes right, ProgramPoint pp) { + public InferredTypes evalBinaryExpression( + BinaryOperator operator, + InferredTypes left, + InferredTypes right, + ProgramPoint pp, + SemanticOracle oracle) { TypeSystem types = pp.getProgram().getTypes(); Set lelems = left.isTop() ? types.getTypes() : left.elements; Set relems = right.isTop() ? types.getTypes() : right.elements; @@ -195,8 +224,13 @@ public InferredTypes evalBinaryExpression(BinaryOperator operator, InferredTypes } @Override - public InferredTypes evalTernaryExpression(TernaryOperator operator, InferredTypes left, - InferredTypes middle, InferredTypes right, ProgramPoint pp) { + public InferredTypes evalTernaryExpression( + TernaryOperator operator, + InferredTypes left, + InferredTypes middle, + InferredTypes right, + ProgramPoint pp, + SemanticOracle oracle) { TypeSystem types = pp.getProgram().getTypes(); Set lelems = left.isTop() ? types.getTypes() : left.elements; Set melems = middle.isTop() ? types.getTypes() : middle.elements; @@ -208,8 +242,12 @@ public InferredTypes evalTernaryExpression(TernaryOperator operator, InferredTyp } @Override - public Satisfiability satisfiesBinaryExpression(BinaryOperator operator, InferredTypes left, - InferredTypes right, ProgramPoint pp) { + public Satisfiability satisfiesBinaryExpression( + BinaryOperator operator, + InferredTypes left, + InferredTypes right, + ProgramPoint pp, + SemanticOracle oracle) { TypeSystem types = pp.getProgram().getTypes(); Set lelems = left.isTop() ? types.getTypes() : left.elements; Set relems = right.isTop() ? types.getTypes() : right.elements; @@ -245,7 +283,7 @@ else if (lelems.size() == 1 && lelems.equals(relems)) return Satisfiability.UNKNOWN; } } else if (operator == TypeCheck.INSTANCE) { - if (evalBinaryExpression(TypeCast.INSTANCE, left, right, pp).isBottom()) + if (evalBinaryExpression(TypeCast.INSTANCE, left, right, pp, oracle).isBottom()) // no common types, the check will always fail return Satisfiability.NOT_SATISFIED; AtomicBoolean mightFail = new AtomicBoolean(); @@ -282,7 +320,9 @@ else if (lelems.size() == 1 && lelems.equals(relems)) * {@link TypeTokenType} (this is due to * the conversion) */ - static boolean typeTokensIntersect(Set lfiltered, Set rfiltered) { + static boolean typeTokensIntersect( + Set lfiltered, + Set rfiltered) { for (Type l : lfiltered) for (Type r : rfiltered) if (!intersection(l.asTypeTokenType().getTypes(), r.asTypeTokenType().getTypes()) @@ -293,14 +333,18 @@ static boolean typeTokensIntersect(Set lfiltered, Set rfiltered) { } @Override - public InferredTypes lubAux(InferredTypes other) throws SemanticException { + public InferredTypes lubAux( + InferredTypes other) + throws SemanticException { Set lub = new HashSet<>(elements); lub.addAll(other.elements); return new InferredTypes(null, lub); } @Override - public boolean lessOrEqualAux(InferredTypes other) throws SemanticException { + public boolean lessOrEqualAux( + InferredTypes other) + throws SemanticException { return other.elements.containsAll(elements); } @@ -314,7 +358,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -333,8 +378,12 @@ public boolean equals(Object obj) { } @Override - public InferredTypes evalTypeCast(BinaryExpression cast, InferredTypes left, InferredTypes right, - ProgramPoint pp) { + public InferredTypes evalTypeCast( + BinaryExpression cast, + InferredTypes left, + InferredTypes right, + ProgramPoint pp, + SemanticOracle oracle) { TypeSystem types = pp.getProgram().getTypes(); Set lelems = left.isTop() ? types.getTypes() : left.elements; Set relems = right.isTop() ? types.getTypes() : right.elements; @@ -345,8 +394,12 @@ public InferredTypes evalTypeCast(BinaryExpression cast, InferredTypes left, Inf } @Override - public InferredTypes evalTypeConv(BinaryExpression conv, InferredTypes left, InferredTypes right, - ProgramPoint pp) { + public InferredTypes evalTypeConv( + BinaryExpression conv, + InferredTypes left, + InferredTypes right, + ProgramPoint pp, + SemanticOracle oracle) { TypeSystem types = pp.getProgram().getTypes(); Set lelems = left.isTop() ? types.getTypes() : left.elements; Set relems = right.isTop() ? types.getTypes() : right.elements; @@ -355,15 +408,4 @@ public InferredTypes evalTypeConv(BinaryExpression conv, InferredTypes left, Inf return BOTTOM; return new InferredTypes(types, inferred); } - - @Override - public boolean tracksIdentifiers(Identifier id) { - return !(id instanceof MemoryPointer); - } - - @Override - public boolean canProcess(SymbolicExpression expression) { - // Type analysis can process any expression - return true; - } } diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/types/StaticTypes.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/types/StaticTypes.java index 34e513092..c2f1322c0 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/types/StaticTypes.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/analysis/types/StaticTypes.java @@ -1,21 +1,19 @@ package it.unive.lisa.analysis.types; import it.unive.lisa.analysis.Lattice; -import it.unive.lisa.analysis.SemanticDomain.Satisfiability; import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.SemanticOracle; +import it.unive.lisa.analysis.lattices.Satisfiability; import it.unive.lisa.analysis.nonrelational.inference.InferredValue; import it.unive.lisa.analysis.nonrelational.value.BaseNonRelationalTypeDomain; import it.unive.lisa.analysis.nonrelational.value.TypeEnvironment; -import it.unive.lisa.analysis.representation.DomainRepresentation; -import it.unive.lisa.analysis.representation.StringRepresentation; import it.unive.lisa.program.cfg.ProgramPoint; import it.unive.lisa.program.cfg.statement.Expression; -import it.unive.lisa.symbolic.SymbolicExpression; import it.unive.lisa.symbolic.value.BinaryExpression; import it.unive.lisa.symbolic.value.Constant; import it.unive.lisa.symbolic.value.Identifier; -import it.unive.lisa.symbolic.value.MemoryPointer; import it.unive.lisa.symbolic.value.PushAny; +import it.unive.lisa.symbolic.value.PushInv; import it.unive.lisa.symbolic.value.ValueExpression; import it.unive.lisa.symbolic.value.operator.binary.BinaryOperator; import it.unive.lisa.symbolic.value.operator.binary.TypeCast; @@ -24,6 +22,8 @@ import it.unive.lisa.type.Type; import it.unive.lisa.type.TypeSystem; import it.unive.lisa.type.Untyped; +import it.unive.lisa.util.representation.StringRepresentation; +import it.unive.lisa.util.representation.StructuredRepresentation; import java.util.Collections; import java.util.Set; @@ -56,17 +56,13 @@ public StaticTypes() { * this element is created * @param type the type to be included in the set of inferred types */ - StaticTypes(TypeSystem types, Type type) { + StaticTypes( + TypeSystem types, + Type type) { this.type = type; this.types = types; } - /** - * {@inheritDoc}
- *
- * Caution: invoking this method on the top instance obtained through - * {@code new StaticTypes().top()} will return a {@code null} value. - */ @Override public Set getRuntimeTypes() { if (this.isBottom()) @@ -90,7 +86,7 @@ public StaticTypes bottom() { } @Override - public DomainRepresentation representation() { + public StructuredRepresentation representation() { if (isTop()) return Lattice.topRepresentation(); @@ -101,31 +97,56 @@ public DomainRepresentation representation() { } @Override - public StaticTypes evalIdentifier(Identifier id, TypeEnvironment environment, - ProgramPoint pp) throws SemanticException { - StaticTypes eval = BaseNonRelationalTypeDomain.super.evalIdentifier(id, environment, pp); + public StaticTypes evalIdentifier( + Identifier id, + TypeEnvironment environment, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + StaticTypes eval = BaseNonRelationalTypeDomain.super.evalIdentifier(id, environment, pp, oracle); if (!eval.isTop() && !eval.isBottom()) return eval; return new StaticTypes(pp.getProgram().getTypes(), id.getStaticType()); } @Override - public StaticTypes evalPushAny(PushAny pushAny, ProgramPoint pp) { + public StaticTypes evalPushAny( + PushAny pushAny, + ProgramPoint pp, + SemanticOracle oracle) { return new StaticTypes(pp.getProgram().getTypes(), pushAny.getStaticType()); } @Override - public StaticTypes evalNullConstant(ProgramPoint pp) { + public StaticTypes evalPushInv( + PushInv pushInv, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + return new StaticTypes(pp.getProgram().getTypes(), pushInv.getStaticType()); + } + + @Override + public StaticTypes evalNullConstant( + ProgramPoint pp, + SemanticOracle oracle) { return new StaticTypes(pp.getProgram().getTypes(), NullType.INSTANCE); } @Override - public StaticTypes evalNonNullConstant(Constant constant, ProgramPoint pp) { + public StaticTypes evalNonNullConstant( + Constant constant, + ProgramPoint pp, + SemanticOracle oracle) { return new StaticTypes(pp.getProgram().getTypes(), constant.getStaticType()); } @Override - public StaticTypes eval(ValueExpression expression, TypeEnvironment environment, ProgramPoint pp) + public StaticTypes eval( + ValueExpression expression, + TypeEnvironment environment, + ProgramPoint pp, + SemanticOracle oracle) throws SemanticException { if (expression instanceof BinaryExpression) { TypeSystem types = pp.getProgram().getTypes(); @@ -133,8 +154,8 @@ public StaticTypes eval(ValueExpression expression, TypeEnvironment if (binary.getOperator() instanceof TypeCast || binary.getOperator() instanceof TypeConv) { StaticTypes left = null, right = null; try { - left = eval((ValueExpression) binary.getLeft(), environment, pp); - right = eval((ValueExpression) binary.getRight(), environment, pp); + left = eval((ValueExpression) binary.getLeft(), environment, pp, oracle); + right = eval((ValueExpression) binary.getRight(), environment, pp, oracle); } catch (ClassCastException e) { throw new SemanticException(expression + " is not a value expression"); } @@ -151,22 +172,31 @@ public StaticTypes eval(ValueExpression expression, TypeEnvironment } @Override - public Satisfiability satisfiesBinaryExpression(BinaryOperator operator, StaticTypes left, - StaticTypes right, ProgramPoint pp) throws SemanticException { + public Satisfiability satisfiesBinaryExpression( + BinaryOperator operator, + StaticTypes left, + StaticTypes right, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { TypeSystem types = pp.getProgram().getTypes(); Set lelems = left.type.allInstances(types); Set relems = right.type.allInstances(types); return new InferredTypes().satisfiesBinaryExpression(operator, new InferredTypes(types, lelems), - new InferredTypes(types, relems), pp); + new InferredTypes(types, relems), pp, oracle); } @Override - public StaticTypes lubAux(StaticTypes other) throws SemanticException { + public StaticTypes lubAux( + StaticTypes other) + throws SemanticException { return new StaticTypes(types, type.commonSupertype(other.type)); } @Override - public boolean lessOrEqualAux(StaticTypes other) throws SemanticException { + public boolean lessOrEqualAux( + StaticTypes other) + throws SemanticException { return type.canBeAssignedTo(other.type); } @@ -179,7 +209,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -194,15 +225,4 @@ public boolean equals(Object obj) { return false; return true; } - - @Override - public boolean tracksIdentifiers(Identifier id) { - return !(id instanceof MemoryPointer); - } - - @Override - public boolean canProcess(SymbolicExpression expression) { - // Type analysis can process any expression - return true; - } } diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/interprocedural/BackwardModularWorstCaseAnalysis.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/interprocedural/BackwardModularWorstCaseAnalysis.java new file mode 100644 index 000000000..7d73b8cd0 --- /dev/null +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/interprocedural/BackwardModularWorstCaseAnalysis.java @@ -0,0 +1,162 @@ +package it.unive.lisa.interprocedural; + +import it.unive.lisa.analysis.AbstractState; +import it.unive.lisa.analysis.AnalysisState; +import it.unive.lisa.analysis.AnalyzedCFG; +import it.unive.lisa.analysis.OptimizedAnalyzedCFG; +import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.StatementStore; +import it.unive.lisa.analysis.lattices.ExpressionSet; +import it.unive.lisa.analysis.symbols.SymbolAliasing; +import it.unive.lisa.conf.FixpointConfiguration; +import it.unive.lisa.interprocedural.callgraph.CallGraph; +import it.unive.lisa.interprocedural.callgraph.CallResolutionException; +import it.unive.lisa.logging.IterationLogger; +import it.unive.lisa.program.Application; +import it.unive.lisa.program.cfg.CFG; +import it.unive.lisa.program.cfg.statement.Statement; +import it.unive.lisa.program.cfg.statement.call.CFGCall; +import it.unive.lisa.program.cfg.statement.call.Call; +import it.unive.lisa.program.cfg.statement.call.OpenCall; +import it.unive.lisa.program.cfg.statement.call.UnresolvedCall; +import it.unive.lisa.type.Type; +import it.unive.lisa.util.collections.workset.WorkingSet; +import it.unive.lisa.util.datastructures.graph.algorithms.FixpointException; +import java.util.Collection; +import java.util.Set; +import java.util.TreeSet; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * A worst case modular analysis were all cfg calls are treated as open calls. + * + * @param the {@link AbstractState} of the analysis + */ +public class BackwardModularWorstCaseAnalysis> implements InterproceduralAnalysis { + + private static final Logger LOG = LogManager.getLogger(BackwardModularWorstCaseAnalysis.class); + + private static final ScopeId ID = new UniqueScope(); + + /** + * The application. + */ + private Application app; + + /** + * The policy used for computing the result of cfg calls. + */ + private OpenCallPolicy policy; + + /** + * The cash of the fixpoints' results. + */ + private FixpointResults results; + + /** + * Builds the interprocedural analysis. + */ + public BackwardModularWorstCaseAnalysis() { + } + + @Override + public boolean needsCallGraph() { + return false; + } + + @Override + public void fixpoint( + AnalysisState entryState, + Class> fixpointWorkingSet, + FixpointConfiguration conf) + throws FixpointException { + if (conf.optimize) + LOG.warn("Optimizations are turned on: this feature is experimental with backward analyses"); + + // new fixpoint iteration: restart + this.results = null; + + Collection all = new TreeSet<>(( + c1, + c2) -> c1.getDescriptor().getLocation() + .compareTo(c2.getDescriptor().getLocation())); + all.addAll(app.getAllCFGs()); + + for (CFG cfg : IterationLogger.iterate(LOG, all, "Computing fixpoint over the whole program", + "cfgs")) + try { + AnalysisState st = entryState.bottom(); + + if (results == null) { + AnalyzedCFG graph = conf.optimize + ? new OptimizedAnalyzedCFG<>(cfg, ID, st, this) + : new AnalyzedCFG<>(cfg, ID, entryState); + CFGResults value = new CFGResults<>(graph); + this.results = new FixpointResults<>(value.top()); + } + + results.putResult(cfg, ID, cfg.backwardFixpoint( + entryState, + this, + WorkingSet.of(fixpointWorkingSet), + conf, + ID)); + } catch (SemanticException e) { + throw new FixpointException("Error while creating the entrystate for " + cfg, e); + } + } + + @Override + public Collection> getAnalysisResultsOf( + CFG cfg) { + return results.getState(cfg).getAll(); + } + + @Override + public AnalysisState getAbstractResultOf( + CFGCall call, + AnalysisState entryState, + ExpressionSet[] parameters, + StatementStore expressions) + throws SemanticException { + OpenCall open = new OpenCall(call.getCFG(), call.getLocation(), call.getCallType(), call.getQualifier(), + call.getTargetName(), call.getStaticType(), call.getParameters()); + return getAbstractResultOf(open, entryState, parameters, expressions); + } + + @Override + public AnalysisState getAbstractResultOf( + OpenCall call, + AnalysisState entryState, + ExpressionSet[] parameters, + StatementStore expressions) + throws SemanticException { + return policy.apply(call, entryState, parameters); + } + + @Override + public void init( + Application app, + CallGraph callgraph, + OpenCallPolicy policy) + throws InterproceduralAnalysisException { + this.app = app; + this.policy = policy; + this.results = null; + } + + @Override + public Call resolve( + UnresolvedCall call, + Set[] types, + SymbolAliasing aliasing) + throws CallResolutionException { + return new OpenCall(call); + } + + @Override + public FixpointResults getFixpointResults() { + return results; + } +} diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/interprocedural/CallGraphBasedAnalysis.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/interprocedural/CallGraphBasedAnalysis.java index 9d7c7655d..d7d23d69d 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/interprocedural/CallGraphBasedAnalysis.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/interprocedural/CallGraphBasedAnalysis.java @@ -4,38 +4,30 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; import it.unive.lisa.analysis.lattices.ExpressionSet; import it.unive.lisa.analysis.symbols.SymbolAliasing; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.callgraph.CallGraph; import it.unive.lisa.interprocedural.callgraph.CallResolutionException; import it.unive.lisa.program.Application; import it.unive.lisa.program.cfg.CFG; +import it.unive.lisa.program.cfg.CodeLocation; import it.unive.lisa.program.cfg.Parameter; +import it.unive.lisa.program.cfg.statement.Assignment; +import it.unive.lisa.program.cfg.statement.VariableRef; import it.unive.lisa.program.cfg.statement.call.Call; import it.unive.lisa.program.cfg.statement.call.OpenCall; import it.unive.lisa.program.cfg.statement.call.UnresolvedCall; -import it.unive.lisa.symbolic.SymbolicExpression; -import it.unive.lisa.symbolic.value.PushAny; -import it.unive.lisa.symbolic.value.Variable; import it.unive.lisa.type.Type; import java.util.Set; /** * An interprocedural analysis based on a call graph. * - * @param The abstract state of the analysis - * @param The heap domain - * @param The value domain - * @param The type domain + * @param The {@link AbstractState} of the analysis */ -public abstract class CallGraphBasedAnalysis, - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> - implements InterproceduralAnalysis { +public abstract class CallGraphBasedAnalysis> + implements + InterproceduralAnalysis { /** * The call graph used to resolve method calls. @@ -63,14 +55,23 @@ protected CallGraphBasedAnalysis() { * * @param other the original analysis to copy */ - protected CallGraphBasedAnalysis(CallGraphBasedAnalysis other) { + protected CallGraphBasedAnalysis( + CallGraphBasedAnalysis other) { this.callgraph = other.callgraph; this.app = other.app; this.policy = other.policy; } @Override - public void init(Application app, CallGraph callgraph, OpenCallPolicy policy) + public boolean needsCallGraph() { + return true; + } + + @Override + public void init( + Application app, + CallGraph callgraph, + OpenCallPolicy policy) throws InterproceduralAnalysisException { this.callgraph = callgraph; this.app = app; @@ -78,7 +79,10 @@ public void init(Application app, CallGraph callgraph, OpenCallPolicy policy) } @Override - public Call resolve(UnresolvedCall call, Set[] types, SymbolAliasing aliasing) + public Call resolve( + UnresolvedCall call, + Set[] types, + SymbolAliasing aliasing) throws CallResolutionException { return callgraph.resolve(call, types, aliasing); } @@ -94,26 +98,32 @@ public Call resolve(UnresolvedCall call, Set[] types, SymbolAliasing alias * * @throws SemanticException if the analysis fails */ - public AnalysisState prepareEntryStateOfEntryPoint(AnalysisState entryState, CFG cfg) + public AnalysisState prepareEntryStateOfEntryPoint( + AnalysisState entryState, + CFG cfg) throws SemanticException { - AnalysisState prepared = entryState; + AnalysisState prepared = entryState; + AnalysisState st = entryState.bottom(); + StatementStore store = new StatementStore<>(st); for (Parameter arg : cfg.getDescriptor().getFormals()) { - Variable id = new Variable(arg.getStaticType(), arg.getName(), arg.getAnnotations(), arg.getLocation()); - prepared = prepared.assign(id, new PushAny(arg.getStaticType(), arg.getLocation()), - cfg.getGenericProgramPoint()); + CodeLocation loc = arg.getLocation(); + Assignment a = new Assignment(cfg, loc, + new VariableRef(cfg, loc, arg.getName()), + arg.getStaticType().unknownValue(cfg, loc)); + prepared = a.forwardSemantics(prepared, this, store); } // the stack has to be empty - return new AnalysisState<>(prepared.getState(), new ExpressionSet<>(), new SymbolAliasing()); + return new AnalysisState<>(prepared.getState(), new ExpressionSet()); } @Override - public AnalysisState getAbstractResultOf( + public AnalysisState getAbstractResultOf( OpenCall call, - AnalysisState entryState, - ExpressionSet[] parameters, - StatementStore expressions) + AnalysisState entryState, + ExpressionSet[] parameters, + StatementStore expressions) throws SemanticException { return policy.apply(call, entryState, parameters); } diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/interprocedural/ModularWorstCaseAnalysis.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/interprocedural/ModularWorstCaseAnalysis.java index a4389b05f..a51fad06e 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/interprocedural/ModularWorstCaseAnalysis.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/interprocedural/ModularWorstCaseAnalysis.java @@ -1,33 +1,28 @@ package it.unive.lisa.interprocedural; -import it.unive.lisa.AnalysisSetupException; -import it.unive.lisa.FallbackImplementation; import it.unive.lisa.analysis.AbstractState; import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.AnalyzedCFG; import it.unive.lisa.analysis.OptimizedAnalyzedCFG; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; import it.unive.lisa.analysis.lattices.ExpressionSet; import it.unive.lisa.analysis.symbols.SymbolAliasing; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.conf.FixpointConfiguration; import it.unive.lisa.interprocedural.callgraph.CallGraph; import it.unive.lisa.interprocedural.callgraph.CallResolutionException; import it.unive.lisa.logging.IterationLogger; import it.unive.lisa.program.Application; import it.unive.lisa.program.cfg.CFG; +import it.unive.lisa.program.cfg.CodeLocation; import it.unive.lisa.program.cfg.Parameter; +import it.unive.lisa.program.cfg.statement.Assignment; import it.unive.lisa.program.cfg.statement.Statement; +import it.unive.lisa.program.cfg.statement.VariableRef; import it.unive.lisa.program.cfg.statement.call.CFGCall; import it.unive.lisa.program.cfg.statement.call.Call; import it.unive.lisa.program.cfg.statement.call.OpenCall; import it.unive.lisa.program.cfg.statement.call.UnresolvedCall; -import it.unive.lisa.symbolic.SymbolicExpression; -import it.unive.lisa.symbolic.value.PushAny; -import it.unive.lisa.symbolic.value.Variable; import it.unive.lisa.type.Type; import it.unive.lisa.util.collections.workset.WorkingSet; import it.unive.lisa.util.datastructures.graph.algorithms.FixpointException; @@ -40,16 +35,9 @@ /** * A worst case modular analysis were all cfg calls are treated as open calls. * - * @param the abstract state of the analysis - * @param the heap domain - * @param the value domain - * @param the type domain + * @param the {@link AbstractState} of the analysis */ -@FallbackImplementation -public class ModularWorstCaseAnalysis, - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> implements InterproceduralAnalysis { +public class ModularWorstCaseAnalysis> implements InterproceduralAnalysis { private static final Logger LOG = LogManager.getLogger(ModularWorstCaseAnalysis.class); @@ -68,7 +56,7 @@ public class ModularWorstCaseAnalysis, /** * The cash of the fixpoints' results. */ - private FixpointResults results; + private FixpointResults results; /** * Builds the interprocedural analysis. @@ -77,53 +65,66 @@ public ModularWorstCaseAnalysis() { } @Override - public void fixpoint(AnalysisState entryState, + public boolean needsCallGraph() { + return false; + } + + @Override + public void fixpoint( + AnalysisState entryState, Class> fixpointWorkingSet, FixpointConfiguration conf) throws FixpointException { // new fixpoint iteration: restart this.results = null; - Collection all = new TreeSet<>((c1, c2) -> c1.getDescriptor().getLocation() - .compareTo(c2.getDescriptor().getLocation())); + Collection all = new TreeSet<>(( + c1, + c2) -> c1.getDescriptor().getLocation() + .compareTo(c2.getDescriptor().getLocation())); all.addAll(app.getAllCFGs()); for (CFG cfg : IterationLogger.iterate(LOG, all, "Computing fixpoint over the whole program", "cfgs")) try { + AnalysisState st = entryState.bottom(); + StatementStore store = new StatementStore<>(st); + if (results == null) { - AnalyzedCFG graph = conf.optimize - ? new OptimizedAnalyzedCFG<>(cfg, ID, entryState.bottom(), this) + AnalyzedCFG graph = conf.optimize + ? new OptimizedAnalyzedCFG<>(cfg, ID, st, this) : new AnalyzedCFG<>(cfg, ID, entryState); - CFGResults value = new CFGResults<>(graph); + CFGResults value = new CFGResults<>(graph); this.results = new FixpointResults<>(value.top()); } - AnalysisState prepared = entryState; + AnalysisState prepared = entryState; for (Parameter arg : cfg.getDescriptor().getFormals()) { - Variable id = new Variable(arg.getStaticType(), arg.getName(), arg.getAnnotations(), - arg.getLocation()); - prepared = prepared.assign(id, new PushAny(arg.getStaticType(), arg.getLocation()), - cfg.getGenericProgramPoint()); + CodeLocation loc = arg.getLocation(); + Assignment a = new Assignment(cfg, loc, + new VariableRef(cfg, loc, arg.getName()), + arg.getStaticType().unknownValue(cfg, loc)); + prepared = a.forwardSemantics(prepared, this, store); } results.putResult(cfg, ID, cfg.fixpoint(prepared, this, WorkingSet.of(fixpointWorkingSet), conf, ID)); - } catch (SemanticException | AnalysisSetupException e) { + } catch (SemanticException e) { throw new FixpointException("Error while creating the entrystate for " + cfg, e); } } @Override - public Collection> getAnalysisResultsOf(CFG cfg) { + public Collection> getAnalysisResultsOf( + CFG cfg) { return results.getState(cfg).getAll(); } @Override - public AnalysisState getAbstractResultOf( + public AnalysisState getAbstractResultOf( CFGCall call, - AnalysisState entryState, - ExpressionSet[] parameters, - StatementStore expressions) + AnalysisState entryState, + ExpressionSet[] parameters, + StatementStore expressions) throws SemanticException { OpenCall open = new OpenCall(call.getCFG(), call.getLocation(), call.getCallType(), call.getQualifier(), call.getTargetName(), call.getStaticType(), call.getParameters()); @@ -131,17 +132,20 @@ public AnalysisState getAbstractResultOf( } @Override - public AnalysisState getAbstractResultOf( + public AnalysisState getAbstractResultOf( OpenCall call, - AnalysisState entryState, - ExpressionSet[] parameters, - StatementStore expressions) + AnalysisState entryState, + ExpressionSet[] parameters, + StatementStore expressions) throws SemanticException { return policy.apply(call, entryState, parameters); } @Override - public void init(Application app, CallGraph callgraph, OpenCallPolicy policy) + public void init( + Application app, + CallGraph callgraph, + OpenCallPolicy policy) throws InterproceduralAnalysisException { this.app = app; this.policy = policy; @@ -149,13 +153,16 @@ public void init(Application app, CallGraph callgraph, OpenCallPolicy policy) } @Override - public Call resolve(UnresolvedCall call, Set[] types, SymbolAliasing aliasing) + public Call resolve( + UnresolvedCall call, + Set[] types, + SymbolAliasing aliasing) throws CallResolutionException { return new OpenCall(call); } @Override - public FixpointResults getFixpointResults() { + public FixpointResults getFixpointResults() { return results; } } diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/interprocedural/callgraph/CHACallGraph.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/interprocedural/callgraph/CHACallGraph.java index aeb779c71..ed39cbfa8 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/interprocedural/callgraph/CHACallGraph.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/interprocedural/callgraph/CHACallGraph.java @@ -18,7 +18,9 @@ public class CHACallGraph extends BaseCallGraph { @Override - public Collection getPossibleTypesOfReceiver(Expression receiver, Set types) { + public Collection getPossibleTypesOfReceiver( + Expression receiver, + Set types) { return receiver.getStaticType().allInstances(receiver.getProgram().getTypes()); } diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/interprocedural/callgraph/RTACallGraph.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/interprocedural/callgraph/RTACallGraph.java index b0e061eec..70f440f6e 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/interprocedural/callgraph/RTACallGraph.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/interprocedural/callgraph/RTACallGraph.java @@ -1,6 +1,5 @@ package it.unive.lisa.interprocedural.callgraph; -import it.unive.lisa.FallbackImplementation; import it.unive.lisa.program.cfg.statement.Expression; import it.unive.lisa.type.Type; import java.util.Collection; @@ -16,11 +15,12 @@ * * @author Pietro Ferrara */ -@FallbackImplementation public class RTACallGraph extends BaseCallGraph { @Override - public Collection getPossibleTypesOfReceiver(Expression receiver, Set types) { + public Collection getPossibleTypesOfReceiver( + Expression receiver, + Set types) { return types; } diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/interprocedural/context/ContextBasedAnalysis.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/interprocedural/context/ContextBasedAnalysis.java index 2cc128072..facb3807d 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/interprocedural/context/ContextBasedAnalysis.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/interprocedural/context/ContextBasedAnalysis.java @@ -1,19 +1,15 @@ package it.unive.lisa.interprocedural.context; import it.unive.lisa.AnalysisExecutionException; -import it.unive.lisa.AnalysisSetupException; -import it.unive.lisa.DefaultParameters; import it.unive.lisa.analysis.AbstractState; import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.AnalyzedCFG; +import it.unive.lisa.analysis.FixpointInfo; import it.unive.lisa.analysis.OptimizedAnalyzedCFG; import it.unive.lisa.analysis.ScopeToken; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; import it.unive.lisa.analysis.lattices.ExpressionSet; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.conf.FixpointConfiguration; import it.unive.lisa.interprocedural.CFGResults; import it.unive.lisa.interprocedural.CallGraphBasedAnalysis; @@ -26,7 +22,6 @@ import it.unive.lisa.interprocedural.context.recursion.Recursion; import it.unive.lisa.interprocedural.context.recursion.RecursionSolver; import it.unive.lisa.logging.IterationLogger; -import it.unive.lisa.logging.TimerLogger; import it.unive.lisa.program.Application; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.CodeMember; @@ -37,7 +32,6 @@ import it.unive.lisa.program.cfg.statement.call.CFGCall; import it.unive.lisa.program.cfg.statement.call.Call; import it.unive.lisa.program.language.parameterassignment.ParameterAssigningStrategy; -import it.unive.lisa.symbolic.SymbolicExpression; import it.unive.lisa.util.StringUtilities; import it.unive.lisa.util.collections.workset.WorkingSet; import it.unive.lisa.util.datastructures.graph.algorithms.FixpointException; @@ -60,17 +54,9 @@ * approximated applying the iterates of the recursion starting from bottom and * using the same widening threshold of cfg fixpoints. * - * @param the abstract state of the analysis - * @param the heap domain - * @param the value domain - * @param the type domain + * @param the {@link AbstractState} of the analysis */ -@DefaultParameters({ FullStackToken.class }) -public class ContextBasedAnalysis, - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> - extends CallGraphBasedAnalysis { +public class ContextBasedAnalysis> extends CallGraphBasedAnalysis { private static final Logger LOG = LogManager.getLogger(ContextBasedAnalysis.class); @@ -90,7 +76,7 @@ public class ContextBasedAnalysis, /** * The results computed by this analysis. */ - protected FixpointResults results; + protected FixpointResults results; /** * The kind of {@link WorkingSet} to use during this analysis. @@ -120,7 +106,8 @@ public ContextBasedAnalysis() { * @param token an instance of the tokens to be used to partition w.r.t. * context sensitivity */ - public ContextBasedAnalysis(ContextSensitivityToken token) { + public ContextBasedAnalysis( + ContextSensitivityToken token) { this.token = token; triggers = new HashSet<>(); } @@ -130,7 +117,8 @@ public ContextBasedAnalysis(ContextSensitivityToken token) { * * @param other the original analysis to copy */ - protected ContextBasedAnalysis(ContextBasedAnalysis other) { + protected ContextBasedAnalysis( + ContextBasedAnalysis other) { super(other); this.conf = other.conf; this.results = other.results; @@ -157,7 +145,7 @@ public void init( @Override public void fixpoint( - AnalysisState entryState, + AnalysisState entryState, Class> fixpointWorkingSet, FixpointConfiguration conf) throws FixpointException { @@ -169,15 +157,13 @@ public void fixpoint( if (app.getEntryPoints().isEmpty()) throw new NoEntryPointException(); - TimerLogger.execAction(LOG, "Computing fixpoint over the whole program", () -> this.fixpointAux(entryState)); - } - - private void fixpointAux(AnalysisState entryState) throws AnalysisExecutionException { int iter = 0; ContextSensitivityToken empty = (ContextSensitivityToken) token.startingId(); Collection entryPoints = new TreeSet<>( - (c1, c2) -> c1.getDescriptor().getLocation().compareTo(c2.getDescriptor().getLocation())); + ( + c1, + c2) -> c1.getDescriptor().getLocation().compareTo(c2.getDescriptor().getLocation())); entryPoints.addAll(app.getEntryPoints()); do { @@ -185,96 +171,15 @@ private void fixpointAux(AnalysisState entryState) throws AnalysisEx triggers.clear(); pendingRecursions = false; - for (CFG cfg : IterationLogger.iterate(LOG, entryPoints, "Processing entrypoints", "entries")) - try { - if (results == null) { - AnalyzedCFG graph = conf.optimize - ? new OptimizedAnalyzedCFG<>(cfg, empty, entryState.bottom(), this) - : new AnalyzedCFG<>(cfg, empty, entryState); - CFGResults value = new CFGResults<>(graph); - this.results = new FixpointResults<>(value.top()); - } - - token = empty; - AnalysisState entryStateCFG = prepareEntryStateOfEntryPoint(entryState, cfg); - results.putResult(cfg, empty, - cfg.fixpoint(entryStateCFG, this, WorkingSet.of(workingSet), conf, empty)); - } catch (SemanticException | AnalysisSetupException e) { - throw new AnalysisExecutionException("Error while creating the entrystate for " + cfg, e); - } catch (FixpointException e) { - throw new AnalysisExecutionException("Error while computing fixpoint for entrypoint " + cfg, e); - } + processEntrypoints(entryState, empty, entryPoints); if (pendingRecursions) { - Set> recursions = new HashSet<>(); - - for (Collection rec : callgraph.getRecursions()) { - // these are the calls that start the recursion by invoking - // one of its members - Collection starters = callgraph.getCallSites(rec).stream() - .filter(site -> !rec.contains(site.getCFG())) - .collect(Collectors.toSet()); - - for (Call starter : starters) { - // these are the head of the recursion: members invoked - // from outside of it - Set heads = callgraph.getCallees(starter.getCFG()).stream() - .filter(callee -> rec.contains(callee)) - .filter(CFG.class::isInstance) - .map(CFG.class::cast) - .collect(Collectors.toSet()); - Set>> entries = new HashSet<>(); - for (Entry> res : results.get(starter.getCFG())) { - StatementStore params = new StatementStore<>(entryState.bottom()); - Expression[] parameters = starter.getParameters(); - if (conf.optimize) - for (Expression actual : parameters) - params.put(actual, ((OptimizedAnalyzedCFG) res.getValue()) - .getUnwindedAnalysisStateAfter(actual)); - else - for (Expression actual : parameters) - params.put(actual, res.getValue().getAnalysisStateAfter(actual)); - - entries.add(Pair.of((ContextSensitivityToken) res.getKey(), - CompoundState.of(params.getState(parameters[parameters.length - 1]), params))); - } - - for (CFG head : heads) - for (Pair> entry : entries) { - Recursion recursion = new Recursion<>( - starter, - entry.getLeft(), - entry.getRight(), - head, - rec); - recursions.add(recursion); - } - } - } + Set> recursions = new HashSet<>(); - List> orderedRecursions = new ArrayList<>(recursions.size()); - for (Recursion rec : recursions) { - int pos = 0; - for (; pos < orderedRecursions.size(); pos++) - if (orderedRecursions.get(pos).getMembers().contains(rec.getInvocation().getCFG())) - // as the recursion at pos contains the member - // invoking rec, rec must be solved before the - // recursion at pos - break; - // if no match is found, add() will place the element at the - // end (pos == size()) - // otherwise, elements will be shifted - orderedRecursions.add(pos, rec); - } + for (Collection rec : callgraph.getRecursions()) + buildRecursion(entryState, recursions, rec); - try { - for (Recursion rec : orderedRecursions) { - new RecursionSolver<>(this, rec).solve(); - triggers.addAll(rec.getMembers()); - } - } catch (SemanticException e) { - throw new AnalysisExecutionException("Unable to solve one or more recursions", e); - } + solveRecursions(recursions); } // starting from the callers of the cfgs that needed a lub, @@ -288,8 +193,108 @@ private void fixpointAux(AnalysisState entryState) throws AnalysisEx } while (!triggers.isEmpty()); } + private void solveRecursions( + Set> recursions) { + List> orderedRecursions = new ArrayList<>(recursions.size()); + for (Recursion rec : recursions) { + int pos = 0; + for (; pos < orderedRecursions.size(); pos++) + if (orderedRecursions.get(pos).getMembers().contains(rec.getInvocation().getCFG())) + // as the recursion at pos contains the member + // invoking rec, rec must be solved before the + // recursion at pos + break; + // if no match is found, add() will place the element at the + // end (pos == size()) + // otherwise, elements will be shifted + orderedRecursions.add(pos, rec); + } + + try { + for (Recursion rec : orderedRecursions) { + new RecursionSolver<>(this, rec).solve(); + triggers.addAll(rec.getMembers()); + } + } catch (SemanticException e) { + throw new AnalysisExecutionException("Unable to solve one or more recursions", e); + } + } + + private void buildRecursion( + AnalysisState entryState, + Set> recursions, + Collection rec) { + // these are the calls that start the recursion by invoking + // one of its members + Collection starters = callgraph.getCallSites(rec).stream() + .filter(site -> !rec.contains(site.getCFG())) + .collect(Collectors.toSet()); + + for (Call starter : starters) { + // these are the head of the recursion: members invoked + // from outside of it + Set heads = callgraph.getCallees(starter.getCFG()).stream() + .filter(callee -> rec.contains(callee)) + .filter(CFG.class::isInstance) + .map(CFG.class::cast) + .collect(Collectors.toSet()); + Set>> entries = new HashSet<>(); + for (Entry> res : results.get(starter.getCFG())) { + StatementStore params = new StatementStore<>(entryState.bottom()); + Expression[] parameters = starter.getParameters(); + if (conf.optimize) + for (Expression actual : parameters) + params.put(actual, ((OptimizedAnalyzedCFG) res.getValue()) + .getUnwindedAnalysisStateAfter(actual, conf)); + else + for (Expression actual : parameters) + params.put(actual, res.getValue().getAnalysisStateAfter(actual)); + + entries.add(Pair.of((ContextSensitivityToken) res.getKey(), + CompoundState.of(params.getState(parameters[parameters.length - 1]), params))); + } + + for (CFG head : heads) + for (Pair> entry : entries) { + Recursion recursion = new Recursion<>( + starter, + entry.getLeft(), + entry.getRight(), + head, + rec); + recursions.add(recursion); + } + } + } + + private void processEntrypoints( + AnalysisState entryState, + ContextSensitivityToken empty, + Collection entryPoints) { + for (CFG cfg : IterationLogger.iterate(LOG, entryPoints, "Processing entrypoints", "entries")) + try { + if (results == null) { + AnalyzedCFG graph = conf.optimize + ? new OptimizedAnalyzedCFG<>(cfg, empty, entryState.bottom(), this) + : new AnalyzedCFG<>(cfg, empty, entryState); + CFGResults value = new CFGResults<>(graph); + this.results = new FixpointResults<>(value.top()); + } + + token = empty; + AnalysisState entryStateCFG = prepareEntryStateOfEntryPoint(entryState, cfg); + results.putResult(cfg, empty, + cfg.fixpoint(entryStateCFG, this, WorkingSet.of(workingSet), conf, empty)); + } catch (SemanticException e) { + throw new AnalysisExecutionException("Error while creating the entrystate for " + cfg, e); + } catch (FixpointException e) { + throw new AnalysisExecutionException("Error while computing fixpoint for entrypoint " + cfg, e); + } + } + @Override - public Collection> getAnalysisResultsOf(CFG cfg) { + public Collection> getAnalysisResultsOf( + CFG cfg) { if (results.contains(cfg)) return results.getState(cfg).getAll(); else @@ -305,25 +310,24 @@ public Collection> getAnalysisResultsOf(CFG cfg) { * * @return the result of the fixpoint computation * - * @throws FixpointException if the fixpoint terminates abruptly - * @throws SemanticException if an exception happens while storing the - * result of the fixpoint - * @throws AnalysisSetupException if the {@link WorkingSet} for the fixpoint - * cannot be created + * @throws FixpointException if the fixpoint terminates abruptly + * @throws SemanticException if an exception happens while storing the + * result of the fixpoint */ - private AnalyzedCFG computeFixpoint( + private AnalyzedCFG computeFixpoint( CFG cfg, ContextSensitivityToken token, - AnalysisState entryState) - throws FixpointException, SemanticException, AnalysisSetupException { - AnalyzedCFG fixpointResult = cfg.fixpoint( + AnalysisState entryState) + throws FixpointException, + SemanticException { + AnalyzedCFG fixpointResult = cfg.fixpoint( entryState, this, WorkingSet.of(workingSet), conf, token); if (shouldStoreFixpointResults()) { - Pair> res = results.putResult(cfg, token, fixpointResult); + Pair> res = results.putResult(cfg, token, fixpointResult); if (shouldStoreFixpointResults() && Boolean.TRUE.equals(res.getLeft())) triggers.add(cfg); fixpointResult = res.getRight(); @@ -340,7 +344,8 @@ private AnalyzedCFG computeFixpoint( * * @return {@code true} if that condition holds (defaults to {@code true}) */ - protected boolean canShortcut(CFG cfg) { + protected boolean canShortcut( + CFG cfg) { return true; } @@ -366,31 +371,31 @@ protected boolean shouldStoreFixpointResults() { } @Override - public FixpointResults getFixpointResults() { + public FixpointResults getFixpointResults() { return results; } - private Pair, ExpressionSet[]> prepareEntryState( + private Pair, ExpressionSet[]> prepareEntryState( CFGCall call, - AnalysisState entryState, - ExpressionSet[] parameters, - StatementStore expressions, + AnalysisState entryState, + ExpressionSet[] parameters, + StatementStore expressions, ScopeToken scope, CFG cfg) throws SemanticException { Parameter[] formals = cfg.getDescriptor().getFormals(); // prepare the state for the call: hide the visible variables - Pair, ExpressionSet[]> scoped = scope( + Pair, ExpressionSet[]> scoped = scope( entryState, scope, parameters); - AnalysisState callState = scoped.getLeft(); - ExpressionSet[] locals = scoped.getRight(); + AnalysisState callState = scoped.getLeft(); + ExpressionSet[] locals = scoped.getRight(); // assign parameters between the caller and the callee contexts ParameterAssigningStrategy strategy = call.getProgram().getFeatures().getAssigningStrategy(); - Pair, ExpressionSet[]> prepared = strategy.prepare( + Pair, ExpressionSet[]> prepared = strategy.prepare( call, callState, this, @@ -401,11 +406,11 @@ private Pair, ExpressionSet[]> pre } @Override - public AnalysisState getAbstractResultOf( + public AnalysisState getAbstractResultOf( CFGCall call, - AnalysisState entryState, - ExpressionSet[] parameters, - StatementStore expressions) + AnalysisState entryState, + ExpressionSet[] parameters, + StatementStore expressions) throws SemanticException { callgraph.registerCall(call); @@ -424,20 +429,20 @@ public AnalysisState getAbstractResultOf( return new AnalysisState<>( entryState.getState().bottom(), call.getMetaVariable(), - entryState.getAliasing().bottom()); + FixpointInfo.BOTTOM); } ContextSensitivityToken callerToken = token; token = token.push(call); ScopeToken scope = new ScopeToken(call); - AnalysisState result = entryState.bottom(); + AnalysisState result = entryState.bottom(); // compute the result over all possible targets, and take the lub of // the results for (CFG cfg : call.getTargetedCFGs()) { - CFGResults localResults = results.get(cfg); - AnalyzedCFG states = localResults == null ? null : localResults.get(token); - Pair, ExpressionSet[]> prepared = prepareEntryState( + CFGResults localResults = results.get(cfg); + AnalyzedCFG states = localResults == null ? null : localResults.get(token); + Pair, ExpressionSet[]> prepared = prepareEntryState( call, entryState, parameters, @@ -445,7 +450,7 @@ public AnalysisState getAbstractResultOf( scope, cfg); - AnalysisState exitState; + AnalysisState exitState; if (canShortcut(cfg) && states != null && prepared.getLeft().lessOrEqual(states.getEntryState())) // no need to compute the fixpoint: we already have an // (over-)approximation of the result computed starting from @@ -453,10 +458,10 @@ public AnalysisState getAbstractResultOf( exitState = states.getExitState(); else { // compute the result with a fixpoint iteration - AnalyzedCFG fixpointResult = null; + AnalyzedCFG fixpointResult = null; try { fixpointResult = computeFixpoint(cfg, token, prepared.getLeft()); - } catch (FixpointException | AnalysisSetupException e) { + } catch (FixpointException e) { throw new SemanticException("Exception during the interprocedural analysis", e); } diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/interprocedural/context/ContextInsensitiveToken.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/interprocedural/context/ContextInsensitiveToken.java index 6aa54ee46..94393b453 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/interprocedural/context/ContextInsensitiveToken.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/interprocedural/context/ContextInsensitiveToken.java @@ -38,7 +38,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { // instances are still unique return this == obj; } @@ -54,7 +55,8 @@ public boolean isStartingId() { } @Override - public ContextSensitivityToken push(CFGCall c) { + public ContextSensitivityToken push( + CFGCall c) { return this; } } diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/interprocedural/context/ContextSensitivityToken.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/interprocedural/context/ContextSensitivityToken.java index 490a218c5..482f942bd 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/interprocedural/context/ContextSensitivityToken.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/interprocedural/context/ContextSensitivityToken.java @@ -16,5 +16,6 @@ public interface ContextSensitivityToken extends ScopeId { ContextSensitivityToken startingId(); @Override - ContextSensitivityToken push(CFGCall c); + ContextSensitivityToken push( + CFGCall c); } diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/interprocedural/context/FullStackToken.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/interprocedural/context/FullStackToken.java index b9b5e689b..3cbbba7d3 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/interprocedural/context/FullStackToken.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/interprocedural/context/FullStackToken.java @@ -22,7 +22,9 @@ private FullStackToken() { calls = Collections.emptyList(); } - private FullStackToken(FullStackToken source, CFGCall newToken) { + private FullStackToken( + FullStackToken source, + CFGCall newToken) { this.calls = new ArrayList<>(source.calls.size() + 1); source.calls.forEach(this.calls::add); this.calls.add(newToken); @@ -62,7 +64,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -89,7 +92,8 @@ public boolean isStartingId() { } @Override - public ContextSensitivityToken push(CFGCall c) { + public ContextSensitivityToken push( + CFGCall c) { return new FullStackToken(this, c); } } diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/interprocedural/context/KDepthToken.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/interprocedural/context/KDepthToken.java index c9fea238b..f7f17d394 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/interprocedural/context/KDepthToken.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/interprocedural/context/KDepthToken.java @@ -17,12 +17,16 @@ public class KDepthToken implements ContextSensitivityToken { private final int k; - private KDepthToken(int k) { + private KDepthToken( + int k) { this.k = k; this.calls = Collections.emptyList(); } - private KDepthToken(int k, KDepthToken source, CFGCall newToken) { + private KDepthToken( + int k, + KDepthToken source, + CFGCall newToken) { this.k = k; int oldlen = source.calls.size(); if (oldlen < k) { @@ -44,7 +48,8 @@ private KDepthToken(int k, KDepthToken source, CFGCall newToken) { * * @return an empty token */ - public static KDepthToken getSingleton(int k) { + public static KDepthToken getSingleton( + int k) { return new KDepthToken(k); } @@ -57,7 +62,8 @@ public String toString() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -103,7 +109,8 @@ public boolean isStartingId() { } @Override - public ContextSensitivityToken push(CFGCall c) { + public ContextSensitivityToken push( + CFGCall c) { return new KDepthToken(k, this, c); } } diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/interprocedural/context/LastCallToken.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/interprocedural/context/LastCallToken.java index 7b398e517..9667353a4 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/interprocedural/context/LastCallToken.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/interprocedural/context/LastCallToken.java @@ -14,7 +14,8 @@ public class LastCallToken implements ContextSensitivityToken { private final CFGCall call; - private LastCallToken(CFGCall call) { + private LastCallToken( + CFGCall call) { this.call = call; } @@ -33,7 +34,8 @@ public String toString() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -75,7 +77,8 @@ public boolean isStartingId() { } @Override - public ContextSensitivityToken push(CFGCall c) { + public ContextSensitivityToken push( + CFGCall c) { return new LastCallToken(c); } } diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/interprocedural/context/recursion/BaseCasesFinder.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/interprocedural/context/recursion/BaseCasesFinder.java index 3850c15ed..77b769af8 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/interprocedural/context/recursion/BaseCasesFinder.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/interprocedural/context/recursion/BaseCasesFinder.java @@ -4,10 +4,7 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; import it.unive.lisa.analysis.lattices.ExpressionSet; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.conf.FixpointConfiguration; import it.unive.lisa.interprocedural.InterproceduralAnalysisException; import it.unive.lisa.interprocedural.OpenCallPolicy; @@ -20,7 +17,6 @@ import it.unive.lisa.program.cfg.statement.Statement; import it.unive.lisa.program.cfg.statement.call.CFGCall; import it.unive.lisa.program.cfg.statement.call.Call; -import it.unive.lisa.symbolic.SymbolicExpression; import it.unive.lisa.util.collections.workset.WorkingSet; import it.unive.lisa.util.datastructures.graph.algorithms.FixpointException; @@ -35,20 +31,10 @@ * * @param the type of {@link AbstractState} contained into the analysis * state - * @param the type of {@link HeapDomain} contained into the computed - * abstract state - * @param the type of {@link ValueDomain} contained into the computed - * abstract state - * @param the type of {@link TypeDomain} contained into the computed - * abstract state */ -public class BaseCasesFinder, - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> - extends ContextBasedAnalysis { +public class BaseCasesFinder> extends ContextBasedAnalysis { - private final Recursion recursion; + private final Recursion recursion; private final boolean returnsVoid; @@ -61,8 +47,8 @@ public class BaseCasesFinder, * @param returnsVoid whether or not the recursion returns void */ public BaseCasesFinder( - ContextBasedAnalysis backing, - Recursion recursion, + ContextBasedAnalysis backing, + Recursion recursion, boolean returnsVoid) { super(backing); this.recursion = recursion; @@ -82,7 +68,7 @@ public void init( @Override public void fixpoint( - AnalysisState entryState, + AnalysisState entryState, Class> fixpointWorkingSet, FixpointConfiguration conf) throws FixpointException { @@ -92,11 +78,11 @@ public void fixpoint( } @Override - public AnalysisState getAbstractResultOf( + public AnalysisState getAbstractResultOf( CFGCall call, - AnalysisState entryState, - ExpressionSet[] parameters, - StatementStore expressions) + AnalysisState entryState, + ExpressionSet[] parameters, + StatementStore expressions) throws SemanticException { boolean inRecursion = recursion.getMembers().contains(call.getCFG()); if (inRecursion && call.getTargetedCFGs().contains(recursion.getRecursionHead())) { @@ -104,17 +90,15 @@ public AnalysisState getAbstractResultOf( if (returnsVoid) return entryState.bottom(); else - return new AnalysisState<>( - entryState.getState().bottom(), - call.getMetaVariable(), - entryState.getAliasing().bottom()); + return entryState.bottom().smallStepSemantics(call.getMetaVariable(), call); } return super.getAbstractResultOf(call, entryState, parameters, expressions); } @Override - protected boolean canShortcut(CFG cfg) { + protected boolean canShortcut( + CFG cfg) { // we want to compute the recursive chain with no shortcuts return !recursion.getMembers().contains(cfg); } @@ -136,18 +120,23 @@ protected boolean shouldStoreFixpointResults() { * * @throws SemanticException if an exception happens during the computation */ - public AnalysisState find() throws SemanticException { + public AnalysisState find() throws SemanticException { Call start = recursion.getInvocation(); - CompoundState entryState = recursion.getEntryState(); + CompoundState entryState = recursion.getEntryState(); // we reset the analysis at the point where the starting call can be // evaluated token = recursion.getInvocationToken(); Expression[] actuals = start.getParameters(); - @SuppressWarnings("unchecked") - ExpressionSet[] params = new ExpressionSet[actuals.length]; + ExpressionSet[] params = new ExpressionSet[actuals.length]; for (int i = 0; i < params.length; i++) params[i] = entryState.intermediateStates.getState(actuals[i]).getComputedExpressions(); - return start.expressionSemantics(this, entryState.postState.top(), params, entryState.intermediateStates); + // it should be enough to send values to top, retaining all type + // information + return start.forwardSemanticsAux( + this, + entryState.postState.withTopValues(), + params, + entryState.intermediateStates); } } diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/interprocedural/context/recursion/Recursion.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/interprocedural/context/recursion/Recursion.java index ccebf8d8a..91e2dd7a7 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/interprocedural/context/recursion/Recursion.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/interprocedural/context/recursion/Recursion.java @@ -1,9 +1,6 @@ package it.unive.lisa.interprocedural.context.recursion; import it.unive.lisa.analysis.AbstractState; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.context.ContextSensitivityToken; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.CodeMember; @@ -18,18 +15,8 @@ * * @param the type of {@link AbstractState} contained into the analysis * state - * @param the type of {@link HeapDomain} contained into the computed - * abstract state - * @param the type of {@link ValueDomain} contained into the computed - * abstract state - * @param the type of {@link TypeDomain} contained into the computed - * abstract state */ -public class Recursion< - A extends AbstractState, - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> { +public class Recursion> { private final Call start; @@ -39,7 +26,7 @@ public class Recursion< private final ContextSensitivityToken invocationToken; - private final CompoundState entryState; + private final CompoundState entryState; /** * Builds the recursion. @@ -57,7 +44,7 @@ public class Recursion< public Recursion( Call invocation, ContextSensitivityToken invocationToken, - CompoundState entryState, + CompoundState entryState, CFG recursionHead, Collection members) { this.start = invocation; @@ -80,14 +67,15 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; - Recursion other = (Recursion) obj; + Recursion other = (Recursion) obj; if (entryState == null) { if (other.entryState != null) return false; @@ -153,7 +141,7 @@ public ContextSensitivityToken getInvocationToken() { * * @return the entry state */ - public CompoundState getEntryState() { + public CompoundState getEntryState() { return entryState; } diff --git a/lisa/lisa-analyses/src/main/java/it/unive/lisa/interprocedural/context/recursion/RecursionSolver.java b/lisa/lisa-analyses/src/main/java/it/unive/lisa/interprocedural/context/recursion/RecursionSolver.java index faa3c3928..979f1a860 100644 --- a/lisa/lisa-analyses/src/main/java/it/unive/lisa/interprocedural/context/recursion/RecursionSolver.java +++ b/lisa/lisa-analyses/src/main/java/it/unive/lisa/interprocedural/context/recursion/RecursionSolver.java @@ -5,11 +5,8 @@ import it.unive.lisa.analysis.OptimizedAnalyzedCFG; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; import it.unive.lisa.analysis.lattices.ExpressionSet; import it.unive.lisa.analysis.lattices.GenericMapLattice; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.conf.FixpointConfiguration; import it.unive.lisa.interprocedural.InterproceduralAnalysisException; import it.unive.lisa.interprocedural.OpenCallPolicy; @@ -23,8 +20,8 @@ import it.unive.lisa.program.cfg.statement.Statement; import it.unive.lisa.program.cfg.statement.call.CFGCall; import it.unive.lisa.program.cfg.statement.call.Call; -import it.unive.lisa.symbolic.SymbolicExpression; import it.unive.lisa.symbolic.value.Identifier; +import it.unive.lisa.symbolic.value.PushInv; import it.unive.lisa.util.StringUtilities; import it.unive.lisa.util.collections.workset.WorkingSet; import it.unive.lisa.util.datastructures.graph.algorithms.FixpointException; @@ -45,34 +42,24 @@ * * @param the type of {@link AbstractState} contained into the analysis * state - * @param the type of {@link HeapDomain} contained into the computed - * abstract state - * @param the type of {@link ValueDomain} contained into the computed - * abstract state - * @param the type of {@link TypeDomain} contained into the computed - * abstract state */ -public class RecursionSolver, - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> - extends ContextBasedAnalysis { +public class RecursionSolver> extends ContextBasedAnalysis { private static final Logger LOG = LogManager.getLogger(RecursionSolver.class); - private final Recursion recursion; + private final Recursion recursion; private final boolean returnsVoid; - private final Map, ContextSensitivityToken>> finalEntryStates; + private final Map, ContextSensitivityToken>> finalEntryStates; - private final BaseCasesFinder baseCases; + private final BaseCasesFinder baseCases; - private GenericMapLattice> previousApprox; + private GenericMapLattice> previousApprox; - private GenericMapLattice> recursiveApprox; + private GenericMapLattice> recursiveApprox; - private AnalysisState base; + private AnalysisState base; /** * Builds the solver. @@ -81,7 +68,9 @@ public class RecursionSolver, * used to query call results * @param recursion the recursion to solve */ - public RecursionSolver(ContextBasedAnalysis backing, Recursion recursion) { + public RecursionSolver( + ContextBasedAnalysis backing, + Recursion recursion) { super(backing); this.recursion = recursion; finalEntryStates = new HashMap<>(); @@ -104,7 +93,7 @@ public void init( @Override public void fixpoint( - AnalysisState entryState, + AnalysisState entryState, Class> fixpointWorkingSet, FixpointConfiguration conf) throws FixpointException { @@ -114,31 +103,42 @@ public void fixpoint( } @Override - public AnalysisState getAbstractResultOf( + public AnalysisState getAbstractResultOf( CFGCall call, - AnalysisState entryState, - ExpressionSet[] parameters, - StatementStore expressions) + AnalysisState entryState, + ExpressionSet[] parameters, + StatementStore expressions) throws SemanticException { boolean inRecursion = recursion.getMembers().contains(call.getCFG()); if (inRecursion && call.getTargetedCFGs().contains(recursion.getRecursionHead())) { // this is a back call finalEntryStates.put(call, Pair.of(entryState, token)); - AnalysisState approx = null; + AnalysisState approx = null; if (recursiveApprox.getMap() != null) approx = recursiveApprox.getMap().get(call); if (approx == null) // no state: we must start with the base cases approx = transferToCallsite(recursion.getInvocation(), call, base); // we bring in the entry state to carry over the correct scope - return approx.lub(entryState); + AnalysisState res = approx.lub(entryState); + Identifier meta = call.getMetaVariable(); + if (!res.getState().knowsIdentifier(meta)) { + // if we have no information for the return value, we want to + // force it to bottom as it means that this is either the first + // execution (that must start from bottom) or that the recursion + // diverges + PushInv inv = new PushInv(meta.getStaticType(), call.getLocation()); + res = res.assign(meta, inv, call); + } + return res; } return super.getAbstractResultOf(call, entryState, parameters, expressions); } @Override - protected boolean canShortcut(CFG cfg) { + protected boolean canShortcut( + CFG cfg) { // we want to compute the recursive chain with no shortcuts return !recursion.getMembers().contains(cfg); } @@ -157,7 +157,7 @@ public void solve() throws SemanticException { int recursionCount = 0; Call start = recursion.getInvocation(); Collection ends = finalEntryStates.keySet(); - CompoundState entryState = recursion.getEntryState(); + CompoundState entryState = recursion.getEntryState(); LOG.info("Solving recursion at " + start.getLocation() + " for context " + recursion.getInvocationToken()); @@ -166,8 +166,7 @@ public void solve() throws SemanticException { base = baseCases.find(); Expression[] actuals = start.getParameters(); - @SuppressWarnings("unchecked") - ExpressionSet[] params = new ExpressionSet[actuals.length]; + ExpressionSet[] params = new ExpressionSet[actuals.length]; for (int i = 0; i < params.length; i++) params[i] = entryState.intermediateStates.getState(actuals[i]).getComputedExpressions(); @@ -181,7 +180,7 @@ public void solve() throws SemanticException { // we reset the analysis at the point where the starting call can be // evaluated token = recursion.getInvocationToken(); - AnalysisState post = start.expressionSemantics( + AnalysisState post = start.forwardSemanticsAux( this, entryState.postState, params, @@ -205,26 +204,38 @@ else if (recursionCount == conf.recursionWideningThreshold) // recursive call, we need to store the approximation for the // recursive call manually or the unwinding won't manage to solve it for (CFGCall call : ends) { - Pair, ContextSensitivityToken> pair = finalEntryStates.get(call); - AnalysisState callEntry = pair.getLeft(); + Pair, ContextSensitivityToken> pair = finalEntryStates.get(call); + AnalysisState callEntry = pair.getLeft(); ContextSensitivityToken callingToken = pair.getRight(); // we get the cfg containing the call - OptimizedAnalyzedCFG caller = (OptimizedAnalyzedCFG) results.get(call.getCFG()) + OptimizedAnalyzedCFG caller = (OptimizedAnalyzedCFG) results.get(call.getCFG()) .get(callingToken); // we get the actual call that is part of the cfg Call source = call; - if (call.getSource() != null) - source = call.getSource(); + while (source.getSource() != null) + source = source.getSource(); // it might happen that the call is a hotspot and we don't need // any additional work if (!caller.hasPostStateOf(source)) { // we add the value to the entry state, bringing in also the // base case - AnalysisState local = transferToCallsite(start, call, base); - AnalysisState returned = callEntry.lub(recursiveApprox.getState(call).lub(local)); + AnalysisState local = transferToCallsite(start, call, base); + AnalysisState returned = callEntry.lub(recursiveApprox.getState(call).lub(local)); + Identifier meta = call.getMetaVariable(); + if (!returned.getState().knowsIdentifier(meta)) { + // if we have no information for the return value, we + // want to + // force it to bottom as it means that this is either + // the first + // execution (that must start from bottom) or that the + // recursion + // diverges + PushInv inv = new PushInv(meta.getStaticType(), call.getLocation()); + returned = returned.assign(meta, inv, call); + } // finally, we store it in the result caller.storePostStateOf(source, returned); @@ -232,12 +243,12 @@ else if (recursionCount == conf.recursionWideningThreshold) } } - private AnalysisState transferToCallsite( + private AnalysisState transferToCallsite( Call original, CFGCall destination, - AnalysisState state) + AnalysisState state) throws SemanticException { - AnalysisState res = state.bottom(); + AnalysisState res = state.bottom(); Identifier meta = destination.getMetaVariable(); if (returnsVoid) res = state; @@ -246,6 +257,15 @@ private AnalysisState transferToCallsite( // we transfer the return value res = res.lub(state.assign(meta, variable, original)); + if (!res.getState().knowsIdentifier(meta)) { + // if we have no information for the return value, we want to + // force it to bottom as it means that this is either the first + // execution (that must start from bottom) or that the recursion + // diverges + PushInv inv = new PushInv(meta.getStaticType(), destination.getLocation()); + res = res.assign(meta, inv, destination); + } + // we only keep variables that can be affected by the recursive // chain: the whole recursion return value, and all variables // that are not sensible to scoping. All other variables are diff --git a/lisa/lisa-analyses/src/test/java/it/unive/lisa/AnalysisTestExecutor.java b/lisa/lisa-analyses/src/test/java/it/unive/lisa/AnalysisTestExecutor.java index 7be59af0a..06f11cb33 100644 --- a/lisa/lisa-analyses/src/test/java/it/unive/lisa/AnalysisTestExecutor.java +++ b/lisa/lisa-analyses/src/test/java/it/unive/lisa/AnalysisTestExecutor.java @@ -52,7 +52,8 @@ public abstract class AnalysisTestExecutor { * present into the configuration will be ignored, as it * will be overwritten by the computed workdir) */ - public void perform(CronConfiguration conf) { + public void perform( + CronConfiguration conf) { String testMethod = getCaller(); System.out.println("### Testing " + testMethod); Objects.requireNonNull(conf); @@ -190,7 +191,12 @@ private void copyFiles( } } - private void regen(Path expectedPath, Path actualPath, File expFile, File actFile, Accumulator acc) + private void regen( + Path expectedPath, + Path actualPath, + File expFile, + File actFile, + Accumulator acc) throws IOException { boolean updateReport = acc.changedWarnings || acc.changedConf || acc.changedInfos || !acc.addedFilePaths.isEmpty() || !acc.removedFilePaths.isEmpty() @@ -219,7 +225,8 @@ private void regen(Path expectedPath, Path actualPath, File expFile, File actFil } } - private Program readProgram(Path target) { + private Program readProgram( + Path target) { Program program = null; try { program = IMPFrontend.processFile(target.toString(), true); @@ -230,7 +237,9 @@ private Program readProgram(Path target) { return program; } - private void run(LiSAConfiguration configuration, Program program) { + private void run( + LiSAConfiguration configuration, + Program program) { LiSA lisa = new LiSA(configuration); try { lisa.run(program); @@ -240,7 +249,9 @@ private void run(LiSAConfiguration configuration, Program program) { } } - private void setupWorkdir(LiSAConfiguration configuration, Path actualPath) { + private void setupWorkdir( + LiSAConfiguration configuration, + Path actualPath) { File workdir = actualPath.toFile(); try { FileManager.forceDeleteFolder(workdir.toString()); @@ -262,12 +273,16 @@ private class Accumulator implements DiffAlgorithm { private final Path exp; - public Accumulator(Path exp) { + public Accumulator( + Path exp) { this.exp = exp; } @Override - public void report(REPORTED_COMPONENT component, REPORT_TYPE type, Collection reported) { + public void report( + REPORTED_COMPONENT component, + REPORT_TYPE type, + Collection reported) { switch (type) { case ONLY_FIRST: switch (component) { @@ -313,18 +328,27 @@ public void report(REPORTED_COMPONENT component, REPORT_TYPE type, Collection } @Override - public void fileDiff(String first, String second, String message) { + public void fileDiff( + String first, + String second, + String message) { Path file = Paths.get(first); changedFileName.add(exp.relativize(file)); } @Override - public void infoDiff(String key, String first, String second) { + public void infoDiff( + String key, + String first, + String second) { changedInfos = true; } @Override - public void configurationDiff(String key, String first, String second) { + public void configurationDiff( + String key, + String first, + String second) { changedConf = true; } } diff --git a/lisa/lisa-analyses/src/test/java/it/unive/lisa/CronConfiguration.java b/lisa/lisa-analyses/src/test/java/it/unive/lisa/CronConfiguration.java index 2536e8ce5..c457f4b56 100644 --- a/lisa/lisa-analyses/src/test/java/it/unive/lisa/CronConfiguration.java +++ b/lisa/lisa-analyses/src/test/java/it/unive/lisa/CronConfiguration.java @@ -9,7 +9,7 @@ * * @author Luca Negrini */ -public class CronConfiguration extends LiSAConfiguration { +public class CronConfiguration extends DefaultConfiguration { /** * The name of the test folder; this is used for searching expected results @@ -40,8 +40,4 @@ public class CronConfiguration extends LiSAConfiguration { * and the results will be checked to be equal to the non-optimized version. */ public boolean compareWithOptimization = true; - - public CronConfiguration() { - optimize = false; - } } diff --git a/lisa/lisa-analyses/src/test/java/it/unive/lisa/EqualityContractVerificationTest.java b/lisa/lisa-analyses/src/test/java/it/unive/lisa/EqualityContractVerificationTest.java index 504971ccc..213f4da5e 100644 --- a/lisa/lisa-analyses/src/test/java/it/unive/lisa/EqualityContractVerificationTest.java +++ b/lisa/lisa-analyses/src/test/java/it/unive/lisa/EqualityContractVerificationTest.java @@ -4,6 +4,9 @@ import it.unive.lisa.LiSAFactory.ConfigurableComponent; import it.unive.lisa.analysis.AnalyzedCFG; +import it.unive.lisa.analysis.BackwardAnalyzedCFG; +import it.unive.lisa.analysis.BackwardOptimizedAnalyzedCFG; +import it.unive.lisa.analysis.FixpointInfo; import it.unive.lisa.analysis.Lattice; import it.unive.lisa.analysis.OptimizedAnalyzedCFG; import it.unive.lisa.analysis.ScopeToken; @@ -17,8 +20,6 @@ import it.unive.lisa.analysis.nonrelational.NonRelationalElement; import it.unive.lisa.analysis.nonrelational.value.BaseNonRelationalValueDomain; import it.unive.lisa.analysis.numeric.Interval; -import it.unive.lisa.analysis.representation.DomainRepresentation; -import it.unive.lisa.analysis.representation.StringRepresentation; import it.unive.lisa.analysis.string.fsa.SimpleAutomaton; import it.unive.lisa.analysis.string.fsa.StringSymbol; import it.unive.lisa.analysis.string.tarsis.RegexAutomaton; @@ -116,6 +117,8 @@ import it.unive.lisa.util.datastructures.regex.symbolic.UnknownSymbolicChar; import it.unive.lisa.util.numeric.IntInterval; import it.unive.lisa.util.numeric.MathNumber; +import it.unive.lisa.util.representation.StringRepresentation; +import it.unive.lisa.util.representation.StructuredRepresentation; import java.lang.reflect.Modifier; import java.util.Collection; import java.util.Collections; @@ -165,8 +168,8 @@ public class EqualityContractVerificationTest { private static final Interval int1 = Interval.TOP; private static final Interval int2 = Interval.BOTTOM; - private static final DomainRepresentation dr1 = new StringRepresentation("foo"); - private static final DomainRepresentation dr2 = new StringRepresentation("bar"); + private static final StructuredRepresentation dr1 = new StringRepresentation("foo"); + private static final StructuredRepresentation dr2 = new StringRepresentation("bar"); private static final SingleGraph g1 = new SingleGraph("a"); private static final SingleGraph g2 = new SingleGraph("b"); private static final UnresolvedCall uc1 = new UnresolvedCall(cfg1, loc, CallType.STATIC, "foo", "foo"); @@ -216,7 +219,10 @@ && definesEqualsHashcode(clazz) assertTrue("Not all equals/hashcode have been tested", notTested.isEmpty()); } - private static boolean definesEqualsHashcode(Class clazz) throws NoSuchMethodException, SecurityException { + private static boolean definesEqualsHashcode( + Class clazz) + throws NoSuchMethodException, + SecurityException { Class equals = clazz.getMethod("equals", Object.class).getDeclaringClass(); Class hashcode = clazz.getMethod("hashCode").getDeclaringClass(); // we want to test our implementations, not the one coming from @@ -224,20 +230,30 @@ private static boolean definesEqualsHashcode(Class clazz) throws NoSuchMethod return equals.getName().startsWith("it.unive.lisa") || hashcode.getName().startsWith("it.unive.lisa"); } - private static void verify(Class clazz, Warning... suppressions) { + private static void verify( + Class clazz, + Warning... suppressions) { verify(clazz, true, null, suppressions); } - private static void verify(Class clazz, Consumer> extra, + private static void verify( + Class clazz, + Consumer> extra, Warning... suppressions) { verify(clazz, true, extra, suppressions); } - private static void verify(Class clazz, boolean getClass, Warning... suppressions) { + private static void verify( + Class clazz, + boolean getClass, + Warning... suppressions) { verify(clazz, getClass, null, suppressions); } - private static void verify(Class clazz, boolean getClass, Consumer> extra, + private static void verify( + Class clazz, + boolean getClass, + Consumer> extra, Warning... suppressions) { if (clazz.isAnonymousClass() || Modifier.isAbstract(clazz.getModifiers()) || Modifier.isInterface(clazz.getModifiers())) @@ -253,7 +269,7 @@ private static void verify(Class clazz, boolean getClass, Consumer void verify(Class clazz, boolean getClass, Consumer verifier.withIgnoredFields("location", "types")); + verify(expr, verifier -> verifier.withIgnoredFields("location")); } @Test @@ -424,7 +441,7 @@ public void testAnnotations() { @Test public void testRepresentations() { Reflections scanner = mkReflections(); - for (Class repr : scanner.getSubTypesOf(DomainRepresentation.class)) + for (Class repr : scanner.getSubTypesOf(StructuredRepresentation.class)) verify(repr); } @@ -444,12 +461,16 @@ public void testDomainsAndLattices() { else if (FunctionalLattice.class.isAssignableFrom(subject) || SetLattice.class.isAssignableFrom(subject) || InverseSetLattice.class.isAssignableFrom(subject) - || NonInterference.class == subject) + || NonInterference.class == subject + || FixpointInfo.class == subject) // fields function and elements and guards can be null verify(subject, Warning.NONFINAL_FIELDS); else if (subject == StaticTypes.class) verify(subject, verifier -> verifier.withIgnoredFields("types")); - else if (subject != AnalyzedCFG.class && subject != OptimizedAnalyzedCFG.class) + else if (subject != AnalyzedCFG.class + && subject != OptimizedAnalyzedCFG.class + && subject != BackwardAnalyzedCFG.class + && subject != BackwardOptimizedAnalyzedCFG.class) // we test the cfg separately verify(subject); } @@ -463,10 +484,15 @@ public void testAnalysisObjects() { // id is mutable verify(AnalyzedCFG.class, verifier -> verifier.withOnlyTheseFields("id", "results", "entryStates"), Warning.NONFINAL_FIELDS); + verify(BackwardAnalyzedCFG.class, verifier -> verifier.withOnlyTheseFields("id", "results", "exitStates"), + Warning.NONFINAL_FIELDS); // we do not consider the expanded results or interprocedural // as they do not identify the results verify(OptimizedAnalyzedCFG.class, verifier -> verifier.withOnlyTheseFields("id", "results", "entryStates"), Warning.NONFINAL_FIELDS); + verify(BackwardOptimizedAnalyzedCFG.class, + verifier -> verifier.withOnlyTheseFields("id", "results", "exitStates"), + Warning.NONFINAL_FIELDS); verify(ExecutionTrace.class); Reflections scanner = mkReflections(); diff --git a/lisa/lisa-analyses/src/test/java/it/unive/lisa/LiSAFactoryTest.java b/lisa/lisa-analyses/src/test/java/it/unive/lisa/LiSAFactoryTest.java deleted file mode 100644 index 52d0c1ba3..000000000 --- a/lisa/lisa-analyses/src/test/java/it/unive/lisa/LiSAFactoryTest.java +++ /dev/null @@ -1,121 +0,0 @@ -package it.unive.lisa; - -import static org.junit.Assert.assertNotEquals; -import static org.junit.Assert.assertSame; -import static org.junit.Assert.assertTrue; - -import it.unive.lisa.LiSAFactory.ConfigurableComponent; -import it.unive.lisa.analysis.nonrelational.heap.HeapEnvironment; -import it.unive.lisa.analysis.nonrelational.value.ValueEnvironment; -import it.unive.lisa.analysis.numeric.Sign; -import it.unive.lisa.analysis.value.ValueDomain; -import it.unive.lisa.program.SourceCodeLocation; -import it.unive.lisa.symbolic.value.Variable; -import it.unive.lisa.type.Untyped; -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashMap; -import java.util.Map; -import java.util.Map.Entry; -import org.apache.commons.lang3.StringUtils; -import org.junit.Test; - -// This test must live here since the implementations are available only in lisa-analyses -public class LiSAFactoryTest { - - private static final Collection components = LiSAFactory.configurableComponents(); - - @Test - public void ensureDefaultsConsistency() { - Collection getDefault = new ArrayList<>(); - Collection getInstanceOfDefault = new ArrayList<>(); - Map, Class[]> getInstanceWithDefaultParams = new HashMap<>(); - for (ConfigurableComponent comp : components) - if (comp.getDefaultInstance() != null) { - try { - LiSAFactory.getDefaultFor(comp.getComponent()); - } catch (AnalysisSetupException e) { - getDefault.add(comp); - } - - try { - LiSAFactory.getInstance(comp.getDefaultInstance()); - } catch (AnalysisSetupException e) { - getInstanceOfDefault.add(comp); - } - } - - for (Entry, Class[]> impl : LiSAFactory.DEFAULT_PARAMETERS.entrySet()) - try { - LiSAFactory.getInstance(impl.getKey()); - Object[] params = new Object[impl.getValue().length]; - for (int i = 0; i < params.length; i++) - params[i] = LiSAFactory.getInstance(impl.getValue()[i]); - LiSAFactory.getInstance(impl.getKey(), params); - } catch (AnalysisSetupException e) { - getInstanceWithDefaultParams.put(impl.getKey(), impl.getValue()); - } - - if (!getDefault.isEmpty()) { - System.err.println( - "The following default implementations cannot be created through LiSAFactory.getDefaultFor(...): "); - for (ConfigurableComponent comp : getDefault) - System.err.println(" - " + comp.getDefaultInstance().getName() + " (default for: " - + comp.getComponent().getName() + ")"); - } - - if (!getInstanceOfDefault.isEmpty()) { - System.err.println( - "The following default implementations cannot be created through LiSAFactory.getInstance(...): "); - for (ConfigurableComponent comp : getInstanceOfDefault) - System.err.println(" - " + comp.getDefaultInstance().getName() + " (default for: " - + comp.getComponent().getName() + ")"); - } - - if (!getInstanceWithDefaultParams.isEmpty()) { - System.err.println( - "The following implementations have default parameters in LiSAFactory.ANALYSIS_DEFAULTS and cannot be created through LiSAFactory.getInstance(...) using those parameters: "); - for (Class alt : getInstanceWithDefaultParams.keySet()) - System.err.println(" - " + alt.getName() + " (with params: " - + StringUtils.join(getInstanceWithDefaultParams.get(alt), ", ") + ")"); - } - - assertTrue("Problems creating instances", - getDefault.isEmpty() && getInstanceOfDefault.isEmpty() && getInstanceWithDefaultParams.isEmpty()); - } - - @Test - @SuppressWarnings("rawtypes") - public void testCustomDefaults() throws AnalysisSetupException { - Class target = ValueDomain.class; - Class newDefault = Sign.class; - Class oldDefault = removeEnvironment(target); - assertNotEquals("Old and new defaults are the same", oldDefault, newDefault); - - String message = "Setting custom default for " + target.getName() + " to " + newDefault.getName() - + " didn't have any effect on %s"; - LiSAFactory.DEFAULT_IMPLEMENTATIONS.put(target, newDefault); - - assertSame(String.format(message, "LiSAFactory.getDefaultFor(...)"), newDefault, removeEnvironment(target)); - - // we do not check configurable components here, since those only - // contain information from the compiled code - } - - private Class removeEnvironment(Class target) throws AnalysisSetupException { - Object def = LiSAFactory.getDefaultFor(target); - - // by getting top(), we know that whatever variable we ask for, we will - // be getting the top instance of the inner lattice - if (def instanceof ValueEnvironment) - def = ((ValueEnvironment) def).top() - .getState( - new Variable(Untyped.INSTANCE, "foo", new SourceCodeLocation("unknown", 0, 0))); - else if (def instanceof HeapEnvironment) - def = ((HeapEnvironment) def).top() - .getState( - new Variable(Untyped.INSTANCE, "foo", new SourceCodeLocation("unknown", 0, 0))); - - return def.getClass(); - } -} diff --git a/lisa/lisa-analyses/src/test/java/it/unive/lisa/TestParameterProvider.java b/lisa/lisa-analyses/src/test/java/it/unive/lisa/TestParameterProvider.java new file mode 100644 index 000000000..9058aba21 --- /dev/null +++ b/lisa/lisa-analyses/src/test/java/it/unive/lisa/TestParameterProvider.java @@ -0,0 +1,293 @@ +package it.unive.lisa; + +import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.SemanticOracle; +import it.unive.lisa.analysis.nonrelational.inference.BaseInferredValue; +import it.unive.lisa.analysis.nonrelational.inference.InferenceSystem; +import it.unive.lisa.analysis.nonrelational.value.BaseNonRelationalTypeDomain; +import it.unive.lisa.analysis.nonrelational.value.BaseNonRelationalValueDomain; +import it.unive.lisa.analysis.nonrelational.value.TypeEnvironment; +import it.unive.lisa.analysis.nonrelational.value.ValueEnvironment; +import it.unive.lisa.imp.IMPFeatures; +import it.unive.lisa.imp.types.IMPTypeSystem; +import it.unive.lisa.program.Program; +import it.unive.lisa.program.SyntheticLocation; +import it.unive.lisa.program.cfg.CFG; +import it.unive.lisa.program.cfg.CodeLocation; +import it.unive.lisa.program.cfg.ProgramPoint; +import it.unive.lisa.program.type.Int32Type; +import it.unive.lisa.symbolic.SymbolicExpression; +import it.unive.lisa.symbolic.value.BinaryExpression; +import it.unive.lisa.symbolic.value.Constant; +import it.unive.lisa.symbolic.value.Identifier; +import it.unive.lisa.symbolic.value.PushAny; +import it.unive.lisa.symbolic.value.PushInv; +import it.unive.lisa.symbolic.value.Skip; +import it.unive.lisa.symbolic.value.TernaryExpression; +import it.unive.lisa.symbolic.value.UnaryExpression; +import it.unive.lisa.symbolic.value.ValueExpression; +import it.unive.lisa.symbolic.value.Variable; +import it.unive.lisa.symbolic.value.operator.binary.BinaryOperator; +import it.unive.lisa.symbolic.value.operator.binary.ComparisonEq; +import it.unive.lisa.symbolic.value.operator.ternary.StringReplace; +import it.unive.lisa.symbolic.value.operator.ternary.TernaryOperator; +import it.unive.lisa.symbolic.value.operator.unary.LogicalNegation; +import it.unive.lisa.symbolic.value.operator.unary.UnaryOperator; +import it.unive.lisa.type.Type; +import it.unive.lisa.type.Untyped; +import it.unive.lisa.util.representation.StringRepresentation; +import it.unive.lisa.util.representation.StructuredRepresentation; +import java.lang.reflect.Method; +import java.util.Collections; +import java.util.Set; +import java.util.concurrent.atomic.AtomicReference; + +public class TestParameterProvider { + private TestParameterProvider() { + } + + public static class SampleNRVD implements BaseNonRelationalValueDomain { + + @Override + public StructuredRepresentation representation() { + return new StringRepresentation("sample"); + } + + @Override + public SampleNRVD top() { + return this; + } + + @Override + public SampleNRVD bottom() { + return this; + } + + @Override + public SampleNRVD lubAux( + SampleNRVD other) + throws SemanticException { + return this; + } + + @Override + public boolean lessOrEqualAux( + SampleNRVD other) + throws SemanticException { + return true; + } + + @Override + public boolean equals( + Object obj) { + return this == obj; + } + + @Override + public int hashCode() { + return getClass().hashCode(); + } + } + + public static class SampleIV implements BaseInferredValue { + + @Override + public StructuredRepresentation representation() { + return new StringRepresentation("sample"); + } + + @Override + public SampleIV top() { + return this; + } + + @Override + public SampleIV bottom() { + return this; + } + + @Override + public boolean canProcess( + SymbolicExpression expression, + ProgramPoint pp, + SemanticOracle oracle) { + return true; + } + + @Override + public SampleIV lubAux( + SampleIV other) + throws SemanticException { + return this; + } + + @Override + public boolean lessOrEqualAux( + SampleIV other) + throws SemanticException { + return true; + } + + @Override + public boolean equals( + Object obj) { + return this == obj; + } + + @Override + public int hashCode() { + return SampleIV.class.hashCode(); + } + } + + public static class SampleNRTD implements BaseNonRelationalTypeDomain { + + @Override + public StructuredRepresentation representation() { + return new StringRepresentation("sample"); + } + + @Override + public SampleNRTD top() { + return this; + } + + @Override + public SampleNRTD bottom() { + return this; + } + + @Override + public SampleNRTD lubAux( + SampleNRTD other) + throws SemanticException { + return this; + } + + @Override + public boolean lessOrEqualAux( + SampleNRTD other) + throws SemanticException { + return true; + } + + @Override + public boolean equals( + Object obj) { + return this == obj; + } + + @Override + public int hashCode() { + return getClass().hashCode(); + } + + @Override + public Set getRuntimeTypes() { + return Collections.emptySet(); + } + } + + public static class FakePP implements ProgramPoint { + + @Override + public CodeLocation getLocation() { + return SyntheticLocation.INSTANCE; + } + + @Override + public CFG getCFG() { + return null; + } + + @Override + public Program getProgram() { + return new Program(new IMPFeatures(), new IMPTypeSystem()); + } + } + + public static Object[] provideParams( + Method mtd, + Class[] params, + Class envClass, + AtomicReference envPos) { + Object[] res = new Object[params.length]; + for (int i = 0; i < res.length; i++) { + res[i] = provideParam(mtd, params[i]); + if (params[i] == envClass) + envPos.set(i); + } + return res; + } + + @SuppressWarnings("unchecked") + public static R provideParam( + Method mtd, + Class param) { + if (param == Type.class) + return (R) Int32Type.INSTANCE; + + if (param == PushAny.class) + return (R) new PushAny(Untyped.INSTANCE, SyntheticLocation.INSTANCE); + if (param == PushInv.class) + return (R) new PushInv(Untyped.INSTANCE, SyntheticLocation.INSTANCE); + if (param == Constant.class || param == ValueExpression.class) + return (R) new Constant(Int32Type.INSTANCE, 5, SyntheticLocation.INSTANCE); + if (param == Identifier.class) + return (R) new Variable(provideParam(mtd, Type.class), "foo", SyntheticLocation.INSTANCE); + if (param == Skip.class) + return (R) new Skip(SyntheticLocation.INSTANCE); + + if (param == TernaryOperator.class) + return (R) StringReplace.INSTANCE; + if (param == BinaryOperator.class) + return (R) ComparisonEq.INSTANCE; + if (param == UnaryOperator.class) + return (R) LogicalNegation.INSTANCE; + + if (param == UnaryExpression.class) + return (R) new UnaryExpression( + provideParam(mtd, Type.class), + provideParam(mtd, Constant.class), + provideParam(mtd, UnaryOperator.class), + SyntheticLocation.INSTANCE); + if (param == BinaryExpression.class) + return (R) new BinaryExpression( + provideParam(mtd, Type.class), + provideParam(mtd, Constant.class), + provideParam(mtd, Constant.class), + provideParam(mtd, BinaryOperator.class), + SyntheticLocation.INSTANCE); + if (param == TernaryExpression.class) + return (R) new TernaryExpression( + provideParam(mtd, Type.class), + provideParam(mtd, Constant.class), + provideParam(mtd, Constant.class), + provideParam(mtd, Constant.class), + provideParam(mtd, TernaryOperator.class), + SyntheticLocation.INSTANCE); + + if (param == ValueEnvironment.class) + return (R) new ValueEnvironment<>(new SampleNRVD()); + if (param == SampleNRVD.class || param == BaseNonRelationalValueDomain.class) + return (R) new SampleNRVD(); + + if (param == InferenceSystem.class) + return (R) new InferenceSystem<>(new SampleIV()); + if (param == SampleIV.class || param == BaseInferredValue.class) + return (R) new SampleIV(); + + if (param == TypeEnvironment.class) + return (R) new TypeEnvironment<>(new SampleNRTD()); + if (param == SampleNRTD.class || param == BaseNonRelationalTypeDomain.class) + return (R) new SampleNRTD(); + + if (param == SemanticOracle.class) + return (R) DefaultConfiguration.defaultAbstractState(); + + if (param == ProgramPoint.class) + return (R) new FakePP(); + + throw new UnsupportedOperationException(mtd + ": No default value for type " + param.getName()); + } +} diff --git a/lisa/lisa-analyses/src/test/java/it/unive/lisa/analysis/heap/pointbased/PointBasedHeapTest.java b/lisa/lisa-analyses/src/test/java/it/unive/lisa/analysis/heap/pointbased/PointBasedHeapTest.java index 44b70c2bb..30fe7b279 100644 --- a/lisa/lisa-analyses/src/test/java/it/unive/lisa/analysis/heap/pointbased/PointBasedHeapTest.java +++ b/lisa/lisa-analyses/src/test/java/it/unive/lisa/analysis/heap/pointbased/PointBasedHeapTest.java @@ -4,12 +4,15 @@ import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; +import it.unive.lisa.TestParameterProvider; import it.unive.lisa.analysis.ScopeToken; import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.SemanticOracle; import it.unive.lisa.analysis.lattices.ExpressionSet; import it.unive.lisa.analysis.nonrelational.heap.HeapEnvironment; import it.unive.lisa.program.CodeElement; import it.unive.lisa.program.SourceCodeLocation; +import it.unive.lisa.program.annotations.Annotations; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.CodeLocation; import it.unive.lisa.program.cfg.ProgramPoint; @@ -24,7 +27,6 @@ import it.unive.lisa.symbolic.value.Identifier; import it.unive.lisa.symbolic.value.MemoryPointer; import it.unive.lisa.symbolic.value.OutOfScopeIdentifier; -import it.unive.lisa.symbolic.value.ValueExpression; import it.unive.lisa.symbolic.value.Variable; import it.unive.lisa.symbolic.value.operator.binary.NumericNonOverflowingAdd; import it.unive.lisa.type.Type; @@ -69,23 +71,10 @@ public CFG getCFG() { } }; - private final CodeLocation fakeLocation = new SourceCodeLocation("fake", 0, 0); + private final SemanticOracle fakeOracle = TestParameterProvider.provideParam(null, SemanticOracle.class); - private final ProgramPoint fakeProgramPoint = new ProgramPoint() { - - @Override - public CodeLocation getLocation() { - return fakeLocation; - } - - @Override - public CFG getCFG() { - return null; - } - }; - - private final Variable x = new Variable(untyped, "x", fakeProgramPoint.getLocation()); - private final Variable y = new Variable(untyped, "y", fakeProgramPoint.getLocation()); + private final Variable x = new Variable(untyped, "x", pp1.getLocation()); + private final Variable y = new Variable(untyped, "y", pp1.getLocation()); private final PointBasedHeap emptyHeap = new PointBasedHeap(); private final PointBasedHeap topHeap = new PointBasedHeap().top(); @@ -98,36 +87,35 @@ public CFG getCFG() { public void testAssign() throws SemanticException { Constant one = new Constant(Int32Type.INSTANCE, 1, loc1); Constant zero = new Constant(Int32Type.INSTANCE, 0, loc1); - PointBasedHeap assignResult = topHeap.assign(x, - one, fakeProgramPoint); + PointBasedHeap assignResult = topHeap.assign(x, one, pp1, fakeOracle); // constants do not affect heap abstract domain assertEquals(topHeap, assignResult); assignResult = topHeap.assign(x, - new BinaryExpression(intType, one, zero, NumericNonOverflowingAdd.INSTANCE, fakeLocation), - fakeProgramPoint); + new BinaryExpression(intType, one, zero, NumericNonOverflowingAdd.INSTANCE, loc1), + pp1, fakeOracle); // binary expressions do not affect heap abstract domain assertEquals(assignResult, topHeap); - // from empty environment, assignment x = *(pp1) + // from empty environment, assignment x = *(pp1, fakeOracle) // expected: x -> pp1 PointBasedHeap xAssign = topHeap.assign(x, new HeapReference(untyped, new MemoryAllocation(untyped, loc1), loc1), - pp1); + pp1, fakeOracle); AllocationSites xSites = new AllocationSites(Collections.singleton(alloc1), false); HeapEnvironment expectedEnv = emptyHeapEnv.putState(x, xSites); assertEquals(new PointBasedHeap(expectedEnv), xAssign); - // from x -> pp1, assignment x = *(pp2) + // from x -> pp1, assignment x = *(pp2, fakeOracle) // expected: x -> pp2 PointBasedHeap actual = xAssign.assign(x, new HeapReference(untyped, new MemoryAllocation(untyped, loc2), loc2), - pp2); + pp2, fakeOracle); xSites = new AllocationSites(Collections.singleton(alloc2), false); expectedEnv = emptyHeapEnv.putState(x, xSites); @@ -143,70 +131,70 @@ public void testSmallStepSemantic() throws SemanticException { // result. // 1. Heap allocation - HeapExpression heapExpression = new MemoryAllocation(untyped, loc1); + HeapExpression heapExpression = new MemoryAllocation(untyped, loc1, new Annotations()); // from topState - PointBasedHeap sss = topHeap.semanticsOf(heapExpression, pp1); - assertEquals(sss.rewrite(heapExpression, pp1), topHeap.rewrite(heapExpression, pp1)); + PointBasedHeap sss = topHeap.semanticsOf(heapExpression, pp1, fakeOracle); + assertEquals(sss.rewrite(heapExpression, pp1, fakeOracle), topHeap.rewrite(heapExpression, pp1, fakeOracle)); // from bottomState - sss = bottomHeap.semanticsOf(heapExpression, pp1); - assertEquals(sss.rewrite(heapExpression, pp1), bottomHeap.rewrite(heapExpression, pp1)); + sss = bottomHeap.semanticsOf(heapExpression, pp1, fakeOracle); + assertEquals(sss.rewrite(heapExpression, pp1, fakeOracle), bottomHeap.rewrite(heapExpression, pp1, fakeOracle)); // from x -> pp1 PointBasedHeap xToLoc1 = topHeap.assign(x, new HeapReference(untyped, new MemoryAllocation(untyped, loc1), loc1), - pp1); - sss = xToLoc1.semanticsOf(heapExpression, pp1); - assertEquals(sss.rewrite(heapExpression, pp1), xToLoc1.rewrite(heapExpression, pp1)); + pp1, fakeOracle); + sss = xToLoc1.semanticsOf(heapExpression, pp1, fakeOracle); + assertEquals(sss.rewrite(heapExpression, pp1, fakeOracle), xToLoc1.rewrite(heapExpression, pp1, fakeOracle)); // 2. Heap reference heapExpression = new HeapReference(untyped, - new MemoryAllocation(untyped, loc1), loc1); + new MemoryAllocation(untyped, loc1, new Annotations()), loc1); // from topState - sss = topHeap.semanticsOf(heapExpression, pp1); - assertEquals(sss.rewrite(heapExpression, pp1), topHeap.rewrite(heapExpression, pp1)); + sss = topHeap.semanticsOf(heapExpression, pp1, fakeOracle); + assertEquals(sss.rewrite(heapExpression, pp1, fakeOracle), topHeap.rewrite(heapExpression, pp1, fakeOracle)); // from bottomState - sss = bottomHeap.semanticsOf(heapExpression, pp1); - assertEquals(sss.rewrite(heapExpression, pp1), bottomHeap.rewrite(heapExpression, pp1)); + sss = bottomHeap.semanticsOf(heapExpression, pp1, fakeOracle); + assertEquals(sss.rewrite(heapExpression, pp1, fakeOracle), bottomHeap.rewrite(heapExpression, pp1, fakeOracle)); // from x -> pp1 - sss = xToLoc1.semanticsOf(heapExpression, pp1); - assertEquals(sss.rewrite(heapExpression, pp1), xToLoc1.rewrite(heapExpression, pp1)); + sss = xToLoc1.semanticsOf(heapExpression, pp1, fakeOracle); + assertEquals(sss.rewrite(heapExpression, pp1, fakeOracle), xToLoc1.rewrite(heapExpression, pp1, fakeOracle)); // 3. Access child heapExpression = new AccessChild(untyped, x, y, loc1); // from topState - sss = topHeap.semanticsOf(heapExpression, pp1); - assertEquals(sss.rewrite(heapExpression, pp1), topHeap.rewrite(heapExpression, pp1)); + sss = topHeap.semanticsOf(heapExpression, pp1, fakeOracle); + assertEquals(sss.rewrite(heapExpression, pp1, fakeOracle), topHeap.rewrite(heapExpression, pp1, fakeOracle)); // from bottomState - sss = bottomHeap.semanticsOf(heapExpression, pp1); - assertEquals(sss.rewrite(heapExpression, pp1), bottomHeap.rewrite(heapExpression, pp1)); + sss = bottomHeap.semanticsOf(heapExpression, pp1, fakeOracle); + assertEquals(sss.rewrite(heapExpression, pp1, fakeOracle), bottomHeap.rewrite(heapExpression, pp1, fakeOracle)); // from x -> pp1 - sss = xToLoc1.semanticsOf(heapExpression, pp1); - assertEquals(sss.rewrite(heapExpression, pp1), xToLoc1.rewrite(heapExpression, pp1)); + sss = xToLoc1.semanticsOf(heapExpression, pp1, fakeOracle); + assertEquals(sss.rewrite(heapExpression, pp1, fakeOracle), xToLoc1.rewrite(heapExpression, pp1, fakeOracle)); // 4. Heap dereference heapExpression = new HeapDereference(untyped, new HeapReference(untyped, - new MemoryAllocation(untyped, loc1), loc1), loc1); + new MemoryAllocation(untyped, loc1, new Annotations()), loc1), loc1); // from topState - sss = topHeap.semanticsOf(heapExpression, pp1); - assertEquals(sss.rewrite(heapExpression, pp1), topHeap.rewrite(heapExpression, pp1)); + sss = topHeap.semanticsOf(heapExpression, pp1, fakeOracle); + assertEquals(sss.rewrite(heapExpression, pp1, fakeOracle), topHeap.rewrite(heapExpression, pp1, fakeOracle)); // from bottomState - sss = bottomHeap.semanticsOf(heapExpression, pp1); - assertEquals(sss.rewrite(heapExpression, pp1), bottomHeap.rewrite(heapExpression, pp1)); + sss = bottomHeap.semanticsOf(heapExpression, pp1, fakeOracle); + assertEquals(sss.rewrite(heapExpression, pp1, fakeOracle), bottomHeap.rewrite(heapExpression, pp1, fakeOracle)); // from x -> pp1 - sss = xToLoc1.semanticsOf(heapExpression, pp1); - assertEquals(sss.rewrite(heapExpression, pp1), xToLoc1.rewrite(heapExpression, pp1)); + sss = xToLoc1.semanticsOf(heapExpression, pp1, fakeOracle); + assertEquals(sss.rewrite(heapExpression, pp1, fakeOracle), xToLoc1.rewrite(heapExpression, pp1, fakeOracle)); } @Test @@ -214,17 +202,15 @@ public void testLub() throws SemanticException { PointBasedHeap xToLoc1 = topHeap.assign(x, new HeapReference(untyped, new MemoryAllocation(untyped, loc1), loc1), - pp1); + pp1, fakeOracle); PointBasedHeap xToLoc2 = topHeap.assign(x, - new HeapReference(untyped, - new MemoryAllocation(untyped, loc2), loc2), - pp2); + new HeapReference(untyped, new MemoryAllocation(untyped, loc2), loc2), + pp2, fakeOracle); PointBasedHeap yToLoc2 = topHeap.assign(y, - new HeapReference(untyped, - new MemoryAllocation(untyped, loc2), loc2), - pp2); + new HeapReference(untyped, new MemoryAllocation(untyped, loc2), loc2), + pp2, fakeOracle); // top lub or lub top = top assertTrue(topHeap.lub(xToLoc1).isTop()); @@ -263,17 +249,17 @@ public void testWidening() throws SemanticException { PointBasedHeap xToLoc1 = topHeap.assign(x, new HeapReference(untyped, new MemoryAllocation(untyped, loc1), loc1), - pp1); + pp1, fakeOracle); PointBasedHeap xToLoc2 = topHeap.assign(x, new HeapReference(untyped, new MemoryAllocation(untyped, loc2), loc2), - pp2); + pp2, fakeOracle); PointBasedHeap yToLoc2 = topHeap.assign(y, new HeapReference(untyped, new MemoryAllocation(untyped, loc2), loc2), - pp2); + pp2, fakeOracle); // top lub or lub top = top assertTrue(topHeap.widening(xToLoc1).isTop()); @@ -313,12 +299,12 @@ public void testLessOrEquals() throws SemanticException { PointBasedHeap xAssign = topHeap.assign(x, new HeapReference(untyped, new MemoryAllocation(untyped, loc1), loc1), - pp1); + pp1, fakeOracle); PointBasedHeap yAssign = topHeap.assign(y, new HeapReference(untyped, new MemoryAllocation(untyped, loc2), loc2), - pp2); + pp2, fakeOracle); // <= top assertTrue(topHeap.lessOrEqual(topHeap)); @@ -351,7 +337,7 @@ public void testForgetIdentifier() throws SemanticException { PointBasedHeap result = topHeap.assign(x, new HeapReference(untyped, new MemoryAllocation(untyped, loc1), loc1), - pp1); + pp1, fakeOracle); assertEquals(result.forgetIdentifier(x), emptyHeap); assertEquals(result.forgetIdentifier(y), result); @@ -376,12 +362,12 @@ public CodeLocation getLocation() { PointBasedHeap xAssign = topHeap.assign(x, new HeapReference(untyped, new MemoryAllocation(untyped, loc1), loc1), - pp1); + pp1, fakeOracle); PointBasedHeap xPushedScopeAssign = topHeap.assign( new OutOfScopeIdentifier(x, token, loc1), new HeapReference(untyped, new MemoryAllocation(untyped, loc1), loc1), - pp1); + pp1, fakeOracle); // x -> pp1 pushScope = [out-of-scope-id]x -> pp1 assertEquals(xAssign.pushScope(token), xPushedScopeAssign); @@ -403,12 +389,12 @@ public CodeLocation getLocation() { PointBasedHeap xAssign = topHeap.assign(x, new HeapReference(untyped, new MemoryAllocation(untyped, loc1), loc1), - pp1); + pp1, fakeOracle); PointBasedHeap xScopedAssign = topHeap.assign((Identifier) x.pushScope(token), new HeapReference(untyped, new MemoryAllocation(untyped, loc1), loc1), - pp1); + pp1, fakeOracle); // [scoped]x -> pp1 popScope = x -> pp1 assertEquals(xAssign, xScopedAssign.popScope(token)); @@ -422,56 +408,55 @@ public void testAccessChildRewrite() throws SemanticException { PointBasedHeap xAssign = topHeap.assign(x, new HeapReference(untyped, new MemoryAllocation(untyped, loc1), loc1), - pp1); + pp1, fakeOracle); // x.y rewritten in x -> pp1 = pp1 AccessChild accessChild = new AccessChild(untyped, x, y, loc1); - ExpressionSet expectedRewritten = new ExpressionSet<>(alloc1); - assertEquals(expectedRewritten, xAssign.rewrite(accessChild, fakeProgramPoint)); + ExpressionSet expectedRewritten = new ExpressionSet(alloc1); + assertEquals(expectedRewritten, xAssign.rewrite(accessChild, pp1, fakeOracle)); // y.x rewritten in x -> pp1 = empty set accessChild = new AccessChild(untyped, y, x, loc1); - assertEquals(new ExpressionSet<>(), xAssign.rewrite(accessChild, fakeProgramPoint)); + assertEquals(new ExpressionSet(), xAssign.rewrite(accessChild, pp1, fakeOracle)); } @Test public void testIdentifierRewrite() throws SemanticException { PointBasedHeap xAssign = topHeap.assign(x, new HeapReference(untyped, - new MemoryAllocation(untyped, loc1), fakeLocation), - pp1); + new MemoryAllocation(untyped, loc1), loc1), + pp1, fakeOracle); // x rewritten in x -> pp1 = pp1 - ExpressionSet expectedRewritten = new ExpressionSet<>( - new MemoryPointer(untyped, alloc1, fakeLocation)); - assertEquals(xAssign.rewrite(x, fakeProgramPoint), expectedRewritten); + ExpressionSet expectedRewritten = new ExpressionSet( + new MemoryPointer(untyped, alloc1, loc1)); + assertEquals(xAssign.rewrite(x, pp1, fakeOracle), expectedRewritten); // y rewritten in x -> pp1 = {y} - // TODO to verify - assertEquals(xAssign.rewrite(y, fakeProgramPoint), new ExpressionSet<>(y)); + assertEquals(xAssign.rewrite(y, pp1, fakeOracle), new ExpressionSet(y)); } @Test public void testHeapDereferenceRewrite() throws SemanticException { - // *(&(new loc(pp1)) rewritten in top -> pp1 + // *(&(new loc(pp1, fakeOracle)) rewritten in top -> pp1 HeapDereference deref = new HeapDereference(untyped, new HeapReference(untyped, - new MemoryAllocation(untyped, loc1), loc1), loc1); + new MemoryAllocation(untyped, loc1, new Annotations()), loc1), loc1); - ExpressionSet expectedRewritten = new ExpressionSet<>(alloc1); - assertEquals(expectedRewritten, topHeap.rewrite(deref, fakeProgramPoint)); + ExpressionSet expectedRewritten = new ExpressionSet(alloc1); + assertEquals(expectedRewritten, topHeap.rewrite(deref, pp1, fakeOracle)); // *(x) rewritten in x -> pp1 -> pp1 PointBasedHeap xAssign = topHeap.assign(x, new HeapReference(untyped, - new MemoryAllocation(untyped, loc1), fakeLocation), - pp1); + new MemoryAllocation(untyped, loc1), loc1), + pp1, fakeOracle); deref = new HeapDereference(untyped, x, loc1); - expectedRewritten = new ExpressionSet<>(alloc1); - assertEquals(expectedRewritten, xAssign.rewrite(deref, fakeProgramPoint)); + expectedRewritten = new ExpressionSet(alloc1); + assertEquals(expectedRewritten, xAssign.rewrite(deref, pp1, fakeOracle)); // *(y) rewritten in x -> pp1 -> empty set - AllocationSite expectedUnknownAlloc = new StackAllocationSite(untyped, "unknown@y", true, fakeLocation); + AllocationSite expectedUnknownAlloc = new StackAllocationSite(untyped, "unknown@y", true, loc1); deref = new HeapDereference(untyped, y, loc1); - expectedRewritten = new ExpressionSet<>(expectedUnknownAlloc); - assertEquals(expectedRewritten, xAssign.rewrite(deref, fakeProgramPoint)); + expectedRewritten = new ExpressionSet(expectedUnknownAlloc); + assertEquals(expectedRewritten, xAssign.rewrite(deref, pp1, fakeOracle)); } } diff --git a/lisa/lisa-analyses/src/test/java/it/unive/lisa/analysis/nonrelational/inference/BaseInferredValueTest.java b/lisa/lisa-analyses/src/test/java/it/unive/lisa/analysis/nonrelational/inference/BaseInferredValueTest.java index 71d697491..14f4fe96c 100644 --- a/lisa/lisa-analyses/src/test/java/it/unive/lisa/analysis/nonrelational/inference/BaseInferredValueTest.java +++ b/lisa/lisa-analyses/src/test/java/it/unive/lisa/analysis/nonrelational/inference/BaseInferredValueTest.java @@ -4,38 +4,9 @@ import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; +import it.unive.lisa.TestParameterProvider; import it.unive.lisa.analysis.Lattice; -import it.unive.lisa.analysis.SemanticDomain.Satisfiability; -import it.unive.lisa.analysis.SemanticException; -import it.unive.lisa.analysis.nonrelational.value.ValueEnvironment; -import it.unive.lisa.analysis.representation.DomainRepresentation; -import it.unive.lisa.analysis.representation.StringRepresentation; -import it.unive.lisa.imp.IMPFeatures; -import it.unive.lisa.imp.types.IMPTypeSystem; -import it.unive.lisa.program.Program; -import it.unive.lisa.program.SyntheticLocation; -import it.unive.lisa.program.cfg.CFG; -import it.unive.lisa.program.cfg.CodeLocation; -import it.unive.lisa.program.cfg.ProgramPoint; -import it.unive.lisa.program.type.Int32Type; -import it.unive.lisa.symbolic.SymbolicExpression; -import it.unive.lisa.symbolic.value.BinaryExpression; -import it.unive.lisa.symbolic.value.Constant; -import it.unive.lisa.symbolic.value.Identifier; -import it.unive.lisa.symbolic.value.PushAny; -import it.unive.lisa.symbolic.value.Skip; -import it.unive.lisa.symbolic.value.TernaryExpression; -import it.unive.lisa.symbolic.value.UnaryExpression; -import it.unive.lisa.symbolic.value.ValueExpression; -import it.unive.lisa.symbolic.value.Variable; -import it.unive.lisa.symbolic.value.operator.binary.BinaryOperator; -import it.unive.lisa.symbolic.value.operator.binary.ComparisonEq; -import it.unive.lisa.symbolic.value.operator.ternary.StringReplace; -import it.unive.lisa.symbolic.value.operator.ternary.TernaryOperator; -import it.unive.lisa.symbolic.value.operator.unary.LogicalNegation; -import it.unive.lisa.symbolic.value.operator.unary.UnaryOperator; -import it.unive.lisa.type.Type; -import it.unive.lisa.type.Untyped; +import it.unive.lisa.analysis.lattices.Satisfiability; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.lang.reflect.Modifier; @@ -44,62 +15,15 @@ public class BaseInferredValueTest { - private static class Sample implements BaseInferredValue { - - @Override - public DomainRepresentation representation() { - return new StringRepresentation("sample"); - } - - @Override - public Sample top() { - return this; - } - - @Override - public Sample bottom() { - return this; - } - - @Override - public boolean tracksIdentifiers(Identifier id) { - return true; - } - - @Override - public boolean canProcess(SymbolicExpression expression) { - return true; - } - - @Override - public Sample lubAux(Sample other) throws SemanticException { - return this; - } - - @Override - public boolean lessOrEqualAux(Sample other) throws SemanticException { - return true; - } - - @Override - public boolean equals(Object obj) { - return this == obj; - } - - @Override - public int hashCode() { - return Sample.class.hashCode(); - } - } - @Test public void testDefaults() throws IllegalAccessException, IllegalArgumentException, InvocationTargetException { for (Method mtd : BaseInferredValue.class.getDeclaredMethods()) if (Modifier.isPublic(mtd.getModifiers()) && !isExcluded(mtd)) try { AtomicReference envPos = new AtomicReference<>(); - Object[] params = provideParams(mtd, mtd.getParameterTypes(), envPos); - Object ret = mtd.invoke(new Sample(), params); + Object[] params = TestParameterProvider.provideParams(mtd, mtd.getParameterTypes(), + InferenceSystem.class, envPos); + Object ret = mtd.invoke(new TestParameterProvider.SampleIV(), params); if (mtd.getName().startsWith("eval")) assertTrue("Default implementation of " + mtd.getName() + " did not return top", ((Lattice) ret).isTop()); @@ -118,7 +42,8 @@ else if (mtd.getName().startsWith("assume")) } } - private static boolean isExcluded(Method mtd) { + private static boolean isExcluded( + Method mtd) { if (mtd.getName().equals("canProcess") || mtd.getName().equals("tracksIdentifiers") || mtd.getName().equals("satisfies") @@ -128,75 +53,4 @@ private static boolean isExcluded(Method mtd) { return true; return false; } - - private static Object[] provideParams(Method mtd, Class[] params, AtomicReference envPos) { - Object[] res = new Object[params.length]; - for (int i = 0; i < res.length; i++) { - res[i] = provideParam(mtd, params[i]); - if (params[i] == ValueEnvironment.class) - envPos.set(i); - } - return res; - } - - @SuppressWarnings("unchecked") - private static R provideParam(Method mtd, Class param) { - class FakePP implements ProgramPoint { - - @Override - public CodeLocation getLocation() { - return null; - } - - @Override - public CFG getCFG() { - return null; - } - - @Override - public Program getProgram() { - return new Program(new IMPFeatures(), new IMPTypeSystem()); - } - - } - - if (param == Type.class) - return (R) Int32Type.INSTANCE; - - if (param == PushAny.class) - return (R) new PushAny(Untyped.INSTANCE, SyntheticLocation.INSTANCE); - if (param == Constant.class || param == ValueExpression.class) - return (R) new Constant(Int32Type.INSTANCE, 5, SyntheticLocation.INSTANCE); - if (param == Identifier.class) - return (R) new Variable(provideParam(mtd, Type.class), "foo", SyntheticLocation.INSTANCE); - - if (param == TernaryOperator.class) - return (R) StringReplace.INSTANCE; - if (param == BinaryOperator.class) - return (R) ComparisonEq.INSTANCE; - if (param == UnaryOperator.class) - return (R) LogicalNegation.INSTANCE; - - if (param == UnaryExpression.class) - return (R) new UnaryExpression(provideParam(mtd, Type.class), provideParam(mtd, Constant.class), - provideParam(mtd, UnaryOperator.class), SyntheticLocation.INSTANCE); - if (param == BinaryExpression.class) - return (R) new BinaryExpression(provideParam(mtd, Type.class), provideParam(mtd, Constant.class), - provideParam(mtd, Constant.class), provideParam(mtd, BinaryOperator.class), - SyntheticLocation.INSTANCE); - if (param == TernaryExpression.class) - return (R) new TernaryExpression(provideParam(mtd, Type.class), provideParam(mtd, Constant.class), - provideParam(mtd, Constant.class), provideParam(mtd, Constant.class), - provideParam(mtd, TernaryOperator.class), SyntheticLocation.INSTANCE); - if (param == InferenceSystem.class) - return (R) new InferenceSystem<>(new Sample()); - if (param == Sample.class || param == BaseInferredValue.class) - return (R) new Sample(); - if (param == ProgramPoint.class) - return (R) new FakePP(); - if (param == Skip.class) - return (R) new Skip(SyntheticLocation.INSTANCE); - - throw new UnsupportedOperationException(mtd + ": No default value for type " + param.getName()); - } } diff --git a/lisa/lisa-analyses/src/test/java/it/unive/lisa/analysis/nonrelational/value/BaseNonRelationalTypeDomainTest.java b/lisa/lisa-analyses/src/test/java/it/unive/lisa/analysis/nonrelational/value/BaseNonRelationalTypeDomainTest.java index 9368c7849..132912569 100644 --- a/lisa/lisa-analyses/src/test/java/it/unive/lisa/analysis/nonrelational/value/BaseNonRelationalTypeDomainTest.java +++ b/lisa/lisa-analyses/src/test/java/it/unive/lisa/analysis/nonrelational/value/BaseNonRelationalTypeDomainTest.java @@ -4,97 +4,26 @@ import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; +import it.unive.lisa.TestParameterProvider; import it.unive.lisa.analysis.Lattice; -import it.unive.lisa.analysis.SemanticDomain.Satisfiability; -import it.unive.lisa.analysis.SemanticException; -import it.unive.lisa.analysis.representation.DomainRepresentation; -import it.unive.lisa.analysis.representation.StringRepresentation; -import it.unive.lisa.imp.IMPFeatures; -import it.unive.lisa.imp.types.IMPTypeSystem; -import it.unive.lisa.program.Program; -import it.unive.lisa.program.SyntheticLocation; -import it.unive.lisa.program.cfg.CFG; -import it.unive.lisa.program.cfg.CodeLocation; -import it.unive.lisa.program.cfg.ProgramPoint; -import it.unive.lisa.program.type.Int32Type; -import it.unive.lisa.symbolic.value.BinaryExpression; -import it.unive.lisa.symbolic.value.Constant; -import it.unive.lisa.symbolic.value.Identifier; -import it.unive.lisa.symbolic.value.PushAny; -import it.unive.lisa.symbolic.value.Skip; -import it.unive.lisa.symbolic.value.TernaryExpression; -import it.unive.lisa.symbolic.value.UnaryExpression; -import it.unive.lisa.symbolic.value.ValueExpression; -import it.unive.lisa.symbolic.value.Variable; -import it.unive.lisa.symbolic.value.operator.binary.BinaryOperator; -import it.unive.lisa.symbolic.value.operator.binary.ComparisonEq; -import it.unive.lisa.symbolic.value.operator.ternary.StringReplace; -import it.unive.lisa.symbolic.value.operator.ternary.TernaryOperator; -import it.unive.lisa.symbolic.value.operator.unary.LogicalNegation; -import it.unive.lisa.symbolic.value.operator.unary.UnaryOperator; -import it.unive.lisa.type.Type; -import it.unive.lisa.type.Untyped; +import it.unive.lisa.analysis.lattices.Satisfiability; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.lang.reflect.Modifier; -import java.util.Collections; -import java.util.Set; import java.util.concurrent.atomic.AtomicReference; import org.junit.Test; public class BaseNonRelationalTypeDomainTest { - private static class Sample implements BaseNonRelationalTypeDomain { - - @Override - public DomainRepresentation representation() { - return new StringRepresentation("sample"); - } - - @Override - public Sample top() { - return this; - } - - @Override - public Sample bottom() { - return this; - } - - @Override - public Sample lubAux(Sample other) throws SemanticException { - return this; - } - - @Override - public boolean lessOrEqualAux(Sample other) throws SemanticException { - return true; - } - - @Override - public boolean equals(Object obj) { - return this == obj; - } - - @Override - public int hashCode() { - return getClass().hashCode(); - } - - @Override - public Set getRuntimeTypes() { - return Collections.emptySet(); - } - } - @Test public void testDefaults() throws IllegalAccessException, IllegalArgumentException, InvocationTargetException { for (Method mtd : BaseNonRelationalTypeDomain.class.getDeclaredMethods()) if (Modifier.isPublic(mtd.getModifiers()) && !isExcluded(mtd)) try { AtomicReference envPos = new AtomicReference<>(); - Object[] params = provideParams(mtd, mtd.getParameterTypes(), envPos); - Object ret = mtd.invoke(new Sample(), params); + Object[] params = TestParameterProvider.provideParams(mtd, mtd.getParameterTypes(), + TypeEnvironment.class, envPos); + Object ret = mtd.invoke(new TestParameterProvider.SampleNRTD(), params); if (mtd.getName().startsWith("eval")) assertTrue("Default implementation of " + mtd.getName() + " did not return top", ((Lattice) ret).isTop()); @@ -113,7 +42,8 @@ else if (mtd.getName().startsWith("assume")) } } - private static boolean isExcluded(Method mtd) { + private static boolean isExcluded( + Method mtd) { if (mtd.getName().equals("canProcess") || mtd.getName().equals("tracksIdentifiers") || mtd.getName().equals("satisfies") @@ -123,74 +53,4 @@ private static boolean isExcluded(Method mtd) { return true; return false; } - - private static Object[] provideParams(Method mtd, Class[] params, AtomicReference envPos) { - Object[] res = new Object[params.length]; - for (int i = 0; i < res.length; i++) { - res[i] = provideParam(mtd, params[i]); - if (params[i] == TypeEnvironment.class) - envPos.set(i); - } - return res; - } - - @SuppressWarnings("unchecked") - private static R provideParam(Method mtd, Class param) { - class FakePP implements ProgramPoint { - - @Override - public CodeLocation getLocation() { - return null; - } - - @Override - public CFG getCFG() { - return null; - } - - @Override - public Program getProgram() { - return new Program(new IMPFeatures(), new IMPTypeSystem()); - } - } - - if (param == Type.class) - return (R) Int32Type.INSTANCE; - - if (param == PushAny.class) - return (R) new PushAny(Untyped.INSTANCE, SyntheticLocation.INSTANCE); - if (param == Constant.class || param == ValueExpression.class) - return (R) new Constant(Int32Type.INSTANCE, 5, SyntheticLocation.INSTANCE); - if (param == Identifier.class) - return (R) new Variable(provideParam(mtd, Type.class), "foo", SyntheticLocation.INSTANCE); - - if (param == TernaryOperator.class) - return (R) StringReplace.INSTANCE; - if (param == BinaryOperator.class) - return (R) ComparisonEq.INSTANCE; - if (param == UnaryOperator.class) - return (R) LogicalNegation.INSTANCE; - - if (param == UnaryExpression.class) - return (R) new UnaryExpression(provideParam(mtd, Type.class), provideParam(mtd, Constant.class), - provideParam(mtd, UnaryOperator.class), SyntheticLocation.INSTANCE); - if (param == BinaryExpression.class) - return (R) new BinaryExpression(provideParam(mtd, Type.class), provideParam(mtd, Constant.class), - provideParam(mtd, Constant.class), provideParam(mtd, BinaryOperator.class), - SyntheticLocation.INSTANCE); - if (param == TernaryExpression.class) - return (R) new TernaryExpression(provideParam(mtd, Type.class), provideParam(mtd, Constant.class), - provideParam(mtd, Constant.class), provideParam(mtd, Constant.class), - provideParam(mtd, TernaryOperator.class), SyntheticLocation.INSTANCE); - if (param == TypeEnvironment.class) - return (R) new TypeEnvironment<>(new Sample()); - if (param == Sample.class || param == BaseNonRelationalTypeDomain.class) - return (R) new Sample(); - if (param == ProgramPoint.class) - return (R) new FakePP(); - if (param == Skip.class) - return (R) new Skip(SyntheticLocation.INSTANCE); - - throw new UnsupportedOperationException(mtd + ": No default value for type " + param.getName()); - } } diff --git a/lisa/lisa-analyses/src/test/java/it/unive/lisa/analysis/nonrelational/value/BaseNonRelationalValueDomainTest.java b/lisa/lisa-analyses/src/test/java/it/unive/lisa/analysis/nonrelational/value/BaseNonRelationalValueDomainTest.java index 3fb48d259..38e1e5782 100644 --- a/lisa/lisa-analyses/src/test/java/it/unive/lisa/analysis/nonrelational/value/BaseNonRelationalValueDomainTest.java +++ b/lisa/lisa-analyses/src/test/java/it/unive/lisa/analysis/nonrelational/value/BaseNonRelationalValueDomainTest.java @@ -4,36 +4,9 @@ import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; +import it.unive.lisa.TestParameterProvider; import it.unive.lisa.analysis.Lattice; -import it.unive.lisa.analysis.SemanticDomain.Satisfiability; -import it.unive.lisa.analysis.SemanticException; -import it.unive.lisa.analysis.representation.DomainRepresentation; -import it.unive.lisa.analysis.representation.StringRepresentation; -import it.unive.lisa.imp.IMPFeatures; -import it.unive.lisa.imp.types.IMPTypeSystem; -import it.unive.lisa.program.Program; -import it.unive.lisa.program.SyntheticLocation; -import it.unive.lisa.program.cfg.CFG; -import it.unive.lisa.program.cfg.CodeLocation; -import it.unive.lisa.program.cfg.ProgramPoint; -import it.unive.lisa.program.type.Int32Type; -import it.unive.lisa.symbolic.value.BinaryExpression; -import it.unive.lisa.symbolic.value.Constant; -import it.unive.lisa.symbolic.value.Identifier; -import it.unive.lisa.symbolic.value.PushAny; -import it.unive.lisa.symbolic.value.Skip; -import it.unive.lisa.symbolic.value.TernaryExpression; -import it.unive.lisa.symbolic.value.UnaryExpression; -import it.unive.lisa.symbolic.value.ValueExpression; -import it.unive.lisa.symbolic.value.Variable; -import it.unive.lisa.symbolic.value.operator.binary.BinaryOperator; -import it.unive.lisa.symbolic.value.operator.binary.ComparisonEq; -import it.unive.lisa.symbolic.value.operator.ternary.StringReplace; -import it.unive.lisa.symbolic.value.operator.ternary.TernaryOperator; -import it.unive.lisa.symbolic.value.operator.unary.LogicalNegation; -import it.unive.lisa.symbolic.value.operator.unary.UnaryOperator; -import it.unive.lisa.type.Type; -import it.unive.lisa.type.Untyped; +import it.unive.lisa.analysis.lattices.Satisfiability; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.lang.reflect.Modifier; @@ -42,52 +15,15 @@ public class BaseNonRelationalValueDomainTest { - private static class Sample implements BaseNonRelationalValueDomain { - - @Override - public DomainRepresentation representation() { - return new StringRepresentation("sample"); - } - - @Override - public Sample top() { - return this; - } - - @Override - public Sample bottom() { - return this; - } - - @Override - public Sample lubAux(Sample other) throws SemanticException { - return this; - } - - @Override - public boolean lessOrEqualAux(Sample other) throws SemanticException { - return true; - } - - @Override - public boolean equals(Object obj) { - return this == obj; - } - - @Override - public int hashCode() { - return getClass().hashCode(); - } - } - @Test public void testDefaults() throws IllegalAccessException, IllegalArgumentException, InvocationTargetException { for (Method mtd : BaseNonRelationalValueDomain.class.getDeclaredMethods()) if (Modifier.isPublic(mtd.getModifiers()) && !isExcluded(mtd)) try { AtomicReference envPos = new AtomicReference<>(); - Object[] params = provideParams(mtd, mtd.getParameterTypes(), envPos); - Object ret = mtd.invoke(new Sample(), params); + Object[] params = TestParameterProvider.provideParams(mtd, mtd.getParameterTypes(), + ValueEnvironment.class, envPos); + Object ret = mtd.invoke(new TestParameterProvider.SampleNRVD(), params); if (mtd.getName().startsWith("eval")) assertTrue("Default implementation of " + mtd.getName() + " did not return top", ((Lattice) ret).isTop()); @@ -106,7 +42,8 @@ else if (mtd.getName().startsWith("assume")) } } - private static boolean isExcluded(Method mtd) { + private static boolean isExcluded( + Method mtd) { if (mtd.getName().equals("canProcess") || mtd.getName().equals("tracksIdentifiers") || mtd.getName().equals("satisfies") @@ -116,74 +53,4 @@ private static boolean isExcluded(Method mtd) { return true; return false; } - - private static Object[] provideParams(Method mtd, Class[] params, AtomicReference envPos) { - Object[] res = new Object[params.length]; - for (int i = 0; i < res.length; i++) { - res[i] = provideParam(mtd, params[i]); - if (params[i] == ValueEnvironment.class) - envPos.set(i); - } - return res; - } - - @SuppressWarnings("unchecked") - private static R provideParam(Method mtd, Class param) { - class FakePP implements ProgramPoint { - - @Override - public CodeLocation getLocation() { - return null; - } - - @Override - public CFG getCFG() { - return null; - } - - @Override - public Program getProgram() { - return new Program(new IMPFeatures(), new IMPTypeSystem()); - } - } - - if (param == Type.class) - return (R) Int32Type.INSTANCE; - - if (param == PushAny.class) - return (R) new PushAny(Untyped.INSTANCE, SyntheticLocation.INSTANCE); - if (param == Constant.class || param == ValueExpression.class) - return (R) new Constant(Int32Type.INSTANCE, 5, SyntheticLocation.INSTANCE); - if (param == Identifier.class) - return (R) new Variable(provideParam(mtd, Type.class), "foo", SyntheticLocation.INSTANCE); - - if (param == TernaryOperator.class) - return (R) StringReplace.INSTANCE; - if (param == BinaryOperator.class) - return (R) ComparisonEq.INSTANCE; - if (param == UnaryOperator.class) - return (R) LogicalNegation.INSTANCE; - - if (param == UnaryExpression.class) - return (R) new UnaryExpression(provideParam(mtd, Type.class), provideParam(mtd, Constant.class), - provideParam(mtd, UnaryOperator.class), SyntheticLocation.INSTANCE); - if (param == BinaryExpression.class) - return (R) new BinaryExpression(provideParam(mtd, Type.class), provideParam(mtd, Constant.class), - provideParam(mtd, Constant.class), provideParam(mtd, BinaryOperator.class), - SyntheticLocation.INSTANCE); - if (param == TernaryExpression.class) - return (R) new TernaryExpression(provideParam(mtd, Type.class), provideParam(mtd, Constant.class), - provideParam(mtd, Constant.class), provideParam(mtd, Constant.class), - provideParam(mtd, TernaryOperator.class), SyntheticLocation.INSTANCE); - if (param == ValueEnvironment.class) - return (R) new ValueEnvironment<>(new Sample()); - if (param == Sample.class || param == BaseNonRelationalValueDomain.class) - return (R) new Sample(); - if (param == ProgramPoint.class) - return (R) new FakePP(); - if (param == Skip.class) - return (R) new Skip(SyntheticLocation.INSTANCE); - - throw new UnsupportedOperationException(mtd + ": No default value for type " + param.getName()); - } } diff --git a/lisa/lisa-analyses/src/test/java/it/unive/lisa/analysis/numeric/IntervalTest.java b/lisa/lisa-analyses/src/test/java/it/unive/lisa/analysis/numeric/IntervalTest.java index cad435114..0ed525a14 100644 --- a/lisa/lisa-analyses/src/test/java/it/unive/lisa/analysis/numeric/IntervalTest.java +++ b/lisa/lisa-analyses/src/test/java/it/unive/lisa/analysis/numeric/IntervalTest.java @@ -4,12 +4,11 @@ import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; -import it.unive.lisa.analysis.SemanticDomain.Satisfiability; +import it.unive.lisa.TestParameterProvider; import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.SemanticOracle; +import it.unive.lisa.analysis.lattices.Satisfiability; import it.unive.lisa.analysis.nonrelational.value.ValueEnvironment; -import it.unive.lisa.program.SourceCodeLocation; -import it.unive.lisa.program.cfg.CFG; -import it.unive.lisa.program.cfg.CodeLocation; import it.unive.lisa.program.cfg.ProgramPoint; import it.unive.lisa.program.type.Int32Type; import it.unive.lisa.symbolic.value.Constant; @@ -37,31 +36,22 @@ public class IntervalTest { private static final int TEST_LIMIT = 5000; private final Random rand = new Random(); - private final ProgramPoint pp = new ProgramPoint() { - - @Override - public CodeLocation getLocation() { - return new SourceCodeLocation("fake", 0, 0); - } - - @Override - public CFG getCFG() { - return null; - } - }; + private final ProgramPoint pp = TestParameterProvider.provideParam(null, ProgramPoint.class);; private final Interval singleton = new Interval(); private final Variable variable = new Variable(Int32Type.INSTANCE, "x", pp.getLocation()); private final Variable varAux = new Variable(Int32Type.INSTANCE, "aux", pp.getLocation()); private final ValueEnvironment< Interval> env = new ValueEnvironment<>(singleton).putState(variable, singleton.top()); + private final SemanticOracle oracle = TestParameterProvider.provideParam(null, SemanticOracle.class); @Test public void testEvalConstant() { for (int i = 0; i < TEST_LIMIT; i++) { int val = rand.nextInt(); assertTrue("eval(" + val + ") did not return [" + val + ", " + val + "]", - singleton.evalNonNullConstant(new Constant(Int32Type.INSTANCE, val, pp.getLocation()), pp).interval - .is(val)); + singleton.evalNonNullConstant(new Constant(Int32Type.INSTANCE, val, pp.getLocation()), pp, + oracle).interval + .is(val)); } } @@ -69,9 +59,10 @@ public void testEvalConstant() { public void testEvalNegationOnSingleton() { for (int i = 0; i < TEST_LIMIT; i++) { int val = rand.nextInt(); - Interval aval = singleton.evalNonNullConstant(new Constant(Int32Type.INSTANCE, val, pp.getLocation()), pp); + Interval aval = singleton.evalNonNullConstant(new Constant(Int32Type.INSTANCE, val, pp.getLocation()), pp, + oracle); assertTrue("eval(-" + val + ") did not return [-" + val + ", -" + val + "]", - singleton.evalUnaryExpression(NumericNegation.INSTANCE, aval, pp).interval.is(-val)); + singleton.evalUnaryExpression(NumericNegation.INSTANCE, aval, pp, oracle).interval.is(-val)); } } @@ -81,13 +72,13 @@ public void testEvalAddOnSingleton() { int val1 = rand.nextInt(); int val2 = rand.nextInt(); Interval aval1 = singleton.evalNonNullConstant(new Constant(Int32Type.INSTANCE, val1, pp.getLocation()), - pp); + pp, oracle); Interval aval2 = singleton.evalNonNullConstant(new Constant(Int32Type.INSTANCE, val2, pp.getLocation()), - pp); + pp, oracle); IntInterval exp = aval1.interval.plus(aval2.interval); assertEquals("eval(" + val1 + " + " + val2 + ") did not return " + exp, exp, singleton.evalBinaryExpression(NumericNonOverflowingAdd.INSTANCE, aval1, aval2, - pp).interval); + pp, oracle).interval); } } @@ -97,13 +88,13 @@ public void testEvalSubOnSingleton() { int val1 = rand.nextInt(); int val2 = rand.nextInt(); Interval aval1 = singleton.evalNonNullConstant(new Constant(Int32Type.INSTANCE, val1, pp.getLocation()), - pp); + pp, oracle); Interval aval2 = singleton.evalNonNullConstant(new Constant(Int32Type.INSTANCE, val2, pp.getLocation()), - pp); + pp, oracle); IntInterval exp = aval1.interval.diff(aval2.interval); assertEquals("eval(" + val1 + " - " + val2 + ") did not return " + exp, exp, singleton.evalBinaryExpression(NumericNonOverflowingSub.INSTANCE, aval1, aval2, - pp).interval); + pp, oracle).interval); } } @@ -113,13 +104,13 @@ public void testEvalMulOnSingleton() { int val1 = rand.nextInt(); int val2 = rand.nextInt(); Interval aval1 = singleton.evalNonNullConstant(new Constant(Int32Type.INSTANCE, val1, pp.getLocation()), - pp); + pp, oracle); Interval aval2 = singleton.evalNonNullConstant(new Constant(Int32Type.INSTANCE, val2, pp.getLocation()), - pp); + pp, oracle); IntInterval exp = aval1.interval.mul(aval2.interval); assertEquals("eval(" + val1 + " * " + val2 + ") did not return " + exp, exp, singleton.evalBinaryExpression(NumericNonOverflowingMul.INSTANCE, aval1, aval2, - pp).interval); + pp, oracle).interval); } } @@ -129,13 +120,13 @@ public void testEvalDivOnSingleton() { int val1 = rand.nextInt(); int val2 = rand.nextInt(); Interval aval1 = singleton.evalNonNullConstant(new Constant(Int32Type.INSTANCE, val1, pp.getLocation()), - pp); + pp, oracle); Interval aval2 = singleton.evalNonNullConstant(new Constant(Int32Type.INSTANCE, val2, pp.getLocation()), - pp); + pp, oracle); IntInterval exp = aval1.interval.div(aval2.interval, false, false); assertEquals("eval(" + val1 + " / " + val2 + ") did not return " + exp, exp, singleton.evalBinaryExpression(NumericNonOverflowingDiv.INSTANCE, aval1, aval2, - pp).interval); + pp, oracle).interval); } } @@ -145,9 +136,9 @@ public void testLatticeOperationsOnSingleton() throws SemanticException { int val1 = rand.nextInt(); int val2 = rand.nextInt(); Interval aval1 = singleton.evalNonNullConstant(new Constant(Int32Type.INSTANCE, val1, pp.getLocation()), - pp); + pp, oracle); Interval aval2 = singleton.evalNonNullConstant(new Constant(Int32Type.INSTANCE, val2, pp.getLocation()), - pp); + pp, oracle); Interval lub = aval1.lub(aval2); Interval widen = aval1.widening(aval2); Interval glb = aval1.glb(aval2); @@ -182,12 +173,12 @@ public void testStatisfiesEQOnSingleton() { int val1 = rand.nextInt(); int val2 = rand.nextInt(); Interval aval1 = singleton.evalNonNullConstant(new Constant(Int32Type.INSTANCE, val1, pp.getLocation()), - pp); + pp, oracle); Interval aval2 = singleton.evalNonNullConstant(new Constant(Int32Type.INSTANCE, val2, pp.getLocation()), - pp); + pp, oracle); Satisfiability exp = Satisfiability.fromBoolean(val1 == val2); assertEquals("satisfies(" + val1 + " == " + val2 + ") did not return " + exp, exp, - singleton.satisfiesBinaryExpression(ComparisonEq.INSTANCE, aval1, aval2, pp)); + singleton.satisfiesBinaryExpression(ComparisonEq.INSTANCE, aval1, aval2, pp, oracle)); } } @@ -197,12 +188,12 @@ public void testStatisfiesNEOnSingleton() { int val1 = rand.nextInt(); int val2 = rand.nextInt(); Interval aval1 = singleton.evalNonNullConstant(new Constant(Int32Type.INSTANCE, val1, pp.getLocation()), - pp); + pp, oracle); Interval aval2 = singleton.evalNonNullConstant(new Constant(Int32Type.INSTANCE, val2, pp.getLocation()), - pp); + pp, oracle); Satisfiability exp = Satisfiability.fromBoolean(val1 != val2); assertEquals("satisfies(" + val1 + " != " + val2 + ") did not return " + exp, exp, - singleton.satisfiesBinaryExpression(ComparisonNe.INSTANCE, aval1, aval2, pp)); + singleton.satisfiesBinaryExpression(ComparisonNe.INSTANCE, aval1, aval2, pp, oracle)); } } @@ -212,12 +203,12 @@ public void testStatisfiesGTOnSingleton() { int val1 = rand.nextInt(); int val2 = rand.nextInt(); Interval aval1 = singleton.evalNonNullConstant(new Constant(Int32Type.INSTANCE, val1, pp.getLocation()), - pp); + pp, oracle); Interval aval2 = singleton.evalNonNullConstant(new Constant(Int32Type.INSTANCE, val2, pp.getLocation()), - pp); + pp, oracle); Satisfiability exp = Satisfiability.fromBoolean(val1 > val2); assertEquals("satisfies(" + val1 + " > " + val2 + ") did not return " + exp, exp, - singleton.satisfiesBinaryExpression(ComparisonGt.INSTANCE, aval1, aval2, pp)); + singleton.satisfiesBinaryExpression(ComparisonGt.INSTANCE, aval1, aval2, pp, oracle)); } } @@ -227,12 +218,12 @@ public void testStatisfiesGEOnSingleton() { int val1 = rand.nextInt(); int val2 = rand.nextInt(); Interval aval1 = singleton.evalNonNullConstant(new Constant(Int32Type.INSTANCE, val1, pp.getLocation()), - pp); + pp, oracle); Interval aval2 = singleton.evalNonNullConstant(new Constant(Int32Type.INSTANCE, val2, pp.getLocation()), - pp); + pp, oracle); Satisfiability exp = Satisfiability.fromBoolean(val1 >= val2); assertEquals("satisfies(" + val1 + " >= " + val2 + ") did not return " + exp, exp, - singleton.satisfiesBinaryExpression(ComparisonGe.INSTANCE, aval1, aval2, pp)); + singleton.satisfiesBinaryExpression(ComparisonGe.INSTANCE, aval1, aval2, pp, oracle)); } } @@ -242,12 +233,12 @@ public void testStatisfiesLTOnSingleton() { int val1 = rand.nextInt(); int val2 = rand.nextInt(); Interval aval1 = singleton.evalNonNullConstant(new Constant(Int32Type.INSTANCE, val1, pp.getLocation()), - pp); + pp, oracle); Interval aval2 = singleton.evalNonNullConstant(new Constant(Int32Type.INSTANCE, val2, pp.getLocation()), - pp); + pp, oracle); Satisfiability exp = Satisfiability.fromBoolean(val1 < val2); assertEquals("satisfies(" + val1 + " < " + val2 + ") did not return " + exp, exp, - singleton.satisfiesBinaryExpression(ComparisonLt.INSTANCE, aval1, aval2, pp)); + singleton.satisfiesBinaryExpression(ComparisonLt.INSTANCE, aval1, aval2, pp, oracle)); } } @@ -257,12 +248,12 @@ public void testStatisfiesLEOnSingleton() { int val1 = rand.nextInt(); int val2 = rand.nextInt(); Interval aval1 = singleton.evalNonNullConstant(new Constant(Int32Type.INSTANCE, val1, pp.getLocation()), - pp); + pp, oracle); Interval aval2 = singleton.evalNonNullConstant(new Constant(Int32Type.INSTANCE, val2, pp.getLocation()), - pp); + pp, oracle); Satisfiability exp = Satisfiability.fromBoolean(val1 <= val2); assertEquals("satisfies(" + val1 + " <= " + val2 + ") did not return " + exp, exp, - singleton.satisfiesBinaryExpression(ComparisonLe.INSTANCE, aval1, aval2, pp)); + singleton.satisfiesBinaryExpression(ComparisonLe.INSTANCE, aval1, aval2, pp, oracle)); } } @@ -270,11 +261,12 @@ public void testStatisfiesLEOnSingleton() { public void testAssumeEQOnSingleton() throws SemanticException { for (int i = 0; i < TEST_LIMIT; i++) { int val = rand.nextInt(); - Interval aval = singleton.evalNonNullConstant(new Constant(Int32Type.INSTANCE, val, pp.getLocation()), pp); + Interval aval = singleton.evalNonNullConstant(new Constant(Int32Type.INSTANCE, val, pp.getLocation()), pp, + oracle); ValueEnvironment exp = env.putState(variable, aval); assertEquals("assume(" + variable + " == " + val + ") did not return " + exp, exp, singleton.assumeBinaryExpression(env, ComparisonEq.INSTANCE, - variable, new Constant(Int32Type.INSTANCE, val, pp.getLocation()), pp, pp)); + variable, new Constant(Int32Type.INSTANCE, val, pp.getLocation()), pp, pp, oracle)); } } @@ -283,14 +275,15 @@ public void testAssumeGTOnSingleton() throws SemanticException { for (int i = 0; i < TEST_LIMIT; i++) { int val = rand.nextInt(); Interval aval = singleton.evalNonNullConstant(new Constant(Int32Type.INSTANCE, val + 1, pp.getLocation()), - pp); + pp, oracle); // val + 1, +inf aval = aval.widening( - singleton.evalNonNullConstant(new Constant(Int32Type.INSTANCE, val + 2, pp.getLocation()), pp)); + singleton.evalNonNullConstant(new Constant(Int32Type.INSTANCE, val + 2, pp.getLocation()), pp, + oracle)); ValueEnvironment exp = env.putState(variable, aval); assertEquals("assume(" + variable + " > " + val + ") did not return " + exp, exp, singleton.assumeBinaryExpression(env, ComparisonGt.INSTANCE, - variable, new Constant(Int32Type.INSTANCE, val, pp.getLocation()), pp, pp)); + variable, new Constant(Int32Type.INSTANCE, val, pp.getLocation()), pp, pp, oracle)); } } @@ -298,14 +291,16 @@ public void testAssumeGTOnSingleton() throws SemanticException { public void testAssumeGEOnSingleton() throws SemanticException { for (int i = 0; i < TEST_LIMIT; i++) { int val = rand.nextInt(); - Interval aval = singleton.evalNonNullConstant(new Constant(Int32Type.INSTANCE, val, pp.getLocation()), pp); + Interval aval = singleton.evalNonNullConstant(new Constant(Int32Type.INSTANCE, val, pp.getLocation()), pp, + oracle); // val, +inf aval = aval.widening( - singleton.evalNonNullConstant(new Constant(Int32Type.INSTANCE, val + 2, pp.getLocation()), pp)); + singleton.evalNonNullConstant(new Constant(Int32Type.INSTANCE, val + 2, pp.getLocation()), pp, + oracle)); ValueEnvironment exp = env.putState(variable, aval); assertEquals("assume(" + variable + " >= " + val + ") did not return " + exp, exp, singleton.assumeBinaryExpression(env, ComparisonGe.INSTANCE, - variable, new Constant(Int32Type.INSTANCE, val, pp.getLocation()), pp, pp)); + variable, new Constant(Int32Type.INSTANCE, val, pp.getLocation()), pp, pp, oracle)); } } @@ -314,14 +309,15 @@ public void testAssumeLTOnSingleton() throws SemanticException { for (int i = 0; i < TEST_LIMIT; i++) { int val = rand.nextInt(); Interval aval = singleton.evalNonNullConstant(new Constant(Int32Type.INSTANCE, val - 1, pp.getLocation()), - pp); + pp, oracle); // -inf, val - 1 aval = aval.widening( - singleton.evalNonNullConstant(new Constant(Int32Type.INSTANCE, val - 2, pp.getLocation()), pp)); + singleton.evalNonNullConstant(new Constant(Int32Type.INSTANCE, val - 2, pp.getLocation()), pp, + oracle)); ValueEnvironment exp = env.putState(variable, aval); assertEquals("assume(" + variable + " < " + val + ") did not return " + exp, exp, singleton.assumeBinaryExpression(env, ComparisonLt.INSTANCE, - variable, new Constant(Int32Type.INSTANCE, val, pp.getLocation()), pp, pp)); + variable, new Constant(Int32Type.INSTANCE, val, pp.getLocation()), pp, pp, oracle)); } } @@ -329,20 +325,27 @@ public void testAssumeLTOnSingleton() throws SemanticException { public void testAssumeLEOnSingleton() throws SemanticException { for (int i = 0; i < TEST_LIMIT; i++) { int val = rand.nextInt(); - Interval aval = singleton.evalNonNullConstant(new Constant(Int32Type.INSTANCE, val, pp.getLocation()), pp); + Interval aval = singleton.evalNonNullConstant(new Constant(Int32Type.INSTANCE, val, pp.getLocation()), pp, + oracle); // -inf, val aval = aval.widening( - singleton.evalNonNullConstant(new Constant(Int32Type.INSTANCE, val - 2, pp.getLocation()), pp)); + singleton.evalNonNullConstant(new Constant(Int32Type.INSTANCE, val - 2, pp.getLocation()), pp, + oracle)); ValueEnvironment exp = env.putState(variable, aval); assertEquals("assume(" + variable + " <= " + val + ") did not return " + exp, exp, singleton.assumeBinaryExpression(env, ComparisonLe.INSTANCE, - variable, new Constant(Int32Type.INSTANCE, val, pp.getLocation()), pp, pp)); + variable, new Constant(Int32Type.INSTANCE, val, pp.getLocation()), pp, pp, oracle)); } } - private Interval mk(int val1, int val2) throws SemanticException { - Interval aval1 = singleton.evalNonNullConstant(new Constant(Int32Type.INSTANCE, val1, pp.getLocation()), pp); - Interval aval2 = singleton.evalNonNullConstant(new Constant(Int32Type.INSTANCE, val2, pp.getLocation()), pp); + private Interval mk( + int val1, + int val2) + throws SemanticException { + Interval aval1 = singleton.evalNonNullConstant(new Constant(Int32Type.INSTANCE, val1, pp.getLocation()), pp, + oracle); + Interval aval2 = singleton.evalNonNullConstant(new Constant(Int32Type.INSTANCE, val2, pp.getLocation()), pp, + oracle); return aval1.lub(aval2); } @@ -354,7 +357,7 @@ public void testEvalNegation() throws SemanticException { Interval aval = mk(val1, val2); Interval exp = mk(-val1, -val2); assertEquals("eval(-" + aval + ") did not return " + exp, exp, - singleton.evalUnaryExpression(NumericNegation.INSTANCE, aval, pp)); + singleton.evalUnaryExpression(NumericNegation.INSTANCE, aval, pp, oracle)); } } @@ -370,7 +373,7 @@ public void testEvalAdd() throws SemanticException { IntInterval exp = aval1.interval.plus(aval2.interval); assertEquals("eval(" + aval1 + " + " + aval2 + ") did not return " + exp, exp, singleton.evalBinaryExpression(NumericNonOverflowingAdd.INSTANCE, aval1, aval2, - pp).interval); + pp, oracle).interval); } } @@ -386,7 +389,7 @@ public void testEvalSub() throws SemanticException { IntInterval exp = aval1.interval.diff(aval2.interval); assertEquals("eval(" + aval1 + " - " + aval2 + ") did not return " + exp, exp, singleton.evalBinaryExpression(NumericNonOverflowingSub.INSTANCE, aval1, aval2, - pp).interval); + pp, oracle).interval); } } @@ -402,7 +405,7 @@ public void testEvalMul() throws SemanticException { IntInterval exp = aval1.interval.mul(aval2.interval); assertEquals("eval(" + aval1 + " * " + aval2 + ") did not return " + exp, exp, singleton.evalBinaryExpression(NumericNonOverflowingMul.INSTANCE, aval1, aval2, - pp).interval); + pp, oracle).interval); } } @@ -418,7 +421,7 @@ public void testEvalDiv() throws SemanticException { IntInterval exp = aval1.interval.div(aval2.interval, false, false); assertEquals("eval(" + aval1 + " / " + aval2 + ") did not return " + exp, exp, singleton.evalBinaryExpression(NumericNonOverflowingDiv.INSTANCE, aval1, aval2, - pp).interval); + pp, oracle).interval); } } @@ -475,7 +478,7 @@ public void testStatisfiesEQ() throws SemanticException { Satisfiability exp = Satisfiability.fromBoolean(aval1.equals(aval2) && aval1.interval.isSingleton()); exp = exp.lub(Satisfiability.fromBoolean(aval1.interval.intersects(aval2.interval))); assertEquals("satisfies(" + aval1 + " == " + aval2 + ") did not return " + exp, exp, - singleton.satisfiesBinaryExpression(ComparisonEq.INSTANCE, aval1, aval2, pp)); + singleton.satisfiesBinaryExpression(ComparisonEq.INSTANCE, aval1, aval2, pp, oracle)); } } @@ -492,7 +495,7 @@ public void testStatisfiesNE() throws SemanticException { if (exp == Satisfiability.NOT_SATISFIED) exp = Satisfiability.UNKNOWN; assertEquals("satisfies(" + aval1 + " != " + aval2 + ") did not return " + exp, exp, - singleton.satisfiesBinaryExpression(ComparisonNe.INSTANCE, aval1, aval2, pp)); + singleton.satisfiesBinaryExpression(ComparisonNe.INSTANCE, aval1, aval2, pp, oracle)); } } @@ -511,7 +514,7 @@ public void testStatisfiesGT() throws SemanticException { else exp = Satisfiability.fromBoolean(aval1.interval.getLow().compareTo(aval2.interval.getHigh()) > 0); assertEquals("satisfies(" + aval1 + " > " + aval2 + ") did not return " + exp, exp, - singleton.satisfiesBinaryExpression(ComparisonGt.INSTANCE, aval1, aval2, pp)); + singleton.satisfiesBinaryExpression(ComparisonGt.INSTANCE, aval1, aval2, pp, oracle)); } } @@ -530,7 +533,7 @@ public void testStatisfiesGE() throws SemanticException { else exp = Satisfiability.fromBoolean(aval1.interval.getLow().compareTo(aval2.interval.getHigh()) >= 0); assertEquals("satisfies(" + aval1 + " >= " + aval2 + ") did not return " + exp, exp, - singleton.satisfiesBinaryExpression(ComparisonGe.INSTANCE, aval1, aval2, pp)); + singleton.satisfiesBinaryExpression(ComparisonGe.INSTANCE, aval1, aval2, pp, oracle)); } } @@ -549,7 +552,7 @@ public void testStatisfiesLT() throws SemanticException { else exp = Satisfiability.fromBoolean(aval1.interval.getLow().compareTo(aval2.interval.getHigh()) < 0); assertEquals("satisfies(" + aval1 + " < " + aval2 + ") did not return " + exp, exp, - singleton.satisfiesBinaryExpression(ComparisonLt.INSTANCE, aval1, aval2, pp)); + singleton.satisfiesBinaryExpression(ComparisonLt.INSTANCE, aval1, aval2, pp, oracle)); } } @@ -568,7 +571,7 @@ public void testStatisfiesLE() throws SemanticException { else exp = Satisfiability.fromBoolean(aval1.interval.getLow().compareTo(aval2.interval.getHigh()) <= 0); assertEquals("satisfies(" + aval1 + " <= " + aval2 + ") did not return " + exp, exp, - singleton.satisfiesBinaryExpression(ComparisonLe.INSTANCE, aval1, aval2, pp)); + singleton.satisfiesBinaryExpression(ComparisonLe.INSTANCE, aval1, aval2, pp, oracle)); } } @@ -582,7 +585,7 @@ public void testAssumeEQ() throws SemanticException { ValueEnvironment exp = start.putState(variable, aval); assertEquals("assume(" + variable + " == " + aval + ") did not return " + exp, exp, singleton.assumeBinaryExpression(start, ComparisonEq.INSTANCE, - variable, varAux, pp, pp)); + variable, varAux, pp, pp, oracle)); } } @@ -598,7 +601,7 @@ public void testAssumeGT() throws SemanticException { ValueEnvironment start = env.putState(varAux, bound); ValueEnvironment exp = start.putState(variable, aval); ValueEnvironment act = singleton.assumeBinaryExpression(start, ComparisonGt.INSTANCE, - variable, varAux, pp, pp); + variable, varAux, pp, pp, oracle); assertEquals("assume(" + variable + " > " + bound + ") did not return " + exp, exp, act); } } @@ -614,7 +617,7 @@ public void testAssumeGE() throws SemanticException { ValueEnvironment start = env.putState(varAux, bound); ValueEnvironment exp = start.putState(variable, aval); ValueEnvironment act = singleton.assumeBinaryExpression(start, ComparisonGe.INSTANCE, - variable, varAux, pp, pp); + variable, varAux, pp, pp, oracle); assertEquals("assume(" + variable + " >= " + bound + ") did not return " + exp, exp, act); } } @@ -631,7 +634,7 @@ public void testAssumeLT() throws SemanticException { ValueEnvironment start = env.putState(varAux, bound); ValueEnvironment exp = start.putState(variable, aval); ValueEnvironment act = singleton.assumeBinaryExpression(start, ComparisonLt.INSTANCE, - variable, varAux, pp, pp); + variable, varAux, pp, pp, oracle); assertEquals("assume(" + variable + " < " + bound + ") did not return " + exp, exp, act); } } @@ -647,7 +650,7 @@ public void testAssumeLE() throws SemanticException { ValueEnvironment start = env.putState(varAux, bound); ValueEnvironment exp = start.putState(variable, aval); ValueEnvironment act = singleton.assumeBinaryExpression(start, ComparisonLe.INSTANCE, - variable, varAux, pp, pp); + variable, varAux, pp, pp, oracle); assertEquals("assume(" + variable + " <= " + bound + ") did not return " + exp, exp, act); } } diff --git a/lisa/lisa-analyses/src/test/java/it/unive/lisa/analysis/string/CharInclusionTest.java b/lisa/lisa-analyses/src/test/java/it/unive/lisa/analysis/string/CharInclusionTest.java index daf16df8e..521a98237 100644 --- a/lisa/lisa-analyses/src/test/java/it/unive/lisa/analysis/string/CharInclusionTest.java +++ b/lisa/lisa-analyses/src/test/java/it/unive/lisa/analysis/string/CharInclusionTest.java @@ -1,6 +1,8 @@ package it.unive.lisa.analysis.string; -import static org.junit.Assert.*; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; import it.unive.lisa.analysis.SemanticException; import java.util.Set; diff --git a/lisa/lisa-analyses/src/test/java/it/unive/lisa/analysis/string/PrefixTest.java b/lisa/lisa-analyses/src/test/java/it/unive/lisa/analysis/string/PrefixTest.java index fee62fe0c..bb3c08a59 100644 --- a/lisa/lisa-analyses/src/test/java/it/unive/lisa/analysis/string/PrefixTest.java +++ b/lisa/lisa-analyses/src/test/java/it/unive/lisa/analysis/string/PrefixTest.java @@ -1,6 +1,8 @@ package it.unive.lisa.analysis.string; -import static org.junit.Assert.*; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; import it.unive.lisa.analysis.SemanticException; import org.junit.Test; diff --git a/lisa/lisa-analyses/src/test/java/it/unive/lisa/analysis/string/SuffixTest.java b/lisa/lisa-analyses/src/test/java/it/unive/lisa/analysis/string/SuffixTest.java index 2d15ef100..9c5b24c50 100644 --- a/lisa/lisa-analyses/src/test/java/it/unive/lisa/analysis/string/SuffixTest.java +++ b/lisa/lisa-analyses/src/test/java/it/unive/lisa/analysis/string/SuffixTest.java @@ -1,6 +1,8 @@ package it.unive.lisa.analysis.string; -import static org.junit.Assert.*; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; import it.unive.lisa.analysis.SemanticException; import org.junit.Test; diff --git a/lisa/lisa-analyses/src/test/java/it/unive/lisa/analysis/string/bricks/BrickTest.java b/lisa/lisa-analyses/src/test/java/it/unive/lisa/analysis/string/bricks/BrickTest.java index 718da93c6..3a8dde802 100644 --- a/lisa/lisa-analyses/src/test/java/it/unive/lisa/analysis/string/bricks/BrickTest.java +++ b/lisa/lisa-analyses/src/test/java/it/unive/lisa/analysis/string/bricks/BrickTest.java @@ -1,6 +1,8 @@ package it.unive.lisa.analysis.string.bricks; -import static org.junit.Assert.*; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; import it.unive.lisa.analysis.SemanticException; import java.util.HashSet; diff --git a/lisa/lisa-analyses/src/test/java/it/unive/lisa/analysis/string/bricks/BricksTest.java b/lisa/lisa-analyses/src/test/java/it/unive/lisa/analysis/string/bricks/BricksTest.java index 95fc7d926..18d6fa600 100644 --- a/lisa/lisa-analyses/src/test/java/it/unive/lisa/analysis/string/bricks/BricksTest.java +++ b/lisa/lisa-analyses/src/test/java/it/unive/lisa/analysis/string/bricks/BricksTest.java @@ -1,11 +1,16 @@ package it.unive.lisa.analysis.string.bricks; -import static org.junit.Assert.*; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.util.numeric.IntInterval; import it.unive.lisa.util.numeric.MathNumber; -import java.util.*; +import java.util.ArrayList; +import java.util.List; +import java.util.Set; +import java.util.TreeSet; import org.junit.Test; public class BricksTest { diff --git a/lisa/lisa-analyses/src/test/java/it/unive/lisa/analysis/string/fsa/ContainsTest.java b/lisa/lisa-analyses/src/test/java/it/unive/lisa/analysis/string/fsa/ContainsTest.java index 93fe39d2f..959727b77 100644 --- a/lisa/lisa-analyses/src/test/java/it/unive/lisa/analysis/string/fsa/ContainsTest.java +++ b/lisa/lisa-analyses/src/test/java/it/unive/lisa/analysis/string/fsa/ContainsTest.java @@ -2,8 +2,10 @@ import static org.junit.Assert.assertEquals; -import it.unive.lisa.analysis.SemanticDomain; +import it.unive.lisa.TestParameterProvider; import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.SemanticOracle; +import it.unive.lisa.analysis.lattices.Satisfiability; import it.unive.lisa.symbolic.value.operator.binary.StringContains; import it.unive.lisa.util.datastructures.automaton.State; import it.unive.lisa.util.datastructures.automaton.Transition; @@ -14,6 +16,8 @@ public class ContainsTest { + private final SemanticOracle oracle = TestParameterProvider.provideParam(null, SemanticOracle.class); + @Test public void test01() throws SemanticException { SortedSet states = new TreeSet<>(); @@ -46,8 +50,8 @@ public void test01() throws SemanticException { FSA fsa = new FSA(a); FSA fsa1 = new FSA(a2); - assertEquals(SemanticDomain.Satisfiability.UNKNOWN, - fsa.satisfiesBinaryExpression(StringContains.INSTANCE, fsa, fsa1, null)); + assertEquals(Satisfiability.UNKNOWN, + fsa.satisfiesBinaryExpression(StringContains.INSTANCE, fsa, fsa1, null, oracle)); } @Test @@ -82,8 +86,8 @@ public void test02() throws SemanticException { FSA fsa = new FSA(a); FSA fsa1 = new FSA(a2); - assertEquals(SemanticDomain.Satisfiability.NOT_SATISFIED, - fsa.satisfiesBinaryExpression(StringContains.INSTANCE, fsa, fsa1, null)); + assertEquals(Satisfiability.NOT_SATISFIED, + fsa.satisfiesBinaryExpression(StringContains.INSTANCE, fsa, fsa1, null, oracle)); } @Test @@ -118,8 +122,8 @@ public void test03() throws SemanticException { FSA fsa = new FSA(a); FSA fsa1 = new FSA(a2); - assertEquals(SemanticDomain.Satisfiability.SATISFIED, - fsa.satisfiesBinaryExpression(StringContains.INSTANCE, fsa, fsa1, null)); + assertEquals(Satisfiability.SATISFIED, + fsa.satisfiesBinaryExpression(StringContains.INSTANCE, fsa, fsa1, null, oracle)); } @Test @@ -156,8 +160,8 @@ public void test04() throws SemanticException { FSA fsa = new FSA(a); FSA fsa1 = new FSA(a2); - assertEquals(SemanticDomain.Satisfiability.UNKNOWN, - fsa.satisfiesBinaryExpression(StringContains.INSTANCE, fsa, fsa1, null)); + assertEquals(Satisfiability.UNKNOWN, + fsa.satisfiesBinaryExpression(StringContains.INSTANCE, fsa, fsa1, null, oracle)); } @Test @@ -191,8 +195,8 @@ public void test05() throws SemanticException { FSA fsa = new FSA(a); FSA fsa1 = new FSA(a2); - assertEquals(SemanticDomain.Satisfiability.UNKNOWN, - fsa.satisfiesBinaryExpression(StringContains.INSTANCE, fsa, fsa1, null)); + assertEquals(Satisfiability.UNKNOWN, + fsa.satisfiesBinaryExpression(StringContains.INSTANCE, fsa, fsa1, null, oracle)); } } diff --git a/lisa/lisa-analyses/src/test/java/it/unive/lisa/analysis/string/tarsis/ContainsTest.java b/lisa/lisa-analyses/src/test/java/it/unive/lisa/analysis/string/tarsis/ContainsTest.java index eb02450cb..0a54745e2 100644 --- a/lisa/lisa-analyses/src/test/java/it/unive/lisa/analysis/string/tarsis/ContainsTest.java +++ b/lisa/lisa-analyses/src/test/java/it/unive/lisa/analysis/string/tarsis/ContainsTest.java @@ -2,9 +2,10 @@ import static org.junit.Assert.assertEquals; -import it.unive.lisa.analysis.SemanticDomain; -import it.unive.lisa.analysis.SemanticDomain.Satisfiability; +import it.unive.lisa.TestParameterProvider; import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.SemanticOracle; +import it.unive.lisa.analysis.lattices.Satisfiability; import it.unive.lisa.symbolic.value.operator.binary.StringContains; import it.unive.lisa.util.datastructures.automaton.State; import it.unive.lisa.util.datastructures.automaton.Transition; @@ -17,6 +18,8 @@ public class ContainsTest { + private final SemanticOracle oracle = TestParameterProvider.provideParam(null, SemanticOracle.class); + @Test public void test01() throws SemanticException { SortedSet states = new TreeSet<>(); @@ -49,8 +52,8 @@ public void test01() throws SemanticException { Tarsis t1 = new Tarsis(a); Tarsis t2 = new Tarsis(a2); - assertEquals(SemanticDomain.Satisfiability.UNKNOWN, - t1.satisfiesBinaryExpression(StringContains.INSTANCE, t1, t2, null)); + assertEquals(Satisfiability.UNKNOWN, + t1.satisfiesBinaryExpression(StringContains.INSTANCE, t1, t2, null, oracle)); } @Test @@ -85,8 +88,8 @@ public void test02() throws SemanticException { Tarsis t1 = new Tarsis(a); Tarsis t2 = new Tarsis(a2); - assertEquals(SemanticDomain.Satisfiability.NOT_SATISFIED, - t1.satisfiesBinaryExpression(StringContains.INSTANCE, t1, t2, null)); + assertEquals(Satisfiability.NOT_SATISFIED, + t1.satisfiesBinaryExpression(StringContains.INSTANCE, t1, t2, null, oracle)); } @Test @@ -121,8 +124,8 @@ public void test03() throws SemanticException { Tarsis t1 = new Tarsis(a); Tarsis t2 = new Tarsis(a2); - assertEquals(SemanticDomain.Satisfiability.SATISFIED, - t1.satisfiesBinaryExpression(StringContains.INSTANCE, t1, t2, null)); + assertEquals(Satisfiability.SATISFIED, + t1.satisfiesBinaryExpression(StringContains.INSTANCE, t1, t2, null, oracle)); } @Test @@ -159,8 +162,8 @@ public void test04() throws SemanticException { Tarsis t1 = new Tarsis(a); Tarsis t2 = new Tarsis(a2); - assertEquals(SemanticDomain.Satisfiability.UNKNOWN, - t1.satisfiesBinaryExpression(StringContains.INSTANCE, t1, t2, null)); + assertEquals(Satisfiability.UNKNOWN, + t1.satisfiesBinaryExpression(StringContains.INSTANCE, t1, t2, null, oracle)); } @Test @@ -194,32 +197,32 @@ public void test05() throws SemanticException { Tarsis t1 = new Tarsis(a); Tarsis t2 = new Tarsis(a2); - assertEquals(SemanticDomain.Satisfiability.UNKNOWN, - t1.satisfiesBinaryExpression(StringContains.INSTANCE, t1, t2, null)); + assertEquals(Satisfiability.UNKNOWN, + t1.satisfiesBinaryExpression(StringContains.INSTANCE, t1, t2, null, oracle)); } @Test public void test06() throws SemanticException { Tarsis t1 = new Tarsis(RegexAutomaton.topString()); Tarsis t2 = new Tarsis(RegexAutomaton.string("a")); - assertEquals(SemanticDomain.Satisfiability.UNKNOWN, - t1.satisfiesBinaryExpression(StringContains.INSTANCE, t1, t2, null)); + assertEquals(Satisfiability.UNKNOWN, + t1.satisfiesBinaryExpression(StringContains.INSTANCE, t1, t2, null, oracle)); } @Test public void test07() throws SemanticException { Tarsis t1 = new Tarsis(RegexAutomaton.string("a")); Tarsis t2 = new Tarsis(RegexAutomaton.topString()); - assertEquals(SemanticDomain.Satisfiability.UNKNOWN, - t1.satisfiesBinaryExpression(StringContains.INSTANCE, t1, t2, null)); + assertEquals(Satisfiability.UNKNOWN, + t1.satisfiesBinaryExpression(StringContains.INSTANCE, t1, t2, null, oracle)); } @Test public void test08() throws SemanticException { Tarsis t1 = new Tarsis(RegexAutomaton.topString().concat(RegexAutomaton.string("a"))); Tarsis t2 = new Tarsis(RegexAutomaton.string("a")); - assertEquals(SemanticDomain.Satisfiability.SATISFIED, - t1.satisfiesBinaryExpression(StringContains.INSTANCE, t1, t2, null)); + assertEquals(Satisfiability.SATISFIED, + t1.satisfiesBinaryExpression(StringContains.INSTANCE, t1, t2, null, oracle)); } @Test @@ -227,41 +230,40 @@ public void test09() throws SemanticException { Tarsis t1 = new Tarsis(RegexAutomaton.string("a")); Tarsis t2 = new Tarsis(RegexAutomaton.topString().concat(RegexAutomaton.string("a"))); - assertEquals(SemanticDomain.Satisfiability.UNKNOWN, - t1.satisfiesBinaryExpression(StringContains.INSTANCE, t1, t2, null)); + assertEquals(Satisfiability.UNKNOWN, + t1.satisfiesBinaryExpression(StringContains.INSTANCE, t1, t2, null, oracle)); } @Test public void test10() throws SemanticException { Tarsis t1 = new Tarsis(RegexAutomaton.topString().concat(RegexAutomaton.string("a"))); Tarsis t2 = new Tarsis(RegexAutomaton.topString().concat(RegexAutomaton.string("b"))); - assertEquals(SemanticDomain.Satisfiability.UNKNOWN, - t1.satisfiesBinaryExpression(StringContains.INSTANCE, t1, t2, null)); + assertEquals(Satisfiability.UNKNOWN, + t1.satisfiesBinaryExpression(StringContains.INSTANCE, t1, t2, null, oracle)); } @Test public void test11() throws SemanticException { Tarsis t1 = new Tarsis(RegexAutomaton.topString().concat(RegexAutomaton.string("a"))); Tarsis t2 = new Tarsis(RegexAutomaton.string("ba")); - assertEquals(SemanticDomain.Satisfiability.UNKNOWN, - t1.satisfiesBinaryExpression(StringContains.INSTANCE, t1, t2, null)); + assertEquals(Satisfiability.UNKNOWN, + t1.satisfiesBinaryExpression(StringContains.INSTANCE, t1, t2, null, oracle)); } @Test public void test12() throws SemanticException { Tarsis t1 = new Tarsis(RegexAutomaton.string("ba")); Tarsis t2 = new Tarsis(RegexAutomaton.topString().concat(RegexAutomaton.string("a"))); - assertEquals(SemanticDomain.Satisfiability.UNKNOWN, - t1.satisfiesBinaryExpression(StringContains.INSTANCE, t1, t2, null)); + assertEquals(Satisfiability.UNKNOWN, + t1.satisfiesBinaryExpression(StringContains.INSTANCE, t1, t2, null, oracle)); } - // TODO to check @Test public void test13() throws SemanticException { Tarsis t1 = new Tarsis(RegexAutomaton.string("ba")); Tarsis t2 = new Tarsis(RegexAutomaton.topString().concat(RegexAutomaton.string("c"))); - assertEquals(SemanticDomain.Satisfiability.NOT_SATISFIED, - t1.satisfiesBinaryExpression(StringContains.INSTANCE, t1, t2, null)); + assertEquals(Satisfiability.NOT_SATISFIED, + t1.satisfiesBinaryExpression(StringContains.INSTANCE, t1, t2, null, oracle)); } @Test diff --git a/lisa/lisa-analyses/src/test/java/it/unive/lisa/analysis/types/InferredTypesTest.java b/lisa/lisa-analyses/src/test/java/it/unive/lisa/analysis/types/InferredTypesTest.java index 1d24e93e8..1a36942b5 100644 --- a/lisa/lisa-analyses/src/test/java/it/unive/lisa/analysis/types/InferredTypesTest.java +++ b/lisa/lisa-analyses/src/test/java/it/unive/lisa/analysis/types/InferredTypesTest.java @@ -4,13 +4,11 @@ import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; -import it.unive.lisa.analysis.SemanticDomain.Satisfiability; +import it.unive.lisa.TestParameterProvider; import it.unive.lisa.analysis.SemanticException; -import it.unive.lisa.imp.IMPFeatures; +import it.unive.lisa.analysis.SemanticOracle; +import it.unive.lisa.analysis.lattices.Satisfiability; import it.unive.lisa.imp.types.IMPTypeSystem; -import it.unive.lisa.program.Program; -import it.unive.lisa.program.cfg.CFG; -import it.unive.lisa.program.cfg.CodeLocation; import it.unive.lisa.program.cfg.ProgramPoint; import it.unive.lisa.program.type.BoolType; import it.unive.lisa.program.type.Float32Type; @@ -104,23 +102,9 @@ public class InferredTypesTest { private final InferredTypes domain = new InferredTypes(); - private final ProgramPoint fake = new ProgramPoint() { + private final ProgramPoint fake = TestParameterProvider.provideParam(null, ProgramPoint.class); - @Override - public CFG getCFG() { - return null; - } - - @Override - public CodeLocation getLocation() { - return null; - } - - @Override - public Program getProgram() { - return new Program(new IMPFeatures(), new IMPTypeSystem()); - } - }; + private final SemanticOracle oracle = TestParameterProvider.provideParam(null, SemanticOracle.class); @Test public void testCastWithNoTokens() { @@ -223,9 +207,13 @@ public void testCommonNumericalTypeWithUntyped() { assertEquals("Common numerical type between two (untyped,float) is not (untyped,float)", union, common); } - private void unaryLE(UnaryOperator op, InferredTypes expected, InferredTypes operand) throws SemanticException { + private void unaryLE( + UnaryOperator op, + InferredTypes expected, + InferredTypes operand) + throws SemanticException { for (Entry first : combos.entrySet()) { - InferredTypes eval = domain.evalUnaryExpression(op, first.getValue(), fake); + InferredTypes eval = domain.evalUnaryExpression(op, first.getValue(), fake, oracle); if (operand.lessOrEqual(first.getValue())) { assertFalse(String.format(UNEXPECTED_BOTTOM, op.getClass().getSimpleName(), first.getKey()), eval.isBottom()); @@ -238,9 +226,12 @@ private void unaryLE(UnaryOperator op, InferredTypes expected, InferredTypes ope } } - private void unaryMapping(UnaryOperator op, Map expected) throws SemanticException { + private void unaryMapping( + UnaryOperator op, + Map expected) + throws SemanticException { for (Entry first : combos.entrySet()) { - InferredTypes eval = domain.evalUnaryExpression(op, first.getValue(), fake); + InferredTypes eval = domain.evalUnaryExpression(op, first.getValue(), fake, oracle); if (expected.containsKey(first.getValue())) { assertFalse(String.format(UNEXPECTED_BOTTOM, op.getClass().getSimpleName(), first.getKey()), eval.isBottom()); @@ -269,12 +260,16 @@ all, new InferredTypes(types, new TypeTokenType(all.getRuntimeTypes())), bool_or_string, new InferredTypes(types, new TypeTokenType(bool_or_string.getRuntimeTypes())))); } - private void binaryLE(BinaryOperator op, InferredTypes expected, InferredTypes left, InferredTypes right) + private void binaryLE( + BinaryOperator op, + InferredTypes expected, + InferredTypes left, + InferredTypes right) throws SemanticException { for (Entry first : combos.entrySet()) for (Entry second : combos.entrySet()) { InferredTypes eval = domain.evalBinaryExpression(op, first.getValue(), second.getValue(), - fake); + fake, oracle); if (left.lessOrEqual(first.getValue()) && right.lessOrEqual(second.getValue())) { assertFalse( String.format(UNEXPECTED_BOTTOM, op.getClass().getSimpleName(), @@ -292,13 +287,15 @@ private void binaryLE(BinaryOperator op, InferredTypes expected, InferredTypes l } } - private void binaryFixed(BinaryOperator op, InferredTypes expected, + private void binaryFixed( + BinaryOperator op, + InferredTypes expected, List> exclusions) throws SemanticException { for (Entry first : combos.entrySet()) for (Entry second : combos.entrySet()) { InferredTypes eval = domain.evalBinaryExpression(op, first.getValue(), second.getValue(), - fake); + fake, oracle); if (notExcluded(exclusions, first, second)) { assertFalse( String.format(UNEXPECTED_BOTTOM, op.getClass().getSimpleName(), @@ -316,7 +313,9 @@ private void binaryFixed(BinaryOperator op, InferredTypes expected, } } - private boolean notExcluded(List> exclusions, Entry first, + private boolean notExcluded( + List> exclusions, + Entry first, Entry second) { return !(exclusions.stream().anyMatch(p -> p.getLeft() == first.getValue() && p.getRight() == second.getValue()) || exclusions.stream().anyMatch(p -> p.getLeft() == first.getValue() && p.getRight() == null) @@ -325,13 +324,15 @@ private boolean notExcluded(List> exclusions, || exclusions.stream().anyMatch(p -> p.getLeft() == null && p.getRight() == second.getValue())); } - private void binaryTransform(BinaryOperator op, java.util.function.BinaryOperator expected, + private void binaryTransform( + BinaryOperator op, + java.util.function.BinaryOperator expected, List> exclusions) throws SemanticException { for (Entry first : combos.entrySet()) for (Entry second : combos.entrySet()) { InferredTypes eval = domain.evalBinaryExpression(op, first.getValue(), second.getValue(), - fake); + fake, oracle); if (notExcluded(exclusions, first, second)) { assertFalse( String.format(UNEXPECTED_BOTTOM, op.getClass().getSimpleName(), @@ -350,16 +351,18 @@ private void binaryTransform(BinaryOperator op, java.util.function.BinaryOperato } } - private void binaryTransformSecond(BinaryOperator op, java.util.function.BinaryOperator expected, + private void binaryTransformSecond( + BinaryOperator op, + java.util.function.BinaryOperator expected, java.util.function.UnaryOperator transformer) throws SemanticException { for (Entry first : combos.entrySet()) for (Entry second : combos.entrySet()) { InferredTypes st = transformer.apply(second.getValue()); InferredTypes eval = domain.evalBinaryExpression(op, first.getValue(), second.getValue(), - fake); + fake, oracle); InferredTypes evalT = domain.evalBinaryExpression(op, first.getValue(), st, - fake); + fake, oracle); assertTrue( String.format(RESULT_NOT_BOTTOM, op.getClass().getSimpleName(), first.getKey() + "," + second.getKey()), @@ -394,7 +397,9 @@ public void testEvalBinary() throws SemanticException { binaryLE(StringIndexOf.INSTANCE, integer, string, string); binaryLE(StringConcat.INSTANCE, string, string, string); - java.util.function.BinaryOperator commonNumbers = (l, r) -> { + java.util.function.BinaryOperator commonNumbers = ( + l, + r) -> { Set set = NumericType.commonNumericalType(l.getRuntimeTypes(), r.getRuntimeTypes()); if (set.isEmpty()) return domain.bottom(); @@ -406,31 +411,42 @@ public void testEvalBinary() throws SemanticException { binaryTransform(NumericNonOverflowingSub.INSTANCE, commonNumbers, excluded); binaryTransform(NumericNonOverflowingMod.INSTANCE, commonNumbers, excluded); - binaryTransformSecond(TypeCast.INSTANCE, (l, r) -> { + binaryTransformSecond(TypeCast.INSTANCE, ( + l, + r) -> { Set set = types.cast(l.getRuntimeTypes(), r.getRuntimeTypes(), null); if (set.isEmpty()) return domain.bottom(); return new InferredTypes(types, set); }, it -> new InferredTypes(types, new TypeTokenType(it.getRuntimeTypes()))); - binaryTransformSecond(TypeConv.INSTANCE, (l, r) -> { + binaryTransformSecond(TypeConv.INSTANCE, ( + l, + r) -> { Set set = types.convert(l.getRuntimeTypes(), r.getRuntimeTypes()); if (set.isEmpty()) return domain.bottom(); return new InferredTypes(types, set); }, it -> new InferredTypes(types, new TypeTokenType(it.getRuntimeTypes()))); - binaryTransformSecond(TypeCheck.INSTANCE, (l, r) -> bool, + binaryTransformSecond(TypeCheck.INSTANCE, ( + l, + r) -> bool, it -> new InferredTypes(types, new TypeTokenType(it.getRuntimeTypes()))); } - private void ternaryLE(TernaryOperator op, InferredTypes expected, InferredTypes left, InferredTypes middle, - InferredTypes right) throws SemanticException { + private void ternaryLE( + TernaryOperator op, + InferredTypes expected, + InferredTypes left, + InferredTypes middle, + InferredTypes right) + throws SemanticException { for (Entry first : combos.entrySet()) for (Entry second : combos.entrySet()) for (Entry third : combos.entrySet()) { InferredTypes eval = domain.evalTernaryExpression(op, first.getValue(), - second.getValue(), third.getValue(), fake); + second.getValue(), third.getValue(), fake, oracle); if (left.lessOrEqual(first.getValue()) && middle.lessOrEqual(second.getValue()) && right.lessOrEqual(third.getValue())) { assertFalse( @@ -455,9 +471,13 @@ public void testTernary() throws SemanticException { ternaryLE(StringReplace.INSTANCE, string, string, string, string); } - private void satisfies(BinaryOperator op, InferredTypes left, InferredTypes right, Satisfiability expected) { + private void satisfies( + BinaryOperator op, + InferredTypes left, + InferredTypes right, + Satisfiability expected) { assertEquals("Satisfies(" + left + " " + op + " " + right + ") returned wrong result", expected, - domain.satisfiesBinaryExpression(op, left, right, fake)); + domain.satisfiesBinaryExpression(op, left, right, fake, oracle)); } @Test diff --git a/lisa/lisa-analyses/src/test/java/it/unive/lisa/checks/ChecksExecutorTest.java b/lisa/lisa-analyses/src/test/java/it/unive/lisa/checks/ChecksExecutorTest.java index 0ae14fa8d..6747dd17a 100644 --- a/lisa/lisa-analyses/src/test/java/it/unive/lisa/checks/ChecksExecutorTest.java +++ b/lisa/lisa-analyses/src/test/java/it/unive/lisa/checks/ChecksExecutorTest.java @@ -16,7 +16,10 @@ public class ChecksExecutorTest extends AnalysisTestExecutor { private static class VariableI implements SyntacticCheck { @Override - public boolean visit(CheckTool tool, CFG graph, Statement node) { + public boolean visit( + CheckTool tool, + CFG graph, + Statement node) { if (node instanceof VariableRef && ((VariableRef) node).getName().equals("i")) tool.warnOn(node, "Found variable i"); return true; diff --git a/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/ArraysTest.java b/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/ArraysTest.java new file mode 100644 index 000000000..ff1353261 --- /dev/null +++ b/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/ArraysTest.java @@ -0,0 +1,54 @@ +package it.unive.lisa.cron; + +import it.unive.lisa.AnalysisTestExecutor; +import it.unive.lisa.CronConfiguration; +import it.unive.lisa.DefaultConfiguration; +import it.unive.lisa.analysis.heap.MonolithicHeap; +import it.unive.lisa.analysis.heap.pointbased.FieldSensitivePointBasedHeap; +import it.unive.lisa.analysis.heap.pointbased.PointBasedHeap; +import org.junit.Test; + +public class ArraysTest extends AnalysisTestExecutor { + + @Test + public void monolithTest() { + CronConfiguration conf = new CronConfiguration(); + conf.serializeResults = true; + conf.abstractState = DefaultConfiguration.simpleState( + new MonolithicHeap(), + DefaultConfiguration.defaultValueDomain(), + DefaultConfiguration.defaultTypeDomain()); + conf.testDir = "arrays"; + conf.testSubDir = "monolith"; + conf.programFile = "arrays.imp"; + perform(conf); + } + + @Test + public void fieldInsensitiveTest() { + CronConfiguration conf = new CronConfiguration(); + conf.serializeResults = true; + conf.abstractState = DefaultConfiguration.simpleState( + new PointBasedHeap(), + DefaultConfiguration.defaultValueDomain(), + DefaultConfiguration.defaultTypeDomain()); + conf.testDir = "arrays"; + conf.testSubDir = "allocations"; + conf.programFile = "arrays.imp"; + perform(conf); + } + + @Test + public void fieldSensitiveTest() { + CronConfiguration conf = new CronConfiguration(); + conf.serializeResults = true; + conf.abstractState = DefaultConfiguration.simpleState( + new FieldSensitivePointBasedHeap(), + DefaultConfiguration.defaultValueDomain(), + DefaultConfiguration.defaultTypeDomain()); + conf.testDir = "arrays"; + conf.testSubDir = "allocations-fields"; + conf.programFile = "arrays.imp"; + perform(conf); + } +} diff --git a/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/DataflowAnalysesTest.java b/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/DataflowAnalysesTest.java new file mode 100644 index 000000000..3a9144f5d --- /dev/null +++ b/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/DataflowAnalysesTest.java @@ -0,0 +1,70 @@ +package it.unive.lisa.cron; + +import it.unive.lisa.AnalysisTestExecutor; +import it.unive.lisa.CronConfiguration; +import it.unive.lisa.DefaultConfiguration; +import it.unive.lisa.analysis.dataflow.AvailableExpressions; +import it.unive.lisa.analysis.dataflow.ConstantPropagation; +import it.unive.lisa.analysis.dataflow.DefiniteDataflowDomain; +import it.unive.lisa.analysis.dataflow.Liveness; +import it.unive.lisa.analysis.dataflow.PossibleDataflowDomain; +import it.unive.lisa.analysis.dataflow.ReachingDefinitions; +import it.unive.lisa.interprocedural.BackwardModularWorstCaseAnalysis; +import org.junit.Test; + +public class DataflowAnalysesTest extends AnalysisTestExecutor { + + @Test + public void testAvailableExpressions() { + CronConfiguration conf = new CronConfiguration(); + conf.serializeResults = true; + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new DefiniteDataflowDomain<>(new AvailableExpressions()), + DefaultConfiguration.defaultTypeDomain()); + conf.testDir = "available-expressions"; + conf.programFile = "available-expressions.imp"; + perform(conf); + } + + @Test + public void testConstantPropagation() { + CronConfiguration conf = new CronConfiguration(); + conf.serializeResults = true; + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new DefiniteDataflowDomain<>(new ConstantPropagation()), + DefaultConfiguration.defaultTypeDomain()); + conf.testDir = "constant-propagation-df"; + conf.programFile = "constant-propagation.imp"; + perform(conf); + } + + @Test + public void testReachingDefinitions() { + CronConfiguration conf = new CronConfiguration(); + conf.serializeResults = true; + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new PossibleDataflowDomain<>(new ReachingDefinitions()), + DefaultConfiguration.defaultTypeDomain()); + conf.testDir = "reaching-definitions"; + conf.programFile = "reaching-definitions.imp"; + perform(conf); + } + + @Test + public void testLiveness() { + CronConfiguration conf = new CronConfiguration(); + conf.serializeResults = true; + conf.interproceduralAnalysis = new BackwardModularWorstCaseAnalysis<>(); + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new PossibleDataflowDomain<>(new Liveness()), + DefaultConfiguration.defaultTypeDomain()); + conf.testDir = "liveness"; + conf.programFile = "liveness.imp"; + conf.compareWithOptimization = false; + perform(conf); + } +} \ No newline at end of file diff --git a/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/DescendingTest.java b/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/DescendingTest.java new file mode 100644 index 000000000..96240a4dc --- /dev/null +++ b/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/DescendingTest.java @@ -0,0 +1,39 @@ +package it.unive.lisa.cron; + +import it.unive.lisa.AnalysisTestExecutor; +import it.unive.lisa.CronConfiguration; +import it.unive.lisa.DefaultConfiguration; +import it.unive.lisa.conf.LiSAConfiguration.DescendingPhaseType; +import org.junit.Test; + +public class DescendingTest extends AnalysisTestExecutor { + + @Test + public void testIntervalDescendingWidening() { + CronConfiguration conf = new CronConfiguration(); + conf.serializeResults = true; + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + DefaultConfiguration.defaultValueDomain(), + DefaultConfiguration.defaultTypeDomain()); + conf.descendingPhaseType = DescendingPhaseType.NARROWING; + conf.testDir = "descending-widening"; + conf.programFile = "program.imp"; + perform(conf); + } + + @Test + public void testIntervalDescendingMaxGlb() { + CronConfiguration conf = new CronConfiguration(); + conf.serializeResults = true; + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + DefaultConfiguration.defaultValueDomain(), + DefaultConfiguration.defaultTypeDomain()); + conf.descendingPhaseType = DescendingPhaseType.GLB; + conf.glbThreshold = 5; + conf.testDir = "descending-maxglb"; + conf.programFile = "program.imp"; + perform(conf); + } +} \ No newline at end of file diff --git a/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/InformationFlowTest.java b/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/InformationFlowTest.java new file mode 100644 index 000000000..7566ae603 --- /dev/null +++ b/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/InformationFlowTest.java @@ -0,0 +1,245 @@ +package it.unive.lisa.cron; + +import it.unive.lisa.AnalysisTestExecutor; +import it.unive.lisa.CronConfiguration; +import it.unive.lisa.DefaultConfiguration; +import it.unive.lisa.analysis.AnalysisState; +import it.unive.lisa.analysis.AnalyzedCFG; +import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.SimpleAbstractState; +import it.unive.lisa.analysis.heap.MonolithicHeap; +import it.unive.lisa.analysis.nonInterference.NonInterference; +import it.unive.lisa.analysis.nonrelational.inference.InferenceSystem; +import it.unive.lisa.analysis.nonrelational.value.TypeEnvironment; +import it.unive.lisa.analysis.nonrelational.value.ValueEnvironment; +import it.unive.lisa.analysis.taint.BaseTaint; +import it.unive.lisa.analysis.taint.Taint; +import it.unive.lisa.analysis.taint.ThreeLevelsTaint; +import it.unive.lisa.analysis.types.InferredTypes; +import it.unive.lisa.checks.semantic.CheckToolWithAnalysisResults; +import it.unive.lisa.checks.semantic.SemanticCheck; +import it.unive.lisa.interprocedural.ReturnTopPolicy; +import it.unive.lisa.interprocedural.callgraph.RTACallGraph; +import it.unive.lisa.interprocedural.context.ContextBasedAnalysis; +import it.unive.lisa.interprocedural.context.FullStackToken; +import it.unive.lisa.program.cfg.CFG; +import it.unive.lisa.program.cfg.CodeMember; +import it.unive.lisa.program.cfg.Parameter; +import it.unive.lisa.program.cfg.statement.Assignment; +import it.unive.lisa.program.cfg.statement.Expression; +import it.unive.lisa.program.cfg.statement.Statement; +import it.unive.lisa.program.cfg.statement.call.CFGCall; +import it.unive.lisa.program.cfg.statement.call.Call; +import it.unive.lisa.program.cfg.statement.call.UnresolvedCall; +import it.unive.lisa.symbolic.SymbolicExpression; +import it.unive.lisa.symbolic.value.ValueExpression; +import java.util.Collection; +import org.junit.Test; + +public class InformationFlowTest extends AnalysisTestExecutor { + + @Test + public void testTaint() { + CronConfiguration conf = new CronConfiguration(); + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new ValueEnvironment<>(new Taint()), + DefaultConfiguration.defaultTypeDomain()); + conf.serializeResults = true; + conf.openCallPolicy = ReturnTopPolicy.INSTANCE; + conf.callGraph = new RTACallGraph(); + conf.interproceduralAnalysis = new ContextBasedAnalysis<>(); + conf.semanticChecks.add(new TaintCheck<>()); + conf.testDir = "taint"; + conf.testSubDir = "2val"; + conf.programFile = "taint.imp"; + conf.hotspots = st -> st instanceof Expression && ((Expression) st).getParentStatement() instanceof Call; + perform(conf); + } + + @Test + public void testThreeLevelsTaint() { + CronConfiguration conf = new CronConfiguration(); + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new ValueEnvironment<>(new ThreeLevelsTaint()), + DefaultConfiguration.defaultTypeDomain()); + conf.serializeResults = true; + conf.openCallPolicy = ReturnTopPolicy.INSTANCE; + conf.callGraph = new RTACallGraph(); + conf.interproceduralAnalysis = new ContextBasedAnalysis<>(); + conf.semanticChecks.add(new TaintCheck<>()); + conf.testDir = "taint"; + conf.testSubDir = "3val"; + conf.programFile = "taint.imp"; + conf.hotspots = st -> st instanceof Expression && ((Expression) st).getParentStatement() instanceof Call; + perform(conf); + } + + private static class TaintCheck> + implements + SemanticCheck< + SimpleAbstractState, TypeEnvironment>> { + + @Override + public boolean visit( + CheckToolWithAnalysisResults< + SimpleAbstractState, TypeEnvironment>> tool, + CFG graph, + Statement node) { + if (!(node instanceof UnresolvedCall)) + return true; + + UnresolvedCall call = (UnresolvedCall) node; + + try { + for (AnalyzedCFG< + SimpleAbstractState< + MonolithicHeap, + ValueEnvironment, + TypeEnvironment>> result : tool.getResultOf(call.getCFG())) { + + Call resolved = (Call) tool.getResolvedVersion(call, result); + if (resolved instanceof CFGCall) { + CFGCall cfg = (CFGCall) resolved; + for (CodeMember n : cfg.getTargets()) { + Parameter[] parameters = n.getDescriptor().getFormals(); + for (int i = 0; i < parameters.length; i++) + if (parameters[i].getAnnotations().contains(BaseTaint.CLEAN_MATCHER)) { + AnalysisState, + TypeEnvironment>> post = result + .getAnalysisStateAfter(call.getParameters()[i]); + for (SymbolicExpression e : post.getState().rewrite(post.getComputedExpressions(), + node, post.getState())) { + T stack = post + .getState() + .getValueState() + .eval((ValueExpression) e, node, post.getState()); + if (stack.isAlwaysTainted()) + tool.warnOn(call, "Parameter " + i + " is always tainted"); + else if (stack.isPossiblyTainted()) + tool.warnOn(call, "Parameter " + i + " is possibly tainted"); + } + } + } + } + } + } catch (SemanticException e1) { + e1.printStackTrace(); + } + + return true; + } + } + + @Test + public void testConfidentialityNI() { + CronConfiguration conf = new CronConfiguration(); + conf.serializeResults = true; + conf.abstractState = new SimpleAbstractState<>( + new MonolithicHeap(), + new InferenceSystem<>(new NonInterference()), + new TypeEnvironment<>(new InferredTypes())); + conf.semanticChecks.add(new NICheck()); + conf.testDir = "non-interference/confidentiality"; + conf.programFile = "program.imp"; + conf.hotspots = st -> st instanceof Assignment + || (st instanceof Expression && ((Expression) st).getParentStatement() instanceof Assignment); + perform(conf); + } + + @Test + public void testIntegrityNI() { + CronConfiguration conf = new CronConfiguration(); + conf.serializeResults = true; + conf.abstractState = new SimpleAbstractState<>( + new MonolithicHeap(), + new InferenceSystem<>(new NonInterference()), + new TypeEnvironment<>(new InferredTypes())); + conf.semanticChecks.add(new NICheck()); + conf.testDir = "non-interference/integrity"; + conf.programFile = "program.imp"; + conf.hotspots = st -> st instanceof Assignment + || (st instanceof Expression && ((Expression) st).getParentStatement() instanceof Assignment); + perform(conf); + } + + @Test + public void testDeclassification() { + CronConfiguration conf = new CronConfiguration(); + conf.serializeResults = true; + conf.abstractState = new SimpleAbstractState<>( + new MonolithicHeap(), + new InferenceSystem<>(new NonInterference()), + new TypeEnvironment<>(new InferredTypes())); + conf.callGraph = new RTACallGraph(); + conf.interproceduralAnalysis = new ContextBasedAnalysis<>(FullStackToken.getSingleton()); + conf.semanticChecks.add(new NICheck()); + conf.testDir = "non-interference/interproc"; + conf.programFile = "program.imp"; + conf.hotspots = st -> st instanceof Assignment + || (st instanceof Expression && ((Expression) st).getParentStatement() instanceof Assignment); + perform(conf); + } + + private static class NICheck + implements + SemanticCheck< + SimpleAbstractState, + TypeEnvironment>> { + + @Override + @SuppressWarnings({ "unchecked" }) + public boolean visit( + CheckToolWithAnalysisResults< + SimpleAbstractState, + TypeEnvironment>> tool, + CFG graph, + Statement node) { + if (!(node instanceof Assignment)) + return true; + + Assignment assign = (Assignment) node; + Collection results = tool.getResultOf(graph); + + for (Object res : results) + try { + AnalyzedCFG result = (AnalyzedCFG) res; + AnalysisState post = result.getAnalysisStateAfter(assign); + InferenceSystem state = post.getState().getDomainInstance(InferenceSystem.class); + AnalysisState postL = result.getAnalysisStateAfter(assign.getLeft()); + InferenceSystem left = postL.getState().getDomainInstance(InferenceSystem.class); + AnalysisState postR = result.getAnalysisStateAfter(assign.getRight()); + InferenceSystem right = postR.getState().getDomainInstance(InferenceSystem.class); + + for (SymbolicExpression l : postL.getState().rewrite(postL.getComputedExpressions(), assign, + postL.getState())) + for (SymbolicExpression r : postR.getState().rewrite(postR.getComputedExpressions(), assign, + postR.getState())) { + NonInterference ll = left.eval((ValueExpression) l, assign.getLeft(), postL.getState()); + NonInterference rr = right.eval((ValueExpression) r, assign.getRight(), postR.getState()); + + if (ll.isLowConfidentiality() && rr.isHighConfidentiality()) + tool.warnOn(assign, + "This assignment assigns a HIGH confidentiality value to a LOW confidentiality variable, thus violating non-interference"); + + if (ll.isLowConfidentiality() && state.getExecutionState().isHighConfidentiality()) + tool.warnOn(assign, + "This assignment, located in a HIGH confidentiality block, assigns a LOW confidentiality variable, thus violating non-interference"); + + if (ll.isHighIntegrity() && rr.isLowIntegrity()) + tool.warnOn(assign, + "This assignment assigns a LOW integrity value to a HIGH integrity variable, thus violating non-interference"); + + if (ll.isHighIntegrity() && state.getExecutionState().isLowIntegrity()) + tool.warnOn(assign, + "This assignment, located in a LOW integrity block, assigns a HIGH integrity variable, thus violating non-interference"); + } + } catch (SemanticException e) { + throw new RuntimeException(e); + } + + return true; + } + } +} diff --git a/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/InterproceduralAnalysesTest.java b/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/InterproceduralAnalysesTest.java new file mode 100644 index 000000000..d62167944 --- /dev/null +++ b/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/InterproceduralAnalysesTest.java @@ -0,0 +1,146 @@ +package it.unive.lisa.cron; + +import it.unive.lisa.AnalysisTestExecutor; +import it.unive.lisa.CronConfiguration; +import it.unive.lisa.DefaultConfiguration; +import it.unive.lisa.analysis.heap.pointbased.PointBasedHeap; +import it.unive.lisa.analysis.nonrelational.value.ValueEnvironment; +import it.unive.lisa.analysis.numeric.Interval; +import it.unive.lisa.analysis.numeric.Sign; +import it.unive.lisa.interprocedural.ModularWorstCaseAnalysis; +import it.unive.lisa.interprocedural.callgraph.CHACallGraph; +import it.unive.lisa.interprocedural.callgraph.RTACallGraph; +import it.unive.lisa.interprocedural.context.ContextBasedAnalysis; +import it.unive.lisa.interprocedural.context.FullStackToken; +import org.junit.Test; + +public class InterproceduralAnalysesTest extends AnalysisTestExecutor { + + @Test + public void testWorstCaseCHACallGraph() { + CronConfiguration conf = new CronConfiguration(); + conf.serializeResults = true; + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new ValueEnvironment<>(new Sign()), + DefaultConfiguration.defaultTypeDomain()); + conf.interproceduralAnalysis = new ModularWorstCaseAnalysis<>(); + conf.callGraph = new CHACallGraph(); + conf.testDir = "interprocedural"; + conf.testSubDir = "CHA"; + conf.programFile = "program.imp"; + perform(conf); + } + + @Test + public void testWorstCaseRTACallGraph() { + CronConfiguration conf = new CronConfiguration(); + conf.serializeResults = true; + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new ValueEnvironment<>(new Sign()), + DefaultConfiguration.defaultTypeDomain()); + conf.interproceduralAnalysis = new ModularWorstCaseAnalysis<>(); + conf.callGraph = new RTACallGraph(); + conf.testDir = "interprocedural"; + conf.testSubDir = "RTA"; + conf.programFile = "program.imp"; + perform(conf); + } + + @Test + public void testRTAContextSensitive1() { + CronConfiguration conf = new CronConfiguration(); + conf.serializeResults = true; + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new ValueEnvironment<>(new Sign()), + DefaultConfiguration.defaultTypeDomain()); + conf.interproceduralAnalysis = new ContextBasedAnalysis<>(); + conf.callGraph = new RTACallGraph(); + conf.testDir = "interprocedural"; + conf.testSubDir = "RTAContextSensitive1"; + conf.programFile = "programContextSensitive1.imp"; + perform(conf); + } + + @Test + public void testRTAContextSensitive2() { + CronConfiguration conf = new CronConfiguration(); + conf.serializeResults = true; + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new ValueEnvironment<>(new Sign()), + DefaultConfiguration.defaultTypeDomain()); + conf.interproceduralAnalysis = new ContextBasedAnalysis<>(); + conf.callGraph = new RTACallGraph(); + conf.testDir = "interprocedural"; + conf.testSubDir = "RTAContextSensitive2"; + conf.programFile = "programContextSensitive2.imp"; + perform(conf); + } + + @Test + public void testRTAContextSensitive3() { + CronConfiguration conf = new CronConfiguration(); + conf.serializeResults = true; + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new ValueEnvironment<>(new Sign()), + DefaultConfiguration.defaultTypeDomain()); + conf.interproceduralAnalysis = new ContextBasedAnalysis<>(); + conf.callGraph = new RTACallGraph(); + conf.testDir = "interprocedural"; + conf.testSubDir = "RTAContextSensitive3"; + conf.programFile = "programContextSensitive3.imp"; + perform(conf); + } + + @Test + public void testRTAContextSensitive4() { + CronConfiguration conf = new CronConfiguration(); + conf.serializeResults = true; + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new ValueEnvironment<>(new Sign()), + DefaultConfiguration.defaultTypeDomain()); + conf.interproceduralAnalysis = new ContextBasedAnalysis<>(FullStackToken.getSingleton()); + conf.callGraph = new RTACallGraph(); + conf.testDir = "interprocedural"; + conf.testSubDir = "RTAContextSensitive4"; + conf.programFile = "programContextSensitive3.imp"; + perform(conf); + } + + @Test + public void testRTAContextSensitive5() { + CronConfiguration conf = new CronConfiguration(); + conf.serializeResults = true; + conf.abstractState = DefaultConfiguration.simpleState( + new PointBasedHeap(), + new ValueEnvironment<>(new Interval()), + DefaultConfiguration.defaultTypeDomain()); + conf.interproceduralAnalysis = new ContextBasedAnalysis<>(); + conf.callGraph = new RTACallGraph(); + conf.testDir = "interprocedural"; + conf.testSubDir = "RTAContextSensitive5"; + conf.programFile = "programContextSensitive4.imp"; + perform(conf); + } + + @Test + public void testRTAContextSensitive6() { + CronConfiguration conf = new CronConfiguration(); + conf.serializeResults = true; + conf.abstractState = DefaultConfiguration.simpleState( + new PointBasedHeap(), + new ValueEnvironment<>(new Interval()), + DefaultConfiguration.defaultTypeDomain()); + conf.interproceduralAnalysis = new ContextBasedAnalysis<>(); + conf.callGraph = new RTACallGraph(); + conf.testDir = "interprocedural"; + conf.testSubDir = "RTAContextSensitive6"; + conf.programFile = "programContextSensitive5.imp"; + perform(conf); + } +} diff --git a/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/MemoryAbstractionsTest.java b/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/MemoryAbstractionsTest.java new file mode 100644 index 000000000..1135e54e3 --- /dev/null +++ b/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/MemoryAbstractionsTest.java @@ -0,0 +1,51 @@ +package it.unive.lisa.cron; + +import it.unive.lisa.AnalysisTestExecutor; +import it.unive.lisa.CronConfiguration; +import it.unive.lisa.DefaultConfiguration; +import it.unive.lisa.analysis.heap.TypeBasedHeap; +import it.unive.lisa.analysis.heap.pointbased.FieldSensitivePointBasedHeap; +import it.unive.lisa.analysis.heap.pointbased.PointBasedHeap; +import org.junit.Test; + +public class MemoryAbstractionsTest extends AnalysisTestExecutor { + + @Test + public void testTypeBasedHeap() { + CronConfiguration conf = new CronConfiguration(); + conf.serializeResults = true; + conf.abstractState = DefaultConfiguration.simpleState( + new TypeBasedHeap(), + DefaultConfiguration.defaultValueDomain(), + DefaultConfiguration.defaultTypeDomain()); + conf.testDir = "heap/type-based-heap"; + conf.programFile = "program.imp"; + perform(conf); + } + + @Test + public void fieldInsensitivePointBasedHeapTest() { + CronConfiguration conf = new CronConfiguration(); + conf.serializeResults = true; + conf.abstractState = DefaultConfiguration.simpleState( + new PointBasedHeap(), + DefaultConfiguration.defaultValueDomain(), + DefaultConfiguration.defaultTypeDomain()); + conf.testDir = "heap/point-based-heap/field-insensitive"; + conf.programFile = "program.imp"; + perform(conf); + } + + @Test + public void fieldSensitivePointBasedHeapTest() { + CronConfiguration conf = new CronConfiguration(); + conf.serializeResults = true; + conf.abstractState = DefaultConfiguration.simpleState( + new FieldSensitivePointBasedHeap(), + DefaultConfiguration.defaultValueDomain(), + DefaultConfiguration.defaultTypeDomain()); + conf.testDir = "heap/point-based-heap/field-sensitive"; + conf.programFile = "program.imp"; + perform(conf); + } +} diff --git a/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/nonRedundantSet/NonRedundantSetTest.java b/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/NonRedundantSetTest.java similarity index 57% rename from lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/nonRedundantSet/NonRedundantSetTest.java rename to lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/NonRedundantSetTest.java index 0ca317c4a..0f8647c2b 100644 --- a/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/nonRedundantSet/NonRedundantSetTest.java +++ b/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/NonRedundantSetTest.java @@ -1,27 +1,23 @@ -package it.unive.lisa.cron.nonRedundantSet; +package it.unive.lisa.cron; -import static it.unive.lisa.LiSAFactory.getDefaultFor; - -import it.unive.lisa.AnalysisSetupException; import it.unive.lisa.AnalysisTestExecutor; import it.unive.lisa.CronConfiguration; -import it.unive.lisa.analysis.AbstractState; -import it.unive.lisa.analysis.heap.HeapDomain; +import it.unive.lisa.DefaultConfiguration; import it.unive.lisa.analysis.nonRedundantSet.NonRedundantPowersetOfInterval; -import it.unive.lisa.analysis.nonrelational.value.TypeEnvironment; -import it.unive.lisa.analysis.types.InferredTypes; +import it.unive.lisa.analysis.nonrelational.value.ValueEnvironment; import it.unive.lisa.conf.LiSAConfiguration.DescendingPhaseType; import org.junit.Test; public class NonRedundantSetTest extends AnalysisTestExecutor { @Test - public void testNonRedundantSetOfInterval() throws AnalysisSetupException { + public void testNonRedundantSetOfInterval() { CronConfiguration conf = new CronConfiguration(); conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, getDefaultFor(HeapDomain.class), - new NonRedundantPowersetOfInterval(), - new TypeEnvironment<>(new InferredTypes())); + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new ValueEnvironment<>(new NonRedundantPowersetOfInterval()), + DefaultConfiguration.defaultTypeDomain()); conf.descendingPhaseType = DescendingPhaseType.GLB; conf.glbThreshold = 5; conf.testDir = "non-redundant-set-interval"; diff --git a/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/NumericAnalysesTest.java b/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/NumericAnalysesTest.java new file mode 100644 index 000000000..679d1cffa --- /dev/null +++ b/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/NumericAnalysesTest.java @@ -0,0 +1,66 @@ +package it.unive.lisa.cron; + +import it.unive.lisa.AnalysisTestExecutor; +import it.unive.lisa.CronConfiguration; +import it.unive.lisa.DefaultConfiguration; +import it.unive.lisa.analysis.nonrelational.value.ValueEnvironment; +import it.unive.lisa.analysis.numeric.IntegerConstantPropagation; +import it.unive.lisa.analysis.numeric.Interval; +import it.unive.lisa.analysis.numeric.Parity; +import it.unive.lisa.analysis.numeric.Sign; +import org.junit.Test; + +public class NumericAnalysesTest extends AnalysisTestExecutor { + + @Test + public void testSign() { + CronConfiguration conf = new CronConfiguration(); + conf.serializeResults = true; + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new ValueEnvironment<>(new Sign()), + DefaultConfiguration.defaultTypeDomain()); + conf.testDir = "sign"; + conf.programFile = "program.imp"; + perform(conf); + } + + @Test + public void testParity() { + CronConfiguration conf = new CronConfiguration(); + conf.serializeResults = true; + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new ValueEnvironment<>(new Parity()), + DefaultConfiguration.defaultTypeDomain()); + conf.testDir = "parity"; + conf.programFile = "program.imp"; + perform(conf); + } + + @Test + public void testInterval() { + CronConfiguration conf = new CronConfiguration(); + conf.serializeResults = true; + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new ValueEnvironment<>(new Interval()), + DefaultConfiguration.defaultTypeDomain()); + conf.testDir = "interval"; + conf.programFile = "program.imp"; + perform(conf); + } + + @Test + public void testIntegerConstantPropagation() { + CronConfiguration conf = new CronConfiguration(); + conf.serializeResults = true; + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new ValueEnvironment<>(new IntegerConstantPropagation()), + DefaultConfiguration.defaultTypeDomain()); + conf.testDir = "int-const"; + conf.programFile = "program.imp"; + perform(conf); + } +} diff --git a/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/interprocedural/RecursionsTest.java b/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/RecursionsTest.java similarity index 60% rename from lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/interprocedural/RecursionsTest.java rename to lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/RecursionsTest.java index 5a3f3f3dd..e3eec5b52 100644 --- a/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/interprocedural/RecursionsTest.java +++ b/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/RecursionsTest.java @@ -1,14 +1,10 @@ -package it.unive.lisa.cron.interprocedural; +package it.unive.lisa.cron; -import static it.unive.lisa.LiSAFactory.getDefaultFor; - -import it.unive.lisa.AnalysisSetupException; import it.unive.lisa.AnalysisTestExecutor; import it.unive.lisa.CronConfiguration; -import it.unive.lisa.analysis.AbstractState; -import it.unive.lisa.analysis.heap.HeapDomain; +import it.unive.lisa.DefaultConfiguration; +import it.unive.lisa.analysis.nonrelational.value.ValueEnvironment; import it.unive.lisa.analysis.numeric.Interval; -import it.unive.lisa.analysis.value.TypeDomain; import it.unive.lisa.interprocedural.callgraph.RTACallGraph; import it.unive.lisa.interprocedural.context.ContextBasedAnalysis; import it.unive.lisa.interprocedural.context.ContextInsensitiveToken; @@ -23,97 +19,77 @@ public class RecursionsTest extends AnalysisTestExecutor { @Test - public void testFibonacciFullStack() throws AnalysisSetupException { + public void testFibonacciFullStack() { CronConfiguration conf = new CronConfiguration(); conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, - getDefaultFor(HeapDomain.class), - new Interval(), - getDefaultFor(TypeDomain.class)); + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new ValueEnvironment<>(new Interval()), + DefaultConfiguration.defaultTypeDomain()); conf.interproceduralAnalysis = new ContextBasedAnalysis<>(FullStackToken.getSingleton()); conf.callGraph = new RTACallGraph(); conf.testDir = "interprocedural"; conf.testSubDir = "fibonacci/full"; conf.programFile = "fibonacci.imp"; - // as the test uses addition, there is a spurious x strcat y placed in - // the computed expressions in the first fixpoint round as the types of - // x and y cannot be determined (the state is bottom). This does not - // happen when unwinding the results, causing a difference. - conf.compareWithOptimization = false; perform(conf); } @Test - public void testFibonacciKDepth() throws AnalysisSetupException { + public void testFibonacciKDepth() { CronConfiguration conf = new CronConfiguration(); conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, - getDefaultFor(HeapDomain.class), - new Interval(), - getDefaultFor(TypeDomain.class)); + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new ValueEnvironment<>(new Interval()), + DefaultConfiguration.defaultTypeDomain()); conf.interproceduralAnalysis = new ContextBasedAnalysis<>(KDepthToken.getSingleton(5)); conf.callGraph = new RTACallGraph(); conf.testDir = "interprocedural"; conf.testSubDir = "fibonacci/kdepth"; conf.programFile = "fibonacci.imp"; - // as the test uses addition, there is a spurious x strcat y placed in - // the computed expressions in the first fixpoint round as the types of - // x and y cannot be determined (the state is bottom). This does not - // happen when unwinding the results, causing a difference. - conf.compareWithOptimization = false; perform(conf); } @Test - public void testFibonacciLast() throws AnalysisSetupException { + public void testFibonacciLast() { CronConfiguration conf = new CronConfiguration(); conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, - getDefaultFor(HeapDomain.class), - new Interval(), - getDefaultFor(TypeDomain.class)); + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new ValueEnvironment<>(new Interval()), + DefaultConfiguration.defaultTypeDomain()); conf.interproceduralAnalysis = new ContextBasedAnalysis<>(LastCallToken.getSingleton()); conf.callGraph = new RTACallGraph(); conf.testDir = "interprocedural"; conf.testSubDir = "fibonacci/last"; conf.programFile = "fibonacci.imp"; - // as the test uses addition, there is a spurious x strcat y placed in - // the computed expressions in the first fixpoint round as the types of - // x and y cannot be determined (the state is bottom). This does not - // happen when unwinding the results, causing a difference. - conf.compareWithOptimization = false; perform(conf); } @Test - public void testFibonacciInsensitive() throws AnalysisSetupException { + public void testFibonacciInsensitive() { CronConfiguration conf = new CronConfiguration(); conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, - getDefaultFor(HeapDomain.class), - new Interval(), - getDefaultFor(TypeDomain.class)); + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new ValueEnvironment<>(new Interval()), + DefaultConfiguration.defaultTypeDomain()); conf.interproceduralAnalysis = new ContextBasedAnalysis<>(ContextInsensitiveToken.getSingleton()); conf.callGraph = new RTACallGraph(); conf.testDir = "interprocedural"; conf.testSubDir = "fibonacci/insensitive"; conf.programFile = "fibonacci.imp"; - // as the test uses addition, there is a spurious x strcat y placed in - // the computed expressions in the first fixpoint round as the types of - // x and y cannot be determined (the state is bottom). This does not - // happen when unwinding the results, causing a difference. - conf.compareWithOptimization = false; perform(conf); } @Test - public void testFactorialLoopFullStack() throws AnalysisSetupException { + public void testFactorialLoopFullStack() { CronConfiguration conf = new CronConfiguration(); conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, - getDefaultFor(HeapDomain.class), - new Interval(), - getDefaultFor(TypeDomain.class)); + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new ValueEnvironment<>(new Interval()), + DefaultConfiguration.defaultTypeDomain()); conf.interproceduralAnalysis = new ContextBasedAnalysis<>(FullStackToken.getSingleton()); conf.callGraph = new RTACallGraph(); conf.testDir = "interprocedural"; @@ -123,13 +99,13 @@ public void testFactorialLoopFullStack() throws AnalysisSetupException { } @Test - public void testFactorialLoopKDepth() throws AnalysisSetupException { + public void testFactorialLoopKDepth() { CronConfiguration conf = new CronConfiguration(); conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, - getDefaultFor(HeapDomain.class), - new Interval(), - getDefaultFor(TypeDomain.class)); + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new ValueEnvironment<>(new Interval()), + DefaultConfiguration.defaultTypeDomain()); conf.interproceduralAnalysis = new ContextBasedAnalysis<>(KDepthToken.getSingleton(5)); conf.callGraph = new RTACallGraph(); conf.testDir = "interprocedural"; @@ -139,13 +115,13 @@ public void testFactorialLoopKDepth() throws AnalysisSetupException { } @Test - public void testFactorialLoopLast() throws AnalysisSetupException { + public void testFactorialLoopLast() { CronConfiguration conf = new CronConfiguration(); conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, - getDefaultFor(HeapDomain.class), - new Interval(), - getDefaultFor(TypeDomain.class)); + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new ValueEnvironment<>(new Interval()), + DefaultConfiguration.defaultTypeDomain()); conf.interproceduralAnalysis = new ContextBasedAnalysis<>(LastCallToken.getSingleton()); conf.callGraph = new RTACallGraph(); conf.testDir = "interprocedural"; @@ -155,13 +131,13 @@ public void testFactorialLoopLast() throws AnalysisSetupException { } @Test - public void testFactorialLoopInsensitive() throws AnalysisSetupException { + public void testFactorialLoopInsensitive() { CronConfiguration conf = new CronConfiguration(); conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, - getDefaultFor(HeapDomain.class), - new Interval(), - getDefaultFor(TypeDomain.class)); + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new ValueEnvironment<>(new Interval()), + DefaultConfiguration.defaultTypeDomain()); conf.interproceduralAnalysis = new ContextBasedAnalysis<>(ContextInsensitiveToken.getSingleton()); conf.callGraph = new RTACallGraph(); conf.testDir = "interprocedural"; @@ -171,13 +147,13 @@ public void testFactorialLoopInsensitive() throws AnalysisSetupException { } @Test - public void testInfiniteRecursion2FullStack() throws AnalysisSetupException { + public void testInfiniteRecursion2FullStack() { CronConfiguration conf = new CronConfiguration(); conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, - getDefaultFor(HeapDomain.class), - new Interval(), - getDefaultFor(TypeDomain.class)); + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new ValueEnvironment<>(new Interval()), + DefaultConfiguration.defaultTypeDomain()); conf.interproceduralAnalysis = new ContextBasedAnalysis<>(FullStackToken.getSingleton()); conf.callGraph = new RTACallGraph(); conf.testDir = "interprocedural"; @@ -188,13 +164,13 @@ public void testInfiniteRecursion2FullStack() throws AnalysisSetupException { } @Test - public void testInfiniteRecursion2KDepth() throws AnalysisSetupException { + public void testInfiniteRecursion2KDepth() { CronConfiguration conf = new CronConfiguration(); conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, - getDefaultFor(HeapDomain.class), - new Interval(), - getDefaultFor(TypeDomain.class)); + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new ValueEnvironment<>(new Interval()), + DefaultConfiguration.defaultTypeDomain()); conf.interproceduralAnalysis = new ContextBasedAnalysis<>(KDepthToken.getSingleton(5)); conf.callGraph = new RTACallGraph(); conf.testDir = "interprocedural"; @@ -205,13 +181,13 @@ public void testInfiniteRecursion2KDepth() throws AnalysisSetupException { } @Test - public void testInfiniteRecursion2Last() throws AnalysisSetupException { + public void testInfiniteRecursion2Last() { CronConfiguration conf = new CronConfiguration(); conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, - getDefaultFor(HeapDomain.class), - new Interval(), - getDefaultFor(TypeDomain.class)); + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new ValueEnvironment<>(new Interval()), + DefaultConfiguration.defaultTypeDomain()); conf.interproceduralAnalysis = new ContextBasedAnalysis<>(LastCallToken.getSingleton()); conf.callGraph = new RTACallGraph(); conf.testDir = "interprocedural"; @@ -222,13 +198,13 @@ public void testInfiniteRecursion2Last() throws AnalysisSetupException { } @Test - public void testInfiniteRecursion2Insensitive() throws AnalysisSetupException { + public void testInfiniteRecursion2Insensitive() { CronConfiguration conf = new CronConfiguration(); conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, - getDefaultFor(HeapDomain.class), - new Interval(), - getDefaultFor(TypeDomain.class)); + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new ValueEnvironment<>(new Interval()), + DefaultConfiguration.defaultTypeDomain()); conf.interproceduralAnalysis = new ContextBasedAnalysis<>(ContextInsensitiveToken.getSingleton()); conf.callGraph = new RTACallGraph(); conf.testDir = "interprocedural"; @@ -239,13 +215,13 @@ public void testInfiniteRecursion2Insensitive() throws AnalysisSetupException { } @Test - public void testInfiniteRecursion1FullStack() throws AnalysisSetupException { + public void testInfiniteRecursion1FullStack() { CronConfiguration conf = new CronConfiguration(); conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, - getDefaultFor(HeapDomain.class), - new Interval(), - getDefaultFor(TypeDomain.class)); + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new ValueEnvironment<>(new Interval()), + DefaultConfiguration.defaultTypeDomain()); conf.interproceduralAnalysis = new ContextBasedAnalysis<>(FullStackToken.getSingleton()); conf.callGraph = new RTACallGraph(); conf.testDir = "interprocedural"; @@ -256,13 +232,13 @@ public void testInfiniteRecursion1FullStack() throws AnalysisSetupException { } @Test - public void testInfiniteRecursion1KDepth() throws AnalysisSetupException { + public void testInfiniteRecursion1KDepth() { CronConfiguration conf = new CronConfiguration(); conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, - getDefaultFor(HeapDomain.class), - new Interval(), - getDefaultFor(TypeDomain.class)); + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new ValueEnvironment<>(new Interval()), + DefaultConfiguration.defaultTypeDomain()); conf.interproceduralAnalysis = new ContextBasedAnalysis<>(KDepthToken.getSingleton(5)); conf.callGraph = new RTACallGraph(); conf.testDir = "interprocedural"; @@ -273,13 +249,13 @@ public void testInfiniteRecursion1KDepth() throws AnalysisSetupException { } @Test - public void testInfiniteRecursion1Last() throws AnalysisSetupException { + public void testInfiniteRecursion1Last() { CronConfiguration conf = new CronConfiguration(); conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, - getDefaultFor(HeapDomain.class), - new Interval(), - getDefaultFor(TypeDomain.class)); + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new ValueEnvironment<>(new Interval()), + DefaultConfiguration.defaultTypeDomain()); conf.interproceduralAnalysis = new ContextBasedAnalysis<>(LastCallToken.getSingleton()); conf.callGraph = new RTACallGraph(); conf.testDir = "interprocedural"; @@ -290,13 +266,13 @@ public void testInfiniteRecursion1Last() throws AnalysisSetupException { } @Test - public void testInfiniteRecursion1Insensitive() throws AnalysisSetupException { + public void testInfiniteRecursion1Insensitive() { CronConfiguration conf = new CronConfiguration(); conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, - getDefaultFor(HeapDomain.class), - new Interval(), - getDefaultFor(TypeDomain.class)); + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new ValueEnvironment<>(new Interval()), + DefaultConfiguration.defaultTypeDomain()); conf.interproceduralAnalysis = new ContextBasedAnalysis<>(ContextInsensitiveToken.getSingleton()); conf.callGraph = new RTACallGraph(); conf.testDir = "interprocedural"; @@ -307,13 +283,13 @@ public void testInfiniteRecursion1Insensitive() throws AnalysisSetupException { } @Test - public void testFactorialFullStack() throws AnalysisSetupException { + public void testFactorialFullStack() { CronConfiguration conf = new CronConfiguration(); conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, - getDefaultFor(HeapDomain.class), - new Interval(), - getDefaultFor(TypeDomain.class)); + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new ValueEnvironment<>(new Interval()), + DefaultConfiguration.defaultTypeDomain()); conf.interproceduralAnalysis = new ContextBasedAnalysis<>(FullStackToken.getSingleton()); conf.callGraph = new RTACallGraph(); conf.testDir = "interprocedural"; @@ -323,13 +299,13 @@ public void testFactorialFullStack() throws AnalysisSetupException { } @Test - public void testFactorialKDepth() throws AnalysisSetupException { + public void testFactorialKDepth() { CronConfiguration conf = new CronConfiguration(); conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, - getDefaultFor(HeapDomain.class), - new Interval(), - getDefaultFor(TypeDomain.class)); + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new ValueEnvironment<>(new Interval()), + DefaultConfiguration.defaultTypeDomain()); conf.interproceduralAnalysis = new ContextBasedAnalysis<>(KDepthToken.getSingleton(5)); conf.callGraph = new RTACallGraph(); conf.testDir = "interprocedural"; @@ -339,13 +315,13 @@ public void testFactorialKDepth() throws AnalysisSetupException { } @Test - public void testFactorialLast() throws AnalysisSetupException { + public void testFactorialLast() { CronConfiguration conf = new CronConfiguration(); conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, - getDefaultFor(HeapDomain.class), - new Interval(), - getDefaultFor(TypeDomain.class)); + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new ValueEnvironment<>(new Interval()), + DefaultConfiguration.defaultTypeDomain()); conf.interproceduralAnalysis = new ContextBasedAnalysis<>(LastCallToken.getSingleton()); conf.callGraph = new RTACallGraph(); conf.testDir = "interprocedural"; @@ -355,13 +331,13 @@ public void testFactorialLast() throws AnalysisSetupException { } @Test - public void testFactorialInsensitive() throws AnalysisSetupException { + public void testFactorialInsensitive() { CronConfiguration conf = new CronConfiguration(); conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, - getDefaultFor(HeapDomain.class), - new Interval(), - getDefaultFor(TypeDomain.class)); + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new ValueEnvironment<>(new Interval()), + DefaultConfiguration.defaultTypeDomain()); conf.interproceduralAnalysis = new ContextBasedAnalysis<>(ContextInsensitiveToken.getSingleton()); conf.callGraph = new RTACallGraph(); conf.testDir = "interprocedural"; @@ -371,13 +347,13 @@ public void testFactorialInsensitive() throws AnalysisSetupException { } @Test - public void testFactorialInterleavedFullStack() throws AnalysisSetupException { + public void testFactorialInterleavedFullStack() { CronConfiguration conf = new CronConfiguration(); conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, - getDefaultFor(HeapDomain.class), - new Interval(), - getDefaultFor(TypeDomain.class)); + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new ValueEnvironment<>(new Interval()), + DefaultConfiguration.defaultTypeDomain()); conf.interproceduralAnalysis = new ContextBasedAnalysis<>(FullStackToken.getSingleton()); conf.callGraph = new RTACallGraph(); conf.testDir = "interprocedural"; @@ -387,13 +363,13 @@ public void testFactorialInterleavedFullStack() throws AnalysisSetupException { } @Test - public void testFactorialInterleavedKDepth() throws AnalysisSetupException { + public void testFactorialInterleavedKDepth() { CronConfiguration conf = new CronConfiguration(); conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, - getDefaultFor(HeapDomain.class), - new Interval(), - getDefaultFor(TypeDomain.class)); + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new ValueEnvironment<>(new Interval()), + DefaultConfiguration.defaultTypeDomain()); conf.interproceduralAnalysis = new ContextBasedAnalysis<>(KDepthToken.getSingleton(5)); conf.callGraph = new RTACallGraph(); conf.testDir = "interprocedural"; @@ -403,13 +379,13 @@ public void testFactorialInterleavedKDepth() throws AnalysisSetupException { } @Test - public void testFactorialInterleavedLast() throws AnalysisSetupException { + public void testFactorialInterleavedLast() { CronConfiguration conf = new CronConfiguration(); conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, - getDefaultFor(HeapDomain.class), - new Interval(), - getDefaultFor(TypeDomain.class)); + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new ValueEnvironment<>(new Interval()), + DefaultConfiguration.defaultTypeDomain()); conf.interproceduralAnalysis = new ContextBasedAnalysis<>(LastCallToken.getSingleton()); conf.callGraph = new RTACallGraph(); conf.testDir = "interprocedural"; @@ -419,13 +395,13 @@ public void testFactorialInterleavedLast() throws AnalysisSetupException { } @Test - public void testFactorialInterleavedInsensitive() throws AnalysisSetupException { + public void testFactorialInterleavedInsensitive() { CronConfiguration conf = new CronConfiguration(); conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, - getDefaultFor(HeapDomain.class), - new Interval(), - getDefaultFor(TypeDomain.class)); + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new ValueEnvironment<>(new Interval()), + DefaultConfiguration.defaultTypeDomain()); conf.interproceduralAnalysis = new ContextBasedAnalysis<>(ContextInsensitiveToken.getSingleton()); conf.callGraph = new RTACallGraph(); conf.testDir = "interprocedural"; @@ -435,13 +411,13 @@ public void testFactorialInterleavedInsensitive() throws AnalysisSetupException } @Test - public void testTwoRecursionsFullStack() throws AnalysisSetupException { + public void testTwoRecursionsFullStack() { CronConfiguration conf = new CronConfiguration(); conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, - getDefaultFor(HeapDomain.class), - new Interval(), - getDefaultFor(TypeDomain.class)); + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new ValueEnvironment<>(new Interval()), + DefaultConfiguration.defaultTypeDomain()); conf.interproceduralAnalysis = new ContextBasedAnalysis<>(FullStackToken.getSingleton()); conf.callGraph = new RTACallGraph(); conf.testDir = "interprocedural"; @@ -451,13 +427,13 @@ public void testTwoRecursionsFullStack() throws AnalysisSetupException { } @Test - public void testTwoRecursionsKDepth() throws AnalysisSetupException { + public void testTwoRecursionsKDepth() { CronConfiguration conf = new CronConfiguration(); conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, - getDefaultFor(HeapDomain.class), - new Interval(), - getDefaultFor(TypeDomain.class)); + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new ValueEnvironment<>(new Interval()), + DefaultConfiguration.defaultTypeDomain()); conf.interproceduralAnalysis = new ContextBasedAnalysis<>(KDepthToken.getSingleton(5)); conf.callGraph = new RTACallGraph(); conf.testDir = "interprocedural"; @@ -467,13 +443,13 @@ public void testTwoRecursionsKDepth() throws AnalysisSetupException { } @Test - public void testTwoRecursionsLast() throws AnalysisSetupException { + public void testTwoRecursionsLast() { CronConfiguration conf = new CronConfiguration(); conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, - getDefaultFor(HeapDomain.class), - new Interval(), - getDefaultFor(TypeDomain.class)); + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new ValueEnvironment<>(new Interval()), + DefaultConfiguration.defaultTypeDomain()); conf.interproceduralAnalysis = new ContextBasedAnalysis<>(LastCallToken.getSingleton()); conf.callGraph = new RTACallGraph(); conf.testDir = "interprocedural"; @@ -483,13 +459,13 @@ public void testTwoRecursionsLast() throws AnalysisSetupException { } @Test - public void testTwoRecursionsInsensitive() throws AnalysisSetupException { + public void testTwoRecursionsInsensitive() { CronConfiguration conf = new CronConfiguration(); conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, - getDefaultFor(HeapDomain.class), - new Interval(), - getDefaultFor(TypeDomain.class)); + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new ValueEnvironment<>(new Interval()), + DefaultConfiguration.defaultTypeDomain()); conf.interproceduralAnalysis = new ContextBasedAnalysis<>(ContextInsensitiveToken.getSingleton()); conf.callGraph = new RTACallGraph(); conf.testDir = "interprocedural"; @@ -499,13 +475,13 @@ public void testTwoRecursionsInsensitive() throws AnalysisSetupException { } @Test - public void testNestedRecursionsFullStack() throws AnalysisSetupException { + public void testNestedRecursionsFullStack() { CronConfiguration conf = new CronConfiguration(); conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, - getDefaultFor(HeapDomain.class), - new Interval(), - getDefaultFor(TypeDomain.class)); + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new ValueEnvironment<>(new Interval()), + DefaultConfiguration.defaultTypeDomain()); conf.interproceduralAnalysis = new ContextBasedAnalysis<>(FullStackToken.getSingleton()); conf.callGraph = new RTACallGraph(); conf.testDir = "interprocedural"; @@ -515,13 +491,13 @@ public void testNestedRecursionsFullStack() throws AnalysisSetupException { } @Test - public void testNestedRecursionsKDepth() throws AnalysisSetupException { + public void testNestedRecursionsKDepth() { CronConfiguration conf = new CronConfiguration(); conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, - getDefaultFor(HeapDomain.class), - new Interval(), - getDefaultFor(TypeDomain.class)); + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new ValueEnvironment<>(new Interval()), + DefaultConfiguration.defaultTypeDomain()); conf.interproceduralAnalysis = new ContextBasedAnalysis<>(KDepthToken.getSingleton(5)); conf.callGraph = new RTACallGraph(); conf.testDir = "interprocedural"; @@ -531,13 +507,13 @@ public void testNestedRecursionsKDepth() throws AnalysisSetupException { } @Test - public void testNestedRecursionsLast() throws AnalysisSetupException { + public void testNestedRecursionsLast() { CronConfiguration conf = new CronConfiguration(); conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, - getDefaultFor(HeapDomain.class), - new Interval(), - getDefaultFor(TypeDomain.class)); + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new ValueEnvironment<>(new Interval()), + DefaultConfiguration.defaultTypeDomain()); conf.interproceduralAnalysis = new ContextBasedAnalysis<>(LastCallToken.getSingleton()); conf.callGraph = new RTACallGraph(); conf.testDir = "interprocedural"; @@ -547,13 +523,13 @@ public void testNestedRecursionsLast() throws AnalysisSetupException { } @Test - public void testNestedRecursionsInsensitive() throws AnalysisSetupException { + public void testNestedRecursionsInsensitive() { CronConfiguration conf = new CronConfiguration(); conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, - getDefaultFor(HeapDomain.class), - new Interval(), - getDefaultFor(TypeDomain.class)); + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new ValueEnvironment<>(new Interval()), + DefaultConfiguration.defaultTypeDomain()); conf.interproceduralAnalysis = new ContextBasedAnalysis<>(ContextInsensitiveToken.getSingleton()); conf.callGraph = new RTACallGraph(); conf.testDir = "interprocedural"; @@ -563,13 +539,13 @@ public void testNestedRecursionsInsensitive() throws AnalysisSetupException { } @Test - public void testUnreachableBaseCaseFullStack() throws AnalysisSetupException { + public void testUnreachableBaseCaseFullStack() { CronConfiguration conf = new CronConfiguration(); conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, - getDefaultFor(HeapDomain.class), - new Interval(), - getDefaultFor(TypeDomain.class)); + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new ValueEnvironment<>(new Interval()), + DefaultConfiguration.defaultTypeDomain()); conf.interproceduralAnalysis = new ContextBasedAnalysis<>(FullStackToken.getSingleton()); conf.callGraph = new RTACallGraph(); conf.testDir = "interprocedural"; @@ -579,13 +555,13 @@ public void testUnreachableBaseCaseFullStack() throws AnalysisSetupException { } @Test - public void testUnreachableBaseCaseKDepth() throws AnalysisSetupException { + public void testUnreachableBaseCaseKDepth() { CronConfiguration conf = new CronConfiguration(); conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, - getDefaultFor(HeapDomain.class), - new Interval(), - getDefaultFor(TypeDomain.class)); + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new ValueEnvironment<>(new Interval()), + DefaultConfiguration.defaultTypeDomain()); conf.interproceduralAnalysis = new ContextBasedAnalysis<>(KDepthToken.getSingleton(5)); conf.callGraph = new RTACallGraph(); conf.testDir = "interprocedural"; @@ -595,13 +571,13 @@ public void testUnreachableBaseCaseKDepth() throws AnalysisSetupException { } @Test - public void testUnreachableBaseCaseLast() throws AnalysisSetupException { + public void testUnreachableBaseCaseLast() { CronConfiguration conf = new CronConfiguration(); conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, - getDefaultFor(HeapDomain.class), - new Interval(), - getDefaultFor(TypeDomain.class)); + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new ValueEnvironment<>(new Interval()), + DefaultConfiguration.defaultTypeDomain()); conf.interproceduralAnalysis = new ContextBasedAnalysis<>(LastCallToken.getSingleton()); conf.callGraph = new RTACallGraph(); conf.testDir = "interprocedural"; @@ -611,13 +587,13 @@ public void testUnreachableBaseCaseLast() throws AnalysisSetupException { } @Test - public void testUnreachableBaseCaseInsensitive() throws AnalysisSetupException { + public void testUnreachableBaseCaseInsensitive() { CronConfiguration conf = new CronConfiguration(); conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, - getDefaultFor(HeapDomain.class), - new Interval(), - getDefaultFor(TypeDomain.class)); + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new ValueEnvironment<>(new Interval()), + DefaultConfiguration.defaultTypeDomain()); conf.interproceduralAnalysis = new ContextBasedAnalysis<>(ContextInsensitiveToken.getSingleton()); conf.callGraph = new RTACallGraph(); conf.testDir = "interprocedural"; diff --git a/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/StringAnalysesTest.java b/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/StringAnalysesTest.java new file mode 100644 index 000000000..c484e8757 --- /dev/null +++ b/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/StringAnalysesTest.java @@ -0,0 +1,103 @@ +package it.unive.lisa.cron; + +import it.unive.lisa.AnalysisTestExecutor; +import it.unive.lisa.CronConfiguration; +import it.unive.lisa.DefaultConfiguration; +import it.unive.lisa.analysis.nonrelational.value.ValueEnvironment; +import it.unive.lisa.analysis.string.CharInclusion; +import it.unive.lisa.analysis.string.Prefix; +import it.unive.lisa.analysis.string.Suffix; +import it.unive.lisa.analysis.string.bricks.Bricks; +import it.unive.lisa.analysis.string.fsa.FSA; +import it.unive.lisa.analysis.string.tarsis.Tarsis; +import org.junit.Test; + +public class StringAnalysesTest extends AnalysisTestExecutor { + + @Test + public void testPrefix() { + CronConfiguration conf = new CronConfiguration(); + conf.serializeResults = true; + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new ValueEnvironment<>(new Prefix()), + DefaultConfiguration.defaultTypeDomain()); + conf.testDir = "prefix"; + conf.programFile = "program.imp"; + perform(conf); + } + + @Test + public void testSuffix() { + CronConfiguration conf = new CronConfiguration(); + conf.serializeResults = true; + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new ValueEnvironment<>(new Suffix()), + DefaultConfiguration.defaultTypeDomain()); + conf.testDir = "suffix"; + conf.programFile = "program.imp"; + perform(conf); + } + + @Test + public void testCharInclusion() { + CronConfiguration conf = new CronConfiguration(); + conf.serializeResults = true; + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new ValueEnvironment<>(new CharInclusion()), + DefaultConfiguration.defaultTypeDomain()); + conf.testDir = "char-inclusion"; + conf.programFile = "program.imp"; + perform(conf); + } + + @Test + public void testBricks() { + CronConfiguration conf = new CronConfiguration(); + conf.serializeResults = true; + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new ValueEnvironment<>(new Bricks()), + DefaultConfiguration.defaultTypeDomain()); + conf.testDir = "bricks"; + conf.programFile = "program.imp"; + // we disable optimized test because of bricks normalization: without + // optimization, loops that get iterated more than once will have + // poststates of instructions within them built with at least one lub + // invocation between the different iterations, and that will invoke the + // normalization algorithm. Optimized run instead will not iterate + // multiple times, and poststates will be the plain ones returned by + // abstract transformers. Even if they are semantically equivalent, + // comparisons will fail nonetheless + conf.compareWithOptimization = false; + perform(conf); + } + + @Test + public void testFSA() { + CronConfiguration conf = new CronConfiguration(); + conf.serializeResults = true; + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new ValueEnvironment<>(new FSA()), + DefaultConfiguration.defaultTypeDomain()); + conf.testDir = "fsa"; + conf.programFile = "program.imp"; + perform(conf); + } + + @Test + public void testTarsis() { + CronConfiguration conf = new CronConfiguration(); + conf.serializeResults = true; + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + new ValueEnvironment<>(new Tarsis()), + DefaultConfiguration.defaultTypeDomain()); + conf.testDir = "tarsis"; + conf.programFile = "program.imp"; + perform(conf); + } +} diff --git a/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/TracePartitioningTest.java b/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/TracePartitioningTest.java new file mode 100644 index 000000000..78ab4cffc --- /dev/null +++ b/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/TracePartitioningTest.java @@ -0,0 +1,23 @@ +package it.unive.lisa.cron; + +import it.unive.lisa.AnalysisTestExecutor; +import it.unive.lisa.CronConfiguration; +import it.unive.lisa.DefaultConfiguration; +import it.unive.lisa.analysis.traces.TracePartitioning; +import org.junit.Test; + +public class TracePartitioningTest extends AnalysisTestExecutor { + + @Test + public void testTracePartitioning() { + CronConfiguration conf = new CronConfiguration(); + conf.abstractState = new TracePartitioning<>(DefaultConfiguration.defaultAbstractState()); + conf.serializeResults = true; + int prev = TracePartitioning.MAX_LOOP_ITERATIONS; + TracePartitioning.MAX_LOOP_ITERATIONS = 3; + conf.testDir = "traces"; + conf.programFile = "traces.imp"; + perform(conf); + TracePartitioning.MAX_LOOP_ITERATIONS = prev; + } +} diff --git a/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/typeInference/TypesCollectionTest.java b/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/TypesCollectionTest.java similarity index 51% rename from lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/typeInference/TypesCollectionTest.java rename to lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/TypesCollectionTest.java index 8f8901f3f..5ea2d536c 100644 --- a/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/typeInference/TypesCollectionTest.java +++ b/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/TypesCollectionTest.java @@ -1,25 +1,20 @@ -package it.unive.lisa.cron.typeInference; +package it.unive.lisa.cron; -import static it.unive.lisa.LiSAFactory.getDefaultFor; - -import it.unive.lisa.AnalysisSetupException; import it.unive.lisa.AnalysisTestExecutor; import it.unive.lisa.CronConfiguration; -import it.unive.lisa.analysis.AbstractState; -import it.unive.lisa.analysis.heap.HeapDomain; +import it.unive.lisa.DefaultConfiguration; import it.unive.lisa.analysis.nonrelational.value.TypeEnvironment; import it.unive.lisa.analysis.types.InferredTypes; -import it.unive.lisa.analysis.value.ValueDomain; import org.junit.Test; public class TypesCollectionTest extends AnalysisTestExecutor { @Test - public void testTypesCollection() throws AnalysisSetupException { + public void testTypesCollection() { CronConfiguration conf = new CronConfiguration(); conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, - getDefaultFor(HeapDomain.class), - getDefaultFor(ValueDomain.class), + conf.abstractState = DefaultConfiguration.simpleState( + DefaultConfiguration.defaultHeapDomain(), + DefaultConfiguration.defaultValueDomain(), new TypeEnvironment<>(new InferredTypes())); conf.testDir = "type-inference"; conf.programFile = "program.imp"; diff --git a/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/visualization/VisualizationTest.java b/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/VisualizationTest.java similarity index 72% rename from lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/visualization/VisualizationTest.java rename to lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/VisualizationTest.java index 9b21fbf12..cd9ae857e 100644 --- a/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/visualization/VisualizationTest.java +++ b/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/VisualizationTest.java @@ -1,15 +1,10 @@ -package it.unive.lisa.cron.visualization; +package it.unive.lisa.cron; -import static it.unive.lisa.LiSAFactory.getDefaultFor; import static org.junit.Assert.assertTrue; -import it.unive.lisa.AnalysisSetupException; import it.unive.lisa.AnalysisTestExecutor; import it.unive.lisa.CronConfiguration; -import it.unive.lisa.analysis.AbstractState; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; +import it.unive.lisa.DefaultConfiguration; import it.unive.lisa.conf.LiSAConfiguration.GraphType; import it.unive.lisa.interprocedural.callgraph.RTACallGraph; import it.unive.lisa.interprocedural.context.ContextBasedAnalysis; @@ -21,12 +16,9 @@ public class VisualizationTest extends AnalysisTestExecutor { - private static CronConfiguration config() throws AnalysisSetupException { + private static CronConfiguration config() { CronConfiguration conf = new CronConfiguration(); - conf.abstractState = getDefaultFor(AbstractState.class, - getDefaultFor(HeapDomain.class), - getDefaultFor(ValueDomain.class), - getDefaultFor(TypeDomain.class)); + conf.abstractState = DefaultConfiguration.defaultAbstractState(); conf.interproceduralAnalysis = new ContextBasedAnalysis<>(FullStackToken.getSingleton()); conf.callGraph = new RTACallGraph(); return conf; @@ -50,7 +42,7 @@ public static void ensureAllTested() { } @Test - public void testInputSerialization() throws AnalysisSetupException { + public void testInputSerialization() { CronConfiguration conf = config(); conf.serializeInputs = true; conf.testDir = "visualization"; @@ -60,7 +52,7 @@ public void testInputSerialization() throws AnalysisSetupException { } @Test - public void testDOT() throws AnalysisSetupException { + public void testDOT() { CronConfiguration conf = config(); conf.analysisGraphs = GraphType.DOT; conf.testDir = "visualization"; @@ -70,7 +62,7 @@ public void testDOT() throws AnalysisSetupException { } @Test - public void testGRAPHML() throws AnalysisSetupException { + public void testGRAPHML() { CronConfiguration conf = config(); conf.analysisGraphs = GraphType.GRAPHML; conf.testDir = "visualization"; @@ -80,7 +72,7 @@ public void testGRAPHML() throws AnalysisSetupException { } @Test - public void testGRAPHML_WITH_SUBNODES() throws AnalysisSetupException { + public void testGRAPHML_WITH_SUBNODES() { CronConfiguration conf = config(); conf.analysisGraphs = GraphType.GRAPHML_WITH_SUBNODES; conf.testDir = "visualization"; @@ -90,7 +82,7 @@ public void testGRAPHML_WITH_SUBNODES() throws AnalysisSetupException { } @Test - public void testHTML() throws AnalysisSetupException { + public void testHTML() { CronConfiguration conf = config(); conf.analysisGraphs = GraphType.HTML; conf.testDir = "visualization"; @@ -100,7 +92,7 @@ public void testHTML() throws AnalysisSetupException { } @Test - public void testHTML_WITH_SUBNODES() throws AnalysisSetupException { + public void testHTML_WITH_SUBNODES() { CronConfiguration conf = config(); conf.analysisGraphs = GraphType.HTML_WITH_SUBNODES; conf.testDir = "visualization"; diff --git a/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/dataflow/AvailableExpressionsTest.java b/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/dataflow/AvailableExpressionsTest.java deleted file mode 100644 index 76a0dfbd0..000000000 --- a/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/dataflow/AvailableExpressionsTest.java +++ /dev/null @@ -1,28 +0,0 @@ -package it.unive.lisa.cron.dataflow; - -import static it.unive.lisa.LiSAFactory.getDefaultFor; - -import it.unive.lisa.AnalysisSetupException; -import it.unive.lisa.AnalysisTestExecutor; -import it.unive.lisa.CronConfiguration; -import it.unive.lisa.analysis.AbstractState; -import it.unive.lisa.analysis.dataflow.AvailableExpressions; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.value.TypeDomain; -import org.junit.Test; - -public class AvailableExpressionsTest extends AnalysisTestExecutor { - - @Test - public void testAvailableExpressions() throws AnalysisSetupException { - CronConfiguration conf = new CronConfiguration(); - conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, - getDefaultFor(HeapDomain.class), - new AvailableExpressions(), - getDefaultFor(TypeDomain.class)); - conf.testDir = "available-expressions"; - conf.programFile = "available-expressions.imp"; - perform(conf); - } -} \ No newline at end of file diff --git a/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/dataflow/ConstantPropagationDFTest.java b/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/dataflow/ConstantPropagationDFTest.java deleted file mode 100644 index 7ecbcf549..000000000 --- a/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/dataflow/ConstantPropagationDFTest.java +++ /dev/null @@ -1,28 +0,0 @@ -package it.unive.lisa.cron.dataflow; - -import static it.unive.lisa.LiSAFactory.getDefaultFor; - -import it.unive.lisa.AnalysisSetupException; -import it.unive.lisa.AnalysisTestExecutor; -import it.unive.lisa.CronConfiguration; -import it.unive.lisa.analysis.AbstractState; -import it.unive.lisa.analysis.dataflow.ConstantPropagation; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.value.TypeDomain; -import org.junit.Test; - -public class ConstantPropagationDFTest extends AnalysisTestExecutor { - - @Test - public void testConstantPropagation() throws AnalysisSetupException { - CronConfiguration conf = new CronConfiguration(); - conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, - getDefaultFor(HeapDomain.class), - new ConstantPropagation(), - getDefaultFor(TypeDomain.class)); - conf.testDir = "constant-propagation-df"; - conf.programFile = "constant-propagation.imp"; - perform(conf); - } -} diff --git a/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/dataflow/ReachingDefinitionsTest.java b/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/dataflow/ReachingDefinitionsTest.java deleted file mode 100644 index 0b5c6c684..000000000 --- a/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/dataflow/ReachingDefinitionsTest.java +++ /dev/null @@ -1,28 +0,0 @@ -package it.unive.lisa.cron.dataflow; - -import static it.unive.lisa.LiSAFactory.getDefaultFor; - -import it.unive.lisa.AnalysisSetupException; -import it.unive.lisa.AnalysisTestExecutor; -import it.unive.lisa.CronConfiguration; -import it.unive.lisa.analysis.AbstractState; -import it.unive.lisa.analysis.dataflow.ReachingDefinitions; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.value.TypeDomain; -import org.junit.Test; - -public class ReachingDefinitionsTest extends AnalysisTestExecutor { - - @Test - public void testReachingDefinitions() throws AnalysisSetupException { - CronConfiguration conf = new CronConfiguration(); - conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, - getDefaultFor(HeapDomain.class), - new ReachingDefinitions(), - getDefaultFor(TypeDomain.class)); - conf.testDir = "reaching-definitions"; - conf.programFile = "reaching-definitions.imp"; - perform(conf); - } -} \ No newline at end of file diff --git a/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/descending/DescendingTest.java b/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/descending/DescendingTest.java deleted file mode 100644 index 571eab392..000000000 --- a/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/descending/DescendingTest.java +++ /dev/null @@ -1,42 +0,0 @@ -package it.unive.lisa.cron.descending; - -import static it.unive.lisa.LiSAFactory.getDefaultFor; - -import it.unive.lisa.AnalysisSetupException; -import it.unive.lisa.AnalysisTestExecutor; -import it.unive.lisa.CronConfiguration; -import it.unive.lisa.analysis.AbstractState; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.nonrelational.value.TypeEnvironment; -import it.unive.lisa.analysis.numeric.Interval; -import it.unive.lisa.analysis.types.InferredTypes; -import it.unive.lisa.conf.LiSAConfiguration.DescendingPhaseType; -import org.junit.Test; - -public class DescendingTest extends AnalysisTestExecutor { - - @Test - public void testIntervalDescendingWidening() throws AnalysisSetupException { - CronConfiguration conf = new CronConfiguration(); - conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, getDefaultFor(HeapDomain.class), new Interval(), - new TypeEnvironment<>(new InferredTypes())); - conf.descendingPhaseType = DescendingPhaseType.NARROWING; - conf.testDir = "descending-widening"; - conf.programFile = "program.imp"; - perform(conf); - } - - @Test - public void testIntervalDescendingMaxGlb() throws AnalysisSetupException { - CronConfiguration conf = new CronConfiguration(); - conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, getDefaultFor(HeapDomain.class), new Interval(), - new TypeEnvironment<>(new InferredTypes())); - conf.descendingPhaseType = DescendingPhaseType.GLB; - conf.glbThreshold = 5; - conf.testDir = "descending-maxglb"; - conf.programFile = "program.imp"; - perform(conf); - } -} \ No newline at end of file diff --git a/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/heap/PointBasedHeapTest.java b/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/heap/PointBasedHeapTest.java deleted file mode 100644 index 39b6067ca..000000000 --- a/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/heap/PointBasedHeapTest.java +++ /dev/null @@ -1,42 +0,0 @@ -package it.unive.lisa.cron.heap; - -import static it.unive.lisa.LiSAFactory.getDefaultFor; - -import it.unive.lisa.AnalysisSetupException; -import it.unive.lisa.AnalysisTestExecutor; -import it.unive.lisa.CronConfiguration; -import it.unive.lisa.analysis.AbstractState; -import it.unive.lisa.analysis.heap.pointbased.FieldSensitivePointBasedHeap; -import it.unive.lisa.analysis.heap.pointbased.PointBasedHeap; -import it.unive.lisa.analysis.numeric.Interval; -import it.unive.lisa.analysis.value.TypeDomain; -import org.junit.Test; - -public class PointBasedHeapTest extends AnalysisTestExecutor { - - @Test - public void fieldInsensitivePointBasedHeapTest() throws AnalysisSetupException { - CronConfiguration conf = new CronConfiguration(); - conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, - new PointBasedHeap(), - new Interval(), - getDefaultFor(TypeDomain.class)); - conf.testDir = "heap/point-based-heap/field-insensitive"; - conf.programFile = "program.imp"; - perform(conf); - } - - @Test - public void fieldSensitivePointBasedHeapTest() throws AnalysisSetupException { - CronConfiguration conf = new CronConfiguration(); - conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, - new FieldSensitivePointBasedHeap(), - new Interval(), - getDefaultFor(TypeDomain.class)); - conf.testDir = "heap/point-based-heap/field-sensitive"; - conf.programFile = "program.imp"; - perform(conf); - } -} diff --git a/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/heap/TypeBasedHeapTest.java b/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/heap/TypeBasedHeapTest.java deleted file mode 100644 index 7fbea21c7..000000000 --- a/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/heap/TypeBasedHeapTest.java +++ /dev/null @@ -1,28 +0,0 @@ -package it.unive.lisa.cron.heap; - -import static it.unive.lisa.LiSAFactory.getDefaultFor; - -import it.unive.lisa.AnalysisSetupException; -import it.unive.lisa.AnalysisTestExecutor; -import it.unive.lisa.CronConfiguration; -import it.unive.lisa.analysis.AbstractState; -import it.unive.lisa.analysis.heap.TypeBasedHeap; -import it.unive.lisa.analysis.numeric.Interval; -import it.unive.lisa.analysis.value.TypeDomain; -import org.junit.Test; - -public class TypeBasedHeapTest extends AnalysisTestExecutor { - - @Test - public void testTypeBasedHeap() throws AnalysisSetupException { - CronConfiguration conf = new CronConfiguration(); - conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, - new TypeBasedHeap(), - new Interval(), - getDefaultFor(TypeDomain.class)); - conf.testDir = "heap/type-based-heap"; - conf.programFile = "program.imp"; - perform(conf); - } -} diff --git a/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/interprocedural/ContextSensitiveAnalysisTest.java b/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/interprocedural/ContextSensitiveAnalysisTest.java deleted file mode 100644 index 932fbed0f..000000000 --- a/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/interprocedural/ContextSensitiveAnalysisTest.java +++ /dev/null @@ -1,116 +0,0 @@ -package it.unive.lisa.cron.interprocedural; - -import static it.unive.lisa.LiSAFactory.getDefaultFor; - -import it.unive.lisa.AnalysisSetupException; -import it.unive.lisa.AnalysisTestExecutor; -import it.unive.lisa.CronConfiguration; -import it.unive.lisa.analysis.AbstractState; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.heap.pointbased.PointBasedHeap; -import it.unive.lisa.analysis.numeric.Interval; -import it.unive.lisa.analysis.numeric.Sign; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.interprocedural.callgraph.RTACallGraph; -import it.unive.lisa.interprocedural.context.ContextBasedAnalysis; -import it.unive.lisa.interprocedural.context.FullStackToken; -import org.junit.Test; - -public class ContextSensitiveAnalysisTest extends AnalysisTestExecutor { - - @Test - public void testRTAContextSensitive1() throws AnalysisSetupException { - CronConfiguration conf = new CronConfiguration(); - conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, - getDefaultFor(HeapDomain.class), - new Sign(), - getDefaultFor(TypeDomain.class)); - conf.interproceduralAnalysis = new ContextBasedAnalysis<>(); - conf.callGraph = new RTACallGraph(); - conf.testDir = "interprocedural"; - conf.testSubDir = "RTAContextSensitive1"; - conf.programFile = "programContextSensitive1.imp"; - perform(conf); - } - - @Test - public void testRTAContextSensitive2() throws AnalysisSetupException { - CronConfiguration conf = new CronConfiguration(); - conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, - getDefaultFor(HeapDomain.class), - new Sign(), - getDefaultFor(TypeDomain.class)); - conf.interproceduralAnalysis = new ContextBasedAnalysis<>(); - conf.callGraph = new RTACallGraph(); - conf.testDir = "interprocedural"; - conf.testSubDir = "RTAContextSensitive2"; - conf.programFile = "programContextSensitive2.imp"; - perform(conf); - } - - @Test - public void testRTAContextSensitive3() throws AnalysisSetupException { - CronConfiguration conf = new CronConfiguration(); - conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, - getDefaultFor(HeapDomain.class), - new Sign(), - getDefaultFor(TypeDomain.class)); - conf.interproceduralAnalysis = new ContextBasedAnalysis<>(); - conf.callGraph = new RTACallGraph(); - conf.testDir = "interprocedural"; - conf.testSubDir = "RTAContextSensitive3"; - conf.programFile = "programContextSensitive3.imp"; - perform(conf); - } - - @Test - public void testRTAContextSensitive4() throws AnalysisSetupException { - CronConfiguration conf = new CronConfiguration(); - conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, - getDefaultFor(HeapDomain.class), - new Sign(), - getDefaultFor(TypeDomain.class)); - conf.interproceduralAnalysis = new ContextBasedAnalysis<>(FullStackToken.getSingleton()); - conf.callGraph = new RTACallGraph(); - conf.testDir = "interprocedural"; - conf.testSubDir = "RTAContextSensitive4"; - conf.programFile = "programContextSensitive3.imp"; - perform(conf); - } - - @Test - public void testRTAContextSensitive5() throws AnalysisSetupException { - CronConfiguration conf = new CronConfiguration(); - conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, - new PointBasedHeap(), - new Interval(), - getDefaultFor(TypeDomain.class)); - conf.interproceduralAnalysis = new ContextBasedAnalysis<>(); - conf.callGraph = new RTACallGraph(); - conf.testDir = "interprocedural"; - conf.testSubDir = "RTAContextSensitive5"; - conf.programFile = "programContextSensitive4.imp"; - perform(conf); - } - - @Test - public void testRTAContextSensitive6() throws AnalysisSetupException { - CronConfiguration conf = new CronConfiguration(); - conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, - new PointBasedHeap(), - new Interval(), - getDefaultFor(TypeDomain.class)); - conf.interproceduralAnalysis = new ContextBasedAnalysis<>(); - conf.callGraph = new RTACallGraph(); - conf.testDir = "interprocedural"; - conf.testSubDir = "RTAContextSensitive6"; - conf.programFile = "programContextSensitive5.imp"; - perform(conf); - } -} diff --git a/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/interprocedural/ModularWorstCaseAnalysisTest.java b/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/interprocedural/ModularWorstCaseAnalysisTest.java deleted file mode 100644 index de954a19a..000000000 --- a/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/interprocedural/ModularWorstCaseAnalysisTest.java +++ /dev/null @@ -1,50 +0,0 @@ -package it.unive.lisa.cron.interprocedural; - -import static it.unive.lisa.LiSAFactory.getDefaultFor; - -import it.unive.lisa.AnalysisSetupException; -import it.unive.lisa.AnalysisTestExecutor; -import it.unive.lisa.CronConfiguration; -import it.unive.lisa.analysis.AbstractState; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.numeric.Sign; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.interprocedural.ModularWorstCaseAnalysis; -import it.unive.lisa.interprocedural.callgraph.CHACallGraph; -import it.unive.lisa.interprocedural.callgraph.RTACallGraph; -import org.junit.Test; - -public class ModularWorstCaseAnalysisTest extends AnalysisTestExecutor { - - @Test - public void testCHACallGraph() throws AnalysisSetupException { - CronConfiguration conf = new CronConfiguration(); - conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, - getDefaultFor(HeapDomain.class), - new Sign(), - getDefaultFor(TypeDomain.class)); - conf.interproceduralAnalysis = new ModularWorstCaseAnalysis<>(); - conf.callGraph = new CHACallGraph(); - conf.testDir = "interprocedural"; - conf.testSubDir = "CHA"; - conf.programFile = "program.imp"; - perform(conf); - } - - @Test - public void testRTACallGraph() throws AnalysisSetupException { - CronConfiguration conf = new CronConfiguration(); - conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, - getDefaultFor(HeapDomain.class), - new Sign(), - getDefaultFor(TypeDomain.class)); - conf.interproceduralAnalysis = new ModularWorstCaseAnalysis<>(); - conf.callGraph = new RTACallGraph(); - conf.testDir = "interprocedural"; - conf.testSubDir = "RTA"; - conf.programFile = "program.imp"; - perform(conf); - } -} diff --git a/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/nonInterference/NonInterferenceTest.java b/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/nonInterference/NonInterferenceTest.java deleted file mode 100644 index 1edffaf4c..000000000 --- a/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/nonInterference/NonInterferenceTest.java +++ /dev/null @@ -1,143 +0,0 @@ -package it.unive.lisa.cron.nonInterference; - -import it.unive.lisa.AnalysisSetupException; -import it.unive.lisa.AnalysisTestExecutor; -import it.unive.lisa.CronConfiguration; -import it.unive.lisa.analysis.AnalysisState; -import it.unive.lisa.analysis.AnalyzedCFG; -import it.unive.lisa.analysis.SemanticException; -import it.unive.lisa.analysis.SimpleAbstractState; -import it.unive.lisa.analysis.heap.MonolithicHeap; -import it.unive.lisa.analysis.nonInterference.NonInterference; -import it.unive.lisa.analysis.nonrelational.inference.InferenceSystem; -import it.unive.lisa.analysis.nonrelational.value.TypeEnvironment; -import it.unive.lisa.analysis.types.InferredTypes; -import it.unive.lisa.checks.semantic.CheckToolWithAnalysisResults; -import it.unive.lisa.checks.semantic.SemanticCheck; -import it.unive.lisa.interprocedural.callgraph.RTACallGraph; -import it.unive.lisa.interprocedural.context.ContextBasedAnalysis; -import it.unive.lisa.interprocedural.context.FullStackToken; -import it.unive.lisa.program.cfg.CFG; -import it.unive.lisa.program.cfg.statement.Assignment; -import it.unive.lisa.program.cfg.statement.Expression; -import it.unive.lisa.program.cfg.statement.Statement; -import it.unive.lisa.symbolic.SymbolicExpression; -import it.unive.lisa.symbolic.value.ValueExpression; -import java.util.Collection; -import org.junit.Test; - -public class NonInterferenceTest extends AnalysisTestExecutor { - - @Test - public void testConfidentialityNI() throws AnalysisSetupException { - CronConfiguration conf = new CronConfiguration(); - conf.serializeResults = true; - conf.abstractState = new SimpleAbstractState<>( - new MonolithicHeap(), - new InferenceSystem<>(new NonInterference()), - new TypeEnvironment<>(new InferredTypes())); - conf.semanticChecks.add(new NICheck()); - conf.testDir = "non-interference/confidentiality"; - conf.programFile = "program.imp"; - conf.hotspots = st -> st instanceof Assignment - || (st instanceof Expression && ((Expression) st).getParentStatement() instanceof Assignment); - perform(conf); - } - - @Test - public void testIntegrityNI() throws AnalysisSetupException { - CronConfiguration conf = new CronConfiguration(); - conf.serializeResults = true; - conf.abstractState = new SimpleAbstractState<>( - new MonolithicHeap(), - new InferenceSystem<>(new NonInterference()), - new TypeEnvironment<>(new InferredTypes())); - conf.semanticChecks.add(new NICheck()); - conf.testDir = "non-interference/integrity"; - conf.programFile = "program.imp"; - conf.hotspots = st -> st instanceof Assignment - || (st instanceof Expression && ((Expression) st).getParentStatement() instanceof Assignment); - perform(conf); - } - - @Test - public void testDeclassification() throws AnalysisSetupException { - CronConfiguration conf = new CronConfiguration(); - conf.serializeResults = true; - conf.abstractState = new SimpleAbstractState<>( - new MonolithicHeap(), - new InferenceSystem<>(new NonInterference()), - new TypeEnvironment<>(new InferredTypes())); - conf.callGraph = new RTACallGraph(); - conf.interproceduralAnalysis = new ContextBasedAnalysis<>(FullStackToken.getSingleton()); - conf.semanticChecks.add(new NICheck()); - conf.testDir = "non-interference/interproc"; - conf.programFile = "program.imp"; - conf.hotspots = st -> st instanceof Assignment - || (st instanceof Expression && ((Expression) st).getParentStatement() instanceof Assignment); - perform(conf); - } - - private static class NICheck - implements SemanticCheck< - SimpleAbstractState, - TypeEnvironment>, - MonolithicHeap, - InferenceSystem, - TypeEnvironment> { - - @Override - @SuppressWarnings({ "unchecked" }) - public boolean visit( - CheckToolWithAnalysisResults< - SimpleAbstractState, - TypeEnvironment>, - MonolithicHeap, - InferenceSystem, - TypeEnvironment> tool, - CFG graph, Statement node) { - if (!(node instanceof Assignment)) - return true; - - Assignment assign = (Assignment) node; - Collection results = tool.getResultOf(graph); - - for (Object res : results) - try { - AnalyzedCFG result = (AnalyzedCFG) res; - AnalysisState post = result.getAnalysisStateAfter(assign); - InferenceSystem state = post.getDomainInstance(InferenceSystem.class); - AnalysisState postL = result.getAnalysisStateAfter(assign.getLeft()); - InferenceSystem left = postL.getDomainInstance(InferenceSystem.class); - AnalysisState postR = result.getAnalysisStateAfter(assign.getRight()); - InferenceSystem right = postR.getDomainInstance(InferenceSystem.class); - - for (SymbolicExpression l : postL.rewrite(postL.getComputedExpressions(), assign)) - for (SymbolicExpression r : postR.rewrite(postR.getComputedExpressions(), assign)) { - NonInterference ll = left.eval((ValueExpression) l, assign.getLeft()); - NonInterference rr = right.eval((ValueExpression) r, assign.getRight()); - - if (ll.isLowConfidentiality() && rr.isHighConfidentiality()) - tool.warnOn(assign, - "This assignment assigns a HIGH confidentiality value to a LOW confidentiality variable, thus violating non-interference"); - - if (ll.isLowConfidentiality() && state.getExecutionState().isHighConfidentiality()) - tool.warnOn(assign, - "This assignment, located in a HIGH confidentiality block, assigns a LOW confidentiality variable, thus violating non-interference"); - - if (ll.isHighIntegrity() && rr.isLowIntegrity()) - tool.warnOn(assign, - "This assignment assigns a LOW integrity value to a HIGH integrity variable, thus violating non-interference"); - - if (ll.isHighIntegrity() && state.getExecutionState().isLowIntegrity()) - tool.warnOn(assign, - "This assignment, located in a LOW integrity block, assigns a HIGH integrity variable, thus violating non-interference"); - } - } catch (SemanticException e) { - throw new RuntimeException(e); - } - - return true; - } - } -} diff --git a/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/numeric/NumericAnalysesTest.java b/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/numeric/NumericAnalysesTest.java deleted file mode 100644 index ca05c02f5..000000000 --- a/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/numeric/NumericAnalysesTest.java +++ /dev/null @@ -1,64 +0,0 @@ -package it.unive.lisa.cron.numeric; - -import static it.unive.lisa.LiSAFactory.getDefaultFor; - -import it.unive.lisa.AnalysisSetupException; -import it.unive.lisa.AnalysisTestExecutor; -import it.unive.lisa.CronConfiguration; -import it.unive.lisa.analysis.AbstractState; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.nonrelational.value.TypeEnvironment; -import it.unive.lisa.analysis.numeric.IntegerConstantPropagation; -import it.unive.lisa.analysis.numeric.Interval; -import it.unive.lisa.analysis.numeric.Parity; -import it.unive.lisa.analysis.numeric.Sign; -import it.unive.lisa.analysis.types.InferredTypes; -import org.junit.Test; - -public class NumericAnalysesTest extends AnalysisTestExecutor { - - @Test - public void testSign() throws AnalysisSetupException { - CronConfiguration conf = new CronConfiguration(); - conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, getDefaultFor(HeapDomain.class), new Sign(), - new TypeEnvironment<>(new InferredTypes())); - conf.testDir = "sign"; - conf.programFile = "program.imp"; - perform(conf); - } - - @Test - public void testParity() throws AnalysisSetupException { - CronConfiguration conf = new CronConfiguration(); - conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, getDefaultFor(HeapDomain.class), new Parity(), - new TypeEnvironment<>(new InferredTypes())); - conf.testDir = "parity"; - conf.programFile = "program.imp"; - perform(conf); - } - - @Test - public void testInterval() throws AnalysisSetupException { - CronConfiguration conf = new CronConfiguration(); - conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, getDefaultFor(HeapDomain.class), new Interval(), - new TypeEnvironment<>(new InferredTypes())); - conf.testDir = "interval"; - conf.programFile = "program.imp"; - perform(conf); - } - - @Test - public void testIntegerConstantPropagation() throws AnalysisSetupException { - CronConfiguration conf = new CronConfiguration(); - conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, getDefaultFor(HeapDomain.class), - new IntegerConstantPropagation(), - new TypeEnvironment<>(new InferredTypes())); - conf.testDir = "int-const"; - conf.programFile = "program.imp"; - perform(conf); - } -} diff --git a/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/string/BricksAnalysisTest.java b/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/string/BricksAnalysisTest.java deleted file mode 100644 index 5be4e8130..000000000 --- a/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/string/BricksAnalysisTest.java +++ /dev/null @@ -1,36 +0,0 @@ -package it.unive.lisa.cron.string; - -import static it.unive.lisa.LiSAFactory.getDefaultFor; - -import it.unive.lisa.AnalysisSetupException; -import it.unive.lisa.AnalysisTestExecutor; -import it.unive.lisa.CronConfiguration; -import it.unive.lisa.analysis.AbstractState; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.nonrelational.value.TypeEnvironment; -import it.unive.lisa.analysis.string.bricks.Bricks; -import it.unive.lisa.analysis.types.InferredTypes; -import org.junit.Test; - -public class BricksAnalysisTest extends AnalysisTestExecutor { - - @Test - public void testBricks() throws AnalysisSetupException { - CronConfiguration conf = new CronConfiguration(); - conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, getDefaultFor(HeapDomain.class), new Bricks(), - new TypeEnvironment<>(new InferredTypes())); - conf.testDir = "bricks"; - conf.programFile = "program.imp"; - // we disable optimized test because of bricks normalization: without - // optimization, loops that get iterated more than once will have - // poststates of instructions within them built with at least one lub - // invocation between the different iterations, and that will invoke the - // normalization algorithm. Optimized run instead will not iterate - // multiple times, and poststates will be the plain ones returned by - // abstract transformers. Even if they are semantically equivalent, - // comparisons will fail nonetheless - conf.compareWithOptimization = false; - perform(conf); - } -} \ No newline at end of file diff --git a/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/string/CharInclusionAnalysisTest.java b/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/string/CharInclusionAnalysisTest.java deleted file mode 100644 index 3d538a368..000000000 --- a/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/string/CharInclusionAnalysisTest.java +++ /dev/null @@ -1,27 +0,0 @@ -package it.unive.lisa.cron.string; - -import static it.unive.lisa.LiSAFactory.getDefaultFor; - -import it.unive.lisa.AnalysisSetupException; -import it.unive.lisa.AnalysisTestExecutor; -import it.unive.lisa.CronConfiguration; -import it.unive.lisa.analysis.AbstractState; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.nonrelational.value.TypeEnvironment; -import it.unive.lisa.analysis.string.CharInclusion; -import it.unive.lisa.analysis.types.InferredTypes; -import org.junit.Test; - -public class CharInclusionAnalysisTest extends AnalysisTestExecutor { - - @Test - public void testCharInclusion() throws AnalysisSetupException { - CronConfiguration conf = new CronConfiguration(); - conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, getDefaultFor(HeapDomain.class), new CharInclusion(), - new TypeEnvironment<>(new InferredTypes())); - conf.testDir = "char-inclusion"; - conf.programFile = "program.imp"; - perform(conf); - } -} \ No newline at end of file diff --git a/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/string/FSATest.java b/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/string/FSATest.java deleted file mode 100644 index 867d61fff..000000000 --- a/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/string/FSATest.java +++ /dev/null @@ -1,27 +0,0 @@ -package it.unive.lisa.cron.string; - -import static it.unive.lisa.LiSAFactory.getDefaultFor; - -import it.unive.lisa.AnalysisSetupException; -import it.unive.lisa.AnalysisTestExecutor; -import it.unive.lisa.CronConfiguration; -import it.unive.lisa.analysis.AbstractState; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.nonrelational.value.TypeEnvironment; -import it.unive.lisa.analysis.string.fsa.FSA; -import it.unive.lisa.analysis.types.InferredTypes; -import org.junit.Test; - -public class FSATest extends AnalysisTestExecutor { - - @Test - public void testFSA() throws AnalysisSetupException { - CronConfiguration conf = new CronConfiguration(); - conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, getDefaultFor(HeapDomain.class), new FSA(), - new TypeEnvironment<>(new InferredTypes())); - conf.testDir = "fsa"; - conf.programFile = "program.imp"; - perform(conf); - } -} diff --git a/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/string/PrefixAnalysisTest.java b/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/string/PrefixAnalysisTest.java deleted file mode 100644 index b06114194..000000000 --- a/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/string/PrefixAnalysisTest.java +++ /dev/null @@ -1,27 +0,0 @@ -package it.unive.lisa.cron.string; - -import static it.unive.lisa.LiSAFactory.getDefaultFor; - -import it.unive.lisa.AnalysisSetupException; -import it.unive.lisa.AnalysisTestExecutor; -import it.unive.lisa.CronConfiguration; -import it.unive.lisa.analysis.AbstractState; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.nonrelational.value.TypeEnvironment; -import it.unive.lisa.analysis.string.Prefix; -import it.unive.lisa.analysis.types.InferredTypes; -import org.junit.Test; - -public class PrefixAnalysisTest extends AnalysisTestExecutor { - - @Test - public void testPrefix() throws AnalysisSetupException { - CronConfiguration conf = new CronConfiguration(); - conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, getDefaultFor(HeapDomain.class), new Prefix(), - new TypeEnvironment<>(new InferredTypes())); - conf.testDir = "prefix"; - conf.programFile = "program.imp"; - perform(conf); - } -} diff --git a/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/string/SuffixAnalysisTest.java b/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/string/SuffixAnalysisTest.java deleted file mode 100644 index c727702dd..000000000 --- a/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/string/SuffixAnalysisTest.java +++ /dev/null @@ -1,27 +0,0 @@ -package it.unive.lisa.cron.string; - -import static it.unive.lisa.LiSAFactory.getDefaultFor; - -import it.unive.lisa.AnalysisSetupException; -import it.unive.lisa.AnalysisTestExecutor; -import it.unive.lisa.CronConfiguration; -import it.unive.lisa.analysis.AbstractState; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.nonrelational.value.TypeEnvironment; -import it.unive.lisa.analysis.string.Suffix; -import it.unive.lisa.analysis.types.InferredTypes; -import org.junit.Test; - -public class SuffixAnalysisTest extends AnalysisTestExecutor { - - @Test - public void testSuffix() throws AnalysisSetupException { - CronConfiguration conf = new CronConfiguration(); - conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, getDefaultFor(HeapDomain.class), new Suffix(), - new TypeEnvironment<>(new InferredTypes())); - conf.testDir = "suffix"; - conf.programFile = "program.imp"; - perform(conf); - } -} diff --git a/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/string/TarsisTest.java b/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/string/TarsisTest.java deleted file mode 100644 index b7bf1b602..000000000 --- a/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/string/TarsisTest.java +++ /dev/null @@ -1,28 +0,0 @@ -package it.unive.lisa.cron.string; - -import static it.unive.lisa.LiSAFactory.getDefaultFor; - -import it.unive.lisa.AnalysisSetupException; -import it.unive.lisa.AnalysisTestExecutor; -import it.unive.lisa.CronConfiguration; -import it.unive.lisa.analysis.AbstractState; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.nonrelational.value.TypeEnvironment; -import it.unive.lisa.analysis.string.tarsis.Tarsis; -import it.unive.lisa.analysis.types.InferredTypes; -import org.junit.Test; - -public class TarsisTest extends AnalysisTestExecutor { - - @Test - public void testTarsis() throws AnalysisSetupException { - CronConfiguration conf = new CronConfiguration(); - conf.serializeResults = true; - conf.abstractState = getDefaultFor(AbstractState.class, getDefaultFor(HeapDomain.class), - new Tarsis(), - new TypeEnvironment<>(new InferredTypes())); - conf.testDir = "tarsis"; - conf.programFile = "program.imp"; - perform(conf); - } -} diff --git a/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/taint/TaintAnalysesTest.java b/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/taint/TaintAnalysesTest.java deleted file mode 100644 index cdc172703..000000000 --- a/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/taint/TaintAnalysesTest.java +++ /dev/null @@ -1,142 +0,0 @@ -package it.unive.lisa.cron.taint; - -import it.unive.lisa.AnalysisSetupException; -import it.unive.lisa.AnalysisTestExecutor; -import it.unive.lisa.CronConfiguration; -import it.unive.lisa.LiSAFactory; -import it.unive.lisa.analysis.AbstractState; -import it.unive.lisa.analysis.AnalysisState; -import it.unive.lisa.analysis.AnalyzedCFG; -import it.unive.lisa.analysis.SemanticException; -import it.unive.lisa.analysis.SimpleAbstractState; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.heap.MonolithicHeap; -import it.unive.lisa.analysis.nonrelational.value.TypeEnvironment; -import it.unive.lisa.analysis.nonrelational.value.ValueEnvironment; -import it.unive.lisa.analysis.taint.BaseTaint; -import it.unive.lisa.analysis.taint.Taint; -import it.unive.lisa.analysis.taint.ThreeLevelsTaint; -import it.unive.lisa.analysis.types.InferredTypes; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.checks.semantic.CheckToolWithAnalysisResults; -import it.unive.lisa.checks.semantic.SemanticCheck; -import it.unive.lisa.interprocedural.ReturnTopPolicy; -import it.unive.lisa.interprocedural.callgraph.RTACallGraph; -import it.unive.lisa.interprocedural.context.ContextBasedAnalysis; -import it.unive.lisa.program.cfg.CFG; -import it.unive.lisa.program.cfg.CodeMember; -import it.unive.lisa.program.cfg.Parameter; -import it.unive.lisa.program.cfg.statement.Expression; -import it.unive.lisa.program.cfg.statement.Statement; -import it.unive.lisa.program.cfg.statement.call.CFGCall; -import it.unive.lisa.program.cfg.statement.call.Call; -import it.unive.lisa.program.cfg.statement.call.UnresolvedCall; -import it.unive.lisa.symbolic.SymbolicExpression; -import it.unive.lisa.symbolic.value.ValueExpression; -import org.junit.Test; - -public class TaintAnalysesTest extends AnalysisTestExecutor { - - @Test - public void testTaint() throws AnalysisSetupException { - CronConfiguration conf = new CronConfiguration(); - conf.abstractState = LiSAFactory.getDefaultFor(AbstractState.class, - LiSAFactory.getDefaultFor(HeapDomain.class), - new ValueEnvironment<>(new Taint()), - LiSAFactory.getDefaultFor(TypeDomain.class)); - conf.serializeResults = true; - conf.openCallPolicy = ReturnTopPolicy.INSTANCE; - conf.callGraph = new RTACallGraph(); - conf.interproceduralAnalysis = new ContextBasedAnalysis<>(); - conf.semanticChecks.add(new TaintCheck<>()); - conf.testDir = "taint"; - conf.testSubDir = "2val"; - conf.programFile = "taint.imp"; - conf.hotspots = st -> st instanceof Expression && ((Expression) st).getParentStatement() instanceof Call; - perform(conf); - } - - @Test - public void testThreeLevelsTaint() throws AnalysisSetupException { - CronConfiguration conf = new CronConfiguration(); - conf.abstractState = LiSAFactory.getDefaultFor(AbstractState.class, - LiSAFactory.getDefaultFor(HeapDomain.class), - new ValueEnvironment<>(new ThreeLevelsTaint()), - LiSAFactory.getDefaultFor(TypeDomain.class)); - conf.serializeResults = true; - conf.openCallPolicy = ReturnTopPolicy.INSTANCE; - conf.callGraph = new RTACallGraph(); - conf.interproceduralAnalysis = new ContextBasedAnalysis<>(); - conf.semanticChecks.add(new TaintCheck<>()); - conf.testDir = "taint"; - conf.testSubDir = "3val"; - conf.programFile = "taint.imp"; - conf.hotspots = st -> st instanceof Expression && ((Expression) st).getParentStatement() instanceof Call; - perform(conf); - } - - private static class TaintCheck> - implements SemanticCheck< - SimpleAbstractState, TypeEnvironment>, - MonolithicHeap, - ValueEnvironment, - TypeEnvironment> { - - @Override - public boolean visit( - CheckToolWithAnalysisResults< - SimpleAbstractState, TypeEnvironment>, - MonolithicHeap, - ValueEnvironment, - TypeEnvironment> tool, - CFG graph, Statement node) { - if (!(node instanceof UnresolvedCall)) - return true; - - UnresolvedCall call = (UnresolvedCall) node; - - try { - for (AnalyzedCFG< - SimpleAbstractState< - MonolithicHeap, - ValueEnvironment, - TypeEnvironment>, - MonolithicHeap, - ValueEnvironment, - TypeEnvironment> result : tool.getResultOf(call.getCFG())) { - - Call resolved = (Call) tool.getResolvedVersion(call, result); - if (resolved instanceof CFGCall) { - CFGCall cfg = (CFGCall) resolved; - for (CodeMember n : cfg.getTargets()) { - Parameter[] parameters = n.getDescriptor().getFormals(); - for (int i = 0; i < parameters.length; i++) - if (parameters[i].getAnnotations().contains(BaseTaint.CLEAN_MATCHER)) { - AnalysisState, - TypeEnvironment>, - MonolithicHeap, ValueEnvironment, - TypeEnvironment> post = result - .getAnalysisStateAfter(call.getParameters()[i]); - for (SymbolicExpression e : post.rewrite(post.getComputedExpressions(), - node)) { - T stack = post - .getState() - .getValueState() - .eval((ValueExpression) e, node); - if (stack.isAlwaysTainted()) - tool.warnOn(call, "Parameter " + i + " is always tainted"); - else if (stack.isPossiblyTainted()) - tool.warnOn(call, "Parameter " + i + " is possibly tainted"); - } - } - } - } - } - } catch (SemanticException e1) { - e1.printStackTrace(); - } - - return true; - } - } -} diff --git a/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/traces/TracePartitioningTest.java b/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/traces/TracePartitioningTest.java deleted file mode 100644 index eb4ae654b..000000000 --- a/lisa/lisa-analyses/src/test/java/it/unive/lisa/cron/traces/TracePartitioningTest.java +++ /dev/null @@ -1,33 +0,0 @@ -package it.unive.lisa.cron.traces; - -import it.unive.lisa.AnalysisSetupException; -import it.unive.lisa.AnalysisTestExecutor; -import it.unive.lisa.CronConfiguration; -import it.unive.lisa.LiSAFactory; -import it.unive.lisa.analysis.SimpleAbstractState; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.nonrelational.value.ValueEnvironment; -import it.unive.lisa.analysis.numeric.Interval; -import it.unive.lisa.analysis.traces.TracePartitioning; -import it.unive.lisa.analysis.value.TypeDomain; -import org.junit.Test; - -public class TracePartitioningTest extends AnalysisTestExecutor { - - @Test - public void testTracePartitioning() throws AnalysisSetupException { - CronConfiguration conf = new CronConfiguration(); - conf.abstractState = new TracePartitioning<>( - new SimpleAbstractState<>( - LiSAFactory.getDefaultFor(HeapDomain.class), - new ValueEnvironment<>(new Interval()), - LiSAFactory.getDefaultFor(TypeDomain.class))); - conf.serializeResults = true; - int prev = TracePartitioning.MAX_LOOP_ITERATIONS; - TracePartitioning.MAX_LOOP_ITERATIONS = 3; - conf.testDir = "traces"; - conf.programFile = "traces.imp"; - perform(conf); - TracePartitioning.MAX_LOOP_ITERATIONS = prev; - } -} diff --git a/lisa/lisa-analyses/src/test/java/it/unive/lisa/program/cfg/CFGFixpointTest.java b/lisa/lisa-analyses/src/test/java/it/unive/lisa/program/cfg/CFGFixpointTest.java index 4407f547b..38357b1da 100644 --- a/lisa/lisa-analyses/src/test/java/it/unive/lisa/program/cfg/CFGFixpointTest.java +++ b/lisa/lisa-analyses/src/test/java/it/unive/lisa/program/cfg/CFGFixpointTest.java @@ -11,7 +11,6 @@ import it.unive.lisa.analysis.nonrelational.value.TypeEnvironment; import it.unive.lisa.analysis.nonrelational.value.ValueEnvironment; import it.unive.lisa.analysis.numeric.Sign; -import it.unive.lisa.analysis.symbols.SymbolAliasing; import it.unive.lisa.analysis.types.InferredTypes; import it.unive.lisa.conf.FixpointConfiguration; import it.unive.lisa.conf.LiSAConfiguration; @@ -51,16 +50,13 @@ public static void init() { } private ModularWorstCaseAnalysis< - SimpleAbstractState, TypeEnvironment>, - MonolithicHeap, - ValueEnvironment, - TypeEnvironment> mkAnalysis(Program p) - throws InterproceduralAnalysisException, CallGraphConstructionException { + SimpleAbstractState, TypeEnvironment>> mkAnalysis( + Program p) + throws InterproceduralAnalysisException, + CallGraphConstructionException { ModularWorstCaseAnalysis< - SimpleAbstractState, TypeEnvironment>, - MonolithicHeap, - ValueEnvironment, - TypeEnvironment> analysis = new ModularWorstCaseAnalysis<>(); + SimpleAbstractState, + TypeEnvironment>> analysis = new ModularWorstCaseAnalysis<>(); RTACallGraph callgraph = new RTACallGraph(); Application app = new Application(p); callgraph.init(app); @@ -69,21 +65,20 @@ TypeEnvironment> mkAnalysis(Program p) } private AnalysisState< - SimpleAbstractState, TypeEnvironment>, - MonolithicHeap, - ValueEnvironment, - TypeEnvironment> mkState() { + SimpleAbstractState, TypeEnvironment>> mkState() { return new AnalysisState<>( new SimpleAbstractState<>( new MonolithicHeap(), new ValueEnvironment<>(new Sign()), new TypeEnvironment<>(new InferredTypes())), - new ExpressionSet<>(), new SymbolAliasing()); + new ExpressionSet()); } @Test public void testEmptyCFG() - throws InterproceduralAnalysisException, CallGraphConstructionException, ParsingException { + throws InterproceduralAnalysisException, + CallGraphConstructionException, + ParsingException { Program p = IMPFrontend.processText("class empty { foo() { } }"); CFG cfg = p.getAllCFGs().iterator().next(); try { @@ -96,7 +91,9 @@ public void testEmptyCFG() @Test public void testEmptyIMPMethod() - throws ParsingException, InterproceduralAnalysisException, CallGraphConstructionException { + throws ParsingException, + InterproceduralAnalysisException, + CallGraphConstructionException { Program p = IMPFrontend.processText("class empty { foo() { } }"); CFG cfg = p.getAllCFGs().iterator().next(); try { @@ -109,7 +106,9 @@ public void testEmptyIMPMethod() @Test public void testIMPMethodWithEmptyIfBranch() - throws ParsingException, InterproceduralAnalysisException, CallGraphConstructionException { + throws ParsingException, + InterproceduralAnalysisException, + CallGraphConstructionException { Program p = IMPFrontend.processText("class empty { foo() { if (true) { this.foo(); } else {} } }"); CFG cfg = p.getAllCFGs().iterator().next(); try { @@ -122,23 +121,21 @@ public void testIMPMethodWithEmptyIfBranch() @Test public void testMetaVariablesOfRootExpressions() - throws FixpointException, InterproceduralAnalysisException, CallGraphConstructionException { + throws FixpointException, + InterproceduralAnalysisException, + CallGraphConstructionException { Program program = new Program(new IMPFeatures(), new IMPTypeSystem()); CFG cfg = new CFG(new CodeMemberDescriptor(SyntheticLocation.INSTANCE, program, false, "cfg")); OpenCall call = new OpenCall(cfg, SyntheticLocation.INSTANCE, CallType.STATIC, "test", "test"); cfg.addNode(call, true); AnalysisState< - SimpleAbstractState, TypeEnvironment>, - MonolithicHeap, - ValueEnvironment, - TypeEnvironment> domain = mkState(); + SimpleAbstractState, + TypeEnvironment>> domain = mkState(); AnalyzedCFG< - SimpleAbstractState, TypeEnvironment>, - MonolithicHeap, - ValueEnvironment, - TypeEnvironment> result = cfg.fixpoint(domain, - mkAnalysis(program), FIFOWorkingSet.mk(), conf, new UniqueScope()); + SimpleAbstractState, + TypeEnvironment>> result = cfg.fixpoint(domain, + mkAnalysis(program), FIFOWorkingSet.mk(), conf, new UniqueScope()); assertTrue(result.getAnalysisStateAfter(call).getState().getValueState().getKeys().isEmpty()); } diff --git a/lisa/lisa-analyses/src/test/java/it/unive/lisa/program/cfg/SemanticsSanityTest.java b/lisa/lisa-analyses/src/test/java/it/unive/lisa/program/cfg/SemanticsSanityTest.java index a5d13a1e5..7913bbfa8 100644 --- a/lisa/lisa-analyses/src/test/java/it/unive/lisa/program/cfg/SemanticsSanityTest.java +++ b/lisa/lisa-analyses/src/test/java/it/unive/lisa/program/cfg/SemanticsSanityTest.java @@ -7,18 +7,19 @@ import it.unive.lisa.analysis.AnalyzedCFG; import it.unive.lisa.analysis.Lattice; import it.unive.lisa.analysis.SemanticDomain; -import it.unive.lisa.analysis.SemanticDomain.Satisfiability; import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.SemanticOracle; import it.unive.lisa.analysis.SimpleAbstractState; import it.unive.lisa.analysis.StatementStore; import it.unive.lisa.analysis.combination.ValueCartesianProduct; import it.unive.lisa.analysis.dataflow.AvailableExpressions; -import it.unive.lisa.analysis.dataflow.DefiniteForwardDataflowDomain; -import it.unive.lisa.analysis.dataflow.PossibleForwardDataflowDomain; +import it.unive.lisa.analysis.dataflow.DefiniteDataflowDomain; +import it.unive.lisa.analysis.dataflow.PossibleDataflowDomain; import it.unive.lisa.analysis.dataflow.ReachingDefinitions; import it.unive.lisa.analysis.heap.HeapDomain; import it.unive.lisa.analysis.heap.MonolithicHeap; import it.unive.lisa.analysis.lattices.ExpressionSet; +import it.unive.lisa.analysis.lattices.Satisfiability; import it.unive.lisa.analysis.nonInterference.NonInterference; import it.unive.lisa.analysis.nonRedundantSet.ValueNonRedundantSet; import it.unive.lisa.analysis.nonrelational.heap.HeapEnvironment; @@ -28,11 +29,9 @@ import it.unive.lisa.analysis.nonrelational.value.TypeEnvironment; import it.unive.lisa.analysis.nonrelational.value.ValueEnvironment; import it.unive.lisa.analysis.numeric.Sign; -import it.unive.lisa.analysis.representation.DomainRepresentation; -import it.unive.lisa.analysis.representation.StringRepresentation; import it.unive.lisa.analysis.symbols.SymbolAliasing; +import it.unive.lisa.analysis.type.TypeDomain; import it.unive.lisa.analysis.types.InferredTypes; -import it.unive.lisa.analysis.value.TypeDomain; import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.imp.IMPFeatures; import it.unive.lisa.imp.types.IMPTypeSystem; @@ -68,14 +67,14 @@ import it.unive.lisa.program.type.BoolType; import it.unive.lisa.program.type.StringType; import it.unive.lisa.symbolic.SymbolicExpression; -import it.unive.lisa.symbolic.value.Identifier; import it.unive.lisa.symbolic.value.PushAny; import it.unive.lisa.symbolic.value.Skip; -import it.unive.lisa.symbolic.value.ValueExpression; import it.unive.lisa.symbolic.value.Variable; import it.unive.lisa.type.Type; import it.unive.lisa.type.Untyped; import it.unive.lisa.util.datastructures.graph.GraphVisitor; +import it.unive.lisa.util.representation.StringRepresentation; +import it.unive.lisa.util.representation.StructuredRepresentation; import java.lang.reflect.Constructor; import java.lang.reflect.Modifier; import java.util.ArrayList; @@ -100,22 +99,62 @@ public class SemanticsSanityTest { private ClassUnit unit; private CFG cfg; private CallGraph cg; - private InterproceduralAnalysis< - SimpleAbstractState, TypeEnvironment>, - MonolithicHeap, - ValueEnvironment, - TypeEnvironment> interprocedural; + private InterproceduralAnalysis, + TypeEnvironment>> interprocedural; private AnalysisState< - SimpleAbstractState, TypeEnvironment>, - MonolithicHeap, - ValueEnvironment, - TypeEnvironment> as; + SimpleAbstractState, TypeEnvironment>> as; private StatementStore< - SimpleAbstractState, TypeEnvironment>, - MonolithicHeap, - ValueEnvironment, - TypeEnvironment> store; + SimpleAbstractState, TypeEnvironment>> store; private Expression fake; + private final SemanticOracle fakeOracle = new SemanticOracle() { + + @Override + public Set getRuntimeTypesOf( + SymbolicExpression e, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + return Collections.singleton(e.getStaticType()); + } + + @Override + public Type getDynamicTypeOf( + SymbolicExpression e, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + return e.getStaticType(); + } + + @Override + public ExpressionSet rewrite( + SymbolicExpression expression, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + return new ExpressionSet(expression); + } + + @Override + public Satisfiability alias( + SymbolicExpression x, + SymbolicExpression y, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + return Satisfiability.UNKNOWN; + } + + @Override + public Satisfiability isReachableFrom( + SymbolicExpression x, + SymbolicExpression y, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + return Satisfiability.UNKNOWN; + } + }; @Before public void setup() throws CallGraphConstructionException, InterproceduralAnalysisException { @@ -133,17 +172,20 @@ public void setup() throws CallGraphConstructionException, InterproceduralAnalys as = new AnalysisState<>( new SimpleAbstractState<>(new MonolithicHeap(), new ValueEnvironment<>(new Sign()), new TypeEnvironment<>(new InferredTypes())), - new ExpressionSet<>(), new SymbolAliasing()); + new ExpressionSet()); store = new StatementStore<>(as); fake = new Expression(cfg, unknownLocation) { @Override - public int setOffset(int offset) { + public int setOffset( + int offset) { return 0; } @Override - public boolean accept(GraphVisitor visitor, V tool) { + public boolean accept( + GraphVisitor visitor, + V tool) { return false; } @@ -153,13 +195,11 @@ public String toString() { } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState semantics( - AnalysisState entryState, - InterproceduralAnalysis interprocedural, StatementStore expressions) - throws SemanticException { + public > AnalysisState forwardSemantics( + AnalysisState entryState, + InterproceduralAnalysis interprocedural, + StatementStore expressions) + throws SemanticException { return entryState .smallStepSemantics( new Variable(Untyped.INSTANCE, "fake", @@ -169,7 +209,8 @@ T extends TypeDomain> AnalysisState semantics( }; } - private Object valueFor(Class param) { + private Object valueFor( + Class param) { if (param == CFG.class) return cfg; if (param == String.class) @@ -232,7 +273,7 @@ public void testSemanticsOfStatements() { for (int i = 0; i < params.length; i++) params[i] = valueFor(types[i]); Statement st = (Statement) c.newInstance(params); - st.semantics(as, interprocedural, store); + st.forwardSemantics(as, interprocedural, store); } catch (Exception e) { failures.computeIfAbsent(statement, s -> new HashMap<>()) .put(Arrays.toString(c.getParameterTypes()), e); @@ -249,7 +290,8 @@ public void testSemanticsOfStatements() { fail(failures.size() + "/" + total + " semantics evaluation failed"); } - private boolean excluded(Class statement) { + private boolean excluded( + Class statement) { // these just forward the semantics to the inner call return statement == MultiCall.class || statement == TruncatedParamsCall.class; @@ -261,40 +303,59 @@ private static class NRHeap implements NonRelationalHeapDomain { private static final NRHeap TOP = new NRHeap(); @Override - public NRHeap eval(SymbolicExpression expression, HeapEnvironment environment, ProgramPoint pp) + public NRHeap eval( + SymbolicExpression expression, + HeapEnvironment environment, + ProgramPoint pp, + SemanticOracle oracle) throws SemanticException { return top(); } @Override - public Satisfiability satisfies(SymbolicExpression expression, HeapEnvironment environment, - ProgramPoint pp) throws SemanticException { + public Satisfiability satisfies( + SymbolicExpression expression, + HeapEnvironment environment, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { return Satisfiability.UNKNOWN; } @Override - public HeapEnvironment assume(HeapEnvironment environment, SymbolicExpression expression, - ProgramPoint src, ProgramPoint dest) throws SemanticException { + public HeapEnvironment assume( + HeapEnvironment environment, + SymbolicExpression expression, + ProgramPoint src, + ProgramPoint dest, + SemanticOracle oracle) + throws SemanticException { return environment; } @Override - public NRHeap glb(NRHeap other) throws SemanticException { + public NRHeap glb( + NRHeap other) + throws SemanticException { return bottom(); } @Override - public DomainRepresentation representation() { + public StructuredRepresentation representation() { return new StringRepresentation(""); } @Override - public NRHeap lub(NRHeap other) throws SemanticException { + public NRHeap lub( + NRHeap other) + throws SemanticException { return top(); } @Override - public boolean lessOrEqual(NRHeap other) throws SemanticException { + public boolean lessOrEqual( + NRHeap other) + throws SemanticException { return false; } @@ -309,29 +370,55 @@ public NRHeap bottom() { } @Override - public boolean tracksIdentifiers(Identifier id) { + public boolean canProcess( + SymbolicExpression expression, + ProgramPoint pp, + SemanticOracle oracle) { return true; } @Override - public boolean canProcess(SymbolicExpression expression) { - return true; + public List getSubstitution() { + return Collections.emptyList(); } @Override - public List getSubstitution() { - return Collections.emptyList(); + public ExpressionSet rewrite( + SymbolicExpression expression, + HeapEnvironment environment, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + return new ExpressionSet(); + } + + @Override + public Satisfiability alias( + SymbolicExpression x, + SymbolicExpression y, + HeapEnvironment environment, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + return Satisfiability.UNKNOWN; } @Override - public ExpressionSet rewrite(SymbolicExpression expression, - HeapEnvironment environment, ProgramPoint pp) throws SemanticException { - return new ExpressionSet<>(); + public Satisfiability isReachableFrom( + SymbolicExpression x, + SymbolicExpression y, + HeapEnvironment environment, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + return Satisfiability.UNKNOWN; } } - private Object domainFor(Class root, Class param) { + private Object domainFor( + Class root, + Class param) { if (root == ValueEnvironment.class) return new Sign(); if (root == HeapEnvironment.class) @@ -340,9 +427,9 @@ private Object domainFor(Class root, Class param) { return new InferredTypes(); if (root == InferenceSystem.class) return new NonInterference(); - if (root == PossibleForwardDataflowDomain.class) + if (root == PossibleDataflowDomain.class) return new ReachingDefinitions(); - if (root == DefiniteForwardDataflowDomain.class) + if (root == DefiniteDataflowDomain.class) return new AvailableExpressions(); if (param == AbstractState.class) return new SimpleAbstractState<>(new MonolithicHeap(), new ValueEnvironment<>(new Sign()), @@ -350,7 +437,7 @@ private Object domainFor(Class root, Class param) { if (param == SymbolicExpression.class) return new Skip(new SourceCodeLocation("unknown", 0, 0)); if (param == ExpressionSet.class) - return new ExpressionSet<>(); + return new ExpressionSet(); if (param == SymbolAliasing.class) return new SymbolAliasing(); if (param == HeapDomain.class) @@ -392,13 +479,18 @@ else if (param == ValueDomain.class) } @SuppressWarnings("unchecked") - private int buildDomainsInstances(Set> classes, Set instances, List failures) { + private int buildDomainsInstances( + Set> classes, + Set instances, + List failures) { int total = 0; Constructor nullary, unary, binary, ternary, quaternary; nullary = unary = binary = ternary = quaternary = null; T instance; for (Class clazz : classes) - if (!Modifier.isAbstract(clazz.getModifiers()) && !Modifier.isInterface(clazz.getModifiers()) + if (!Modifier.isAbstract(clazz.getModifiers()) + && !Modifier.isInterface(clazz.getModifiers()) + && !clazz.isAnonymousClass() && !Satisfiability.class.isAssignableFrom(clazz) && !CompoundState.class.isAssignableFrom(clazz) // some testing domain that we do not care about end up here @@ -416,7 +508,8 @@ else if (c.getParameterCount() == 3) else if (c.getParameterCount() == 4) quaternary = c; } - + if (clazz.getName().contains("FixpointInfo")) + System.out.println(); try { if (nullary != null) instance = (T) nullary.newInstance(); @@ -450,7 +543,7 @@ else if (unary != null) { instances.add(instance); - nullary = unary = binary = ternary = null; + nullary = unary = binary = ternary = quaternary = null; } catch (Exception e) { failures.add(clazz.getName()); System.err.println("Instantiation of class " + clazz.getName() + " failed due to " + e); @@ -477,12 +570,15 @@ public void testAssignOnBottom() { try { instance = (SemanticDomain) ((Lattice) instance).bottom(); Variable v = new Variable(bool, "b", new SourceCodeLocation("unknown", 0, 0)); - instance = instance.assign(v, new PushAny(bool, new SourceCodeLocation("unknown", 0, 0)), fake); + instance = instance.assign(v, new PushAny(bool, new SourceCodeLocation("unknown", 0, 0)), fake, + fakeOracle); boolean isBottom = ((Lattice) instance).isBottom(); if (instance instanceof AnalysisState) { AnalysisState state = (AnalysisState) instance; - isBottom = state.getState().isBottom() && state.getAliasing().isBottom() - // analysis state keeps the assigned id on the stack + isBottom = state.getState().isBottom() + && state.getFixpointInformation() != null + && state.getFixpointInformation().isBottom() + // analysis state keeps the assigned id on the stack && state.getComputedExpressions().size() == 1 && state.getComputedExpressions().iterator().next().equals(v); } diff --git a/lisa/lisa-analyses/src/test/resources/log4j2.xml b/lisa/lisa-analyses/src/test/resources/log4j2.xml index e0734d70b..cbdcb32af 100644 --- a/lisa/lisa-analyses/src/test/resources/log4j2.xml +++ b/lisa/lisa-analyses/src/test/resources/log4j2.xml @@ -2,7 +2,7 @@ - + diff --git a/lisa/lisa-imp/example.imp b/lisa/lisa-imp/example.imp index 6b6ccd460..0171dcd3c 100644 --- a/lisa/lisa-imp/example.imp +++ b/lisa/lisa-imp/example.imp @@ -164,6 +164,10 @@ class example { strindex("x", "y"); // yield the index of the first occourrence of the second string into the first one strrep("x", "y", "z"); // replace all occurrences of the second string inside the first one with the third string strsub("x", 0, 1); // yield the substring of the string, from the first integer (inclusive) to the second one (exclusive) + + + // array operations directly supported (i.e., not in the form of receiver.method(params)) + arraylen(intArray); // yields the length of the array } // methods can be final to avoid overriding by subclasses diff --git a/lisa/lisa-imp/src/main/antlr/IMPLexer.g4 b/lisa/lisa-imp/src/main/antlr/IMPLexer.g4 index d27abcc13..c6b6f0dcc 100644 --- a/lisa/lisa-imp/src/main/antlr/IMPLexer.g4 +++ b/lisa/lisa-imp/src/main/antlr/IMPLexer.g4 @@ -143,6 +143,11 @@ STRSTARTS STRSUB : 'strsub' ; + // =========================== ARRAY FUNCTIONS =========================== + +ARRAYLEN + : 'arraylen' + ; // =========================== LITERALS =========================== LITERAL_DECIMAL diff --git a/lisa/lisa-imp/src/main/antlr/IMPParser.g4 b/lisa/lisa-imp/src/main/antlr/IMPParser.g4 index 44fd5273c..a7786aef9 100644 --- a/lisa/lisa-imp/src/main/antlr/IMPParser.g4 +++ b/lisa/lisa-imp/src/main/antlr/IMPParser.g4 @@ -93,6 +93,7 @@ expression | methodCall | assignment | stringExpr + | arrayExpr ; basicExpr @@ -160,6 +161,10 @@ ternaryStringExpr : STRREPLACE LPAREN left = expression COMMA middle = expression COMMA right = expression RPAREN | STRSUB LPAREN left = expression COMMA middle = expression COMMA right = expression RPAREN ; + +arrayExpr + : ARRAYLEN LPAREN op = expression RPAREN + ; /* * STATEMENT */ diff --git a/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/Antlr4Util.java b/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/Antlr4Util.java index 76803375e..74d6fa037 100644 --- a/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/Antlr4Util.java +++ b/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/Antlr4Util.java @@ -36,7 +36,9 @@ public class Antlr4Util { * @return a {@link ParsingException} contained more detailed information * about the one thrown by ANTLR4 */ - static ParsingException handleRecognitionException(String file, RecognitionException e) { + static ParsingException handleRecognitionException( + String file, + RecognitionException e) { Token problem = e.getOffendingToken(); StringBuilder message = errorHeader(file, problem); @@ -56,7 +58,10 @@ else if (e instanceof NoViableAltException || e instanceof LexerNoViableAltExcep return new ParsingException("Error while parsing " + file + ":\n" + message.toString()); } - private static void dumpProblem(String file, Token problem, StringBuilder message) { + private static void dumpProblem( + String file, + Token problem, + StringBuilder message) { String base = message.toString(); message.append(" at: "); @@ -78,31 +83,43 @@ private static void dumpProblem(String file, Token problem, StringBuilder messag } } - private static void missingAlternative(StringBuilder message) { + private static void missingAlternative( + StringBuilder message) { message.append("could not decide what path to take"); } - private static void failedPredicate(RecognitionException e, StringBuilder message) { + private static void failedPredicate( + RecognitionException e, + StringBuilder message) { message.append("failed predicate '").append(((FailedPredicateException) e).getPredicate()).append("' "); } - private static void inputMismatch(RecognitionException e, Token problem, StringBuilder message) { + private static void inputMismatch( + RecognitionException e, + Token problem, + StringBuilder message) { message.append("matched '").append(problem.getText()).append("' as <") .append(tokenName(problem.getType(), e.getRecognizer().getVocabulary())).append(">, expecting <") .append(tokenNames(((InputMismatchException) e).getExpectedTokens(), e.getRecognizer().getVocabulary())) .append(">"); } - private static StringBuilder errorHeader(String file, Token problem) { + private static StringBuilder errorHeader( + String file, + Token problem) { return new StringBuilder().append(file).append(":").append(problem.getLine()).append(":") .append(problem.getCharPositionInLine()).append(" - "); } - private static String tokenName(int type, Vocabulary vocabulary) { + private static String tokenName( + int type, + Vocabulary vocabulary) { return type < 0 ? "" : vocabulary.getSymbolicName(type); } - private static String tokenNames(IntervalSet types, Vocabulary vocabulary) { + private static String tokenNames( + IntervalSet types, + Vocabulary vocabulary) { List typeList = types.toList(); StringBuilder expectedBuilder = new StringBuilder(); @@ -119,7 +136,8 @@ private static String tokenNames(IntervalSet types, Vocabulary vocabulary) { * * @return the line number where the context appears */ - static int getLine(ParserRuleContext ctx) { + static int getLine( + ParserRuleContext ctx) { return ctx.getStart().getLine(); } @@ -130,7 +148,8 @@ static int getLine(ParserRuleContext ctx) { * * @return the column number where the context appears */ - static int getCol(ParserRuleContext ctx) { + static int getCol( + ParserRuleContext ctx) { return ctx.getStop().getCharPositionInLine(); } @@ -141,7 +160,8 @@ static int getCol(ParserRuleContext ctx) { * * @return the line number where the token appears */ - static int getLine(Token tok) { + static int getLine( + Token tok) { return tok.getLine(); } @@ -152,7 +172,8 @@ static int getLine(Token tok) { * * @return the column number where the token appears */ - static int getCol(Token tok) { + static int getCol( + Token tok) { return tok.getCharPositionInLine(); } } diff --git a/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/IMPAnnotationVisitor.java b/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/IMPAnnotationVisitor.java index 44869b219..bc407844f 100644 --- a/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/IMPAnnotationVisitor.java +++ b/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/IMPAnnotationVisitor.java @@ -32,7 +32,8 @@ public class IMPAnnotationVisitor extends IMPParserBaseVisitor { @Override - public Annotations visitAnnotations(AnnotationsContext ctx) { + public Annotations visitAnnotations( + AnnotationsContext ctx) { if (ctx == null) return new Annotations(); Set anns = new TreeSet<>(); @@ -42,7 +43,8 @@ public Annotations visitAnnotations(AnnotationsContext ctx) { } @Override - public Annotation visitAnnotation(AnnotationContext ctx) { + public Annotation visitAnnotation( + AnnotationContext ctx) { String annotationName = ctx.name.getText(); if (annotationName.startsWith("Inherited")) return new Annotation(annotationName, visitAnnotationMembers(ctx.annotationMembers()), true); @@ -51,7 +53,8 @@ public Annotation visitAnnotation(AnnotationContext ctx) { } @Override - public List visitAnnotationMembers(AnnotationMembersContext ctx) { + public List visitAnnotationMembers( + AnnotationMembersContext ctx) { List arr = new ArrayList<>(); if (ctx == null) return arr; @@ -62,12 +65,14 @@ public List visitAnnotationMembers(AnnotationMembersContext ct } @Override - public AnnotationMember visitAnnotationMember(AnnotationMemberContext ctx) { + public AnnotationMember visitAnnotationMember( + AnnotationMemberContext ctx) { return new AnnotationMember(ctx.IDENTIFIER().getText(), visitAnnotationValue(ctx.annotationValue())); } @Override - public AnnotationValue visitAnnotationValue(AnnotationValueContext ctx) { + public AnnotationValue visitAnnotationValue( + AnnotationValueContext ctx) { if (ctx.basicAnnotationValue() != null) return visitBasicAnnotationValue(ctx.basicAnnotationValue()); else @@ -75,7 +80,8 @@ public AnnotationValue visitAnnotationValue(AnnotationValueContext ctx) { } @Override - public BasicAnnotationValue visitBasicAnnotationValue(BasicAnnotationValueContext ctx) { + public BasicAnnotationValue visitBasicAnnotationValue( + BasicAnnotationValueContext ctx) { if (ctx.LITERAL_DECIMAL() != null) if (ctx.SUB() != null) return new IntAnnotationValue(Integer.parseInt(ctx.LITERAL_DECIMAL().getText())); @@ -96,7 +102,8 @@ else if (ctx.unit_name != null) } @Override - public ArrayAnnotationValue visitArrayAnnotationValue(ArrayAnnotationValueContext ctx) { + public ArrayAnnotationValue visitArrayAnnotationValue( + ArrayAnnotationValueContext ctx) { if (ctx.basicAnnotationValue() == null) return new ArrayAnnotationValue(new BasicAnnotationValue[0]); else { diff --git a/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/IMPCodeMemberVisitor.java b/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/IMPCodeMemberVisitor.java index e33e5ec39..9844d65f1 100644 --- a/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/IMPCodeMemberVisitor.java +++ b/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/IMPCodeMemberVisitor.java @@ -7,6 +7,7 @@ import it.unive.lisa.imp.antlr.IMPParser.ArgumentsContext; import it.unive.lisa.imp.antlr.IMPParser.ArrayAccessContext; import it.unive.lisa.imp.antlr.IMPParser.ArrayCreatorRestContext; +import it.unive.lisa.imp.antlr.IMPParser.ArrayExprContext; import it.unive.lisa.imp.antlr.IMPParser.AssignmentContext; import it.unive.lisa.imp.antlr.IMPParser.BasicExprContext; import it.unive.lisa.imp.antlr.IMPParser.BinaryStringExprContext; @@ -31,6 +32,7 @@ import it.unive.lisa.imp.antlr.IMPParser.UnaryStringExprContext; import it.unive.lisa.imp.antlr.IMPParser.WhileLoopContext; import it.unive.lisa.imp.antlr.IMPParserBaseVisitor; +import it.unive.lisa.imp.constructs.ArrayLength; import it.unive.lisa.imp.constructs.StringConcat; import it.unive.lisa.imp.constructs.StringContains; import it.unive.lisa.imp.constructs.StringEndsWith; @@ -138,7 +140,9 @@ class IMPCodeMemberVisitor extends IMPParserBaseVisitor { * appears * @param descriptor the descriptor of the method or constructor */ - IMPCodeMemberVisitor(String file, CodeMemberDescriptor descriptor) { + IMPCodeMemberVisitor( + String file, + CodeMemberDescriptor descriptor) { this.file = file; this.descriptor = descriptor; list = new NodeList<>(new SequentialEdge()); @@ -160,7 +164,8 @@ class IMPCodeMemberVisitor extends IMPParserBaseVisitor { * * @return the {@link CFG} built from the block */ - CFG visitCodeMember(BlockContext ctx) { + CFG visitCodeMember( + BlockContext ctx) { Triple, Statement> visited = visitBlock(ctx); entrypoints.add(visited.getLeft()); list.mergeWith(visited.getMiddle()); @@ -194,7 +199,8 @@ CFG visitCodeMember(BlockContext ctx) { } @Override - public Triple, Statement> visitBlock(BlockContext ctx) { + public Triple, Statement> visitBlock( + BlockContext ctx) { Map> backup = new HashMap<>(visibleIds); NodeList block = new NodeList<>(new SequentialEdge()); @@ -243,7 +249,8 @@ public Triple, Statement> visitBlockOr } @Override - public Triple, Statement> visitStatement(StatementContext ctx) { + public Triple, Statement> visitStatement( + StatementContext ctx) { Statement st; if (ctx.localDeclaration() != null) st = visitLocalDeclaration(ctx.localDeclaration()); @@ -274,7 +281,8 @@ else if (ctx.command != null) return Triple.of(st, adj, st); } - private Triple, Statement> visitIf(StatementContext ctx) { + private Triple, Statement> visitIf( + StatementContext ctx) { NodeList ite = new NodeList<>(new SequentialEdge()); Statement condition = visitParExpr(ctx.parExpr()); @@ -306,12 +314,14 @@ private Triple, Statement> visitIf(Sta } @Override - public Expression visitParExpr(ParExprContext ctx) { + public Expression visitParExpr( + ParExprContext ctx) { return visitExpression(ctx.expression()); } @Override - public Assignment visitLocalDeclaration(LocalDeclarationContext ctx) { + public Assignment visitLocalDeclaration( + LocalDeclarationContext ctx) { Expression expression = visitExpression(ctx.expression()); VariableRef ref = visitVar(ctx.IDENTIFIER(), false); @@ -327,7 +337,8 @@ public Assignment visitLocalDeclaration(LocalDeclarationContext ctx) { } @Override - public Triple, Statement> visitLoop(LoopContext ctx) { + public Triple, Statement> visitLoop( + LoopContext ctx) { if (ctx.whileLoop() != null) return visitWhileLoop(ctx.whileLoop()); else @@ -335,7 +346,8 @@ public Triple, Statement> visitLoop(Lo } @Override - public Triple, Statement> visitWhileLoop(WhileLoopContext ctx) { + public Triple, Statement> visitWhileLoop( + WhileLoopContext ctx) { NodeList loop = new NodeList<>(new SequentialEdge()); Statement condition = visitParExpr(ctx.parExpr()); loop.addNode(condition); @@ -356,7 +368,8 @@ public Triple, Statement> visitWhileLo } @Override - public Triple, Statement> visitForLoop(ForLoopContext ctx) { + public Triple, Statement> visitForLoop( + ForLoopContext ctx) { NodeList loop = new NodeList<>(new SequentialEdge()); LocalDeclarationContext initDecl = ctx.forDeclaration().initDecl; ExpressionContext initExpr = ctx.forDeclaration().initExpr; @@ -417,7 +430,8 @@ public Triple, Statement> visitForLoop } @Override - public Assignment visitAssignment(AssignmentContext ctx) { + public Assignment visitAssignment( + AssignmentContext ctx) { Expression expression = visitExpression(ctx.expression()); Expression target = null; if (ctx.IDENTIFIER() != null) @@ -433,7 +447,9 @@ else if (ctx.arrayAccess() != null) return new Assignment(cfg, new SourceCodeLocation(file, getLine(ctx), getCol(ctx)), target, expression); } - private VariableRef visitVar(TerminalNode identifier, boolean localReference) { + private VariableRef visitVar( + TerminalNode identifier, + boolean localReference) { VariableRef ref = new VariableRef(cfg, new SourceCodeLocation(file, getLine(identifier.getSymbol()), getCol(identifier.getSymbol())), identifier.getText(), Untyped.INSTANCE); @@ -444,14 +460,16 @@ private VariableRef visitVar(TerminalNode identifier, boolean localReference) { } @Override - public AccessInstanceGlobal visitFieldAccess(FieldAccessContext ctx) { + public AccessInstanceGlobal visitFieldAccess( + FieldAccessContext ctx) { Expression receiver = visitReceiver(ctx.receiver()); return new AccessInstanceGlobal(cfg, new SourceCodeLocation(file, getLine(ctx), getCol(ctx)), receiver, ctx.name.getText()); } @Override - public Expression visitReceiver(ReceiverContext ctx) { + public Expression visitReceiver( + ReceiverContext ctx) { if (ctx.THIS() != null) return visitVar(ctx.THIS(), false); else if (ctx.SUPER() != null) @@ -461,7 +479,8 @@ else if (ctx.SUPER() != null) } @Override - public IMPArrayAccess visitArrayAccess(ArrayAccessContext ctx) { + public IMPArrayAccess visitArrayAccess( + ArrayAccessContext ctx) { Expression receiver = visitReceiver(ctx.receiver()); Expression result = receiver; for (IndexContext i : ctx.index()) @@ -471,7 +490,8 @@ public IMPArrayAccess visitArrayAccess(ArrayAccessContext ctx) { } @Override - public Expression visitIndex(IndexContext ctx) { + public Expression visitIndex( + IndexContext ctx) { if (ctx.IDENTIFIER() != null) return visitVar(ctx.IDENTIFIER(), true); else @@ -480,7 +500,8 @@ public Expression visitIndex(IndexContext ctx) { } @Override - public Expression visitExpression(ExpressionContext ctx) { + public Expression visitExpression( + ExpressionContext ctx) { int line = getLine(ctx); int col = getCol(ctx); if (ctx.paren != null) @@ -551,12 +572,15 @@ else if (ctx.methodCall() != null) return visitMethodCall(ctx.methodCall()); else if (ctx.stringExpr() != null) return visitStringExpr(ctx.stringExpr()); + else if (ctx.arrayExpr() != null) + return visitArrayExpr(ctx.arrayExpr()); throw new UnsupportedOperationException("Type of expression not supported: " + ctx); } @Override - public Expression visitStringExpr(StringExprContext ctx) { + public Expression visitStringExpr( + StringExprContext ctx) { Expression returned = null; if (ctx.unaryStringExpr() != null) returned = visitUnaryStringExpr(ctx.unaryStringExpr()); @@ -575,14 +599,22 @@ else if (ctx.ternaryStringExpr() != null) } @Override - public Expression visitUnaryStringExpr(UnaryStringExprContext ctx) { + public Expression visitArrayExpr( + ArrayExprContext ctx) { + return new ArrayLength.IMPArrayLength(cfg, file, getLine(ctx), getCol(ctx), visitExpression(ctx.op)); + } + + @Override + public Expression visitUnaryStringExpr( + UnaryStringExprContext ctx) { if (ctx.STRLEN() != null) return new StringLength.IMPStringLength(cfg, file, getLine(ctx), getCol(ctx), visitExpression(ctx.op)); throw new UnsupportedOperationException("Type of string expression not supported: " + ctx); } @Override - public Expression visitBinaryStringExpr(BinaryStringExprContext ctx) { + public Expression visitBinaryStringExpr( + BinaryStringExprContext ctx) { if (ctx.STRCAT() != null) return new StringConcat.IMPStringConcat(cfg, file, getLine(ctx), getCol(ctx), visitExpression(ctx.left), visitExpression(ctx.right)); @@ -606,7 +638,8 @@ else if (ctx.STRSTARTS() != null) } @Override - public Expression visitTernaryStringExpr(TernaryStringExprContext ctx) { + public Expression visitTernaryStringExpr( + TernaryStringExprContext ctx) { if (ctx.STRREPLACE() != null) return new StringReplace.IMPStringReplace(cfg, file, getLine(ctx), getCol(ctx), visitExpression(ctx.left), visitExpression(ctx.middle), visitExpression(ctx.right)); @@ -618,19 +651,22 @@ else if (ctx.STRSUB() != null) throw new UnsupportedOperationException("Type of string expression not supported: " + ctx); } - private Expression visitBumpBasicArrayExpr(NewBasicArrayExprContext ctx) { + private Expression visitBumpBasicArrayExpr( + NewBasicArrayExprContext ctx) { return new IMPNewArray(cfg, file, getLine(ctx), getCol(ctx), visitPrimitiveType(ctx.primitiveType()), true, visitArrayCreatorRest(ctx.arrayCreatorRest())); } @Override - public Expression visitNewBasicArrayExpr(NewBasicArrayExprContext ctx) { + public Expression visitNewBasicArrayExpr( + NewBasicArrayExprContext ctx) { return new IMPNewArray(cfg, file, getLine(ctx), getCol(ctx), visitPrimitiveType(ctx.primitiveType()), false, visitArrayCreatorRest(ctx.arrayCreatorRest())); } @Override - public Expression[] visitArrayCreatorRest(ArrayCreatorRestContext ctx) { + public Expression[] visitArrayCreatorRest( + ArrayCreatorRestContext ctx) { Expression[] result = new Expression[ctx.index().size()]; for (int i = 0; i < result.length; i++) result[i] = visitIndex(ctx.index(i)); @@ -638,7 +674,8 @@ public Expression[] visitArrayCreatorRest(ArrayCreatorRestContext ctx) { } @Override - public Type visitPrimitiveType(PrimitiveTypeContext ctx) { + public Type visitPrimitiveType( + PrimitiveTypeContext ctx) { if (ctx.BOOLEAN() != null) return BoolType.INSTANCE; else if (ctx.INT() != null) @@ -647,7 +684,8 @@ else if (ctx.INT() != null) return Float32Type.INSTANCE; } - private Expression visitBumpReferenceType(NewReferenceTypeContext ctx) { + private Expression visitBumpReferenceType( + NewReferenceTypeContext ctx) { // null since we do not want to create a new one, class types should // have been created during the preprocessing Type base = ClassType.lookup(ctx.IDENTIFIER().getText(), null); @@ -659,7 +697,8 @@ private Expression visitBumpReferenceType(NewReferenceTypeContext ctx) { } @Override - public Expression visitNewReferenceType(NewReferenceTypeContext ctx) { + public Expression visitNewReferenceType( + NewReferenceTypeContext ctx) { // null since we do not want to create a new one, class types should // have been created during the preprocessing Type base = ClassType.lookup(ctx.IDENTIFIER().getText(), null); @@ -671,7 +710,8 @@ public Expression visitNewReferenceType(NewReferenceTypeContext ctx) { } @Override - public Expression[] visitArguments(ArgumentsContext ctx) { + public Expression[] visitArguments( + ArgumentsContext ctx) { Expression[] args = new Expression[ctx.arg().size()]; int i = 0; for (ArgContext arg : ctx.arg()) @@ -680,7 +720,8 @@ public Expression[] visitArguments(ArgumentsContext ctx) { } @Override - public Expression visitArg(ArgContext ctx) { + public Expression visitArg( + ArgContext ctx) { if (ctx.literal() != null) return visitLiteral(ctx.literal()); else if (ctx.fieldAccess() != null) @@ -696,7 +737,8 @@ else if (ctx.IDENTIFIER() != null) } @Override - public Expression visitMethodCall(MethodCallContext ctx) { + public Expression visitMethodCall( + MethodCallContext ctx) { Expression receiver = visitReceiver(ctx.receiver()); String name = ctx.name.getText(); Expression[] args = ArrayUtils.insert(0, visitArguments(ctx.arguments()), receiver); @@ -705,7 +747,8 @@ public Expression visitMethodCall(MethodCallContext ctx) { } @Override - public Expression visitBasicExpr(BasicExprContext ctx) { + public Expression visitBasicExpr( + BasicExprContext ctx) { if (ctx.literal() != null) return visitLiteral(ctx.literal()); else if (ctx.THIS() != null) @@ -717,7 +760,8 @@ else if (ctx.SUPER() != null) } @Override - public Literal visitLiteral(LiteralContext ctx) { + public Literal visitLiteral( + LiteralContext ctx) { int line = getLine(ctx); int col = getCol(ctx); if (ctx.LITERAL_NULL() != null) @@ -754,7 +798,8 @@ else if (ctx.LITERAL_DECIMAL() != null) * * @return the cleaned string */ - static String clean(LiteralContext ctx) { + static String clean( + LiteralContext ctx) { String text = ctx.LITERAL_STRING().getText(); if (text.startsWith("\"") && text.endsWith("\"")) return text.substring(1, text.length() - 1); diff --git a/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/IMPFrontend.java b/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/IMPFrontend.java index fa41937f7..8eff181c4 100644 --- a/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/IMPFrontend.java +++ b/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/IMPFrontend.java @@ -19,6 +19,7 @@ import it.unive.lisa.imp.antlr.IMPParser.UnitContext; import it.unive.lisa.imp.antlr.IMPParser.UnitNameContext; import it.unive.lisa.imp.antlr.IMPParserBaseVisitor; +import it.unive.lisa.imp.constructs.ArrayLength; import it.unive.lisa.imp.constructs.StringContains; import it.unive.lisa.imp.constructs.StringEndsWith; import it.unive.lisa.imp.constructs.StringEquals; @@ -98,7 +99,9 @@ public class IMPFrontend extends IMPParserBaseVisitor { * * @throws ParsingException if this frontend is unable to parse the file */ - public static Program processFile(String file) throws ParsingException { + public static Program processFile( + String file) + throws ParsingException { return new IMPFrontend(file, false).work(null); } @@ -115,7 +118,10 @@ public static Program processFile(String file) throws ParsingException { * * @throws ParsingException if this frontend is unable to parse the file */ - public static Program processFile(String file, boolean onlyMain) throws ParsingException { + public static Program processFile( + String file, + boolean onlyMain) + throws ParsingException { return new IMPFrontend(file, onlyMain).work(null); } @@ -133,7 +139,9 @@ public static Program processFile(String file, boolean onlyMain) throws ParsingE * * @throws ParsingException if this frontend is unable to parse the text */ - public static Program processText(String text) throws ParsingException { + public static Program processText( + String text) + throws ParsingException { return processText(text, false); } @@ -150,7 +158,10 @@ public static Program processText(String text) throws ParsingException { * * @throws ParsingException if this frontend is unable to parse the text */ - public static Program processText(String text, boolean onlyMain) throws ParsingException { + public static Program processText( + String text, + boolean onlyMain) + throws ParsingException { try (InputStream is = new ByteArrayInputStream(text.getBytes())) { return new IMPFrontend("in-memory.imp", onlyMain).work(is); } catch (IOException e) { @@ -170,7 +181,9 @@ public static Program processText(String text, boolean onlyMain) throws ParsingE private final boolean onlyMain; - private IMPFrontend(String file, boolean onlyMain) { + private IMPFrontend( + String file, + boolean onlyMain) { this.file = file; inheritanceMap = new HashMap<>(); implementedInterfaces = new HashMap<>(); @@ -178,7 +191,9 @@ private IMPFrontend(String file, boolean onlyMain) { this.onlyMain = onlyMain; } - private Program work(InputStream inputStream) throws ParsingException { + private Program work( + InputStream inputStream) + throws ParsingException { // first remove all cached types from previous executions ClassType.clearAll(); ArrayType.clearAll(); @@ -215,6 +230,7 @@ private Program work(InputStream inputStream) throws ParsingException { str.addInstanceCodeMember(new StringReplace(unknownLocation, str)); str.addInstanceCodeMember(new StringStartsWith(unknownLocation, str)); str.addInstanceCodeMember(new StringSubstring(unknownLocation, str)); + str.addInstanceCodeMember(new ArrayLength(unknownLocation, program)); // register all possible types p.getTypes().registerType(BoolType.INSTANCE); @@ -248,7 +264,8 @@ private Program work(InputStream inputStream) throws ParsingException { } @Override - public Program visitFile(FileContext ctx) { + public Program visitFile( + FileContext ctx) { for (UnitContext unit : ctx.unit()) { // we add all the units first, so that type resolution an work SourceCodeLocation loc = new SourceCodeLocation(file, getLine(ctx), getCol(ctx)); @@ -295,7 +312,8 @@ public Program visitFile(FileContext ctx) { } @Override - public Unit visitUnit(UnitContext ctx) { + public Unit visitUnit( + UnitContext ctx) { if (ctx.classUnit() != null) return visitClassUnit(ctx.classUnit()); else if (ctx.interfaceUnit() != null) @@ -304,7 +322,8 @@ else if (ctx.interfaceUnit() != null) } @Override - public InterfaceUnit visitInterfaceUnit(InterfaceUnitContext ctx) { + public InterfaceUnit visitInterfaceUnit( + InterfaceUnitContext ctx) { InterfaceUnit unit = (InterfaceUnit) program.getUnit(ctx.name.getText()); currentUnit = unit; @@ -337,7 +356,8 @@ public InterfaceUnit visitInterfaceUnit(InterfaceUnitContext ctx) { } @Override - public ClassUnit visitClassUnit(ClassUnitContext ctx) { + public ClassUnit visitClassUnit( + ClassUnitContext ctx) { ClassUnit unit = (ClassUnit) program.getUnit(ctx.name.getText()); currentUnit = unit; @@ -384,7 +404,8 @@ public ClassUnit visitClassUnit(ClassUnitContext ctx) { return unit; } - private boolean isEntryPoint(CodeMember cm) { + private boolean isEntryPoint( + CodeMember cm) { if (!(cm instanceof CFG)) return false; else if (!onlyMain) @@ -394,7 +415,8 @@ else if (!onlyMain) } @Override - public ConstantGlobal visitConstantDeclaration(ConstantDeclarationContext ctx) { + public ConstantGlobal visitConstantDeclaration( + ConstantDeclarationContext ctx) { SourceCodeLocation location = new SourceCodeLocation(file, getLine(ctx), getCol(ctx)); String name = ctx.name.getText(); Annotations annotations = new IMPAnnotationVisitor().visitAnnotations(ctx.annotations()); @@ -403,7 +425,8 @@ public ConstantGlobal visitConstantDeclaration(ConstantDeclarationContext ctx) { } @Override - public Global visitFieldDeclaration(FieldDeclarationContext ctx) { + public Global visitFieldDeclaration( + FieldDeclarationContext ctx) { SourceCodeLocation location = new SourceCodeLocation(file, getLine(ctx), getCol(ctx)); String name = ctx.name.getText(); Annotations annotations = new IMPAnnotationVisitor().visitAnnotations(ctx.annotations()); @@ -411,7 +434,8 @@ public Global visitFieldDeclaration(FieldDeclarationContext ctx) { } @Override - public CFG visitConstructorDeclaration(ConstructorDeclarationContext ctx) { + public CFG visitConstructorDeclaration( + ConstructorDeclarationContext ctx) { CodeMemberDescriptor descr = mkDescriptor(ctx); if (!currentUnit.getName().equals(descr.getName())) throw new IMPSyntaxException("Constructor does not have the same name as its containing class"); @@ -419,18 +443,21 @@ public CFG visitConstructorDeclaration(ConstructorDeclarationContext ctx) { } @Override - public CFG visitMethodDeclaration(MethodDeclarationContext ctx) { + public CFG visitMethodDeclaration( + MethodDeclarationContext ctx) { CodeMemberDescriptor descr = mkDescriptor(ctx); return new IMPCodeMemberVisitor(file, descr).visitCodeMember(ctx.block()); } @Override - public AbstractCodeMember visitSignatureDeclaration(SignatureDeclarationContext ctx) { + public AbstractCodeMember visitSignatureDeclaration( + SignatureDeclarationContext ctx) { CodeMemberDescriptor descr = mkDescriptor(ctx); return new AbstractCodeMember(descr); } - private CodeMemberDescriptor mkDescriptor(SignatureDeclarationContext ctx) { + private CodeMemberDescriptor mkDescriptor( + SignatureDeclarationContext ctx) { CodeMemberDescriptor descriptor = new CodeMemberDescriptor( new SourceCodeLocation(file, getLine(ctx), getCol(ctx)), currentUnit, @@ -441,7 +468,8 @@ private CodeMemberDescriptor mkDescriptor(SignatureDeclarationContext ctx) { return descriptor; } - private CodeMemberDescriptor mkDescriptor(ConstructorDeclarationContext ctx) { + private CodeMemberDescriptor mkDescriptor( + ConstructorDeclarationContext ctx) { CodeMemberDescriptor descriptor = new CodeMemberDescriptor( new SourceCodeLocation(file, getLine(ctx), getCol(ctx)), currentUnit, @@ -452,7 +480,8 @@ private CodeMemberDescriptor mkDescriptor(ConstructorDeclarationContext ctx) { return descriptor; } - private CodeMemberDescriptor mkDescriptor(MethodDeclarationContext ctx) { + private CodeMemberDescriptor mkDescriptor( + MethodDeclarationContext ctx) { CodeMemberDescriptor descriptor = new CodeMemberDescriptor( new SourceCodeLocation(file, getLine(ctx), getCol(ctx)), currentUnit, @@ -469,7 +498,8 @@ private CodeMemberDescriptor mkDescriptor(MethodDeclarationContext ctx) { } @Override - public Parameter[] visitFormals(FormalsContext ctx) { + public Parameter[] visitFormals( + FormalsContext ctx) { Parameter[] formals = new Parameter[ctx.formal().size() + 1]; formals[0] = new Parameter(new SourceCodeLocation(file, getLine(ctx), getCol(ctx)), "this", new ReferenceType(ClassType.lookup(this.currentUnit.getName(), this.currentUnit))); @@ -480,13 +510,15 @@ public Parameter[] visitFormals(FormalsContext ctx) { } @Override - public Parameter visitFormal(FormalContext ctx) { + public Parameter visitFormal( + FormalContext ctx) { return new Parameter(new SourceCodeLocation(file, getLine(ctx), getCol(ctx)), ctx.name.getText(), Untyped.INSTANCE, null, new IMPAnnotationVisitor().visitAnnotations(ctx.annotations())); } @Override - public Constant visitLiteral(LiteralContext ctx) { + public Constant visitLiteral( + LiteralContext ctx) { int line = getLine(ctx); int col = getCol(ctx); SourceCodeLocation location = new SourceCodeLocation(file, line, col); diff --git a/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/IMPSyntaxException.java b/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/IMPSyntaxException.java index 78825ea88..7d2fa9605 100644 --- a/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/IMPSyntaxException.java +++ b/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/IMPSyntaxException.java @@ -22,7 +22,9 @@ public IMPSyntaxException() { * @param message the message of this exception * @param cause the inner cause of this exception */ - public IMPSyntaxException(String message, Throwable cause) { + public IMPSyntaxException( + String message, + Throwable cause) { super(message, cause); } @@ -31,7 +33,8 @@ public IMPSyntaxException(String message, Throwable cause) { * * @param message the message of this exception */ - public IMPSyntaxException(String message) { + public IMPSyntaxException( + String message) { super(message); } @@ -40,7 +43,8 @@ public IMPSyntaxException(String message) { * * @param cause the inner cause of this exception */ - public IMPSyntaxException(Throwable cause) { + public IMPSyntaxException( + Throwable cause) { super(cause); } } \ No newline at end of file diff --git a/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/ParsingException.java b/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/ParsingException.java index c1d34ca5c..efa3af82a 100644 --- a/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/ParsingException.java +++ b/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/ParsingException.java @@ -22,7 +22,9 @@ public ParsingException() { * @param message the message of this exception * @param cause the inner cause of this exception */ - public ParsingException(String message, Throwable cause) { + public ParsingException( + String message, + Throwable cause) { super(message, cause); } @@ -31,7 +33,8 @@ public ParsingException(String message, Throwable cause) { * * @param message the message of this exception */ - public ParsingException(String message) { + public ParsingException( + String message) { super(message); } @@ -40,7 +43,8 @@ public ParsingException(String message) { * * @param cause the inner cause of this exception */ - public ParsingException(Throwable cause) { + public ParsingException( + Throwable cause) { super(cause); } } \ No newline at end of file diff --git a/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/constructs/ArrayLength.java b/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/constructs/ArrayLength.java new file mode 100644 index 000000000..b275ee346 --- /dev/null +++ b/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/constructs/ArrayLength.java @@ -0,0 +1,149 @@ +package it.unive.lisa.imp.constructs; + +import it.unive.lisa.analysis.AbstractState; +import it.unive.lisa.analysis.AnalysisState; +import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.StatementStore; +import it.unive.lisa.interprocedural.InterproceduralAnalysis; +import it.unive.lisa.program.Program; +import it.unive.lisa.program.SourceCodeLocation; +import it.unive.lisa.program.cfg.CFG; +import it.unive.lisa.program.cfg.CodeLocation; +import it.unive.lisa.program.cfg.CodeMemberDescriptor; +import it.unive.lisa.program.cfg.NativeCFG; +import it.unive.lisa.program.cfg.Parameter; +import it.unive.lisa.program.cfg.statement.Expression; +import it.unive.lisa.program.cfg.statement.PluggableStatement; +import it.unive.lisa.program.cfg.statement.Statement; +import it.unive.lisa.program.cfg.statement.UnaryExpression; +import it.unive.lisa.program.type.Int32Type; +import it.unive.lisa.symbolic.SymbolicExpression; +import it.unive.lisa.symbolic.heap.AccessChild; +import it.unive.lisa.symbolic.heap.HeapDereference; +import it.unive.lisa.symbolic.value.Variable; +import it.unive.lisa.type.ArrayType; +import it.unive.lisa.type.Type; +import it.unive.lisa.type.Untyped; +import java.util.HashSet; +import java.util.Set; + +/** + * The native construct representing the array length operation. This construct + * can be invoked on an array variable {@code x} with {@code arraylen(x)}. + * + * @author Luca Negrini + */ +public class ArrayLength extends NativeCFG { + + /** + * Builds the construct. + * + * @param location the location where this construct is defined + * @param program the program of the analysis + */ + public ArrayLength( + CodeLocation location, + Program program) { + super(new CodeMemberDescriptor(location, program, false, "arraylen", Int32Type.INSTANCE, + new Parameter(location, "a", Untyped.INSTANCE)), + IMPArrayLength.class); + } + + /** + * An expression modeling the array length operation. The type of the + * operand must be {@link ArrayType}. The type of this expression is the + * {@link Int32Type}. + * + * @author Luca Negrini + */ + public static class IMPArrayLength extends UnaryExpression implements PluggableStatement { + + /** + * The statement that originated this one. + */ + protected Statement originating; + + /** + * Builds a new instance of this native call, according to the + * {@link PluggableStatement} contract. + * + * @param cfg the cfg where the native call happens + * @param location the location where the native call happens + * @param params the parameters of the native call + * + * @return the newly-built call + */ + public static IMPArrayLength build( + CFG cfg, + CodeLocation location, + Expression... params) { + return new IMPArrayLength(cfg, location, params[0]); + } + + @Override + public void setOriginatingStatement( + Statement st) { + originating = st; + } + + /** + * Builds the length. + * + * @param cfg the {@link CFG} where this operation lies + * @param sourceFile the source file name where this operation is + * defined + * @param line the line number where this operation is defined + * @param col the column where this operation is defined + * @param parameter the operand of this operation + */ + public IMPArrayLength( + CFG cfg, + String sourceFile, + int line, + int col, + Expression parameter) { + this(cfg, new SourceCodeLocation(sourceFile, line, col), parameter); + } + + /** + * Builds the length. + * + * @param cfg the {@link CFG} where this operation lies + * @param location the code location where this operation is defined + * @param parameter the operand of this operation + */ + public IMPArrayLength( + CFG cfg, + CodeLocation location, + Expression parameter) { + super(cfg, location, "arraylen", parameter); + } + + @Override + public > AnalysisState fwdUnarySemantics( + InterproceduralAnalysis interprocedural, + AnalysisState state, + SymbolicExpression expr, + StatementStore expressions) + throws SemanticException { + Set arraytypes = new HashSet<>(); + Set types = state.getState().getRuntimeTypesOf(expr, this, state.getState()); + for (Type t : types) + if (t.isPointerType() && t.asPointerType().getInnerType().isArrayType()) + arraytypes.add(t.asPointerType().getInnerType()); + + if (arraytypes.isEmpty()) + return state.bottom(); + + ArrayType arraytype = Type.commonSupertype(arraytypes, getStaticType()).asArrayType(); + HeapDereference container = new HeapDereference(arraytype, expr, getLocation()); + AccessChild len = new AccessChild( + Int32Type.INSTANCE, + container, + new Variable(Untyped.INSTANCE, "len", getLocation()), + getLocation()); + + return state.smallStepSemantics(len, this); + } + } +} \ No newline at end of file diff --git a/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/constructs/StringConcat.java b/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/constructs/StringConcat.java index a034485f0..447fac5b8 100644 --- a/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/constructs/StringConcat.java +++ b/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/constructs/StringConcat.java @@ -29,7 +29,9 @@ public class StringConcat extends NativeCFG { * @param location the location where this construct is defined * @param stringUnit the unit where this construct is defined */ - public StringConcat(CodeLocation location, ClassUnit stringUnit) { + public StringConcat( + CodeLocation location, + ClassUnit stringUnit) { super(new CodeMemberDescriptor(location, stringUnit, true, "concat", StringType.INSTANCE, new Parameter(location, "this", StringType.INSTANCE), new Parameter(location, "other", StringType.INSTANCE)), @@ -55,12 +57,16 @@ public static class IMPStringConcat extends Concat implements PluggableStatement * * @return the newly-built call */ - public static IMPStringConcat build(CFG cfg, CodeLocation location, Expression... params) { + public static IMPStringConcat build( + CFG cfg, + CodeLocation location, + Expression... params) { return new IMPStringConcat(cfg, location, params[0], params[1]); } @Override - public void setOriginatingStatement(Statement st) { + public void setOriginatingStatement( + Statement st) { originating = st; } @@ -75,7 +81,13 @@ public void setOriginatingStatement(Statement st) { * @param left the left-hand side of this operation * @param right the right-hand side of this operation */ - public IMPStringConcat(CFG cfg, String sourceFile, int line, int col, Expression left, Expression right) { + public IMPStringConcat( + CFG cfg, + String sourceFile, + int line, + int col, + Expression left, + Expression right) { this(cfg, new SourceCodeLocation(sourceFile, line, col), left, right); } @@ -87,7 +99,11 @@ public IMPStringConcat(CFG cfg, String sourceFile, int line, int col, Expression * @param left the left-hand side of this operation * @param right the right-hand side of this operation */ - public IMPStringConcat(CFG cfg, CodeLocation location, Expression left, Expression right) { + public IMPStringConcat( + CFG cfg, + CodeLocation location, + Expression left, + Expression right) { super(cfg, location, left, right); } } diff --git a/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/constructs/StringContains.java b/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/constructs/StringContains.java index 5f84e321b..85a9c33ae 100644 --- a/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/constructs/StringContains.java +++ b/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/constructs/StringContains.java @@ -30,7 +30,9 @@ public class StringContains extends NativeCFG { * @param location the location where this construct is defined * @param stringUnit the unit where this construct is defined */ - public StringContains(CodeLocation location, ClassUnit stringUnit) { + public StringContains( + CodeLocation location, + ClassUnit stringUnit) { super(new CodeMemberDescriptor(location, stringUnit, true, "contains", BoolType.INSTANCE, new Parameter(location, "this", StringType.INSTANCE), new Parameter(location, "other", StringType.INSTANCE)), @@ -56,12 +58,16 @@ public static class IMPStringContains extends Contains implements PluggableState * * @return the newly-built call */ - public static IMPStringContains build(CFG cfg, CodeLocation location, Expression... params) { + public static IMPStringContains build( + CFG cfg, + CodeLocation location, + Expression... params) { return new IMPStringContains(cfg, location, params[0], params[1]); } @Override - public void setOriginatingStatement(Statement st) { + public void setOriginatingStatement( + Statement st) { originating = st; } @@ -76,7 +82,12 @@ public void setOriginatingStatement(Statement st) { * @param left the left-hand side of this operation * @param right the right-hand side of this operation */ - public IMPStringContains(CFG cfg, String sourceFile, int line, int col, Expression left, + public IMPStringContains( + CFG cfg, + String sourceFile, + int line, + int col, + Expression left, Expression right) { this(cfg, new SourceCodeLocation(sourceFile, line, col), left, right); } @@ -89,7 +100,11 @@ public IMPStringContains(CFG cfg, String sourceFile, int line, int col, Expressi * @param left the left-hand side of this operation * @param right the right-hand side of this operation */ - public IMPStringContains(CFG cfg, CodeLocation location, Expression left, Expression right) { + public IMPStringContains( + CFG cfg, + CodeLocation location, + Expression left, + Expression right) { super(cfg, location, left, right); } } diff --git a/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/constructs/StringEndsWith.java b/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/constructs/StringEndsWith.java index b57270b04..e15c4ceb5 100644 --- a/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/constructs/StringEndsWith.java +++ b/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/constructs/StringEndsWith.java @@ -30,7 +30,9 @@ public class StringEndsWith extends NativeCFG { * @param location the location where this construct is defined * @param stringUnit the unit where this construct is defined */ - public StringEndsWith(CodeLocation location, ClassUnit stringUnit) { + public StringEndsWith( + CodeLocation location, + ClassUnit stringUnit) { super(new CodeMemberDescriptor(location, stringUnit, true, "endsWith", BoolType.INSTANCE, new Parameter(location, "this", StringType.INSTANCE), new Parameter(location, "other", StringType.INSTANCE)), @@ -56,12 +58,16 @@ public static class IMPStringEndsWith extends EndsWith implements PluggableState * * @return the newly-built call */ - public static IMPStringEndsWith build(CFG cfg, CodeLocation location, Expression... params) { + public static IMPStringEndsWith build( + CFG cfg, + CodeLocation location, + Expression... params) { return new IMPStringEndsWith(cfg, location, params[0], params[1]); } @Override - public void setOriginatingStatement(Statement st) { + public void setOriginatingStatement( + Statement st) { originating = st; } @@ -76,7 +82,12 @@ public void setOriginatingStatement(Statement st) { * @param left the left-hand side of this operation * @param right the right-hand side of this operation */ - public IMPStringEndsWith(CFG cfg, String sourceFile, int line, int col, Expression left, + public IMPStringEndsWith( + CFG cfg, + String sourceFile, + int line, + int col, + Expression left, Expression right) { this(cfg, new SourceCodeLocation(sourceFile, line, col), left, right); } @@ -89,7 +100,11 @@ public IMPStringEndsWith(CFG cfg, String sourceFile, int line, int col, Expressi * @param left the left-hand side of this operation * @param right the right-hand side of this operation */ - public IMPStringEndsWith(CFG cfg, CodeLocation location, Expression left, Expression right) { + public IMPStringEndsWith( + CFG cfg, + CodeLocation location, + Expression left, + Expression right) { super(cfg, location, left, right); } } diff --git a/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/constructs/StringEquals.java b/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/constructs/StringEquals.java index a484a738e..6177d4c55 100644 --- a/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/constructs/StringEquals.java +++ b/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/constructs/StringEquals.java @@ -30,7 +30,9 @@ public class StringEquals extends NativeCFG { * @param location the location where this construct is defined * @param stringUnit the unit where this construct is defined */ - public StringEquals(CodeLocation location, ClassUnit stringUnit) { + public StringEquals( + CodeLocation location, + ClassUnit stringUnit) { super(new CodeMemberDescriptor(location, stringUnit, true, "equals", BoolType.INSTANCE, new Parameter(location, "this", StringType.INSTANCE), new Parameter(location, "other", StringType.INSTANCE)), @@ -56,12 +58,16 @@ public static class IMPStringEquals extends Equals implements PluggableStatement * * @return the newly-built call */ - public static IMPStringEquals build(CFG cfg, CodeLocation location, Expression... params) { + public static IMPStringEquals build( + CFG cfg, + CodeLocation location, + Expression... params) { return new IMPStringEquals(cfg, location, params[0], params[1]); } @Override - public void setOriginatingStatement(Statement st) { + public void setOriginatingStatement( + Statement st) { originating = st; } @@ -76,7 +82,12 @@ public void setOriginatingStatement(Statement st) { * @param left the left-hand side of this operation * @param right the right-hand side of this operation */ - public IMPStringEquals(CFG cfg, String sourceFile, int line, int col, Expression left, + public IMPStringEquals( + CFG cfg, + String sourceFile, + int line, + int col, + Expression left, Expression right) { this(cfg, new SourceCodeLocation(sourceFile, line, col), left, right); } @@ -89,7 +100,11 @@ public IMPStringEquals(CFG cfg, String sourceFile, int line, int col, Expression * @param left the left-hand side of this operation * @param right the right-hand side of this operation */ - public IMPStringEquals(CFG cfg, CodeLocation location, Expression left, Expression right) { + public IMPStringEquals( + CFG cfg, + CodeLocation location, + Expression left, + Expression right) { super(cfg, location, left, right); } } diff --git a/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/constructs/StringIndexOf.java b/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/constructs/StringIndexOf.java index aa0f6c384..c7e9abf5c 100644 --- a/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/constructs/StringIndexOf.java +++ b/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/constructs/StringIndexOf.java @@ -29,7 +29,9 @@ public class StringIndexOf extends NativeCFG { * @param location the location where this construct is defined * @param stringUnit the unit where this construct is defined */ - public StringIndexOf(CodeLocation location, ClassUnit stringUnit) { + public StringIndexOf( + CodeLocation location, + ClassUnit stringUnit) { super(new CodeMemberDescriptor(location, stringUnit, true, "indexOf", StringType.INSTANCE, new Parameter(location, "this", StringType.INSTANCE), new Parameter(location, "search", StringType.INSTANCE)), @@ -55,12 +57,16 @@ public static class IMPStringIndexOf extends IndexOf implements PluggableStateme * * @return the newly-built call */ - public static IMPStringIndexOf build(CFG cfg, CodeLocation location, Expression... params) { + public static IMPStringIndexOf build( + CFG cfg, + CodeLocation location, + Expression... params) { return new IMPStringIndexOf(cfg, location, params[0], params[1]); } @Override - public void setOriginatingStatement(Statement st) { + public void setOriginatingStatement( + Statement st) { originating = st; } @@ -75,8 +81,13 @@ public void setOriginatingStatement(Statement st) { * @param left the left-hand side of this operation * @param right the right-hand side of this operation */ - public IMPStringIndexOf(CFG cfg, String sourceFile, int line, int col, - Expression left, Expression right) { + public IMPStringIndexOf( + CFG cfg, + String sourceFile, + int line, + int col, + Expression left, + Expression right) { this(cfg, new SourceCodeLocation(sourceFile, line, col), left, right); } @@ -88,7 +99,11 @@ public IMPStringIndexOf(CFG cfg, String sourceFile, int line, int col, * @param left the left-hand side of this operation * @param right the right-hand side of this operation */ - public IMPStringIndexOf(CFG cfg, CodeLocation location, Expression left, Expression right) { + public IMPStringIndexOf( + CFG cfg, + CodeLocation location, + Expression left, + Expression right) { super(cfg, location, left, right); } } diff --git a/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/constructs/StringLength.java b/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/constructs/StringLength.java index f1a4e5fa4..f24ffdc08 100644 --- a/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/constructs/StringLength.java +++ b/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/constructs/StringLength.java @@ -28,7 +28,9 @@ public class StringLength extends NativeCFG { * @param location the location where this construct is defined * @param stringUnit the unit where this construct is defined */ - public StringLength(CodeLocation location, ClassUnit stringUnit) { + public StringLength( + CodeLocation location, + ClassUnit stringUnit) { super(new CodeMemberDescriptor(location, stringUnit, true, "len", Int32Type.INSTANCE, new Parameter(location, "this", StringType.INSTANCE)), IMPStringLength.class); @@ -53,12 +55,16 @@ public static class IMPStringLength extends Length implements PluggableStatement * * @return the newly-built call */ - public static IMPStringLength build(CFG cfg, CodeLocation location, Expression... params) { + public static IMPStringLength build( + CFG cfg, + CodeLocation location, + Expression... params) { return new IMPStringLength(cfg, location, params[0]); } @Override - public void setOriginatingStatement(Statement st) { + public void setOriginatingStatement( + Statement st) { originating = st; } @@ -72,7 +78,11 @@ public void setOriginatingStatement(Statement st) { * @param col the column where this operation is defined * @param parameter the operand of this operation */ - public IMPStringLength(CFG cfg, String sourceFile, int line, int col, + public IMPStringLength( + CFG cfg, + String sourceFile, + int line, + int col, Expression parameter) { this(cfg, new SourceCodeLocation(sourceFile, line, col), parameter); } @@ -84,7 +94,10 @@ public IMPStringLength(CFG cfg, String sourceFile, int line, int col, * @param location the code location where this operation is defined * @param parameter the operand of this operation */ - public IMPStringLength(CFG cfg, CodeLocation location, Expression parameter) { + public IMPStringLength( + CFG cfg, + CodeLocation location, + Expression parameter) { super(cfg, location, parameter); } } diff --git a/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/constructs/StringReplace.java b/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/constructs/StringReplace.java index 918e05370..593fc7e67 100644 --- a/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/constructs/StringReplace.java +++ b/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/constructs/StringReplace.java @@ -30,7 +30,9 @@ public class StringReplace extends NativeCFG { * @param location the location where this construct is defined * @param stringUnit the unit where this construct is defined */ - public StringReplace(CodeLocation location, ClassUnit stringUnit) { + public StringReplace( + CodeLocation location, + ClassUnit stringUnit) { super(new CodeMemberDescriptor(location, stringUnit, true, "replace", BoolType.INSTANCE, new Parameter(location, "this", StringType.INSTANCE), new Parameter(location, "search", StringType.INSTANCE), @@ -57,12 +59,16 @@ public static class IMPStringReplace extends Replace implements PluggableStateme * * @return the newly-built call */ - public static IMPStringReplace build(CFG cfg, CodeLocation location, Expression... params) { + public static IMPStringReplace build( + CFG cfg, + CodeLocation location, + Expression... params) { return new IMPStringReplace(cfg, location, params[0], params[1], params[2]); } @Override - public void setOriginatingStatement(Statement st) { + public void setOriginatingStatement( + Statement st) { originating = st; } @@ -78,8 +84,14 @@ public void setOriginatingStatement(Statement st) { * @param middle the middle operand of this operation * @param right the right-hand side of this operation */ - public IMPStringReplace(CFG cfg, String sourceFile, int line, int col, Expression left, - Expression middle, Expression right) { + public IMPStringReplace( + CFG cfg, + String sourceFile, + int line, + int col, + Expression left, + Expression middle, + Expression right) { this(cfg, new SourceCodeLocation(sourceFile, line, col), left, middle, right); } @@ -92,8 +104,12 @@ public IMPStringReplace(CFG cfg, String sourceFile, int line, int col, Expressio * @param middle the middle operand of this operation * @param right the right-hand side of this operation */ - public IMPStringReplace(CFG cfg, CodeLocation location, Expression left, - Expression middle, Expression right) { + public IMPStringReplace( + CFG cfg, + CodeLocation location, + Expression left, + Expression middle, + Expression right) { super(cfg, location, left, middle, right); } } diff --git a/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/constructs/StringStartsWith.java b/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/constructs/StringStartsWith.java index ab06a1f62..28da91cf9 100644 --- a/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/constructs/StringStartsWith.java +++ b/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/constructs/StringStartsWith.java @@ -30,7 +30,9 @@ public class StringStartsWith extends NativeCFG { * @param location the location where this construct is defined * @param stringUnit the unit where this construct is defined */ - public StringStartsWith(CodeLocation location, ClassUnit stringUnit) { + public StringStartsWith( + CodeLocation location, + ClassUnit stringUnit) { super(new CodeMemberDescriptor(location, stringUnit, true, "startsWith", BoolType.INSTANCE, new Parameter(location, "this", StringType.INSTANCE), new Parameter(location, "other", StringType.INSTANCE)), @@ -56,12 +58,16 @@ public static class IMPStringStartsWith extends StartsWith implements PluggableS * * @return the newly-built call */ - public static IMPStringStartsWith build(CFG cfg, CodeLocation location, Expression... params) { + public static IMPStringStartsWith build( + CFG cfg, + CodeLocation location, + Expression... params) { return new IMPStringStartsWith(cfg, location, params[0], params[1]); } @Override - public void setOriginatingStatement(Statement st) { + public void setOriginatingStatement( + Statement st) { originating = st; } @@ -76,7 +82,12 @@ public void setOriginatingStatement(Statement st) { * @param left the left-hand side of this operation * @param right the right-hand side of this operation */ - public IMPStringStartsWith(CFG cfg, String sourceFile, int line, int col, Expression left, + public IMPStringStartsWith( + CFG cfg, + String sourceFile, + int line, + int col, + Expression left, Expression right) { this(cfg, new SourceCodeLocation(sourceFile, line, col), left, right); } @@ -89,7 +100,11 @@ public IMPStringStartsWith(CFG cfg, String sourceFile, int line, int col, Expres * @param left the left-hand side of this operation * @param right the right-hand side of this operation */ - public IMPStringStartsWith(CFG cfg, CodeLocation location, Expression left, Expression right) { + public IMPStringStartsWith( + CFG cfg, + CodeLocation location, + Expression left, + Expression right) { super(cfg, location, left, right); } } diff --git a/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/constructs/StringSubstring.java b/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/constructs/StringSubstring.java index 6b6ead408..d2496832a 100644 --- a/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/constructs/StringSubstring.java +++ b/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/constructs/StringSubstring.java @@ -32,7 +32,9 @@ public class StringSubstring extends NativeCFG { * @param location the location where this construct is defined * @param stringUnit the unit where this construct is defined */ - public StringSubstring(CodeLocation location, ClassUnit stringUnit) { + public StringSubstring( + CodeLocation location, + ClassUnit stringUnit) { super(new CodeMemberDescriptor(location, stringUnit, true, "substring", BoolType.INSTANCE, new Parameter(location, "this", StringType.INSTANCE), new Parameter(location, "start", Int32Type.INSTANCE), @@ -60,12 +62,16 @@ public static class IMPStringSubstring extends Substring implements PluggableSta * * @return the newly-built call */ - public static IMPStringSubstring build(CFG cfg, CodeLocation location, Expression... params) { + public static IMPStringSubstring build( + CFG cfg, + CodeLocation location, + Expression... params) { return new IMPStringSubstring(cfg, location, params[0], params[1], params[2]); } @Override - public void setOriginatingStatement(Statement st) { + public void setOriginatingStatement( + Statement st) { originating = st; } @@ -81,8 +87,14 @@ public void setOriginatingStatement(Statement st) { * @param middle the middle operand of this operation * @param right the right-hand side of this operation */ - public IMPStringSubstring(CFG cfg, String sourceFile, int line, int col, Expression left, - Expression middle, Expression right) { + public IMPStringSubstring( + CFG cfg, + String sourceFile, + int line, + int col, + Expression left, + Expression middle, + Expression right) { this(cfg, new SourceCodeLocation(sourceFile, line, col), left, middle, right); } @@ -95,7 +107,11 @@ public IMPStringSubstring(CFG cfg, String sourceFile, int line, int col, Express * @param middle the middle operand of this operation * @param right the right-hand side of this operation */ - public IMPStringSubstring(CFG cfg, CodeLocation location, Expression left, Expression middle, + public IMPStringSubstring( + CFG cfg, + CodeLocation location, + Expression left, + Expression middle, Expression right) { super(cfg, location, left, middle, right); } diff --git a/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/expressions/IMPAddOrConcat.java b/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/expressions/IMPAddOrConcat.java index de78a535b..43174b019 100644 --- a/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/expressions/IMPAddOrConcat.java +++ b/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/expressions/IMPAddOrConcat.java @@ -5,9 +5,6 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.SourceCodeLocation; import it.unive.lisa.program.cfg.CFG; @@ -22,18 +19,18 @@ import it.unive.lisa.type.Type; import it.unive.lisa.type.TypeSystem; import it.unive.lisa.type.Untyped; +import java.util.Set; /** * An expression modeling the plus operation ({@code +}) that, in some * languages, represents either the string concatenation or the numeric addition - * depending on the types of its operands. If both operands' dynamic type - * (according to {@link SymbolicExpression#getDynamicType()}) is a - * {@link it.unive.lisa.type.StringType} (according to - * {@link Type#isStringType()}), then this operation translates to a string - * concatenation of its operands, and its type is {@link StringType}. Otherwise, - * both operands' types must be instances of {@link NumericType}, and the type - * of this expression (i.e., a numerical sum) is the common numerical type of - * its operands, according to the type inference. + * depending on the types of its operands. The semantics checks for each + * combination of the operands' runtime types: if both types are + * {@link it.unive.lisa.type.StringType}s, then this operation translates to a + * string concatenation of its operands, and its type is {@link StringType}. + * Otherwise, both operands' types must be instances of {@link NumericType}, and + * the type of this expression (i.e., a numerical sum) is the common numerical + * type of its operands, according to the type inference. * * @author Luca Negrini */ @@ -49,27 +46,33 @@ public class IMPAddOrConcat extends it.unive.lisa.program.cfg.statement.BinaryEx * @param left the left-hand side of this operation * @param right the right-hand side of this operation */ - public IMPAddOrConcat(CFG cfg, String sourceFile, int line, int col, Expression left, Expression right) { + public IMPAddOrConcat( + CFG cfg, + String sourceFile, + int line, + int col, + Expression left, + Expression right) { super(cfg, new SourceCodeLocation(sourceFile, line, col), "+", left, right); } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState binarySemantics( - InterproceduralAnalysis interprocedural, - AnalysisState state, - SymbolicExpression left, - SymbolicExpression right, - StatementStore expressions) - throws SemanticException { - AnalysisState result = state.bottom(); + public > AnalysisState fwdBinarySemantics( + InterproceduralAnalysis interprocedural, + AnalysisState state, + SymbolicExpression left, + SymbolicExpression right, + StatementStore expressions) + throws SemanticException { + AnalysisState result = state.bottom(); BinaryOperator op; TypeSystem types = getProgram().getTypes(); - for (Type tleft : left.getRuntimeTypes(types)) - for (Type tright : right.getRuntimeTypes(types)) { + Set ltypes = state.getState().getRuntimeTypesOf(left, this, state.getState()); + Set rtypes = state.getState().getRuntimeTypesOf(right, this, state.getState()); + + for (Type tleft : ltypes) + for (Type tright : rtypes) { if (tleft.isStringType()) if (tright.isStringType() || tright.isUntyped()) op = StringConcat.INSTANCE; @@ -95,9 +98,7 @@ else if (tright.isNumericType() || tright.isUntyped()) if (op == null) continue; - Type t = Type.commonSupertype( - op.typeInference(types, left.getRuntimeTypes(types), right.getRuntimeTypes(types)), - Untyped.INSTANCE); + Type t = Type.commonSupertype(op.typeInference(types, ltypes, rtypes), Untyped.INSTANCE); result = result.lub(state.smallStepSemantics( new BinaryExpression( t, diff --git a/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/expressions/IMPArrayAccess.java b/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/expressions/IMPArrayAccess.java index 457f5e633..7e479c894 100644 --- a/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/expressions/IMPArrayAccess.java +++ b/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/expressions/IMPArrayAccess.java @@ -4,9 +4,6 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.SourceCodeLocation; import it.unive.lisa.program.cfg.CFG; @@ -17,7 +14,6 @@ import it.unive.lisa.symbolic.heap.HeapDereference; import it.unive.lisa.type.ArrayType; import it.unive.lisa.type.Type; -import it.unive.lisa.type.TypeSystem; import java.util.HashSet; import java.util.Set; @@ -41,35 +37,40 @@ public class IMPArrayAccess extends BinaryExpression { * will receive the access * @param location the expression representing the accessed element */ - public IMPArrayAccess(CFG cfg, String sourceFile, int line, int col, Expression container, Expression location) { + public IMPArrayAccess( + CFG cfg, + String sourceFile, + int line, + int col, + Expression container, + Expression location) { super(cfg, new SourceCodeLocation(sourceFile, line, col), "[]", container, location); } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState binarySemantics( - InterproceduralAnalysis interprocedural, - AnalysisState state, - SymbolicExpression left, - SymbolicExpression right, - StatementStore expressions) - throws SemanticException { + public > AnalysisState fwdBinarySemantics( + InterproceduralAnalysis interprocedural, + AnalysisState state, + SymbolicExpression left, + SymbolicExpression right, + StatementStore expressions) + throws SemanticException { Set arraytypes = new HashSet<>(); - TypeSystem types = getProgram().getTypes(); - for (Type t : left.getRuntimeTypes(types)) + for (Type t : state.getState().getRuntimeTypesOf(left, this, state.getState())) if (t.isPointerType() && t.asPointerType().getInnerType().isArrayType()) - arraytypes.add(t.asPointerType().getInnerType().asArrayType()); + arraytypes.add(t.asPointerType().getInnerType()); if (arraytypes.isEmpty()) return state.bottom(); ArrayType arraytype = Type.commonSupertype(arraytypes, getStaticType()).asArrayType(); HeapDereference container = new HeapDereference(arraytype, left, getLocation()); - container.setRuntimeTypes(arraytypes); + AccessChild elem = new AccessChild( + arraytype.getInnerType(), + container, + right, + getLocation()); - return state.smallStepSemantics(new AccessChild(arraytype.getInnerType(), container, right, getLocation()), - this); + return state.smallStepSemantics(elem, this); } } diff --git a/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/expressions/IMPAssert.java b/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/expressions/IMPAssert.java index 275325671..9f678acb6 100644 --- a/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/expressions/IMPAssert.java +++ b/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/expressions/IMPAssert.java @@ -4,9 +4,6 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.SourceCodeLocation; import it.unive.lisa.program.cfg.CFG; @@ -14,8 +11,8 @@ import it.unive.lisa.program.cfg.statement.UnaryStatement; import it.unive.lisa.symbolic.SymbolicExpression; import it.unive.lisa.symbolic.value.Skip; -import it.unive.lisa.symbolic.value.ValueExpression; import it.unive.lisa.type.Type; +import java.util.Set; /** * An assertion in an IMP program. @@ -33,31 +30,24 @@ public class IMPAssert extends UnaryStatement { * @param col the column where this operation is defined * @param expression the expression being asserted */ - public IMPAssert(CFG cfg, String sourceFile, int line, int col, Expression expression) { + public IMPAssert( + CFG cfg, + String sourceFile, + int line, + int col, + Expression expression) { super(cfg, new SourceCodeLocation(sourceFile, line, col), "assert", expression); } @Override - @SuppressWarnings("unchecked") - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState unarySemantics( - InterproceduralAnalysis interprocedural, - AnalysisState state, - SymbolicExpression expr, - StatementStore expressions) - throws SemanticException { - Type type = null; - T typedom = (T) state.getDomainInstance(TypeDomain.class); - for (SymbolicExpression e : state.rewrite(expr, this)) { - Type inferred = typedom.getDynamicTypeOf((ValueExpression) e, this); - if (type == null) - type = inferred; - else - type = type.commonSupertype(inferred); - } - if (!type.isBooleanType()) + public > AnalysisState fwdUnarySemantics( + InterproceduralAnalysis interprocedural, + AnalysisState state, + SymbolicExpression expr, + StatementStore expressions) + throws SemanticException { + Set types = state.getState().getRuntimeTypesOf(expr, this, state.getState()); + if (types.stream().noneMatch(Type::isBooleanType)) return state.bottom(); return state.smallStepSemantics(new Skip(getLocation()), this); } diff --git a/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/expressions/IMPNewArray.java b/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/expressions/IMPNewArray.java index 00afb9e69..6bfcffe21 100644 --- a/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/expressions/IMPNewArray.java +++ b/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/expressions/IMPNewArray.java @@ -4,21 +4,22 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; import it.unive.lisa.analysis.lattices.ExpressionSet; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.imp.types.ArrayType; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.SourceCodeLocation; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.statement.Expression; import it.unive.lisa.program.cfg.statement.NaryExpression; +import it.unive.lisa.program.type.Int32Type; import it.unive.lisa.symbolic.SymbolicExpression; +import it.unive.lisa.symbolic.heap.AccessChild; import it.unive.lisa.symbolic.heap.HeapReference; import it.unive.lisa.symbolic.heap.MemoryAllocation; +import it.unive.lisa.symbolic.value.Variable; import it.unive.lisa.type.ReferenceType; import it.unive.lisa.type.Type; +import it.unive.lisa.type.Untyped; import java.util.Objects; /** @@ -46,35 +47,69 @@ public class IMPNewArray extends NaryExpression { * @param staticallyAllocated if this allocation is static or not * @param dimensions the dimensions of the array */ - public IMPNewArray(CFG cfg, String sourceFile, int line, int col, Type type, boolean staticallyAllocated, + public IMPNewArray( + CFG cfg, + String sourceFile, + int line, + int col, + Type type, + boolean staticallyAllocated, Expression[] dimensions) { super(cfg, new SourceCodeLocation(sourceFile, line, col), (staticallyAllocated ? "" : "new ") + type + "[]", ArrayType.lookup(type, dimensions.length), dimensions); + if (dimensions.length != 1) + throw new UnsupportedOperationException("Multidimensional arrays are not yet supported"); this.staticallyAllocated = staticallyAllocated; } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState expressionSemantics( - InterproceduralAnalysis interprocedural, - AnalysisState state, - ExpressionSet[] params, - StatementStore expressions) - throws SemanticException { - MemoryAllocation alloc = new MemoryAllocation(getStaticType(), getLocation(), staticallyAllocated); - AnalysisState sem = state.smallStepSemantics(alloc, this); + public > AnalysisState forwardSemanticsAux( + InterproceduralAnalysis interprocedural, + AnalysisState state, + ExpressionSet[] params, + StatementStore expressions) + throws SemanticException { + Type type = getStaticType(); + MemoryAllocation alloc = new MemoryAllocation(type, getLocation(), staticallyAllocated); + AnalysisState allocSt = state.smallStepSemantics(alloc, this); + ExpressionSet allocExps = allocSt.getComputedExpressions(); - AnalysisState result = state.bottom(); - for (SymbolicExpression loc : sem.getComputedExpressions()) { - ReferenceType staticType = new ReferenceType(loc.getStaticType()); - HeapReference ref = new HeapReference(staticType, loc, getLocation()); - AnalysisState refSem = sem.smallStepSemantics(ref, this); - result = result.lub(refSem); + AnalysisState initSt = state.bottom(); + for (SymbolicExpression allocExp : allocExps) { + AccessChild len = new AccessChild( + Int32Type.INSTANCE, + allocExp, + new Variable(Untyped.INSTANCE, "len", getLocation()), + getLocation()); + + AnalysisState lenSt = state.bottom(); + // TODO fix when we'll support multidimensional arrays + for (SymbolicExpression dim : params[0]) + lenSt = lenSt.lub(allocSt.assign(len, dim, this)); + initSt = initSt.lub(lenSt); } - return result; + AnalysisState refSt = state.bottom(); + for (SymbolicExpression loc : allocSt.getComputedExpressions()) { + ReferenceType t = new ReferenceType(loc.getStaticType()); + HeapReference ref = new HeapReference(t, loc, getLocation()); + AnalysisState refSem = initSt.smallStepSemantics(ref, this); + refSt = refSt.lub(refSem); + } + + return refSt; + } + + @Override + public > AnalysisState backwardSemanticsAux( + InterproceduralAnalysis interprocedural, + AnalysisState state, + ExpressionSet[] params, + StatementStore expressions) + throws SemanticException { + // TODO implement this when backward analysis will be out of + // beta + throw new UnsupportedOperationException(); } @Override @@ -86,7 +121,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (!super.equals(obj)) diff --git a/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/expressions/IMPNewObj.java b/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/expressions/IMPNewObj.java index c990bd948..2b2a5d43d 100644 --- a/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/expressions/IMPNewObj.java +++ b/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/expressions/IMPNewObj.java @@ -4,10 +4,7 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; import it.unive.lisa.analysis.lattices.ExpressionSet; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.SourceCodeLocation; import it.unive.lisa.program.cfg.CFG; @@ -23,7 +20,6 @@ import it.unive.lisa.type.ReferenceType; import it.unive.lisa.type.Type; import it.unive.lisa.type.UnitType; -import java.util.Collections; import java.util.Objects; import org.apache.commons.lang3.ArrayUtils; @@ -55,7 +51,13 @@ public class IMPNewObj extends NaryExpression { * @param staticallyAllocated if this allocation is static or not * @param parameters the parameters of the constructor call */ - public IMPNewObj(CFG cfg, String sourceFile, int line, int col, Type type, boolean staticallyAllocated, + public IMPNewObj( + CFG cfg, + String sourceFile, + int line, + int col, + Type type, + boolean staticallyAllocated, Expression... parameters) { super(cfg, new SourceCodeLocation(sourceFile, line, col), (staticallyAllocated ? "" : "new ") + type, type, parameters); @@ -63,37 +65,33 @@ public IMPNewObj(CFG cfg, String sourceFile, int line, int col, Type type, boole } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState expressionSemantics( - InterproceduralAnalysis interprocedural, - AnalysisState state, - ExpressionSet[] params, - StatementStore expressions) - throws SemanticException { + public > AnalysisState forwardSemanticsAux( + InterproceduralAnalysis interprocedural, + AnalysisState state, + ExpressionSet[] params, + StatementStore expressions) + throws SemanticException { Type type = getStaticType(); ReferenceType reftype = new ReferenceType(type); MemoryAllocation created = new MemoryAllocation(type, getLocation(), staticallyAllocated); HeapReference ref = new HeapReference(reftype, created, getLocation()); - created.setRuntimeTypes(Collections.singleton(type)); - ref.setRuntimeTypes(Collections.singleton(reftype)); // we need to add the receiver to the parameters - VariableRef paramThis = new VariableRef(getCFG(), getLocation(), "$lisareceiver", type); + VariableRef paramThis = new VariableRef(getCFG(), getLocation(), "$lisareceiver", reftype); Expression[] fullExpressions = ArrayUtils.insert(0, getSubExpressions(), paramThis); - ExpressionSet[] fullParams = ArrayUtils.insert(0, params, new ExpressionSet<>(created)); // we also have to add the receiver inside the state - AnalysisState callstate = paramThis.semantics(state, interprocedural, expressions); - AnalysisState tmp = state.bottom(); + AnalysisState callstate = paramThis.forwardSemantics(state, interprocedural, expressions); + AnalysisState tmp = state.bottom(); for (SymbolicExpression v : callstate.getComputedExpressions()) tmp = tmp.lub(callstate.assign(v, ref, paramThis)); + ExpressionSet[] fullParams = ArrayUtils.insert(0, params, + callstate.getComputedExpressions()); expressions.put(paramThis, tmp); UnresolvedCall call = new UnresolvedCall(getCFG(), getLocation(), CallType.INSTANCE, type.toString(), type.toString(), fullExpressions); - AnalysisState sem = call.expressionSemantics(interprocedural, tmp, fullParams, expressions); + AnalysisState sem = call.forwardSemanticsAux(interprocedural, tmp, fullParams, expressions); // now remove the instrumented receiver expressions.forget(paramThis); @@ -103,7 +101,7 @@ T extends TypeDomain> AnalysisState expressionSemantics( sem = sem.smallStepSemantics(created, this); - AnalysisState result = state.bottom(); + AnalysisState result = state.bottom(); for (SymbolicExpression loc : sem.getComputedExpressions()) { ReferenceType staticType = new ReferenceType(loc.getStaticType()); HeapReference locref = new HeapReference(staticType, loc, getLocation()); @@ -113,6 +111,18 @@ T extends TypeDomain> AnalysisState expressionSemantics( return result; } + @Override + public > AnalysisState backwardSemanticsAux( + InterproceduralAnalysis interprocedural, + AnalysisState state, + ExpressionSet[] params, + StatementStore expressions) + throws SemanticException { + // TODO implement this when backward analysis will be out of + // beta + throw new UnsupportedOperationException(); + } + @Override public int hashCode() { final int prime = 31; @@ -122,7 +132,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (!super.equals(obj)) @@ -132,5 +143,4 @@ public boolean equals(Object obj) { IMPNewObj other = (IMPNewObj) obj; return staticallyAllocated == other.staticallyAllocated; } - } diff --git a/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/types/ArrayType.java b/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/types/ArrayType.java index 6be6b0930..dcb56278d 100644 --- a/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/types/ArrayType.java +++ b/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/types/ArrayType.java @@ -1,5 +1,23 @@ package it.unive.lisa.imp.types; +import it.unive.lisa.analysis.AbstractState; +import it.unive.lisa.analysis.AnalysisState; +import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.StatementStore; +import it.unive.lisa.analysis.lattices.ExpressionSet; +import it.unive.lisa.interprocedural.InterproceduralAnalysis; +import it.unive.lisa.program.cfg.CFG; +import it.unive.lisa.program.cfg.CodeLocation; +import it.unive.lisa.program.cfg.statement.DefaultParamInitialization; +import it.unive.lisa.program.cfg.statement.Expression; +import it.unive.lisa.program.type.Int32Type; +import it.unive.lisa.symbolic.SymbolicExpression; +import it.unive.lisa.symbolic.heap.AccessChild; +import it.unive.lisa.symbolic.heap.HeapReference; +import it.unive.lisa.symbolic.heap.MemoryAllocation; +import it.unive.lisa.symbolic.value.PushAny; +import it.unive.lisa.symbolic.value.Variable; +import it.unive.lisa.type.ReferenceType; import it.unive.lisa.type.Type; import it.unive.lisa.type.TypeSystem; import it.unive.lisa.type.Untyped; @@ -50,7 +68,9 @@ public static Collection all() { * @return the unique instance of {@link ArrayType} representing the class * with the given name */ - public static ArrayType lookup(Type base, int dimensions) { + public static ArrayType lookup( + Type base, + int dimensions) { return types.computeIfAbsent(Pair.of(base, dimensions), x -> new ArrayType(base, dimensions)); } @@ -58,7 +78,9 @@ public static ArrayType lookup(Type base, int dimensions) { private final int dimensions; - private ArrayType(Type base, int dimensions) { + private ArrayType( + Type base, + int dimensions) { this.base = base; if (dimensions < 1) throw new IllegalArgumentException("Cannot create an array type with less then 1 dimensions"); @@ -66,12 +88,14 @@ private ArrayType(Type base, int dimensions) { } @Override - public final boolean canBeAssignedTo(Type other) { + public final boolean canBeAssignedTo( + Type other) { return other instanceof ArrayType && getInnerType().canBeAssignedTo(other.asArrayType().getInnerType()); } @Override - public Type commonSupertype(Type other) { + public Type commonSupertype( + Type other) { if (canBeAssignedTo(other)) return other; @@ -103,7 +127,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -134,7 +159,67 @@ public Type getBaseType() { } @Override - public Set allInstances(TypeSystem types) { + public int getDimensions() { + return dimensions; + } + + @Override + public Set allInstances( + TypeSystem types) { return Collections.singleton(this); } + + @Override + public Expression unknownValue( + CFG cfg, + CodeLocation location) { + return new DefaultParamInitialization(cfg, location, this) { + @Override + public > AnalysisState forwardSemantics( + AnalysisState entryState, + InterproceduralAnalysis interprocedural, + StatementStore expressions) + throws SemanticException { + Type type = getStaticType(); + MemoryAllocation alloc = new MemoryAllocation(type, getLocation(), false); + AnalysisState allocSt = entryState.smallStepSemantics(alloc, this); + ExpressionSet allocExps = allocSt.getComputedExpressions(); + + AnalysisState initSt = entryState.bottom(); + for (SymbolicExpression allocExp : allocExps) { + AccessChild len = new AccessChild( + Int32Type.INSTANCE, + allocExp, + new Variable(Untyped.INSTANCE, "len", getLocation()), + getLocation()); + + AnalysisState lenSt = entryState.bottom(); + // TODO fix when we'll support multidimensional arrays + lenSt = lenSt.lub(allocSt.assign(len, new PushAny(Int32Type.INSTANCE, getLocation()), this)); + initSt = initSt.lub(lenSt); + } + + AnalysisState refSt = entryState.bottom(); + for (SymbolicExpression loc : allocSt.getComputedExpressions()) { + ReferenceType t = new ReferenceType(loc.getStaticType()); + HeapReference ref = new HeapReference(t, loc, getLocation()); + AnalysisState refSem = initSt.smallStepSemantics(ref, this); + refSt = refSt.lub(refSem); + } + + return refSt; + } + + @Override + public > AnalysisState backwardSemantics( + AnalysisState exitState, + InterproceduralAnalysis interprocedural, + StatementStore expressions) + throws SemanticException { + // TODO implement this when backward analysis will be out of + // beta + throw new UnsupportedOperationException(); + } + }; + } } diff --git a/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/types/ClassType.java b/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/types/ClassType.java index 3bd19ffaa..eb19c9b2a 100644 --- a/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/types/ClassType.java +++ b/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/types/ClassType.java @@ -57,7 +57,9 @@ public static Collection all() { * @return the unique instance of {@link ClassType} representing the class * with the given name */ - public static ClassType lookup(String name, CompilationUnit unit) { + public static ClassType lookup( + String name, + CompilationUnit unit) { return types.computeIfAbsent(name, x -> new ClassType(name, unit)); } @@ -65,7 +67,9 @@ public static ClassType lookup(String name, CompilationUnit unit) { private final CompilationUnit unit; - private ClassType(String name, CompilationUnit unit) { + private ClassType( + String name, + CompilationUnit unit) { Objects.requireNonNull(name, "The name of a class type cannot be null"); Objects.requireNonNull(unit, "The unit of a class type cannot be null"); this.name = name; @@ -78,7 +82,8 @@ public CompilationUnit getUnit() { } @Override - public final boolean canBeAssignedTo(Type other) { + public final boolean canBeAssignedTo( + Type other) { if (other instanceof ClassType) return subclass((ClassType) other); @@ -88,16 +93,19 @@ public final boolean canBeAssignedTo(Type other) { return false; } - private boolean subclass(ClassType other) { + private boolean subclass( + ClassType other) { return this == other || unit.isInstanceOf(other.unit); } - private boolean subclass(InterfaceType other) { + private boolean subclass( + InterfaceType other) { return unit.isInstanceOf(other.getUnit()); } @Override - public Type commonSupertype(Type other) { + public Type commonSupertype( + Type other) { if (other.isNullType()) return this; @@ -113,7 +121,8 @@ public Type commonSupertype(Type other) { return scanForSupertypeOf((UnitType) other); } - private Type scanForSupertypeOf(UnitType other) { + private Type scanForSupertypeOf( + UnitType other) { WorkingSet ws = FIFOWorkingSet.mk(); Set seen = new HashSet<>(); ws.push(this); @@ -148,7 +157,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -170,7 +180,8 @@ public boolean equals(Object obj) { } @Override - public Set allInstances(TypeSystem types) { + public Set allInstances( + TypeSystem types) { Set instances = new HashSet<>(); for (Unit in : unit.getInstances()) instances.add(lookup(in.getName(), null)); diff --git a/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/types/IMPTypeSystem.java b/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/types/IMPTypeSystem.java index a03faa766..da2c45542 100644 --- a/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/types/IMPTypeSystem.java +++ b/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/types/IMPTypeSystem.java @@ -31,7 +31,8 @@ public NumericType getIntegerType() { } @Override - public boolean canBeReferenced(Type type) { + public boolean canBeReferenced( + Type type) { return type.isInMemoryType(); } diff --git a/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/types/InterfaceType.java b/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/types/InterfaceType.java index 08abbeaba..afca350cb 100644 --- a/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/types/InterfaceType.java +++ b/lisa/lisa-imp/src/main/java/it/unive/lisa/imp/types/InterfaceType.java @@ -55,7 +55,9 @@ public static Collection all() { * @return the unique instance of {@link InterfaceType} representing the * interface with the given name */ - public static InterfaceType lookup(String name, InterfaceUnit unit) { + public static InterfaceType lookup( + String name, + InterfaceUnit unit) { return types.computeIfAbsent(name, x -> new InterfaceType(name, unit)); } @@ -63,7 +65,9 @@ public static InterfaceType lookup(String name, InterfaceUnit unit) { private final InterfaceUnit unit; - private InterfaceType(String name, InterfaceUnit unit) { + private InterfaceType( + String name, + InterfaceUnit unit) { Objects.requireNonNull(name, "The name of an interface type cannot be null"); Objects.requireNonNull(unit, "The unit of a interface type cannot be null"); this.name = name; @@ -76,19 +80,22 @@ public InterfaceUnit getUnit() { } @Override - public final boolean canBeAssignedTo(Type other) { + public final boolean canBeAssignedTo( + Type other) { if (other instanceof InterfaceType) return subclass((InterfaceType) other); return false; } - private boolean subclass(InterfaceType other) { + private boolean subclass( + InterfaceType other) { return this == other || unit.isInstanceOf(other.unit); } @Override - public Type commonSupertype(Type other) { + public Type commonSupertype( + Type other) { if (other.isNullType()) return this; @@ -101,7 +108,8 @@ public Type commonSupertype(Type other) { return scanForSupertypeOf((UnitType) other); } - private Type scanForSupertypeOf(UnitType other) { + private Type scanForSupertypeOf( + UnitType other) { WorkingSet ws = FIFOWorkingSet.mk(); Set seen = new HashSet<>(); ws.push(this); @@ -136,7 +144,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -158,7 +167,8 @@ public boolean equals(Object obj) { } @Override - public Set allInstances(TypeSystem types) { + public Set allInstances( + TypeSystem types) { Set instances = new HashSet<>(); for (Unit un : unit.getInstances()) if (un instanceof InterfaceUnit) diff --git a/lisa/lisa-imp/src/test/java/it/unive/lisa/imp/HierarchyComputationTest.java b/lisa/lisa-imp/src/test/java/it/unive/lisa/imp/HierarchyComputationTest.java index c931625eb..3fbef0e12 100644 --- a/lisa/lisa-imp/src/test/java/it/unive/lisa/imp/HierarchyComputationTest.java +++ b/lisa/lisa-imp/src/test/java/it/unive/lisa/imp/HierarchyComputationTest.java @@ -17,13 +17,17 @@ public class HierarchyComputationTest { - private static Unit findUnit(Program prog, String name) { + private static Unit findUnit( + Program prog, + String name) { Unit unit = prog.getUnits().stream().filter(u -> u.getName().equals(name)).findFirst().get(); assertNotNull("'" + name + "' unit not found", unit); return unit; } - private static CFG findCFG(ClassUnit unit, String name) { + private static CFG findCFG( + ClassUnit unit, + String name) { CFG cfg = unit.getInstanceCFGs(false).stream().filter(c -> c.getDescriptor().getName().equals(name)) .findFirst() .get(); @@ -31,7 +35,9 @@ private static CFG findCFG(ClassUnit unit, String name) { return cfg; } - private static AbstractCodeMember findSignatureCFG(ClassUnit unit, String name) { + private static AbstractCodeMember findSignatureCFG( + ClassUnit unit, + String name) { AbstractCodeMember cfg = unit.getAbstractCodeMembers(false).stream() .filter(c -> c.getDescriptor().getName().equals(name)) .findFirst() @@ -40,7 +46,9 @@ private static AbstractCodeMember findSignatureCFG(ClassUnit unit, String name) return cfg; } - private static AbstractCodeMember findSignatureCFG(InterfaceUnit unit, String name) { + private static AbstractCodeMember findSignatureCFG( + InterfaceUnit unit, + String name) { AbstractCodeMember cfg = unit.getAbstractCodeMembers(false).stream() .filter(c -> c.getDescriptor().getName().equals(name)) .findFirst() @@ -49,7 +57,9 @@ private static AbstractCodeMember findSignatureCFG(InterfaceUnit unit, String na return cfg; } - private static CFG findImplementedCFG(InterfaceUnit unit, String name) { + private static CFG findImplementedCFG( + InterfaceUnit unit, + String name) { CFG cfg = unit.getInstanceCFGs(false).stream().filter(c -> c.getDescriptor().getName().equals(name)) .findFirst() .get(); @@ -57,7 +67,9 @@ private static CFG findImplementedCFG(InterfaceUnit unit, String name) { return cfg; } - private static void isInstance(CompilationUnit sup, Unit unit) { + private static void isInstance( + CompilationUnit sup, + Unit unit) { assertTrue("'" + unit.getName() + "' is not among '" + sup.getName() + "' instances", sup.getInstances().contains(unit)); if (sup != unit) { @@ -70,7 +82,9 @@ private static void isInstance(CompilationUnit sup, Unit unit) { } } - private static void notInstance(CompilationUnit sup, CompilationUnit unit) { + private static void notInstance( + CompilationUnit sup, + CompilationUnit unit) { assertFalse("'" + unit.getName() + "' is among '" + sup.getName() + "' instances", sup.getInstances().contains(unit)); if (sup != unit) @@ -78,7 +92,9 @@ private static void notInstance(CompilationUnit sup, CompilationUnit unit) { unit.getImmediateAncestors().contains(sup)); } - private static void overrides(CodeMember sup, CodeMember cfg) { + private static void overrides( + CodeMember sup, + CodeMember cfg) { assertTrue( "'" + sup.getDescriptor().getFullName() + "' is not overridden by '" + cfg.getDescriptor().getFullName() + "'", @@ -89,7 +105,9 @@ private static void overrides(CodeMember sup, CodeMember cfg) { cfg.getDescriptor().overrides().contains(sup)); } - private static void notOverrides(CFG sup, CFG cfg) { + private static void notOverrides( + CFG sup, + CFG cfg) { assertFalse( "'" + sup.getDescriptor().getFullName() + "' is overridden by '" + cfg.getDescriptor().getFullName() + "'", diff --git a/lisa/lisa-imp/src/test/resources/log4j2.xml b/lisa/lisa-imp/src/test/resources/log4j2.xml index 781933f92..cbdcb32af 100644 --- a/lisa/lisa-imp/src/test/resources/log4j2.xml +++ b/lisa/lisa-imp/src/test/resources/log4j2.xml @@ -2,13 +2,13 @@ - + - + diff --git a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/comparison/Equal.java b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/comparison/Equal.java index 20d36dbd5..24ff85f77 100644 --- a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/comparison/Equal.java +++ b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/comparison/Equal.java @@ -4,9 +4,6 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.CodeLocation; @@ -32,21 +29,22 @@ public class Equal extends it.unive.lisa.program.cfg.statement.BinaryExpression * @param left the left-hand side of this operation * @param right the right-hand side of this operation */ - public Equal(CFG cfg, CodeLocation location, Expression left, Expression right) { + public Equal( + CFG cfg, + CodeLocation location, + Expression left, + Expression right) { super(cfg, location, "==", cfg.getDescriptor().getUnit().getProgram().getTypes().getBooleanType(), left, right); } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState binarySemantics( - InterproceduralAnalysis interprocedural, - AnalysisState state, - SymbolicExpression left, - SymbolicExpression right, - StatementStore expressions) - throws SemanticException { + public > AnalysisState fwdBinarySemantics( + InterproceduralAnalysis interprocedural, + AnalysisState state, + SymbolicExpression left, + SymbolicExpression right, + StatementStore expressions) + throws SemanticException { return state.smallStepSemantics( new BinaryExpression( getStaticType(), diff --git a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/comparison/GreaterOrEqual.java b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/comparison/GreaterOrEqual.java index 3e9627ec0..d743c281e 100644 --- a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/comparison/GreaterOrEqual.java +++ b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/comparison/GreaterOrEqual.java @@ -4,9 +4,6 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.CodeLocation; @@ -17,7 +14,6 @@ import it.unive.lisa.type.BooleanType; import it.unive.lisa.type.NumericType; import it.unive.lisa.type.Type; -import it.unive.lisa.type.TypeSystem; /** * An expression modeling the greater or equal operation ({@code >=}). Both @@ -36,25 +32,25 @@ public class GreaterOrEqual extends it.unive.lisa.program.cfg.statement.BinaryEx * @param left the left-hand side of this operation * @param right the right-hand side of this operation */ - public GreaterOrEqual(CFG cfg, CodeLocation location, Expression left, Expression right) { + public GreaterOrEqual( + CFG cfg, + CodeLocation location, + Expression left, + Expression right) { super(cfg, location, ">=", cfg.getDescriptor().getUnit().getProgram().getTypes().getBooleanType(), left, right); } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState binarySemantics( - InterproceduralAnalysis interprocedural, - AnalysisState state, - SymbolicExpression left, - SymbolicExpression right, - StatementStore expressions) - throws SemanticException { - TypeSystem types = getProgram().getTypes(); - if (left.getRuntimeTypes(types).stream().noneMatch(Type::isNumericType)) + public > AnalysisState fwdBinarySemantics( + InterproceduralAnalysis interprocedural, + AnalysisState state, + SymbolicExpression left, + SymbolicExpression right, + StatementStore expressions) + throws SemanticException { + if (state.getState().getRuntimeTypesOf(left, this, state.getState()).stream().noneMatch(Type::isNumericType)) return state.bottom(); - if (right.getRuntimeTypes(types).stream().noneMatch(Type::isNumericType)) + if (state.getState().getRuntimeTypesOf(right, this, state.getState()).stream().noneMatch(Type::isNumericType)) return state.bottom(); return state.smallStepSemantics( diff --git a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/comparison/GreaterThan.java b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/comparison/GreaterThan.java index 3e81bcecb..41859ce64 100644 --- a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/comparison/GreaterThan.java +++ b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/comparison/GreaterThan.java @@ -4,9 +4,6 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.CodeLocation; @@ -17,7 +14,6 @@ import it.unive.lisa.type.BooleanType; import it.unive.lisa.type.NumericType; import it.unive.lisa.type.Type; -import it.unive.lisa.type.TypeSystem; /** * An expression modeling the greater than operation ({@code >}). Both operands' @@ -36,25 +32,25 @@ public class GreaterThan extends it.unive.lisa.program.cfg.statement.BinaryExpre * @param left the left-hand side of this operation * @param right the right-hand side of this operation */ - public GreaterThan(CFG cfg, CodeLocation location, Expression left, Expression right) { + public GreaterThan( + CFG cfg, + CodeLocation location, + Expression left, + Expression right) { super(cfg, location, ">", cfg.getDescriptor().getUnit().getProgram().getTypes().getBooleanType(), left, right); } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState binarySemantics( - InterproceduralAnalysis interprocedural, - AnalysisState state, - SymbolicExpression left, - SymbolicExpression right, - StatementStore expressions) - throws SemanticException { - TypeSystem types = getProgram().getTypes(); - if (left.getRuntimeTypes(types).stream().noneMatch(Type::isNumericType)) + public > AnalysisState fwdBinarySemantics( + InterproceduralAnalysis interprocedural, + AnalysisState state, + SymbolicExpression left, + SymbolicExpression right, + StatementStore expressions) + throws SemanticException { + if (state.getState().getRuntimeTypesOf(left, this, state.getState()).stream().noneMatch(Type::isNumericType)) return state.bottom(); - if (right.getRuntimeTypes(types).stream().noneMatch(Type::isNumericType)) + if (state.getState().getRuntimeTypesOf(right, this, state.getState()).stream().noneMatch(Type::isNumericType)) return state.bottom(); return state.smallStepSemantics( diff --git a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/comparison/LessOrEqual.java b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/comparison/LessOrEqual.java index fa6eac11e..3293bfcc1 100644 --- a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/comparison/LessOrEqual.java +++ b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/comparison/LessOrEqual.java @@ -4,9 +4,6 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.CodeLocation; @@ -17,7 +14,6 @@ import it.unive.lisa.type.BooleanType; import it.unive.lisa.type.NumericType; import it.unive.lisa.type.Type; -import it.unive.lisa.type.TypeSystem; /** * An expression modeling the less or equal operation ({@code <=}). Both @@ -36,25 +32,25 @@ public class LessOrEqual extends it.unive.lisa.program.cfg.statement.BinaryExpre * @param left the left-hand side of this operation * @param right the right-hand side of this operation */ - public LessOrEqual(CFG cfg, CodeLocation location, Expression left, Expression right) { + public LessOrEqual( + CFG cfg, + CodeLocation location, + Expression left, + Expression right) { super(cfg, location, "<=", cfg.getDescriptor().getUnit().getProgram().getTypes().getBooleanType(), left, right); } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState binarySemantics( - InterproceduralAnalysis interprocedural, - AnalysisState state, - SymbolicExpression left, - SymbolicExpression right, - StatementStore expressions) - throws SemanticException { - TypeSystem types = getProgram().getTypes(); - if (left.getRuntimeTypes(types).stream().noneMatch(Type::isNumericType)) + public > AnalysisState fwdBinarySemantics( + InterproceduralAnalysis interprocedural, + AnalysisState state, + SymbolicExpression left, + SymbolicExpression right, + StatementStore expressions) + throws SemanticException { + if (state.getState().getRuntimeTypesOf(left, this, state.getState()).stream().noneMatch(Type::isNumericType)) return state.bottom(); - if (right.getRuntimeTypes(types).stream().noneMatch(Type::isNumericType)) + if (state.getState().getRuntimeTypesOf(right, this, state.getState()).stream().noneMatch(Type::isNumericType)) return state.bottom(); return state.smallStepSemantics( diff --git a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/comparison/LessThan.java b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/comparison/LessThan.java index 969d1fd36..790b7e733 100644 --- a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/comparison/LessThan.java +++ b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/comparison/LessThan.java @@ -4,9 +4,6 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.CodeLocation; @@ -17,7 +14,6 @@ import it.unive.lisa.type.BooleanType; import it.unive.lisa.type.NumericType; import it.unive.lisa.type.Type; -import it.unive.lisa.type.TypeSystem; /** * An expression modeling the less than operation ({@code <}). Both operands' @@ -36,25 +32,25 @@ public class LessThan extends it.unive.lisa.program.cfg.statement.BinaryExpressi * @param left the left-hand side of this operation * @param right the right-hand side of this operation */ - public LessThan(CFG cfg, CodeLocation location, Expression left, Expression right) { + public LessThan( + CFG cfg, + CodeLocation location, + Expression left, + Expression right) { super(cfg, location, "<", cfg.getDescriptor().getUnit().getProgram().getTypes().getBooleanType(), left, right); } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState binarySemantics( - InterproceduralAnalysis interprocedural, - AnalysisState state, - SymbolicExpression left, - SymbolicExpression right, - StatementStore expressions) - throws SemanticException { - TypeSystem types = getProgram().getTypes(); - if (left.getRuntimeTypes(types).stream().noneMatch(Type::isNumericType)) + public > AnalysisState fwdBinarySemantics( + InterproceduralAnalysis interprocedural, + AnalysisState state, + SymbolicExpression left, + SymbolicExpression right, + StatementStore expressions) + throws SemanticException { + if (state.getState().getRuntimeTypesOf(left, this, state.getState()).stream().noneMatch(Type::isNumericType)) return state.bottom(); - if (right.getRuntimeTypes(types).stream().noneMatch(Type::isNumericType)) + if (state.getState().getRuntimeTypesOf(right, this, state.getState()).stream().noneMatch(Type::isNumericType)) return state.bottom(); return state.smallStepSemantics( diff --git a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/comparison/NotEqual.java b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/comparison/NotEqual.java index 55562e8e9..54d8cbc4a 100644 --- a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/comparison/NotEqual.java +++ b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/comparison/NotEqual.java @@ -4,9 +4,6 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.CodeLocation; @@ -32,21 +29,22 @@ public class NotEqual extends it.unive.lisa.program.cfg.statement.BinaryExpressi * @param left the left-hand side of this operation * @param right the right-hand side of this operation */ - public NotEqual(CFG cfg, CodeLocation location, Expression left, Expression right) { + public NotEqual( + CFG cfg, + CodeLocation location, + Expression left, + Expression right) { super(cfg, location, "!=", cfg.getDescriptor().getUnit().getProgram().getTypes().getBooleanType(), left, right); } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState binarySemantics( - InterproceduralAnalysis interprocedural, - AnalysisState state, - SymbolicExpression left, - SymbolicExpression right, - StatementStore expressions) - throws SemanticException { + public > AnalysisState fwdBinarySemantics( + InterproceduralAnalysis interprocedural, + AnalysisState state, + SymbolicExpression left, + SymbolicExpression right, + StatementStore expressions) + throws SemanticException { return state.smallStepSemantics( new BinaryExpression( getStaticType(), diff --git a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/global/AccessGlobal.java b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/global/AccessGlobal.java index 4ae0a0333..ded758404 100644 --- a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/global/AccessGlobal.java +++ b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/global/AccessGlobal.java @@ -4,9 +4,6 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.ConstantGlobal; import it.unive.lisa.program.Global; @@ -46,7 +43,11 @@ public class AccessGlobal extends Expression { * @param container the unit containing the accessed global * @param target the accessed global */ - public AccessGlobal(CFG cfg, CodeLocation location, Unit container, Global target) { + public AccessGlobal( + CFG cfg, + CodeLocation location, + Unit container, + Global target) { super(cfg, location, target.getStaticType()); this.container = container; this.target = target; @@ -72,12 +73,15 @@ public Global getTarget() { } @Override - public int setOffset(int offset) { + public int setOffset( + int offset) { return this.offset = offset; } @Override - public boolean accept(GraphVisitor visitor, V tool) { + public boolean accept( + GraphVisitor visitor, + V tool) { return visitor.visit(tool, getCFG(), this); } @@ -91,7 +95,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (!super.equals(obj)) @@ -118,12 +123,11 @@ public String toString() { } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState semantics(AnalysisState entryState, - InterproceduralAnalysis interprocedural, StatementStore expressions) - throws SemanticException { + public > AnalysisState forwardSemantics( + AnalysisState entryState, + InterproceduralAnalysis interprocedural, + StatementStore expressions) + throws SemanticException { if (target instanceof ConstantGlobal) return entryState.smallStepSemantics(((ConstantGlobal) target).getConstant(), this); diff --git a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/global/AccessInstanceGlobal.java b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/global/AccessInstanceGlobal.java index 1cfb44229..501f65a3c 100644 --- a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/global/AccessInstanceGlobal.java +++ b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/global/AccessInstanceGlobal.java @@ -4,9 +4,6 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.ClassUnit; import it.unive.lisa.program.CompilationUnit; @@ -22,9 +19,7 @@ import it.unive.lisa.symbolic.heap.HeapDereference; import it.unive.lisa.symbolic.value.Variable; import it.unive.lisa.type.Type; -import it.unive.lisa.type.TypeSystem; import it.unive.lisa.type.Untyped; -import java.util.Collections; import java.util.HashSet; import java.util.Set; @@ -50,7 +45,11 @@ public class AccessInstanceGlobal extends UnaryExpression { * @param receiver the expression that determines the accessed instance * @param target the accessed global */ - public AccessInstanceGlobal(CFG cfg, CodeLocation location, Expression receiver, String target) { + public AccessInstanceGlobal( + CFG cfg, + CodeLocation location, + Expression receiver, + String target) { super(cfg, location, "::", Untyped.INSTANCE, receiver); this.target = target; receiver.setParentStatement(this); @@ -84,7 +83,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (!super.equals(obj)) @@ -106,28 +106,25 @@ public String toString() { } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState unarySemantics( - InterproceduralAnalysis interprocedural, - AnalysisState state, - SymbolicExpression expr, - StatementStore expressions) - throws SemanticException { + public > AnalysisState fwdUnarySemantics( + InterproceduralAnalysis interprocedural, + AnalysisState state, + SymbolicExpression expr, + StatementStore expressions) + throws SemanticException { CodeLocation loc = getLocation(); - AnalysisState result = state.bottom(); + AnalysisState result = state.bottom(); boolean atLeastOne = false; - TypeSystem types = getProgram().getTypes(); - for (Type recType : expr.getRuntimeTypes(types)) + Set types = state.getState().getRuntimeTypesOf(expr, this, state.getState()); + + for (Type recType : types) if (recType.isPointerType()) { Type inner = recType.asPointerType().getInnerType(); if (!inner.isUnitType()) continue; HeapDereference container = new HeapDereference(inner, expr, loc); - container.setRuntimeTypes(Collections.singleton(inner)); CompilationUnit unit = inner.asUnitType().getUnit(); Set seen = new HashSet<>(); @@ -149,7 +146,7 @@ T extends TypeDomain> AnalysisState unarySemantics( // worst case: we are accessing a global that we know nothing about Set rectypes = new HashSet<>(); - for (Type t : expr.getRuntimeTypes(types)) + for (Type t : types) if (t.isPointerType()) rectypes.add(t.asPointerType().getInnerType()); @@ -159,7 +156,6 @@ T extends TypeDomain> AnalysisState unarySemantics( Type rectype = Type.commonSupertype(rectypes, Untyped.INSTANCE); Variable var = new Variable(Untyped.INSTANCE, target, new Annotations(), getLocation()); HeapDereference container = new HeapDereference(rectype, expr, getLocation()); - container.setRuntimeTypes(rectypes); AccessChild access = new AccessChild(Untyped.INSTANCE, container, var, getLocation()); return state.smallStepSemantics(access, this); } diff --git a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/literal/FalseLiteral.java b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/literal/FalseLiteral.java index 168b4fda9..0e2e99db1 100644 --- a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/literal/FalseLiteral.java +++ b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/literal/FalseLiteral.java @@ -18,7 +18,9 @@ public class FalseLiteral extends Literal { * @param cfg the {@link CFG} where this literal lies * @param location the location where this literal is defined */ - public FalseLiteral(CFG cfg, CodeLocation location) { + public FalseLiteral( + CFG cfg, + CodeLocation location) { super(cfg, location, false, cfg.getDescriptor().getUnit().getProgram().getTypes().getBooleanType()); } diff --git a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/literal/Float32Literal.java b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/literal/Float32Literal.java index 1a19d000b..3c7618fc4 100644 --- a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/literal/Float32Literal.java +++ b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/literal/Float32Literal.java @@ -20,7 +20,10 @@ public class Float32Literal extends Literal { * @param location the location where this literal is defined * @param value the constant value represented by this literal */ - public Float32Literal(CFG cfg, CodeLocation location, float value) { + public Float32Literal( + CFG cfg, + CodeLocation location, + float value) { super(cfg, location, value, Float32Type.INSTANCE); } } diff --git a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/literal/Float64Literal.java b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/literal/Float64Literal.java index 9aef556cd..a8e15d4ec 100644 --- a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/literal/Float64Literal.java +++ b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/literal/Float64Literal.java @@ -20,7 +20,10 @@ public class Float64Literal extends Literal { * @param location the location where this literal is defined * @param value the constant value represented by this literal */ - public Float64Literal(CFG cfg, CodeLocation location, double value) { + public Float64Literal( + CFG cfg, + CodeLocation location, + double value) { super(cfg, location, value, Float64Type.INSTANCE); } } diff --git a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/literal/Int16Literal.java b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/literal/Int16Literal.java index a7d82feab..f6886d902 100644 --- a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/literal/Int16Literal.java +++ b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/literal/Int16Literal.java @@ -20,7 +20,10 @@ public class Int16Literal extends Literal { * @param location the location where this literal is defined * @param value the constant value represented by this literal */ - public Int16Literal(CFG cfg, CodeLocation location, short value) { + public Int16Literal( + CFG cfg, + CodeLocation location, + short value) { super(cfg, location, value, Int16Type.INSTANCE); } } diff --git a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/literal/Int32Literal.java b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/literal/Int32Literal.java index 96f80932d..c5eb167b6 100644 --- a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/literal/Int32Literal.java +++ b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/literal/Int32Literal.java @@ -20,7 +20,10 @@ public class Int32Literal extends Literal { * @param location the location where this literal is defined * @param value the constant value represented by this literal */ - public Int32Literal(CFG cfg, CodeLocation location, int value) { + public Int32Literal( + CFG cfg, + CodeLocation location, + int value) { super(cfg, location, value, Int32Type.INSTANCE); } } diff --git a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/literal/Int64Literal.java b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/literal/Int64Literal.java index a2f19baf8..038bafa4d 100644 --- a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/literal/Int64Literal.java +++ b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/literal/Int64Literal.java @@ -20,7 +20,10 @@ public class Int64Literal extends Literal { * @param location the location where this literal is defined * @param value the constant value represented by this literal */ - public Int64Literal(CFG cfg, CodeLocation location, long value) { + public Int64Literal( + CFG cfg, + CodeLocation location, + long value) { super(cfg, location, value, Int64Type.INSTANCE); } } diff --git a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/literal/Int8Literal.java b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/literal/Int8Literal.java index 082022958..f9722bdfc 100644 --- a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/literal/Int8Literal.java +++ b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/literal/Int8Literal.java @@ -20,7 +20,10 @@ public class Int8Literal extends Literal { * @param location the location where this literal is defined * @param value the constant value represented by this literal */ - public Int8Literal(CFG cfg, CodeLocation location, byte value) { + public Int8Literal( + CFG cfg, + CodeLocation location, + byte value) { super(cfg, location, value, Int8Type.INSTANCE); } } diff --git a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/literal/NullLiteral.java b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/literal/NullLiteral.java index ce80b4584..7c20a9f32 100644 --- a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/literal/NullLiteral.java +++ b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/literal/NullLiteral.java @@ -4,9 +4,6 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.CodeLocation; @@ -28,18 +25,18 @@ public class NullLiteral extends Literal { * @param location the location where the expression is defined within the * program */ - public NullLiteral(CFG cfg, CodeLocation location) { + public NullLiteral( + CFG cfg, + CodeLocation location) { super(cfg, location, null, NullType.INSTANCE); } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState semantics( - AnalysisState entryState, InterproceduralAnalysis interprocedural, - StatementStore expressions) - throws SemanticException { + public > AnalysisState forwardSemantics( + AnalysisState entryState, + InterproceduralAnalysis interprocedural, + StatementStore expressions) + throws SemanticException { return entryState.smallStepSemantics(new NullConstant(getLocation()), this); } } diff --git a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/literal/StringLiteral.java b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/literal/StringLiteral.java index 14a44acbc..239397af8 100644 --- a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/literal/StringLiteral.java +++ b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/literal/StringLiteral.java @@ -19,7 +19,10 @@ public class StringLiteral extends Literal { * @param location the location where this literal is defined * @param value the constant value represented by this literal */ - public StringLiteral(CFG cfg, CodeLocation location, String value) { + public StringLiteral( + CFG cfg, + CodeLocation location, + String value) { super(cfg, location, value, cfg.getDescriptor().getUnit().getProgram().getTypes().getStringType()); } diff --git a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/literal/TrueLiteral.java b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/literal/TrueLiteral.java index 70eb074af..bf94dc830 100644 --- a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/literal/TrueLiteral.java +++ b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/literal/TrueLiteral.java @@ -18,7 +18,9 @@ public class TrueLiteral extends Literal { * @param cfg the {@link CFG} where this literal lies * @param location the location where this literal is defined */ - public TrueLiteral(CFG cfg, CodeLocation location) { + public TrueLiteral( + CFG cfg, + CodeLocation location) { super(cfg, location, true, cfg.getDescriptor().getUnit().getProgram().getTypes().getBooleanType()); } } diff --git a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/literal/UInt16Literal.java b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/literal/UInt16Literal.java index 6a7f69c85..818960bc5 100644 --- a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/literal/UInt16Literal.java +++ b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/literal/UInt16Literal.java @@ -20,7 +20,10 @@ public class UInt16Literal extends Literal { * @param location the location where this literal is defined * @param value the constant value represented by this literal */ - public UInt16Literal(CFG cfg, CodeLocation location, short value) { + public UInt16Literal( + CFG cfg, + CodeLocation location, + short value) { super(cfg, location, value, UInt16Type.INSTANCE); } } diff --git a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/literal/UInt32Literal.java b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/literal/UInt32Literal.java index eca6cf43c..db60d994a 100644 --- a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/literal/UInt32Literal.java +++ b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/literal/UInt32Literal.java @@ -20,7 +20,10 @@ public class UInt32Literal extends Literal { * @param location the location where this literal is defined * @param value the constant value represented by this literal */ - public UInt32Literal(CFG cfg, CodeLocation location, int value) { + public UInt32Literal( + CFG cfg, + CodeLocation location, + int value) { super(cfg, location, value, UInt32Type.INSTANCE); } } diff --git a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/literal/UInt64Literal.java b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/literal/UInt64Literal.java index 416269d52..04433b132 100644 --- a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/literal/UInt64Literal.java +++ b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/literal/UInt64Literal.java @@ -20,7 +20,10 @@ public class UInt64Literal extends Literal { * @param location the location where this literal is defined * @param value the constant value represented by this literal */ - public UInt64Literal(CFG cfg, CodeLocation location, long value) { + public UInt64Literal( + CFG cfg, + CodeLocation location, + long value) { super(cfg, location, value, UInt64Type.INSTANCE); } } diff --git a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/literal/UInt8Literal.java b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/literal/UInt8Literal.java index 6fbd5f311..c1cdebb6f 100644 --- a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/literal/UInt8Literal.java +++ b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/literal/UInt8Literal.java @@ -20,7 +20,10 @@ public class UInt8Literal extends Literal { * @param location the location where this literal is defined * @param value the constant value represented by this literal */ - public UInt8Literal(CFG cfg, CodeLocation location, byte value) { + public UInt8Literal( + CFG cfg, + CodeLocation location, + byte value) { super(cfg, location, value, UInt8Type.INSTANCE); } } diff --git a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/logic/And.java b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/logic/And.java index 88ead9b68..106553834 100644 --- a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/logic/And.java +++ b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/logic/And.java @@ -4,9 +4,6 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.CodeLocation; @@ -16,7 +13,6 @@ import it.unive.lisa.symbolic.value.operator.binary.LogicalAnd; import it.unive.lisa.type.BooleanType; import it.unive.lisa.type.Type; -import it.unive.lisa.type.TypeSystem; /** * An expression modeling the logical conjunction ({@code &&} or {@code and}). @@ -35,25 +31,25 @@ public class And extends it.unive.lisa.program.cfg.statement.BinaryExpression { * @param left the left-hand side of this operation * @param right the right-hand side of this operation */ - public And(CFG cfg, CodeLocation location, Expression left, Expression right) { + public And( + CFG cfg, + CodeLocation location, + Expression left, + Expression right) { super(cfg, location, "&&", cfg.getDescriptor().getUnit().getProgram().getTypes().getBooleanType(), left, right); } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState binarySemantics( - InterproceduralAnalysis interprocedural, - AnalysisState state, - SymbolicExpression left, - SymbolicExpression right, - StatementStore expressions) - throws SemanticException { - TypeSystem types = getProgram().getTypes(); - if (left.getRuntimeTypes(types).stream().noneMatch(Type::isBooleanType)) + public > AnalysisState fwdBinarySemantics( + InterproceduralAnalysis interprocedural, + AnalysisState state, + SymbolicExpression left, + SymbolicExpression right, + StatementStore expressions) + throws SemanticException { + if (state.getState().getRuntimeTypesOf(left, this, state.getState()).stream().noneMatch(Type::isBooleanType)) return state.bottom(); - if (right.getRuntimeTypes(types).stream().noneMatch(Type::isBooleanType)) + if (state.getState().getRuntimeTypesOf(right, this, state.getState()).stream().noneMatch(Type::isBooleanType)) return state.bottom(); return state.smallStepSemantics( diff --git a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/logic/Not.java b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/logic/Not.java index c73f83c82..e07a5ade3 100644 --- a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/logic/Not.java +++ b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/logic/Not.java @@ -4,9 +4,6 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.CodeLocation; @@ -16,7 +13,6 @@ import it.unive.lisa.symbolic.value.operator.unary.LogicalNegation; import it.unive.lisa.type.BooleanType; import it.unive.lisa.type.Type; -import it.unive.lisa.type.TypeSystem; /** * An expression modeling the logical negation ({@code !} or {@code not}). The @@ -34,22 +30,21 @@ public class Not extends it.unive.lisa.program.cfg.statement.UnaryExpression { * @param location the location where this literal is defined * @param expression the operand of this operation */ - public Not(CFG cfg, CodeLocation location, Expression expression) { + public Not( + CFG cfg, + CodeLocation location, + Expression expression) { super(cfg, location, "!", cfg.getDescriptor().getUnit().getProgram().getTypes().getBooleanType(), expression); } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState unarySemantics( - InterproceduralAnalysis interprocedural, - AnalysisState state, - SymbolicExpression expr, - StatementStore expressions) - throws SemanticException { - TypeSystem types = getProgram().getTypes(); - if (expr.getRuntimeTypes(types).stream().noneMatch(Type::isBooleanType)) + public > AnalysisState fwdUnarySemantics( + InterproceduralAnalysis interprocedural, + AnalysisState state, + SymbolicExpression expr, + StatementStore expressions) + throws SemanticException { + if (state.getState().getRuntimeTypesOf(expr, this, state.getState()).stream().noneMatch(Type::isBooleanType)) return state.bottom(); return state.smallStepSemantics( diff --git a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/logic/Or.java b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/logic/Or.java index 2ff91db94..9cb40848f 100644 --- a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/logic/Or.java +++ b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/logic/Or.java @@ -4,9 +4,6 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.CodeLocation; @@ -16,7 +13,6 @@ import it.unive.lisa.symbolic.value.operator.binary.LogicalOr; import it.unive.lisa.type.BooleanType; import it.unive.lisa.type.Type; -import it.unive.lisa.type.TypeSystem; /** * An expression modeling the logical disjunction ({@code ||} or {@code or}). @@ -35,25 +31,25 @@ public class Or extends it.unive.lisa.program.cfg.statement.BinaryExpression { * @param left the left-hand side of this operation * @param right the right-hand side of this operation */ - public Or(CFG cfg, CodeLocation location, Expression left, Expression right) { + public Or( + CFG cfg, + CodeLocation location, + Expression left, + Expression right) { super(cfg, location, "||", cfg.getDescriptor().getUnit().getProgram().getTypes().getBooleanType(), left, right); } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState binarySemantics( - InterproceduralAnalysis interprocedural, - AnalysisState state, - SymbolicExpression left, - SymbolicExpression right, - StatementStore expressions) - throws SemanticException { - TypeSystem types = getProgram().getTypes(); - if (left.getRuntimeTypes(types).stream().noneMatch(Type::isBooleanType)) + public > AnalysisState fwdBinarySemantics( + InterproceduralAnalysis interprocedural, + AnalysisState state, + SymbolicExpression left, + SymbolicExpression right, + StatementStore expressions) + throws SemanticException { + if (state.getState().getRuntimeTypesOf(left, this, state.getState()).stream().noneMatch(Type::isBooleanType)) return state.bottom(); - if (right.getRuntimeTypes(types).stream().noneMatch(Type::isBooleanType)) + if (state.getState().getRuntimeTypesOf(right, this, state.getState()).stream().noneMatch(Type::isBooleanType)) return state.bottom(); return state.smallStepSemantics( diff --git a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/numeric/Addition.java b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/numeric/Addition.java index 65fc737e7..64de9f4da 100644 --- a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/numeric/Addition.java +++ b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/numeric/Addition.java @@ -4,9 +4,6 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.CodeLocation; @@ -16,7 +13,6 @@ import it.unive.lisa.symbolic.value.operator.binary.NumericNonOverflowingAdd; import it.unive.lisa.type.NumericType; import it.unive.lisa.type.Type; -import it.unive.lisa.type.TypeSystem; /** * An expression modeling the addition operation ({@code +}). Both operands' @@ -36,25 +32,25 @@ public class Addition extends it.unive.lisa.program.cfg.statement.BinaryExpressi * @param left the left-hand side of this operation * @param right the right-hand side of this operation */ - public Addition(CFG cfg, CodeLocation location, Expression left, Expression right) { + public Addition( + CFG cfg, + CodeLocation location, + Expression left, + Expression right) { super(cfg, location, "+", left, right); } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState binarySemantics( - InterproceduralAnalysis interprocedural, - AnalysisState state, - SymbolicExpression left, - SymbolicExpression right, - StatementStore expressions) - throws SemanticException { - TypeSystem types = getProgram().getTypes(); - if (left.getRuntimeTypes(types).stream().noneMatch(Type::isNumericType)) + public > AnalysisState fwdBinarySemantics( + InterproceduralAnalysis interprocedural, + AnalysisState state, + SymbolicExpression left, + SymbolicExpression right, + StatementStore expressions) + throws SemanticException { + if (state.getState().getRuntimeTypesOf(right, this, state.getState()).stream().noneMatch(Type::isNumericType)) return state.bottom(); - if (right.getRuntimeTypes(types).stream().noneMatch(Type::isNumericType)) + if (state.getState().getRuntimeTypesOf(right, this, state.getState()).stream().noneMatch(Type::isNumericType)) return state.bottom(); return state.smallStepSemantics( diff --git a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/numeric/Division.java b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/numeric/Division.java index e868d5e02..4d130ef61 100644 --- a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/numeric/Division.java +++ b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/numeric/Division.java @@ -4,9 +4,6 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.CodeLocation; @@ -16,7 +13,6 @@ import it.unive.lisa.symbolic.value.operator.binary.NumericNonOverflowingDiv; import it.unive.lisa.type.NumericType; import it.unive.lisa.type.Type; -import it.unive.lisa.type.TypeSystem; /** * An expression modeling the division operation ({@code /}). Both operands' @@ -36,25 +32,25 @@ public class Division extends it.unive.lisa.program.cfg.statement.BinaryExpressi * @param left the left-hand side of this operation * @param right the right-hand side of this operation */ - public Division(CFG cfg, CodeLocation location, Expression left, Expression right) { + public Division( + CFG cfg, + CodeLocation location, + Expression left, + Expression right) { super(cfg, location, "/", left, right); } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState binarySemantics( - InterproceduralAnalysis interprocedural, - AnalysisState state, - SymbolicExpression left, - SymbolicExpression right, - StatementStore expressions) - throws SemanticException { - TypeSystem types = getProgram().getTypes(); - if (left.getRuntimeTypes(types).stream().noneMatch(Type::isNumericType)) + public > AnalysisState fwdBinarySemantics( + InterproceduralAnalysis interprocedural, + AnalysisState state, + SymbolicExpression left, + SymbolicExpression right, + StatementStore expressions) + throws SemanticException { + if (state.getState().getRuntimeTypesOf(left, this, state.getState()).stream().noneMatch(Type::isNumericType)) return state.bottom(); - if (right.getRuntimeTypes(types).stream().noneMatch(Type::isNumericType)) + if (state.getState().getRuntimeTypesOf(right, this, state.getState()).stream().noneMatch(Type::isNumericType)) return state.bottom(); return state.smallStepSemantics( diff --git a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/numeric/Modulo.java b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/numeric/Modulo.java index 20b4396a0..51dd4fa30 100644 --- a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/numeric/Modulo.java +++ b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/numeric/Modulo.java @@ -4,9 +4,6 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.CodeLocation; @@ -16,7 +13,6 @@ import it.unive.lisa.symbolic.value.operator.binary.NumericNonOverflowingMod; import it.unive.lisa.type.NumericType; import it.unive.lisa.type.Type; -import it.unive.lisa.type.TypeSystem; /** * An expression modeling the modulo operation ({@code %}, returning the @@ -37,25 +33,25 @@ public class Modulo extends it.unive.lisa.program.cfg.statement.BinaryExpression * @param left the left-hand side of this operation * @param right the right-hand side of this operation */ - public Modulo(CFG cfg, CodeLocation location, Expression left, Expression right) { + public Modulo( + CFG cfg, + CodeLocation location, + Expression left, + Expression right) { super(cfg, location, "%", left, right); } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState binarySemantics( - InterproceduralAnalysis interprocedural, - AnalysisState state, - SymbolicExpression left, - SymbolicExpression right, - StatementStore expressions) - throws SemanticException { - TypeSystem types = getProgram().getTypes(); - if (left.getRuntimeTypes(types).stream().noneMatch(Type::isNumericType)) + public > AnalysisState fwdBinarySemantics( + InterproceduralAnalysis interprocedural, + AnalysisState state, + SymbolicExpression left, + SymbolicExpression right, + StatementStore expressions) + throws SemanticException { + if (state.getState().getRuntimeTypesOf(left, this, state.getState()).stream().noneMatch(Type::isNumericType)) return state.bottom(); - if (right.getRuntimeTypes(types).stream().noneMatch(Type::isNumericType)) + if (state.getState().getRuntimeTypesOf(right, this, state.getState()).stream().noneMatch(Type::isNumericType)) return state.bottom(); return state.smallStepSemantics( diff --git a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/numeric/Multiplication.java b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/numeric/Multiplication.java index ff69f452f..7e27d89ac 100644 --- a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/numeric/Multiplication.java +++ b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/numeric/Multiplication.java @@ -4,9 +4,6 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.CodeLocation; @@ -16,7 +13,6 @@ import it.unive.lisa.symbolic.value.operator.binary.NumericNonOverflowingMul; import it.unive.lisa.type.NumericType; import it.unive.lisa.type.Type; -import it.unive.lisa.type.TypeSystem; /** * An expression modeling the multiplication operation ({@code *}). Both @@ -36,25 +32,25 @@ public class Multiplication extends it.unive.lisa.program.cfg.statement.BinaryEx * @param left the left-hand side of this operation * @param right the right-hand side of this operation */ - public Multiplication(CFG cfg, CodeLocation location, Expression left, Expression right) { + public Multiplication( + CFG cfg, + CodeLocation location, + Expression left, + Expression right) { super(cfg, location, "*", left, right); } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState binarySemantics( - InterproceduralAnalysis interprocedural, - AnalysisState state, - SymbolicExpression left, - SymbolicExpression right, - StatementStore expressions) - throws SemanticException { - TypeSystem types = getProgram().getTypes(); - if (left.getRuntimeTypes(types).stream().noneMatch(Type::isNumericType)) + public > AnalysisState fwdBinarySemantics( + InterproceduralAnalysis interprocedural, + AnalysisState state, + SymbolicExpression left, + SymbolicExpression right, + StatementStore expressions) + throws SemanticException { + if (state.getState().getRuntimeTypesOf(left, this, state.getState()).stream().noneMatch(Type::isNumericType)) return state.bottom(); - if (right.getRuntimeTypes(types).stream().noneMatch(Type::isNumericType)) + if (state.getState().getRuntimeTypesOf(right, this, state.getState()).stream().noneMatch(Type::isNumericType)) return state.bottom(); return state.smallStepSemantics( diff --git a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/numeric/Negation.java b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/numeric/Negation.java index 668ece839..aa8a7e6aa 100644 --- a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/numeric/Negation.java +++ b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/numeric/Negation.java @@ -4,9 +4,6 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.CodeLocation; @@ -16,7 +13,6 @@ import it.unive.lisa.symbolic.value.operator.unary.NumericNegation; import it.unive.lisa.type.NumericType; import it.unive.lisa.type.Type; -import it.unive.lisa.type.TypeSystem; /** * An expression modeling the numerical negation operation ({@code -}). The @@ -34,22 +30,21 @@ public class Negation extends it.unive.lisa.program.cfg.statement.UnaryExpressio * @param location the location where this literal is defined * @param expression the operand of this operation */ - public Negation(CFG cfg, CodeLocation location, Expression expression) { + public Negation( + CFG cfg, + CodeLocation location, + Expression expression) { super(cfg, location, "-", expression); } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState unarySemantics( - InterproceduralAnalysis interprocedural, - AnalysisState state, - SymbolicExpression expr, - StatementStore expressions) - throws SemanticException { - TypeSystem types = getProgram().getTypes(); - if (expr.getRuntimeTypes(types).stream().noneMatch(Type::isNumericType)) + public > AnalysisState fwdUnarySemantics( + InterproceduralAnalysis interprocedural, + AnalysisState state, + SymbolicExpression expr, + StatementStore expressions) + throws SemanticException { + if (state.getState().getRuntimeTypesOf(expr, this, state.getState()).stream().noneMatch(Type::isNumericType)) return state.bottom(); return state.smallStepSemantics( diff --git a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/numeric/Remainder.java b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/numeric/Remainder.java index 413d17110..39c760f36 100644 --- a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/numeric/Remainder.java +++ b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/numeric/Remainder.java @@ -4,9 +4,6 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.CodeLocation; @@ -16,7 +13,6 @@ import it.unive.lisa.symbolic.value.operator.binary.NumericNonOverflowingRem; import it.unive.lisa.type.NumericType; import it.unive.lisa.type.Type; -import it.unive.lisa.type.TypeSystem; /** * An expression modeling the remainder operation ({@code %}, returning the @@ -37,25 +33,25 @@ public class Remainder extends it.unive.lisa.program.cfg.statement.BinaryExpress * @param left the left-hand side of this operation * @param right the right-hand side of this operation */ - public Remainder(CFG cfg, CodeLocation location, Expression left, Expression right) { + public Remainder( + CFG cfg, + CodeLocation location, + Expression left, + Expression right) { super(cfg, location, "%", left, right); } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState binarySemantics( - InterproceduralAnalysis interprocedural, - AnalysisState state, - SymbolicExpression left, - SymbolicExpression right, - StatementStore expressions) - throws SemanticException { - TypeSystem types = getProgram().getTypes(); - if (left.getRuntimeTypes(types).stream().noneMatch(Type::isNumericType)) + public > AnalysisState fwdBinarySemantics( + InterproceduralAnalysis interprocedural, + AnalysisState state, + SymbolicExpression left, + SymbolicExpression right, + StatementStore expressions) + throws SemanticException { + if (state.getState().getRuntimeTypesOf(left, this, state.getState()).stream().noneMatch(Type::isNumericType)) return state.bottom(); - if (right.getRuntimeTypes(types).stream().noneMatch(Type::isNumericType)) + if (state.getState().getRuntimeTypesOf(left, this, state.getState()).stream().noneMatch(Type::isNumericType)) return state.bottom(); return state.smallStepSemantics( diff --git a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/numeric/Subtraction.java b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/numeric/Subtraction.java index 8a68bb8f1..6dafa73dc 100644 --- a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/numeric/Subtraction.java +++ b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/numeric/Subtraction.java @@ -4,9 +4,6 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.CodeLocation; @@ -16,7 +13,6 @@ import it.unive.lisa.symbolic.value.operator.binary.NumericNonOverflowingSub; import it.unive.lisa.type.NumericType; import it.unive.lisa.type.Type; -import it.unive.lisa.type.TypeSystem; /** * An expression modeling the subtraction operation ({@code -}). Both operands' @@ -36,25 +32,25 @@ public class Subtraction extends it.unive.lisa.program.cfg.statement.BinaryExpre * @param left the left-hand side of this operation * @param right the right-hand side of this operation */ - public Subtraction(CFG cfg, CodeLocation location, Expression left, Expression right) { + public Subtraction( + CFG cfg, + CodeLocation location, + Expression left, + Expression right) { super(cfg, location, "-", left, right); } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState binarySemantics( - InterproceduralAnalysis interprocedural, - AnalysisState state, - SymbolicExpression left, - SymbolicExpression right, - StatementStore expressions) - throws SemanticException { - TypeSystem types = getProgram().getTypes(); - if (left.getRuntimeTypes(types).stream().noneMatch(Type::isNumericType)) + public > AnalysisState fwdBinarySemantics( + InterproceduralAnalysis interprocedural, + AnalysisState state, + SymbolicExpression left, + SymbolicExpression right, + StatementStore expressions) + throws SemanticException { + if (state.getState().getRuntimeTypesOf(left, this, state.getState()).stream().noneMatch(Type::isNumericType)) return state.bottom(); - if (right.getRuntimeTypes(types).stream().noneMatch(Type::isNumericType)) + if (state.getState().getRuntimeTypesOf(right, this, state.getState()).stream().noneMatch(Type::isNumericType)) return state.bottom(); return state.smallStepSemantics( diff --git a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/string/Concat.java b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/string/Concat.java index 3ceef0b5c..01a956573 100644 --- a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/string/Concat.java +++ b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/string/Concat.java @@ -4,9 +4,6 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.CodeLocation; @@ -20,7 +17,6 @@ import it.unive.lisa.symbolic.value.operator.binary.StringConcat; import it.unive.lisa.type.StringType; import it.unive.lisa.type.Type; -import it.unive.lisa.type.TypeSystem; /** * An expression modeling the string contains operation. The type of both @@ -28,13 +24,12 @@ * {@link StringType}.
*
* Since in most languages string operations are provided through calls to - * library functions, this class contains a field {@link #originating} whose - * purpose is to optionally store a {@link Statement} that is rewritten to an - * instance of this class (i.e., a call to a {@link NativeCFG} modeling the - * library function). If present, such statement will be used as - * {@link ProgramPoint} for semantics computations. This allows subclasses to - * implement {@link PluggableStatement} easily without redefining the semantics - * provided by this class. + * library functions, this class contains a field whose purpose is to optionally + * store a {@link Statement} that is rewritten to an instance of this class + * (i.e., a call to a {@link NativeCFG} modeling the library function). If + * present, such statement will be used as {@link ProgramPoint} for semantics + * computations. This allows subclasses to implement {@link PluggableStatement} + * easily without redefining the semantics provided by this class. * * @author
Luca Negrini */ @@ -57,26 +52,26 @@ public class Concat extends it.unive.lisa.program.cfg.statement.BinaryExpression * @param left the left-hand side of this operation * @param right the right-hand side of this operation */ - public Concat(CFG cfg, CodeLocation location, Expression left, Expression right) { + public Concat( + CFG cfg, + CodeLocation location, + Expression left, + Expression right) { super(cfg, location, "concat", cfg.getDescriptor().getUnit().getProgram().getTypes().getStringType(), left, right); } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState binarySemantics( - InterproceduralAnalysis interprocedural, - AnalysisState state, - SymbolicExpression left, - SymbolicExpression right, - StatementStore expressions) - throws SemanticException { - TypeSystem types = getProgram().getTypes(); - if (left.getRuntimeTypes(types).stream().noneMatch(Type::isStringType)) + public > AnalysisState fwdBinarySemantics( + InterproceduralAnalysis interprocedural, + AnalysisState state, + SymbolicExpression left, + SymbolicExpression right, + StatementStore expressions) + throws SemanticException { + if (state.getState().getRuntimeTypesOf(left, this, state.getState()).stream().noneMatch(Type::isStringType)) return state.bottom(); - if (right.getRuntimeTypes(types).stream().noneMatch(Type::isStringType)) + if (state.getState().getRuntimeTypesOf(right, this, state.getState()).stream().noneMatch(Type::isStringType)) return state.bottom(); return state.smallStepSemantics( diff --git a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/string/Contains.java b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/string/Contains.java index 0f5581b97..694b5b497 100644 --- a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/string/Contains.java +++ b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/string/Contains.java @@ -4,9 +4,6 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.CodeLocation; @@ -21,7 +18,6 @@ import it.unive.lisa.type.BooleanType; import it.unive.lisa.type.StringType; import it.unive.lisa.type.Type; -import it.unive.lisa.type.TypeSystem; /** * An expression modeling the string contains operation. The type of both @@ -29,13 +25,12 @@ * {@link BooleanType}.
*
* Since in most languages string operations are provided through calls to - * library functions, this class contains a field {@link #originating} whose - * purpose is to optionally store a {@link Statement} that is rewritten to an - * instance of this class (i.e., a call to a {@link NativeCFG} modeling the - * library function). If present, such statement will be used as - * {@link ProgramPoint} for semantics computations. This allows subclasses to - * implement {@link PluggableStatement} easily without redefining the semantics - * provided by this class. + * library functions, this class contains a field whose purpose is to optionally + * store a {@link Statement} that is rewritten to an instance of this class + * (i.e., a call to a {@link NativeCFG} modeling the library function). If + * present, such statement will be used as {@link ProgramPoint} for semantics + * computations. This allows subclasses to implement {@link PluggableStatement} + * easily without redefining the semantics provided by this class. * * @author
Luca Negrini */ @@ -58,26 +53,26 @@ public class Contains extends it.unive.lisa.program.cfg.statement.BinaryExpressi * @param left the left-hand side of this operation * @param right the right-hand side of this operation */ - public Contains(CFG cfg, CodeLocation location, Expression left, Expression right) { + public Contains( + CFG cfg, + CodeLocation location, + Expression left, + Expression right) { super(cfg, location, "contains", cfg.getDescriptor().getUnit().getProgram().getTypes().getBooleanType(), left, right); } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState binarySemantics( - InterproceduralAnalysis interprocedural, - AnalysisState state, - SymbolicExpression left, - SymbolicExpression right, - StatementStore expressions) - throws SemanticException { - TypeSystem types = getProgram().getTypes(); - if (left.getRuntimeTypes(types).stream().noneMatch(Type::isStringType)) + public > AnalysisState fwdBinarySemantics( + InterproceduralAnalysis interprocedural, + AnalysisState state, + SymbolicExpression left, + SymbolicExpression right, + StatementStore expressions) + throws SemanticException { + if (state.getState().getRuntimeTypesOf(left, this, state.getState()).stream().noneMatch(Type::isStringType)) return state.bottom(); - if (right.getRuntimeTypes(types).stream().noneMatch(Type::isStringType)) + if (state.getState().getRuntimeTypesOf(right, this, state.getState()).stream().noneMatch(Type::isStringType)) return state.bottom(); return state.smallStepSemantics( diff --git a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/string/EndsWith.java b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/string/EndsWith.java index 22c9d5de1..1b0dbbcb4 100644 --- a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/string/EndsWith.java +++ b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/string/EndsWith.java @@ -4,9 +4,6 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.CodeLocation; @@ -21,7 +18,6 @@ import it.unive.lisa.type.BooleanType; import it.unive.lisa.type.StringType; import it.unive.lisa.type.Type; -import it.unive.lisa.type.TypeSystem; /** * An expression modeling the string endsWith operation. The type of both @@ -29,13 +25,12 @@ * {@link BooleanType}.
*
* Since in most languages string operations are provided through calls to - * library functions, this class contains a field {@link #originating} whose - * purpose is to optionally store a {@link Statement} that is rewritten to an - * instance of this class (i.e., a call to a {@link NativeCFG} modeling the - * library function). If present, such statement will be used as - * {@link ProgramPoint} for semantics computations. This allows subclasses to - * implement {@link PluggableStatement} easily without redefining the semantics - * provided by this class. + * library functions, this class contains a field whose purpose is to optionally + * store a {@link Statement} that is rewritten to an instance of this class + * (i.e., a call to a {@link NativeCFG} modeling the library function). If + * present, such statement will be used as {@link ProgramPoint} for semantics + * computations. This allows subclasses to implement {@link PluggableStatement} + * easily without redefining the semantics provided by this class. * * @author
Luca Negrini */ @@ -58,26 +53,26 @@ public class EndsWith extends it.unive.lisa.program.cfg.statement.BinaryExpressi * @param left the left-hand side of this operation * @param right the right-hand side of this operation */ - public EndsWith(CFG cfg, CodeLocation location, Expression left, Expression right) { + public EndsWith( + CFG cfg, + CodeLocation location, + Expression left, + Expression right) { super(cfg, location, "endsWith", cfg.getDescriptor().getUnit().getProgram().getTypes().getBooleanType(), left, right); } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState binarySemantics( - InterproceduralAnalysis interprocedural, - AnalysisState state, - SymbolicExpression left, - SymbolicExpression right, - StatementStore expressions) - throws SemanticException { - TypeSystem types = getProgram().getTypes(); - if (left.getRuntimeTypes(types).stream().noneMatch(Type::isStringType)) + public > AnalysisState fwdBinarySemantics( + InterproceduralAnalysis interprocedural, + AnalysisState state, + SymbolicExpression left, + SymbolicExpression right, + StatementStore expressions) + throws SemanticException { + if (state.getState().getRuntimeTypesOf(left, this, state.getState()).stream().noneMatch(Type::isStringType)) return state.bottom(); - if (right.getRuntimeTypes(types).stream().noneMatch(Type::isStringType)) + if (state.getState().getRuntimeTypesOf(right, this, state.getState()).stream().noneMatch(Type::isStringType)) return state.bottom(); return state.smallStepSemantics( diff --git a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/string/Equals.java b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/string/Equals.java index ed55a5585..d4d7c4f4d 100644 --- a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/string/Equals.java +++ b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/string/Equals.java @@ -4,9 +4,6 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.CodeLocation; @@ -21,7 +18,6 @@ import it.unive.lisa.type.BooleanType; import it.unive.lisa.type.StringType; import it.unive.lisa.type.Type; -import it.unive.lisa.type.TypeSystem; /** * An expression modeling the string equals operation. The type of both operands @@ -29,13 +25,12 @@ * {@link BooleanType}.
*
* Since in most languages string operations are provided through calls to - * library functions, this class contains a field {@link #originating} whose - * purpose is to optionally store a {@link Statement} that is rewritten to an - * instance of this class (i.e., a call to a {@link NativeCFG} modeling the - * library function). If present, such statement will be used as - * {@link ProgramPoint} for semantics computations. This allows subclasses to - * implement {@link PluggableStatement} easily without redefining the semantics - * provided by this class. + * library functions, this class contains a field whose purpose is to optionally + * store a {@link Statement} that is rewritten to an instance of this class + * (i.e., a call to a {@link NativeCFG} modeling the library function). If + * present, such statement will be used as {@link ProgramPoint} for semantics + * computations. This allows subclasses to implement {@link PluggableStatement} + * easily without redefining the semantics provided by this class. * * @author
Luca Negrini */ @@ -58,26 +53,26 @@ public class Equals extends it.unive.lisa.program.cfg.statement.BinaryExpression * @param left the left-hand side of this operation * @param right the right-hand side of this operation */ - public Equals(CFG cfg, CodeLocation location, Expression left, Expression right) { + public Equals( + CFG cfg, + CodeLocation location, + Expression left, + Expression right) { super(cfg, location, "equals", cfg.getDescriptor().getUnit().getProgram().getTypes().getBooleanType(), left, right); } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState binarySemantics( - InterproceduralAnalysis interprocedural, - AnalysisState state, - SymbolicExpression left, - SymbolicExpression right, - StatementStore expressions) - throws SemanticException { - TypeSystem types = getProgram().getTypes(); - if (left.getRuntimeTypes(types).stream().noneMatch(Type::isStringType)) + public > AnalysisState fwdBinarySemantics( + InterproceduralAnalysis interprocedural, + AnalysisState state, + SymbolicExpression left, + SymbolicExpression right, + StatementStore expressions) + throws SemanticException { + if (state.getState().getRuntimeTypesOf(left, this, state.getState()).stream().noneMatch(Type::isStringType)) return state.bottom(); - if (right.getRuntimeTypes(types).stream().noneMatch(Type::isStringType)) + if (state.getState().getRuntimeTypesOf(right, this, state.getState()).stream().noneMatch(Type::isStringType)) return state.bottom(); return state.smallStepSemantics( diff --git a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/string/IndexOf.java b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/string/IndexOf.java index 7321518b4..9a6535e1e 100644 --- a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/string/IndexOf.java +++ b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/string/IndexOf.java @@ -4,9 +4,6 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.CodeLocation; @@ -21,7 +18,6 @@ import it.unive.lisa.type.NumericType; import it.unive.lisa.type.StringType; import it.unive.lisa.type.Type; -import it.unive.lisa.type.TypeSystem; /** * An expression modeling the string indexOf operation. The type of both @@ -29,13 +25,12 @@ * {@link NumericType}.
*
* Since in most languages string operations are provided through calls to - * library functions, this class contains a field {@link #originating} whose - * purpose is to optionally store a {@link Statement} that is rewritten to an - * instance of this class (i.e., a call to a {@link NativeCFG} modeling the - * library function). If present, such statement will be used as - * {@link ProgramPoint} for semantics computations. This allows subclasses to - * implement {@link PluggableStatement} easily without redefining the semantics - * provided by this class. + * library functions, this class contains a field whose purpose is to optionally + * store a {@link Statement} that is rewritten to an instance of this class + * (i.e., a call to a {@link NativeCFG} modeling the library function). If + * present, such statement will be used as {@link ProgramPoint} for semantics + * computations. This allows subclasses to implement {@link PluggableStatement} + * easily without redefining the semantics provided by this class. * * @author
Luca Negrini */ @@ -58,26 +53,26 @@ public class IndexOf extends it.unive.lisa.program.cfg.statement.BinaryExpressio * @param left the left-hand side of this operation * @param right the right-hand side of this operation */ - public IndexOf(CFG cfg, CodeLocation location, Expression left, Expression right) { + public IndexOf( + CFG cfg, + CodeLocation location, + Expression left, + Expression right) { super(cfg, location, "indexOf", cfg.getDescriptor().getUnit().getProgram().getTypes().getIntegerType(), left, right); } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState binarySemantics( - InterproceduralAnalysis interprocedural, - AnalysisState state, - SymbolicExpression left, - SymbolicExpression right, - StatementStore expressions) - throws SemanticException { - TypeSystem types = getProgram().getTypes(); - if (left.getRuntimeTypes(types).stream().noneMatch(Type::isStringType)) + public > AnalysisState fwdBinarySemantics( + InterproceduralAnalysis interprocedural, + AnalysisState state, + SymbolicExpression left, + SymbolicExpression right, + StatementStore expressions) + throws SemanticException { + if (state.getState().getRuntimeTypesOf(left, this, state.getState()).stream().noneMatch(Type::isStringType)) return state.bottom(); - if (right.getRuntimeTypes(types).stream().noneMatch(Type::isStringType)) + if (state.getState().getRuntimeTypesOf(right, this, state.getState()).stream().noneMatch(Type::isStringType)) return state.bottom(); return state.smallStepSemantics( diff --git a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/string/Length.java b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/string/Length.java index 1e36e3de7..03d3f3eec 100644 --- a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/string/Length.java +++ b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/string/Length.java @@ -4,9 +4,6 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.CodeLocation; @@ -21,7 +18,6 @@ import it.unive.lisa.type.NumericType; import it.unive.lisa.type.StringType; import it.unive.lisa.type.Type; -import it.unive.lisa.type.TypeSystem; /** * An expression modeling the string length operation. The type of the operand @@ -29,13 +25,12 @@ * {@link NumericType}.
*
* Since in most languages string operations are provided through calls to - * library functions, this class contains a field {@link #originating} whose - * purpose is to optionally store a {@link Statement} that is rewritten to an - * instance of this class (i.e., a call to a {@link NativeCFG} modeling the - * library function). If present, such statement will be used as - * {@link ProgramPoint} for semantics computations. This allows subclasses to - * implement {@link PluggableStatement} easily without redefining the semantics - * provided by this class. + * library functions, this class contains a field whose purpose is to optionally + * store a {@link Statement} that is rewritten to an instance of this class + * (i.e., a call to a {@link NativeCFG} modeling the library function). If + * present, such statement will be used as {@link ProgramPoint} for semantics + * computations. This allows subclasses to implement {@link PluggableStatement} + * easily without redefining the semantics provided by this class. * * @author
Luca Negrini */ @@ -57,22 +52,21 @@ public class Length extends it.unive.lisa.program.cfg.statement.UnaryExpression * @param location the code location where this operation is defined * @param parameter the operand of this operation */ - public Length(CFG cfg, CodeLocation location, Expression parameter) { + public Length( + CFG cfg, + CodeLocation location, + Expression parameter) { super(cfg, location, "len", cfg.getDescriptor().getUnit().getProgram().getTypes().getIntegerType(), parameter); } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState unarySemantics( - InterproceduralAnalysis interprocedural, - AnalysisState state, - SymbolicExpression expr, - StatementStore expressions) - throws SemanticException { - TypeSystem types = getProgram().getTypes(); - if (expr.getRuntimeTypes(types).stream().noneMatch(Type::isStringType)) + public > AnalysisState fwdUnarySemantics( + InterproceduralAnalysis interprocedural, + AnalysisState state, + SymbolicExpression expr, + StatementStore expressions) + throws SemanticException { + if (state.getState().getRuntimeTypesOf(expr, this, state.getState()).stream().noneMatch(Type::isStringType)) return state.bottom(); return state.smallStepSemantics( diff --git a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/string/Replace.java b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/string/Replace.java index 1d49f29b3..0da38736c 100644 --- a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/string/Replace.java +++ b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/string/Replace.java @@ -4,9 +4,6 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.CodeLocation; @@ -20,7 +17,6 @@ import it.unive.lisa.symbolic.value.operator.ternary.StringReplace; import it.unive.lisa.type.StringType; import it.unive.lisa.type.Type; -import it.unive.lisa.type.TypeSystem; /** * An expression modeling the string replace operation. The type of all three @@ -28,13 +24,12 @@ * {@link StringType}.
*
* Since in most languages string operations are provided through calls to - * library functions, this class contains a field {@link #originating} whose - * purpose is to optionally store a {@link Statement} that is rewritten to an - * instance of this class (i.e., a call to a {@link NativeCFG} modeling the - * library function). If present, such statement will be used as - * {@link ProgramPoint} for semantics computations. This allows subclasses to - * implement {@link PluggableStatement} easily without redefining the semantics - * provided by this class. + * library functions, this class contains a field whose purpose is to optionally + * store a {@link Statement} that is rewritten to an instance of this class + * (i.e., a call to a {@link NativeCFG} modeling the library function). If + * present, such statement will be used as {@link ProgramPoint} for semantics + * computations. This allows subclasses to implement {@link PluggableStatement} + * easily without redefining the semantics provided by this class. * * @author
Luca Negrini */ @@ -58,29 +53,30 @@ public class Replace extends it.unive.lisa.program.cfg.statement.TernaryExpressi * @param middle the middle operand of this operation * @param right the right-hand side of this operation */ - public Replace(CFG cfg, CodeLocation location, Expression left, Expression middle, Expression right) { + public Replace( + CFG cfg, + CodeLocation location, + Expression left, + Expression middle, + Expression right) { super(cfg, location, "replace", cfg.getDescriptor().getUnit().getProgram().getTypes().getStringType(), left, middle, right); } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState ternarySemantics( - InterproceduralAnalysis interprocedural, - AnalysisState state, - SymbolicExpression left, - SymbolicExpression middle, - SymbolicExpression right, - StatementStore expressions) - throws SemanticException { - TypeSystem types = getProgram().getTypes(); - if (left.getRuntimeTypes(types).stream().noneMatch(Type::isStringType)) + public > AnalysisState fwdTernarySemantics( + InterproceduralAnalysis interprocedural, + AnalysisState state, + SymbolicExpression left, + SymbolicExpression middle, + SymbolicExpression right, + StatementStore expressions) + throws SemanticException { + if (state.getState().getRuntimeTypesOf(left, this, state.getState()).stream().noneMatch(Type::isStringType)) return state.bottom(); - if (middle.getRuntimeTypes(types).stream().noneMatch(Type::isStringType)) + if (state.getState().getRuntimeTypesOf(middle, this, state.getState()).stream().noneMatch(Type::isStringType)) return state.bottom(); - if (right.getRuntimeTypes(types).stream().noneMatch(Type::isStringType)) + if (state.getState().getRuntimeTypesOf(right, this, state.getState()).stream().noneMatch(Type::isStringType)) return state.bottom(); return state.smallStepSemantics( diff --git a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/string/StartsWith.java b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/string/StartsWith.java index 2f494ed0c..2f8e100cb 100644 --- a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/string/StartsWith.java +++ b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/string/StartsWith.java @@ -4,9 +4,6 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.CodeLocation; @@ -21,7 +18,6 @@ import it.unive.lisa.type.BooleanType; import it.unive.lisa.type.StringType; import it.unive.lisa.type.Type; -import it.unive.lisa.type.TypeSystem; /** * An expression modeling the string startsWith operation. The type of both @@ -29,13 +25,12 @@ * {@link BooleanType}.
*
* Since in most languages string operations are provided through calls to - * library functions, this class contains a field {@link #originating} whose - * purpose is to optionally store a {@link Statement} that is rewritten to an - * instance of this class (i.e., a call to a {@link NativeCFG} modeling the - * library function). If present, such statement will be used as - * {@link ProgramPoint} for semantics computations. This allows subclasses to - * implement {@link PluggableStatement} easily without redefining the semantics - * provided by this class. + * library functions, this class contains a field whose purpose is to optionally + * store a {@link Statement} that is rewritten to an instance of this class + * (i.e., a call to a {@link NativeCFG} modeling the library function). If + * present, such statement will be used as {@link ProgramPoint} for semantics + * computations. This allows subclasses to implement {@link PluggableStatement} + * easily without redefining the semantics provided by this class. * * @author
Luca Negrini */ @@ -58,26 +53,26 @@ public class StartsWith extends it.unive.lisa.program.cfg.statement.BinaryExpres * @param left the left-hand side of this operation * @param right the right-hand side of this operation */ - public StartsWith(CFG cfg, CodeLocation location, Expression left, Expression right) { + public StartsWith( + CFG cfg, + CodeLocation location, + Expression left, + Expression right) { super(cfg, location, "startsWith", cfg.getDescriptor().getUnit().getProgram().getTypes().getBooleanType(), left, right); } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState binarySemantics( - InterproceduralAnalysis interprocedural, - AnalysisState state, - SymbolicExpression left, - SymbolicExpression right, - StatementStore expressions) - throws SemanticException { - TypeSystem types = getProgram().getTypes(); - if (left.getRuntimeTypes(types).stream().noneMatch(Type::isStringType)) + public > AnalysisState fwdBinarySemantics( + InterproceduralAnalysis interprocedural, + AnalysisState state, + SymbolicExpression left, + SymbolicExpression right, + StatementStore expressions) + throws SemanticException { + if (state.getState().getRuntimeTypesOf(left, this, state.getState()).stream().noneMatch(Type::isStringType)) return state.bottom(); - if (right.getRuntimeTypes(types).stream().noneMatch(Type::isStringType)) + if (state.getState().getRuntimeTypesOf(right, this, state.getState()).stream().noneMatch(Type::isStringType)) return state.bottom(); return state.smallStepSemantics( diff --git a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/string/Substring.java b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/string/Substring.java index 88c8c01d4..11ae02ee8 100644 --- a/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/string/Substring.java +++ b/lisa/lisa-program/src/main/java/it/unive/lisa/program/cfg/statement/string/Substring.java @@ -4,9 +4,6 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.CodeLocation; @@ -21,7 +18,6 @@ import it.unive.lisa.type.NumericType; import it.unive.lisa.type.StringType; import it.unive.lisa.type.Type; -import it.unive.lisa.type.TypeSystem; /** * An expression modeling the string substring operation. The type of the first @@ -30,13 +26,12 @@ * {@link StringType}.
*
* Since in most languages string operations are provided through calls to - * library functions, this class contains a field {@link #originating} whose - * purpose is to optionally store a {@link Statement} that is rewritten to an - * instance of this class (i.e., a call to a {@link NativeCFG} modeling the - * library function). If present, such statement will be used as - * {@link ProgramPoint} for semantics computations. This allows subclasses to - * implement {@link PluggableStatement} easily without redefining the semantics - * provided by this class. + * library functions, this class contains a field whose purpose is to optionally + * store a {@link Statement} that is rewritten to an instance of this class + * (i.e., a call to a {@link NativeCFG} modeling the library function). If + * present, such statement will be used as {@link ProgramPoint} for semantics + * computations. This allows subclasses to implement {@link PluggableStatement} + * easily without redefining the semantics provided by this class. * * @author
Luca Negrini */ @@ -60,29 +55,30 @@ public class Substring extends it.unive.lisa.program.cfg.statement.TernaryExpres * @param middle the middle operand of this operation * @param right the right-hand side of this operation */ - public Substring(CFG cfg, CodeLocation location, Expression left, Expression middle, Expression right) { + public Substring( + CFG cfg, + CodeLocation location, + Expression left, + Expression middle, + Expression right) { super(cfg, location, "substring", cfg.getDescriptor().getUnit().getProgram().getTypes().getStringType(), left, middle, right); } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState ternarySemantics( - InterproceduralAnalysis interprocedural, - AnalysisState state, - SymbolicExpression left, - SymbolicExpression middle, - SymbolicExpression right, - StatementStore expressions) - throws SemanticException { - TypeSystem types = getProgram().getTypes(); - if (left.getRuntimeTypes(types).stream().noneMatch(Type::isStringType)) + public > AnalysisState fwdTernarySemantics( + InterproceduralAnalysis interprocedural, + AnalysisState state, + SymbolicExpression left, + SymbolicExpression middle, + SymbolicExpression right, + StatementStore expressions) + throws SemanticException { + if (state.getState().getRuntimeTypesOf(left, this, state.getState()).stream().noneMatch(Type::isStringType)) return state.bottom(); - if (middle.getRuntimeTypes(types).stream().noneMatch(Type::isNumericType)) + if (state.getState().getRuntimeTypesOf(middle, this, state.getState()).stream().noneMatch(Type::isNumericType)) return state.bottom(); - if (right.getRuntimeTypes(types).stream().noneMatch(Type::isNumericType)) + if (state.getState().getRuntimeTypesOf(right, this, state.getState()).stream().noneMatch(Type::isNumericType)) return state.bottom(); return state.smallStepSemantics( diff --git a/lisa/lisa-program/src/main/java/it/unive/lisa/program/type/BoolType.java b/lisa/lisa-program/src/main/java/it/unive/lisa/program/type/BoolType.java index ea191ec07..c4e80e983 100644 --- a/lisa/lisa-program/src/main/java/it/unive/lisa/program/type/BoolType.java +++ b/lisa/lisa-program/src/main/java/it/unive/lisa/program/type/BoolType.java @@ -32,12 +32,14 @@ protected BoolType() { } @Override - public boolean canBeAssignedTo(Type other) { + public boolean canBeAssignedTo( + Type other) { return other.isBooleanType() || other.isUntyped(); } @Override - public Type commonSupertype(Type other) { + public Type commonSupertype( + Type other) { return other.isBooleanType() ? this : Untyped.INSTANCE; } @@ -47,7 +49,8 @@ public String toString() { } @Override - public boolean equals(Object other) { + public boolean equals( + Object other) { return other instanceof BooleanType; } @@ -57,7 +60,8 @@ public int hashCode() { } @Override - public Set allInstances(TypeSystem types) { + public Set allInstances( + TypeSystem types) { return Collections.singleton(this); } } diff --git a/lisa/lisa-program/src/main/java/it/unive/lisa/program/type/Float32Type.java b/lisa/lisa-program/src/main/java/it/unive/lisa/program/type/Float32Type.java index 3c96c1135..1bd5cd76c 100644 --- a/lisa/lisa-program/src/main/java/it/unive/lisa/program/type/Float32Type.java +++ b/lisa/lisa-program/src/main/java/it/unive/lisa/program/type/Float32Type.java @@ -73,12 +73,14 @@ public boolean isIntegral() { } @Override - public boolean canBeAssignedTo(Type other) { + public boolean canBeAssignedTo( + Type other) { return other.isNumericType() || other.isUntyped(); } @Override - public Type commonSupertype(Type other) { + public Type commonSupertype( + Type other) { if (!other.isNumericType()) return Untyped.INSTANCE; @@ -91,7 +93,8 @@ public String toString() { } @Override - public boolean equals(Object other) { + public boolean equals( + Object other) { if (!(other instanceof NumericType)) return false; @@ -104,7 +107,8 @@ public int hashCode() { } @Override - public Set allInstances(TypeSystem types) { + public Set allInstances( + TypeSystem types) { return Collections.singleton(this); } } diff --git a/lisa/lisa-program/src/main/java/it/unive/lisa/program/type/Float64Type.java b/lisa/lisa-program/src/main/java/it/unive/lisa/program/type/Float64Type.java index b64415dee..8f49f9b3b 100644 --- a/lisa/lisa-program/src/main/java/it/unive/lisa/program/type/Float64Type.java +++ b/lisa/lisa-program/src/main/java/it/unive/lisa/program/type/Float64Type.java @@ -73,12 +73,14 @@ public boolean isIntegral() { } @Override - public boolean canBeAssignedTo(Type other) { + public boolean canBeAssignedTo( + Type other) { return other.isNumericType() || other.isUntyped(); } @Override - public Type commonSupertype(Type other) { + public Type commonSupertype( + Type other) { if (!other.isNumericType()) return Untyped.INSTANCE; @@ -91,7 +93,8 @@ public String toString() { } @Override - public boolean equals(Object other) { + public boolean equals( + Object other) { if (!(other instanceof NumericType)) return false; @@ -104,7 +107,8 @@ public int hashCode() { } @Override - public Set allInstances(TypeSystem types) { + public Set allInstances( + TypeSystem types) { return Collections.singleton(this); } } diff --git a/lisa/lisa-program/src/main/java/it/unive/lisa/program/type/Int16Type.java b/lisa/lisa-program/src/main/java/it/unive/lisa/program/type/Int16Type.java index e5ee4aa62..e303f2fc9 100644 --- a/lisa/lisa-program/src/main/java/it/unive/lisa/program/type/Int16Type.java +++ b/lisa/lisa-program/src/main/java/it/unive/lisa/program/type/Int16Type.java @@ -73,12 +73,14 @@ public boolean isIntegral() { } @Override - public boolean canBeAssignedTo(Type other) { + public boolean canBeAssignedTo( + Type other) { return other.isNumericType() || other.isUntyped(); } @Override - public Type commonSupertype(Type other) { + public Type commonSupertype( + Type other) { if (!other.isNumericType()) return Untyped.INSTANCE; @@ -91,7 +93,8 @@ public String toString() { } @Override - public boolean equals(Object other) { + public boolean equals( + Object other) { if (!(other instanceof NumericType)) return false; @@ -104,7 +107,8 @@ public int hashCode() { } @Override - public Set allInstances(TypeSystem types) { + public Set allInstances( + TypeSystem types) { return Collections.singleton(this); } } diff --git a/lisa/lisa-program/src/main/java/it/unive/lisa/program/type/Int32Type.java b/lisa/lisa-program/src/main/java/it/unive/lisa/program/type/Int32Type.java index 626b5f873..5a19f3bb4 100644 --- a/lisa/lisa-program/src/main/java/it/unive/lisa/program/type/Int32Type.java +++ b/lisa/lisa-program/src/main/java/it/unive/lisa/program/type/Int32Type.java @@ -73,12 +73,14 @@ public boolean isIntegral() { } @Override - public boolean canBeAssignedTo(Type other) { + public boolean canBeAssignedTo( + Type other) { return other.isNumericType() || other.isUntyped(); } @Override - public Type commonSupertype(Type other) { + public Type commonSupertype( + Type other) { if (!other.isNumericType()) return Untyped.INSTANCE; @@ -91,7 +93,8 @@ public String toString() { } @Override - public boolean equals(Object other) { + public boolean equals( + Object other) { if (!(other instanceof NumericType)) return false; @@ -104,7 +107,8 @@ public int hashCode() { } @Override - public Set allInstances(TypeSystem types) { + public Set allInstances( + TypeSystem types) { return Collections.singleton(this); } } diff --git a/lisa/lisa-program/src/main/java/it/unive/lisa/program/type/Int64Type.java b/lisa/lisa-program/src/main/java/it/unive/lisa/program/type/Int64Type.java index e8829d182..0ee0a9ea5 100644 --- a/lisa/lisa-program/src/main/java/it/unive/lisa/program/type/Int64Type.java +++ b/lisa/lisa-program/src/main/java/it/unive/lisa/program/type/Int64Type.java @@ -73,12 +73,14 @@ public boolean isIntegral() { } @Override - public boolean canBeAssignedTo(Type other) { + public boolean canBeAssignedTo( + Type other) { return other.isNumericType() || other.isUntyped(); } @Override - public Type commonSupertype(Type other) { + public Type commonSupertype( + Type other) { if (!other.isNumericType()) return Untyped.INSTANCE; @@ -91,7 +93,8 @@ public String toString() { } @Override - public boolean equals(Object other) { + public boolean equals( + Object other) { if (!(other instanceof NumericType)) return false; @@ -104,7 +107,8 @@ public int hashCode() { } @Override - public Set allInstances(TypeSystem types) { + public Set allInstances( + TypeSystem types) { return Collections.singleton(this); } } diff --git a/lisa/lisa-program/src/main/java/it/unive/lisa/program/type/Int8Type.java b/lisa/lisa-program/src/main/java/it/unive/lisa/program/type/Int8Type.java index 41f583dd1..939642918 100644 --- a/lisa/lisa-program/src/main/java/it/unive/lisa/program/type/Int8Type.java +++ b/lisa/lisa-program/src/main/java/it/unive/lisa/program/type/Int8Type.java @@ -73,12 +73,14 @@ public boolean isIntegral() { } @Override - public boolean canBeAssignedTo(Type other) { + public boolean canBeAssignedTo( + Type other) { return other.isNumericType() || other.isUntyped(); } @Override - public Type commonSupertype(Type other) { + public Type commonSupertype( + Type other) { if (!other.isNumericType()) return Untyped.INSTANCE; @@ -91,7 +93,8 @@ public String toString() { } @Override - public boolean equals(Object other) { + public boolean equals( + Object other) { if (!(other instanceof NumericType)) return false; @@ -104,7 +107,8 @@ public int hashCode() { } @Override - public Set allInstances(TypeSystem types) { + public Set allInstances( + TypeSystem types) { return Collections.singleton(this); } } diff --git a/lisa/lisa-program/src/main/java/it/unive/lisa/program/type/StringType.java b/lisa/lisa-program/src/main/java/it/unive/lisa/program/type/StringType.java index 595a6ba38..5b14db88e 100644 --- a/lisa/lisa-program/src/main/java/it/unive/lisa/program/type/StringType.java +++ b/lisa/lisa-program/src/main/java/it/unive/lisa/program/type/StringType.java @@ -32,12 +32,14 @@ protected StringType() { } @Override - public boolean canBeAssignedTo(Type other) { + public boolean canBeAssignedTo( + Type other) { return other.isStringType() || other.isUntyped(); } @Override - public Type commonSupertype(Type other) { + public Type commonSupertype( + Type other) { return other.isStringType() ? this : Untyped.INSTANCE; } @@ -47,7 +49,8 @@ public String toString() { } @Override - public boolean equals(Object other) { + public boolean equals( + Object other) { return other instanceof it.unive.lisa.type.StringType; } @@ -57,7 +60,8 @@ public int hashCode() { } @Override - public Set allInstances(TypeSystem types) { + public Set allInstances( + TypeSystem types) { return Collections.singleton(this); } } diff --git a/lisa/lisa-program/src/main/java/it/unive/lisa/program/type/UInt16Type.java b/lisa/lisa-program/src/main/java/it/unive/lisa/program/type/UInt16Type.java index a0c82ee65..d9067ef5e 100644 --- a/lisa/lisa-program/src/main/java/it/unive/lisa/program/type/UInt16Type.java +++ b/lisa/lisa-program/src/main/java/it/unive/lisa/program/type/UInt16Type.java @@ -73,12 +73,14 @@ public boolean isIntegral() { } @Override - public boolean canBeAssignedTo(Type other) { + public boolean canBeAssignedTo( + Type other) { return other.isNumericType() || other.isUntyped(); } @Override - public Type commonSupertype(Type other) { + public Type commonSupertype( + Type other) { if (!other.isNumericType()) return Untyped.INSTANCE; @@ -91,7 +93,8 @@ public String toString() { } @Override - public boolean equals(Object other) { + public boolean equals( + Object other) { if (!(other instanceof NumericType)) return false; @@ -104,7 +107,8 @@ public int hashCode() { } @Override - public Set allInstances(TypeSystem types) { + public Set allInstances( + TypeSystem types) { return Collections.singleton(this); } } diff --git a/lisa/lisa-program/src/main/java/it/unive/lisa/program/type/UInt32Type.java b/lisa/lisa-program/src/main/java/it/unive/lisa/program/type/UInt32Type.java index 10b04adab..445a0ed7c 100644 --- a/lisa/lisa-program/src/main/java/it/unive/lisa/program/type/UInt32Type.java +++ b/lisa/lisa-program/src/main/java/it/unive/lisa/program/type/UInt32Type.java @@ -73,12 +73,14 @@ public boolean isIntegral() { } @Override - public boolean canBeAssignedTo(Type other) { + public boolean canBeAssignedTo( + Type other) { return other.isNumericType() || other.isUntyped(); } @Override - public Type commonSupertype(Type other) { + public Type commonSupertype( + Type other) { if (!other.isNumericType()) return Untyped.INSTANCE; @@ -91,7 +93,8 @@ public String toString() { } @Override - public boolean equals(Object other) { + public boolean equals( + Object other) { if (!(other instanceof NumericType)) return false; @@ -104,7 +107,8 @@ public int hashCode() { } @Override - public Set allInstances(TypeSystem types) { + public Set allInstances( + TypeSystem types) { return Collections.singleton(this); } } diff --git a/lisa/lisa-program/src/main/java/it/unive/lisa/program/type/UInt64Type.java b/lisa/lisa-program/src/main/java/it/unive/lisa/program/type/UInt64Type.java index 454afb747..232224024 100644 --- a/lisa/lisa-program/src/main/java/it/unive/lisa/program/type/UInt64Type.java +++ b/lisa/lisa-program/src/main/java/it/unive/lisa/program/type/UInt64Type.java @@ -73,12 +73,14 @@ public boolean isIntegral() { } @Override - public boolean canBeAssignedTo(Type other) { + public boolean canBeAssignedTo( + Type other) { return other.isNumericType() || other.isUntyped(); } @Override - public Type commonSupertype(Type other) { + public Type commonSupertype( + Type other) { if (!other.isNumericType()) return Untyped.INSTANCE; @@ -91,7 +93,8 @@ public String toString() { } @Override - public boolean equals(Object other) { + public boolean equals( + Object other) { if (!(other instanceof NumericType)) return false; @@ -104,7 +107,8 @@ public int hashCode() { } @Override - public Set allInstances(TypeSystem types) { + public Set allInstances( + TypeSystem types) { return Collections.singleton(this); } } diff --git a/lisa/lisa-program/src/main/java/it/unive/lisa/program/type/UInt8Type.java b/lisa/lisa-program/src/main/java/it/unive/lisa/program/type/UInt8Type.java index 57874be35..187d28f87 100644 --- a/lisa/lisa-program/src/main/java/it/unive/lisa/program/type/UInt8Type.java +++ b/lisa/lisa-program/src/main/java/it/unive/lisa/program/type/UInt8Type.java @@ -73,12 +73,14 @@ public boolean isIntegral() { } @Override - public boolean canBeAssignedTo(Type other) { + public boolean canBeAssignedTo( + Type other) { return other.isNumericType() || other.isUntyped(); } @Override - public Type commonSupertype(Type other) { + public Type commonSupertype( + Type other) { if (!other.isNumericType()) return Untyped.INSTANCE; @@ -91,7 +93,8 @@ public String toString() { } @Override - public boolean equals(Object other) { + public boolean equals( + Object other) { if (!(other instanceof NumericType)) return false; @@ -104,7 +107,8 @@ public int hashCode() { } @Override - public Set allInstances(TypeSystem types) { + public Set allInstances( + TypeSystem types) { return Collections.singleton(this); } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/AnalysisException.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/AnalysisException.java index 1a3cd538e..2f1922cd3 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/AnalysisException.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/AnalysisException.java @@ -1,12 +1,12 @@ package it.unive.lisa; /** - * A generic {@link Exception} that indicates that something has gone wrong - * during the analysis. + * A generic {@link RuntimeException} that indicates that something has gone + * wrong during the analysis. * * @author Luca Negrini */ -public class AnalysisException extends Exception { +public class AnalysisException extends RuntimeException { private static final long serialVersionUID = 2005239836054799858L; @@ -23,7 +23,9 @@ public AnalysisException() { * @param message the message of this exception * @param cause the cause of this exception */ - public AnalysisException(String message, Throwable cause) { + public AnalysisException( + String message, + Throwable cause) { super(message, cause); } @@ -32,7 +34,8 @@ public AnalysisException(String message, Throwable cause) { * * @param message the message of this exception */ - public AnalysisException(String message) { + public AnalysisException( + String message) { super(message); } @@ -41,7 +44,8 @@ public AnalysisException(String message) { * * @param cause the cause of this exception */ - public AnalysisException(Throwable cause) { + public AnalysisException( + Throwable cause) { super(cause); } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/AnalysisExecutionException.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/AnalysisExecutionException.java index be0bc91a3..e0dfddda3 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/AnalysisExecutionException.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/AnalysisExecutionException.java @@ -1,13 +1,13 @@ package it.unive.lisa; /** - * A generic {@link RuntimeException} that indicates that something has gone + * A generic {@link AnalysisException} that indicates that something has gone * wrong during the analysis. Instances of this exception will be catched at the * root of the analysis execution. * * @author Luca Negrini */ -public class AnalysisExecutionException extends RuntimeException { +public class AnalysisExecutionException extends AnalysisException { private static final long serialVersionUID = 3947756263710715139L; @@ -24,7 +24,9 @@ public AnalysisExecutionException() { * @param message the message of this exception * @param cause the cause of this exception */ - public AnalysisExecutionException(String message, Throwable cause) { + public AnalysisExecutionException( + String message, + Throwable cause) { super(message, cause); } @@ -33,7 +35,8 @@ public AnalysisExecutionException(String message, Throwable cause) { * * @param message the message of this exception */ - public AnalysisExecutionException(String message) { + public AnalysisExecutionException( + String message) { super(message); } @@ -42,7 +45,8 @@ public AnalysisExecutionException(String message) { * * @param cause the cause of this exception */ - public AnalysisExecutionException(Throwable cause) { + public AnalysisExecutionException( + Throwable cause) { super(cause); } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/AnalysisSetupException.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/AnalysisSetupException.java index b58b2d013..c7a17bcad 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/AnalysisSetupException.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/AnalysisSetupException.java @@ -22,7 +22,9 @@ public AnalysisSetupException() { * @param message the message of this exception * @param cause the cause of this exception */ - public AnalysisSetupException(String message, Throwable cause) { + public AnalysisSetupException( + String message, + Throwable cause) { super(message, cause); } @@ -31,7 +33,8 @@ public AnalysisSetupException(String message, Throwable cause) { * * @param message the message of this exception */ - public AnalysisSetupException(String message) { + public AnalysisSetupException( + String message) { super(message); } @@ -40,7 +43,8 @@ public AnalysisSetupException(String message) { * * @param cause the cause of this exception */ - public AnalysisSetupException(Throwable cause) { + public AnalysisSetupException( + Throwable cause) { super(cause); } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/DefaultImplementation.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/DefaultImplementation.java deleted file mode 100644 index 082e7ec0b..000000000 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/DefaultImplementation.java +++ /dev/null @@ -1,21 +0,0 @@ -package it.unive.lisa; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * Annotation that lets one define default implementations for analysis - * components. {@link LiSAFactory#getDefaultFor(Class, Object...)} will search - * for subtypes of the given class that are annotated with this annotation to - * create compatible implementations. If none is found, {@link LiSAFactory} will - * instead search for types annotated as {@link FallbackImplementation}, an - * annotation reserved for LiSA to define its own defaults. - * - * @author Luca Negrini - */ -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.TYPE) -public @interface DefaultImplementation { -} diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/DefaultParameters.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/DefaultParameters.java deleted file mode 100644 index 8f110932e..000000000 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/DefaultParameters.java +++ /dev/null @@ -1,29 +0,0 @@ -package it.unive.lisa; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * Annotation that lets one define default parameters types for analysis - * components' implementations. Each parameter is specified through it's class - * object. {@link LiSAFactory#getInstance(Class, Object...)} will be used to - * generate objects for each specified parameter, and will pass them to a - * compatible constructor to create the annotated class. - * - * @author Luca Negrini - */ -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.TYPE) -public @interface DefaultParameters { - - /** - * The array of types of each parameter needed to construct the annotated - * type. Each of them will be instantiated by - * {@link LiSAFactory#getInstance(Class, Object...)}. - * - * @return the types - */ - Class[] value() default {}; -} diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/FallbackImplementation.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/FallbackImplementation.java deleted file mode 100644 index 3ecaf2ec2..000000000 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/FallbackImplementation.java +++ /dev/null @@ -1,21 +0,0 @@ -package it.unive.lisa; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * Annotation reserved for LiSA to define its own default implementations for - * analysis components. {@link LiSAFactory#getDefaultFor(Class, Object...)} will - * search for subtypes of the given class that are annotated with - * {@link DefaultImplementation} to create compatible implementations. If none - * is found, {@link LiSAFactory} will instead search for types annotated with - * this annotation. - * - * @author Luca Negrini - */ -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.TYPE) -public @interface FallbackImplementation { -} diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/LiSA.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/LiSA.java index 4285495ab..c55b4f3e6 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/LiSA.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/LiSA.java @@ -1,11 +1,7 @@ package it.unive.lisa; -import static it.unive.lisa.LiSAFactory.getDefaultFor; - import it.unive.lisa.checks.warnings.Warning; import it.unive.lisa.conf.LiSAConfiguration; -import it.unive.lisa.interprocedural.InterproceduralAnalysis; -import it.unive.lisa.interprocedural.callgraph.CallGraph; import it.unive.lisa.logging.TimerLogger; import it.unive.lisa.outputs.json.JsonReport; import it.unive.lisa.program.Application; @@ -50,7 +46,8 @@ public class LiSA { * * @param conf the configuration of the analysis to run */ - public LiSA(LiSAConfiguration conf) { + public LiSA( + LiSAConfiguration conf) { this.conf = conf; this.fileManager = new FileManager(conf.workdir); } @@ -66,32 +63,13 @@ public LiSA(LiSAConfiguration conf) { * @throws AnalysisException if anything goes wrong during the analysis */ @SuppressWarnings({ "rawtypes", "unchecked" }) - public LiSAReport run(Program... programs) throws AnalysisException { + public LiSAReport run( + Program... programs) + throws AnalysisException { LOG.info(conf.toString()); DateTime start = new DateTime(); - - CallGraph callGraph; - try { - callGraph = conf.callGraph == null ? getDefaultFor(CallGraph.class) : conf.callGraph; - if (conf.callGraph == null) - LOG.warn("No call graph set for this analysis, defaulting to {}", callGraph.getClass().getSimpleName()); - } catch (AnalysisSetupException e) { - throw new AnalysisExecutionException("Unable to create default call graph", e); - } - - InterproceduralAnalysis interproc; - try { - interproc = conf.interproceduralAnalysis == null ? getDefaultFor(InterproceduralAnalysis.class) - : conf.interproceduralAnalysis; - if (conf.interproceduralAnalysis == null) - LOG.warn("No interprocedural analysis set for this analysis, defaulting to {}", - interproc.getClass().getSimpleName()); - } catch (AnalysisSetupException e) { - throw new AnalysisExecutionException("Unable to create default interprocedural analysis", e); - } - - LiSARunner runner = new LiSARunner(conf, interproc, callGraph, conf.abstractState); + LiSARunner runner = new LiSARunner(conf, conf.interproceduralAnalysis, conf.callGraph, conf.abstractState); Application app = new Application(programs); Collection warnings; diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/LiSAFactory.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/LiSAFactory.java deleted file mode 100644 index e05095c17..000000000 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/LiSAFactory.java +++ /dev/null @@ -1,496 +0,0 @@ -package it.unive.lisa; - -import it.unive.lisa.analysis.AbstractState; -import it.unive.lisa.analysis.dataflow.DataflowElement; -import it.unive.lisa.analysis.dataflow.DefiniteForwardDataflowDomain; -import it.unive.lisa.analysis.dataflow.PossibleForwardDataflowDomain; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.nonrelational.heap.HeapEnvironment; -import it.unive.lisa.analysis.nonrelational.heap.NonRelationalHeapDomain; -import it.unive.lisa.analysis.nonrelational.inference.InferenceSystem; -import it.unive.lisa.analysis.nonrelational.inference.InferredValue; -import it.unive.lisa.analysis.nonrelational.value.NonRelationalTypeDomain; -import it.unive.lisa.analysis.nonrelational.value.NonRelationalValueDomain; -import it.unive.lisa.analysis.nonrelational.value.TypeEnvironment; -import it.unive.lisa.analysis.nonrelational.value.ValueEnvironment; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; -import it.unive.lisa.interprocedural.InterproceduralAnalysis; -import it.unive.lisa.interprocedural.callgraph.CallGraph; -import java.lang.reflect.Constructor; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.lang.reflect.Modifier; -import java.lang.reflect.ParameterizedType; -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.HashMap; -import java.util.HashSet; -import java.util.IdentityHashMap; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; -import org.apache.commons.lang3.ArrayUtils; -import org.apache.commons.lang3.StringUtils; -import org.reflections.Reflections; -import org.reflections.scanners.SubTypesScanner; - -/** - * An utility class for instantiating analysis components, that is, modular - * pieces of the analysis that have several implementations. The default - * instance for a component can be retrieved through - * {@link #getDefaultFor(Class, Object...)}, while a specific instance can be - * retrieved through {@link #getInstance(Class, Object...)}. Note that custom - * defaults for each component can be defined by using - * {@link DefaultImplementation}, or by modifying - * {@link #DEFAULT_IMPLEMENTATIONS} and {@link #DEFAULT_PARAMETERS}. - * - * @author Luca Negrini - */ -public final class LiSAFactory { - - /** - * Default implementation for analysis components. Keys of this map are the - * class objects of the analysis components while values are the key's - * default implementation's class object. - */ - public static final Map, Class> DEFAULT_IMPLEMENTATIONS = new HashMap<>(); - - /** - * Default parameters types for analysis components' implementations. Keys - * of this map are the class objects of the analysis components while values - * are arrays containing the key's default parameters' class objects. - */ - public static final Map, Class[]> DEFAULT_PARAMETERS = new HashMap<>(); - - static { - for (ConfigurableComponent component : configurableComponents()) { - if (component.defaultInstance != null) - DEFAULT_IMPLEMENTATIONS.put(component.component, component.defaultInstance); - - if (component.defaultParameters != null && component.defaultParameters.length > 0) - DEFAULT_PARAMETERS.put(component.component, component.defaultParameters); - - for (Entry, Class[]> alt : component.alternatives.entrySet()) - if (alt.getValue().length > 0) - DEFAULT_PARAMETERS.put(alt.getKey(), alt.getValue()); - } - - // wrapped defaults - DEFAULT_IMPLEMENTATIONS.putIfAbsent(HeapDomain.class, - DEFAULT_IMPLEMENTATIONS.get(NonRelationalHeapDomain.class)); - DEFAULT_IMPLEMENTATIONS.putIfAbsent(TypeDomain.class, - DEFAULT_IMPLEMENTATIONS.get(NonRelationalTypeDomain.class)); - DEFAULT_IMPLEMENTATIONS.putIfAbsent(ValueDomain.class, - DEFAULT_IMPLEMENTATIONS.get(NonRelationalValueDomain.class)); - DEFAULT_IMPLEMENTATIONS.putIfAbsent(ValueDomain.class, DEFAULT_IMPLEMENTATIONS.get(InferredValue.class)); - DEFAULT_IMPLEMENTATIONS.putIfAbsent(ValueDomain.class, DEFAULT_IMPLEMENTATIONS.get(DataflowElement.class)); - } - - private LiSAFactory() { - // this class is just a static holder - } - - @SuppressWarnings("unchecked") - private static T construct(Class component, Class[] argTypes, Object[] params) - throws AnalysisSetupException { - if (argTypes.length == 0) - try { - // tokens use the getSingleton() pattern for construction - Method method = component.getMethod("getSingleton"); - if (method != null && Modifier.isStatic(method.getModifiers())) - return (T) method.invoke(null); - } catch (NoSuchMethodException e) { - // we don't do anything: the class does not have a - // getSingleton() - } catch (SecurityException | IllegalAccessException | IllegalArgumentException - | InvocationTargetException e) { - throw new AnalysisSetupException("Unable to instantiate " + component.getSimpleName(), e); - } - - try { - Constructor constructor = component.getConstructor(argTypes); - return constructor.newInstance(params); - } catch (NoSuchMethodException | SecurityException | InstantiationException | IllegalAccessException - | IllegalArgumentException | InvocationTargetException e) { - throw new AnalysisSetupException("Unable to instantiate " + component.getSimpleName(), e); - } - } - - private static Class[] findConstructorSignature(Class component, Object[] params) - throws AnalysisSetupException { - Map, List> candidates = new IdentityHashMap<>(); - Class[] types; - outer: for (Constructor constructor : component.getConstructors()) { - types = constructor.getParameterTypes(); - if (params.length != types.length) - continue; - - List toWrap = new ArrayList<>(); - for (int i = 0; i < types.length; i++) - if (needsWrapping(params[i].getClass(), types[i])) - toWrap.add(i); - else if (!types[i].isAssignableFrom(params[i].getClass())) - continue outer; - - candidates.put(constructor, toWrap); - } - - if (candidates.isEmpty()) - throw new AnalysisSetupException( - "No suitable constructor of " + component.getSimpleName() + " found for argument types " - + Arrays.toString(Arrays.stream(params).map(Object::getClass).toArray(Class[]::new))); - - if (candidates.size() > 1) - throw new AnalysisSetupException( - "Constructor call of " + component.getSimpleName() + " is ambiguous for argument types " - + Arrays.toString(Arrays.stream(params).map(Object::getClass).toArray(Class[]::new))); - - for (int p : candidates.values().iterator().next()) - params[p] = wrapParam(params[p]); - - return candidates.keySet().iterator().next().getParameterTypes(); - } - - private static boolean needsWrapping(Class actual, Class desired) { - if (NonRelationalHeapDomain.class.isAssignableFrom(actual) && desired.isAssignableFrom(HeapDomain.class)) - return true; - else if (NonRelationalValueDomain.class.isAssignableFrom(actual) && desired.isAssignableFrom(ValueDomain.class)) - return true; - else if (NonRelationalTypeDomain.class.isAssignableFrom(actual) && desired.isAssignableFrom(TypeDomain.class)) - return true; - else if (InferredValue.class.isAssignableFrom(actual) && desired.isAssignableFrom(ValueDomain.class)) - return true; - else if (DataflowElement.class.isAssignableFrom(actual) && desired.isAssignableFrom(ValueDomain.class)) - return true; - else - return false; - } - - @SuppressWarnings({ "rawtypes", "unchecked" }) - private static Object wrapParam(Object param) { - if (NonRelationalHeapDomain.class.isAssignableFrom(param.getClass())) - return new HeapEnvironment((NonRelationalHeapDomain) param); - else if (NonRelationalValueDomain.class.isAssignableFrom(param.getClass())) - return new ValueEnvironment((NonRelationalValueDomain) param); - else if (NonRelationalTypeDomain.class.isAssignableFrom(param.getClass())) - return new TypeEnvironment((NonRelationalTypeDomain) param); - else if (InferredValue.class.isAssignableFrom(param.getClass())) - return new InferenceSystem((InferredValue) param); - else if (DataflowElement.class.isAssignableFrom(param.getClass())) { - Class elem = (Class) param.getClass(); - if (elem.getGenericInterfaces().length == 0) - return param; - - for (Type gi : elem.getGenericInterfaces()) - if (gi instanceof ParameterizedType && ((ParameterizedType) gi).getRawType() == DataflowElement.class) { - Type domain = ((ParameterizedType) gi).getActualTypeArguments()[0]; - if (((ParameterizedType) domain).getRawType() == PossibleForwardDataflowDomain.class) - return new PossibleForwardDataflowDomain((DataflowElement) param); - else if (((ParameterizedType) domain).getRawType() == DefiniteForwardDataflowDomain.class) - return new DefiniteForwardDataflowDomain((DataflowElement) param); - else - return param; - } - } - return param; - } - - /** - * Creates an instance of the given {@code component}. If {@code params} are - * provided, a suitable (and not ambiguous) constructor must exist in - * {@code component}'s class. If no {@code params} have been provided but - * the type has default parameters (that is, if it has been annotated with - * {@link DefaultParameters}), {@link #getInstance(Class, Object...)} will - * be used to create such parameters and those will be used. Otherwise, the - * nullary constructor of {@code component} is invoked. - * - * @param the type of the component - * @param component the component to instantiate - * @param params the parameters for the creation - * - * @return an instance of the given component - * - * @throws AnalysisSetupException if the component cannot be created - */ - public static T getInstance(Class component, Object... params) throws AnalysisSetupException { - try { - if (params != null && params.length != 0) - return construct(component, findConstructorSignature(component, params), params); - - Class[] defaultParams; - if (!DEFAULT_PARAMETERS.containsKey(component) - || (defaultParams = DEFAULT_PARAMETERS.get(component)) == null - || defaultParams.length == 0) - return construct(component, ArrayUtils.EMPTY_CLASS_ARRAY, ArrayUtils.EMPTY_OBJECT_ARRAY); - - Object[] defaults = new Object[defaultParams.length]; - for (int i = 0; i < defaults.length; i++) - defaults[i] = getInstance(defaultParams[i]); - - return construct(component, findConstructorSignature(component, defaults), defaults); - } catch (NullPointerException e) { - throw new AnalysisSetupException("Unable to instantiate default " + component.getSimpleName(), e); - } - } - - /** - * Builds the default instance of the specified analysis component. The - * instance to create is retrieved by first looking into the custom defaults - * (subtypes annotated with {@link DefaultImplementation}). If no entry for - * {@code component} is found, then the instance is looked up in the - * predefined defaults (subtypes annotated with - * {@link FallbackImplementation}). If {@code component} does not have a - * predefined default, then an {@link AnalysisSetupException} is thrown. - * Then, {@link #getInstance(Class, Object...)} is invoked on the retrieved - * instance, using the given {@code params}. If no {@code params} have been - * provided but the type has default parameters (that is, if it has been - * annotated with {@link DefaultParameters}), - * {@link #getInstance(Class, Object...)} will be used to create such - * parameters and those will be used. Note that some types are automatically - * wrapped before being returned. - *
    - *
  • {@link NonRelationalHeapDomain} is wrapped into a - * {@link HeapEnvironment}.
  • - *
  • {@link NonRelationalValueDomain} is wrapped into a - * {@link ValueEnvironment}.
  • - *
  • {@link NonRelationalTypeDomain} is wrapped into a - * {@link TypeEnvironment}.
  • - *
  • {@link InferredValue} is wrapped into a {@link InferenceSystem}.
  • - *
- * - * @param the type of the component - * @param component the component to instantiate - * @param params the parameters for the creation of the default instance - * - * @return an instance of the default implementation of the given component - * - * @throws AnalysisSetupException if the default implementation cannot be - * created - */ - @SuppressWarnings("unchecked") - public static T getDefaultFor(Class component, Object... params) throws AnalysisSetupException { - try { - Class def = DEFAULT_IMPLEMENTATIONS.get(component); - if (def == null) - throw new AnalysisSetupException("No registered default for " + component); - - Class[] defParams = DEFAULT_PARAMETERS.getOrDefault(def, ArrayUtils.EMPTY_CLASS_ARRAY); - if (params.length == 0 && defParams.length > 0) { - params = new Object[defParams.length]; - for (int i = 0; i < params.length; i++) - params[i] = getInstance(defParams[i]); - } - - if (needsWrapping(def, component)) - return (T) wrapParam(getInstance(def, params)); - else - return (T) getInstance(def, params); - } catch (NullPointerException e) { - throw new AnalysisSetupException("Unable to instantiate default " + component.getSimpleName(), e); - } - } - - /** - * An analysis component that can be configured, that is, it has more than - * one implementation that can be modularly integrated into the analysis. - * {@link #getComponent()} yields the component itself, i.e. the interface - * or abstract class that defines the analysis components. - * {@link #getDefaultInstance()} yields the default implementation of the - * component that will be used if no specific implementation is requested. - * {@link #getAlternatives()} yields all the concrete implementations of the - * components.
- *
- * Note that all information present in instances of this class reflect the - * static information known to LiSA, that is, what is present inside the - * classpath. Any customization performed through {@link LiSAFactory} (i.e., - * changing the defaults) will not have any effect on the components. - * - * @author Luca Negrini - */ - public static final class ConfigurableComponent { - private static final Reflections scanner = new Reflections("", new SubTypesScanner()); - - private final Class component; - private final Class defaultInstance; - private final Class[] defaultParameters; - private final Map, Class[]> alternatives; - - private ConfigurableComponent(Class component) { - this.component = component; - this.alternatives = new HashMap<>(); - this.defaultParameters = component.isAnnotationPresent(DefaultParameters.class) - ? component.getAnnotation(DefaultParameters.class).value() - : ArrayUtils.EMPTY_CLASS_ARRAY; - - @SuppressWarnings("rawtypes") - Set subtypes = scanner.getSubTypesOf(component); - Set> fallbacks = new HashSet<>(); - Set> defaults = new HashSet<>(); - for (Object sub : subtypes) { - Class subtype = (Class) sub; - if (Modifier.isAbstract(subtype.getModifiers()) || subtype.isInterface()) - continue; - - Class[] defaultParams = subtype.isAnnotationPresent(DefaultParameters.class) - ? subtype.getAnnotation(DefaultParameters.class).value() - : ArrayUtils.EMPTY_CLASS_ARRAY; - alternatives.put(subtype, defaultParams); - - if (subtype.isAnnotationPresent(DefaultImplementation.class)) - defaults.add(subtype); - if (subtype.isAnnotationPresent(FallbackImplementation.class)) - fallbacks.add(subtype); - } - - if (defaults.size() > 1) - throw new IllegalStateException( - "More than one user-default for " + component.getName() + ": " + defaults); - if (fallbacks.size() > 1) - throw new IllegalStateException( - "More than one LiSA-default for " + component.getName() + ": " + fallbacks); - - if (!defaults.isEmpty()) - defaultInstance = defaults.iterator().next(); - else if (!fallbacks.isEmpty()) - defaultInstance = fallbacks.iterator().next(); - else - defaultInstance = null; - } - - /** - * Yields the component represented by this - * {@link ConfigurableComponent}. - * - * @return the analysis component - */ - public Class getComponent() { - return component; - } - - /** - * Yields the default implementation for this component, that is, the - * concrete class that implements it and that will be used if the - * component is requested but the user did not specify which - * implementation to use (among the ones offered by - * {@link #getAlternatives()}. Might be {@code null} if no default is - * set. - * - * @return the default implementation for this component - */ - public Class getDefaultInstance() { - return defaultInstance; - } - - /** - * Yields the classes of the parameters passed by-default to the - * constructor of the default implementation for this component. Might - * be {@code null} if no default is set, or might be an empty array if - * the default implementation does not require parameters. - * - * @return the classes of the parameters for the construction of the - * default implementation for this component - */ - public Class[] getDefaultParameters() { - return defaultParameters; - } - - /** - * Yields the alternatives for this component, that is, the concrete - * classes that implements it. Each alternative is mapped to its default - * parameters, if any. - * - * @return the alternatives for this component - */ - public Map, Class[]> getAlternatives() { - return alternatives; - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((alternatives == null) ? 0 : alternatives.hashCode()); - result = prime * result + ((component == null) ? 0 : component.hashCode()); - result = prime * result + ((defaultInstance == null) ? 0 : defaultInstance.hashCode()); - result = prime * result + ((defaultParameters == null) ? 0 : Arrays.hashCode(defaultParameters)); - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - ConfigurableComponent other = (ConfigurableComponent) obj; - if (alternatives == null) { - if (other.alternatives != null) - return false; - } else if (!alternatives.equals(other.alternatives)) - return false; - if (component == null) { - if (other.component != null) - return false; - } else if (!component.equals(other.component)) - return false; - if (defaultInstance == null) { - if (other.defaultInstance != null) - return false; - } else if (!defaultInstance.equals(other.defaultInstance)) - return false; - if (defaultParameters == null) { - if (other.defaultParameters != null) - return false; - } else if (!Arrays.equals(defaultParameters, other.defaultParameters)) - return false; - return true; - } - - @Override - public String toString() { - String result = component.getName(); - if (defaultInstance != null) { - result += " (defaults to: '" + defaultInstance.getName() + "'"; - if (defaultParameters != null && defaultParameters.length != 0) { - String[] paramNames = Arrays.stream(defaultParameters).map(c -> c.getName()).toArray(String[]::new); - result += " with parameters [" + StringUtils.join(paramNames, ", ") + "]"; - } - result += ")"; - } - String[] alternatives = this.alternatives.entrySet().stream() - .map(e -> e.getKey().getName() + (e.getValue().length == 0 ? "" - : " (with default parameters: " + StringUtils.join(e.getValue(), ", ") + ")")) - .toArray(String[]::new); - result += " possible implementations: " + StringUtils.join(alternatives, ", "); - return result; - } - } - - /** - * Yields the collection of {@link ConfigurableComponent}s that can be used - * to customize the analysis. - * - * @return the components that can be configured - */ - public static Collection configurableComponents() { - Collection in = new ArrayList<>(); - in.add(new ConfigurableComponent(InterproceduralAnalysis.class)); - in.add(new ConfigurableComponent(CallGraph.class)); - in.add(new ConfigurableComponent(AbstractState.class)); - in.add(new ConfigurableComponent(HeapDomain.class)); - in.add(new ConfigurableComponent(ValueDomain.class)); - in.add(new ConfigurableComponent(TypeDomain.class)); - in.add(new ConfigurableComponent(NonRelationalHeapDomain.class)); - in.add(new ConfigurableComponent(NonRelationalValueDomain.class)); - in.add(new ConfigurableComponent(NonRelationalTypeDomain.class)); - in.add(new ConfigurableComponent(InferredValue.class)); - in.add(new ConfigurableComponent(DataflowElement.class)); - return in; - } -} diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/LiSAReport.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/LiSAReport.java index d79150917..c4484fb42 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/LiSAReport.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/LiSAReport.java @@ -89,7 +89,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/LiSARunInfo.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/LiSARunInfo.java index 4e6f3e4ee..22c841b93 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/LiSARunInfo.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/LiSARunInfo.java @@ -33,14 +33,18 @@ public class LiSARunInfo { private static class StatementCounter - implements GraphVisitor { + implements + GraphVisitor { private int statements = 0; private int expressions = 0; @Override - public boolean visit(Void tool, CFG graph, Statement node) { + public boolean visit( + Void tool, + CFG graph, + Statement node) { if (node instanceof Expression) { if (((Expression) node).getRootStatement() == node) statements++; @@ -149,7 +153,11 @@ public boolean visit(Void tool, CFG graph, Statement node) { * @param start the start time * @param end the end time */ - public LiSARunInfo(Collection warnings, Collection files, Application app, DateTime start, + public LiSARunInfo( + Collection warnings, + Collection files, + Application app, + DateTime start, DateTime end) { this.version = VersionInfo.VERSION; this.warnings = warnings.size(); @@ -189,7 +197,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -222,7 +231,8 @@ public boolean equals(Object obj) { * @return whether or not the two info contain the same code metrics and * results */ - public boolean sameCodeAndResults(LiSARunInfo other) { + public boolean sameCodeAndResults( + LiSARunInfo other) { if (this == other) return true; if (other == null) diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/LiSARunner.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/LiSARunner.java index e9ae3a276..45ad6c86d 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/LiSARunner.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/LiSARunner.java @@ -4,10 +4,6 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.AnalyzedCFG; import it.unive.lisa.analysis.OptimizedAnalyzedCFG; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.symbols.SymbolAliasing; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.checks.ChecksExecutor; import it.unive.lisa.checks.semantic.CheckToolWithAnalysisResults; import it.unive.lisa.checks.semantic.SemanticCheck; @@ -53,17 +49,8 @@ * * @param the type of {@link AbstractState} contained into the analysis * state that will be used in the analysis fixpoint - * @param the type of {@link HeapDomain} contained into the abstract state - * that will be used in the analysis fixpoint - * @param the type of {@link ValueDomain} contained into the abstract state - * that will be used in the analysis fixpoint - * @param the type of {@link TypeDomain} contained into the abstract state - * that will be used in the analysis fixpoint */ -public class LiSARunner, - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> { +public class LiSARunner> { private static final String FIXPOINT_EXCEPTION_MESSAGE = "Exception during fixpoint computation"; @@ -71,7 +58,7 @@ public class LiSARunner, private final LiSAConfiguration conf; - private final InterproceduralAnalysis interproc; + private final InterproceduralAnalysis interproc; private final CallGraph callGraph; @@ -85,7 +72,11 @@ public class LiSARunner, * @param callGraph the call graph to use * @param state the abstract state to use for the analysis */ - LiSARunner(LiSAConfiguration conf, InterproceduralAnalysis interproc, CallGraph callGraph, A state) { + LiSARunner( + LiSAConfiguration conf, + InterproceduralAnalysis interproc, + CallGraph callGraph, + A state) { this.conf = conf; this.interproc = interproc; this.callGraph = callGraph; @@ -100,7 +91,9 @@ public class LiSARunner, * * @return the warnings generated by the analysis */ - Collection run(Application app, FileManager fileManager) { + Collection run( + Application app, + FileManager fileManager) { finalizeApp(app); Collection allCFGs = app.getAllCFGs(); @@ -131,31 +124,40 @@ Collection run(Application app, FileManager fileManager) { else LOG.warn("Skipping syntactic checks execution since none have been provided"); - try { - callGraph.init(app); - } catch (CallGraphConstructionException e) { - LOG.fatal("Exception while building the call graph for the input program", e); - throw new AnalysisExecutionException("Exception while building the call graph for the input program", e); - } + if (interproc == null) + LOG.warn("Skipping analysis execution since no interprocedural analysis has been provided"); + else if (callGraph == null && interproc.needsCallGraph()) + throw new AnalysisSetupException( + "The provided interprocedural analysis needs a call graph to function, but none has been provided"); + else if (state == null) + LOG.warn("Skipping analysis execution since no abstract sate has been provided"); + else { + try { + callGraph.init(app); + } catch (CallGraphConstructionException e) { + LOG.fatal("Exception while building the call graph for the input program", e); + throw new AnalysisSetupException( + "Exception while building the call graph for the input program", + e); + } - try { - interproc.init(app, callGraph, conf.openCallPolicy); - } catch (InterproceduralAnalysisException e) { - LOG.fatal("Exception while building the interprocedural analysis for the input program", e); - throw new AnalysisExecutionException( - "Exception while building the interprocedural analysis for the input program", e); - } + try { + interproc.init(app, callGraph, conf.openCallPolicy); + } catch (InterproceduralAnalysisException e) { + LOG.fatal("Exception while building the interprocedural analysis for the input program", e); + throw new AnalysisSetupException( + "Exception while building the interprocedural analysis for the input program", e); + } - if (state != null) { analyze(allCFGs, fileManager, htmlViewer, subnodes); - Map>> results = new IdentityHashMap<>(allCFGs.size()); + Map>> results = new IdentityHashMap<>(allCFGs.size()); for (CFG cfg : allCFGs) results.put(cfg, interproc.getAnalysisResultsOf(cfg)); @SuppressWarnings({ "rawtypes", "unchecked" }) - Collection> semanticChecks = (Collection) conf.semanticChecks; + Collection> semanticChecks = (Collection) conf.semanticChecks; if (!semanticChecks.isEmpty()) { - CheckToolWithAnalysisResults tool2 = new CheckToolWithAnalysisResults<>( + CheckToolWithAnalysisResults tool2 = new CheckToolWithAnalysisResults<>( tool, results, callGraph); @@ -163,23 +165,26 @@ Collection run(Application app, FileManager fileManager) { ChecksExecutor.executeAll(tool2, app, semanticChecks); } else LOG.warn("Skipping semantic checks execution since none have been provided"); - } else - LOG.warn("Skipping analysis execution since no abstract sate has been provided"); + } return tool.getWarnings(); } @SuppressWarnings("unchecked") - private void analyze(Collection allCFGs, FileManager fileManager, AtomicBoolean htmlViewer, + private void analyze( + Collection allCFGs, + FileManager fileManager, + AtomicBoolean htmlViewer, AtomicBoolean subnodes) { A state = this.state.top(); + FixpointConfiguration fixconf = new FixpointConfiguration(conf); TimerLogger.execAction(LOG, "Computing fixpoint over the whole program", () -> { try { interproc.fixpoint( - new AnalysisState<>(state, new Skip(SyntheticLocation.INSTANCE), new SymbolAliasing()), + new AnalysisState<>(state, new Skip(SyntheticLocation.INSTANCE)), (Class>) conf.fixpointWorkingSet, - new FixpointConfiguration(conf)); + fixconf); } catch (FixpointException e) { LOG.fatal(FIXPOINT_EXCEPTION_MESSAGE, e); throw new AnalysisExecutionException(FIXPOINT_EXCEPTION_MESSAGE, e); @@ -193,17 +198,21 @@ private void analyze(Collection allCFGs, FileManager fileManager, AtomicBoo BiFunction labeler = conf.optimize && conf.dumpForcesUnwinding - ? (cfg, st) -> ((OptimizedAnalyzedCFG) cfg) - .getUnwindedAnalysisStateAfter(st) - .representation() - .toSerializableValue() - : (cfg, st) -> ((AnalyzedCFG) cfg) - .getAnalysisStateAfter(st) - .representation() - .toSerializableValue(); + ? ( + cfg, + st) -> ((OptimizedAnalyzedCFG) cfg) + .getUnwindedAnalysisStateAfter(st, fixconf) + .representation() + .toSerializableValue() + : ( + cfg, + st) -> ((AnalyzedCFG) cfg) + .getAnalysisStateAfter(st) + .representation() + .toSerializableValue(); for (CFG cfg : IterationLogger.iterate(LOG, allCFGs, "Dumping analysis results", "cfgs")) - for (AnalyzedCFG result : interproc.getAnalysisResultsOf(cfg)) { + for (AnalyzedCFG result : interproc.getAnalysisResultsOf(cfg)) { SerializableGraph graph = result.toSerializableGraph(labeler); String filename = cfg.getDescriptor().getFullSignatureWithParNames(); if (!result.getId().isStartingId()) @@ -233,8 +242,14 @@ private void analyze(Collection allCFGs, FileManager fileManager, AtomicBoo } } - private static void dump(FileManager fileManager, String filename, GraphType type, SerializableGraph graph, - AtomicBoolean htmlViewer, AtomicBoolean subnodes) throws IOException { + private static void dump( + FileManager fileManager, + String filename, + GraphType type, + SerializableGraph graph, + AtomicBoolean htmlViewer, + AtomicBoolean subnodes) + throws IOException { switch (type) { case DOT: fileManager.mkDotFile(filename, writer -> graph.toDot().dump(writer)); @@ -262,7 +277,8 @@ private static void dump(FileManager fileManager, String filename, GraphType typ } } - private static void finalizeApp(Application app) { + private static void finalizeApp( + Application app) { for (Program p : app.getPrograms()) { TypeSystem types = p.getTypes(); // make sure the basic types are registered diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/AbstractState.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/AbstractState.java index c760c4891..3a399897d 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/AbstractState.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/AbstractState.java @@ -1,9 +1,5 @@ package it.unive.lisa.analysis; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.representation.DomainRepresentation; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.symbolic.SymbolicExpression; import it.unive.lisa.symbolic.value.Identifier; @@ -16,81 +12,37 @@ * @author Luca Negrini * * @param the concrete type of the {@link AbstractState} - * @param the type of {@link HeapDomain} embedded in this state - * @param the type of {@link ValueDomain} embedded in this state - * @param the type of {@link ValueDomain} and {@link TypeDomain} embedded in - * this state */ -public interface AbstractState, - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> - extends Lattice, SemanticDomain { +public interface AbstractState> + extends + SemanticOracle, + Lattice, + SemanticDomain { /** - * The key that should be used to store the instance of {@link HeapDomain} - * inside the {@link DomainRepresentation} returned by - * {@link #representation()}. - */ - public static final String HEAP_REPRESENTATION_KEY = "heap"; - - /** - * The key that should be used to store the instance of {@link TypeDomain} - * inside the {@link DomainRepresentation} returned by - * {@link #representation()}. - */ - public static final String TYPE_REPRESENTATION_KEY = "type"; - - /** - * The key that should be used to store the instance of {@link ValueDomain} - * inside the {@link DomainRepresentation} returned by - * {@link #representation()}. - */ - public static final String VALUE_REPRESENTATION_KEY = "value"; - - /** - * Yields the instance of {@link HeapDomain} that contains the information - * on heap structures contained in this abstract state. - * - * @return the heap domain - */ - H getHeapState(); - - /** - * Yields the instance of {@link ValueDomain} that contains the information - * on values of program variables and concretized memory locations. - * - * @return the value domain - */ - V getValueState(); - - /** - * Yields the instance of {@link ValueDomain} and {@link TypeDomain} that - * contains the information on runtime types of program variables and - * concretized memory locations. - * - * @return the type domain - */ - T getTypeState(); - - /** - * Yields a copy of this state, but with the {@link HeapDomain} set to top. + * Yields a copy of this state, but with its memory abstraction set to top. + * This is useful to represent effects of unknown calls that arbitrarily + * manipulate the memory. * - * @return the copy with top heap + * @return the copy with top memory */ - A withTopHeap(); + A withTopMemory(); /** - * Yields a copy of this state, but with the {@link ValueDomain} set to top. + * Yields a copy of this state, but with its value abstraction set to top. + * This is useful to represent effects of unknown calls that arbitrarily + * manipulate the values of variables. * - * @return the copy with top value + * @return the copy with top values */ - A withTopValue(); + A withTopValues(); /** - * Yields a copy of this state, but with the {@link TypeDomain} set to top. + * Yields a copy of this state, but with its type abstraction set to top. + * This is useful to represent effects of unknown calls that arbitrarily + * manipulate the values of variables (and their type accordingly). * - * @return the copy with top type + * @return the copy with top types */ - A withTopType(); + A withTopTypes(); } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/AnalysisState.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/AnalysisState.java index ba856f944..1f32d2b0c 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/AnalysisState.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/AnalysisState.java @@ -1,18 +1,13 @@ package it.unive.lisa.analysis; -import it.unive.lisa.analysis.heap.HeapDomain; import it.unive.lisa.analysis.lattices.ExpressionSet; -import it.unive.lisa.analysis.representation.DomainRepresentation; -import it.unive.lisa.analysis.representation.ObjectRepresentation; -import it.unive.lisa.analysis.symbols.Symbol; -import it.unive.lisa.analysis.symbols.SymbolAliasing; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; +import it.unive.lisa.analysis.lattices.Satisfiability; import it.unive.lisa.program.cfg.ProgramPoint; import it.unive.lisa.symbolic.SymbolicExpression; import it.unive.lisa.symbolic.value.Identifier; -import it.unive.lisa.symbolic.value.ValueExpression; -import java.util.Collection; +import it.unive.lisa.util.representation.ObjectRepresentation; +import it.unive.lisa.util.representation.StructuredObject; +import it.unive.lisa.util.representation.StructuredRepresentation; import java.util.HashSet; import java.util.Map; import java.util.Set; @@ -28,16 +23,12 @@ * @author Luca Negrini * * @param the type of {@link AbstractState} embedded in this state - * @param the type of {@link HeapDomain} embedded in the abstract state - * @param the type of {@link ValueDomain} embedded in the abstract state - * @param the type of {@link TypeDomain} embedded in the abstract state */ -public class AnalysisState, - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> - implements BaseLattice>, - SemanticDomain, SymbolicExpression, Identifier> { +public class AnalysisState> + implements + BaseLattice>, + StructuredObject, + ScopedObject> { /** * The abstract state of program variables and memory locations @@ -45,15 +36,15 @@ public class AnalysisState, private final A state; /** - * The lattice that handles symbol aliasing + * The additional information to be computed during fixpoint computations */ - private final SymbolAliasing aliasing; + private final FixpointInfo info; /** * The last expressions that have been computed, representing side-effect * free expressions that are pending evaluation */ - private final ExpressionSet computedExpressions; + private final ExpressionSet computedExpressions; /** * Builds a new state. @@ -61,10 +52,11 @@ public class AnalysisState, * @param state the {@link AbstractState} to embed in this * analysis state * @param computedExpression the expression that has been computed - * @param aliasing the symbol aliasing information */ - public AnalysisState(A state, SymbolicExpression computedExpression, SymbolAliasing aliasing) { - this(state, new ExpressionSet<>(computedExpression), aliasing); + public AnalysisState( + A state, + SymbolicExpression computedExpression) { + this(state, new ExpressionSet(computedExpression), null); } /** @@ -73,12 +65,45 @@ public AnalysisState(A state, SymbolicExpression computedExpression, SymbolAlias * @param state the {@link AbstractState} to embed in this * analysis state * @param computedExpressions the expressions that have been computed - * @param aliasing the symbol aliasing information */ - public AnalysisState(A state, ExpressionSet computedExpressions, SymbolAliasing aliasing) { + public AnalysisState( + A state, + ExpressionSet computedExpressions) { + this(state, computedExpressions, null); + } + + /** + * Builds a new state. + * + * @param state the {@link AbstractState} to embed in this + * analysis state + * @param computedExpression the expression that has been computed + * @param info the additional information to be computed + * during fixpoint computations + */ + public AnalysisState( + A state, + SymbolicExpression computedExpression, + FixpointInfo info) { + this(state, new ExpressionSet(computedExpression), info); + } + + /** + * Builds a new state. + * + * @param state the {@link AbstractState} to embed in this + * analysis state + * @param computedExpressions the expressions that have been computed + * @param info the additional information to be computed + * during fixpoint computations + */ + public AnalysisState( + A state, + ExpressionSet computedExpressions, + FixpointInfo info) { this.state = state; this.computedExpressions = computedExpressions; - this.aliasing = aliasing; + this.info = info; } /** @@ -92,14 +117,88 @@ public A getState() { } /** - * Yields the symbol aliasing information, that can be used to resolve - * targets of calls when the names used in the call are different from the - * ones in the target's signature. + * Yields the additional information that must be computed during fixpoint + * computations. This is a generic key-value mapping that users of the + * library can use for ad-hoc purposes. + * + * @return the additional information (can be {@code null}) + */ + public FixpointInfo getFixpointInformation() { + return info; + } + + /** + * Yields the Additional information associated to the given key, as defined + * in this instance's {@link #getFixpointInformation()}. + * + * @param key the key + * + * @return the mapped information + */ + public Lattice getInfo( + String key) { + return info == null ? null : info.get(key); + } + + /** + * Yields the additional information associated to the given key, casted to + * the given type, as defined in this instance's + * {@link #getFixpointInformation()}. + * + * @param the type to cast the return value of this method to + * @param key the key + * @param type the type to cast the retrieved information to + * + * @return the mapped information + */ + public T getInfo( + String key, + Class type) { + return info == null ? null : info.get(key, type); + } + + /** + * Yields a copy of this state where the additional fixpoint information + * ({@link #getFixpointInformation()}) has been updated by mapping the given + * key to {@code info}. This is a strong update, meaning that the + * information previously mapped to the same key, if any, is lost. For a + * weak update, use {@link #weakStoreInfo(String, Lattice)}. + * + * @param key the key + * @param info the information to store * - * @return the aliasing information + * @return a new instance with the updated mapping */ - public SymbolAliasing getAliasing() { - return aliasing; + public AnalysisState storeInfo( + String key, + Lattice info) { + FixpointInfo fixinfo = this.info == null ? new FixpointInfo() : this.info; + fixinfo = fixinfo.put(key, info); + return new AnalysisState<>(state, computedExpressions, fixinfo); + } + + /** + * Yields a copy of this state where the additional fixpoint information + * ({@link #getFixpointInformation()}) has been updated by mapping the given + * key to {@code info}. This is a weak update, meaning that the information + * previously mapped to the same key, if any, is lubbed together with the + * given one, and the result is stored inside the mapping instead. For a + * strong update, use {@link #storeInfo(String, Lattice)}. + * + * @param key the key + * @param info the information to store + * + * @return a new instance with the updated mapping + * + * @throws SemanticException if something goes wrong during the lub + */ + public AnalysisState weakStoreInfo( + String key, + Lattice info) + throws SemanticException { + FixpointInfo fixinfo = this.info == null ? new FixpointInfo() : this.info; + fixinfo = fixinfo.putWeak(key, info); + return new AnalysisState<>(state, computedExpressions, fixinfo); } /** @@ -114,29 +213,30 @@ public SymbolAliasing getAliasing() { * * @return the last computed expression */ - public ExpressionSet getComputedExpressions() { + public ExpressionSet getComputedExpressions() { return computedExpressions; } /** - * Registers an alias for the given symbol. Any previous aliases will be - * deleted. + * Yields a copy of this state, where {@code id} has been assigned to + * {@code value}. + * + * @param id the identifier to assign the value to + * @param value the expression to assign + * @param pp the program point that where this operation is being + * evaluated * - * @param toAlias the symbol being aliased - * @param alias the alias for {@code toAlias} + * @return a copy of this domain, modified by the assignment * - * @return a copy of this analysis state, with the new alias + * @throws SemanticException if an error occurs during the computation */ - public AnalysisState alias(Symbol toAlias, Symbol alias) { - SymbolAliasing aliasing = this.aliasing.putState(toAlias, alias); - return new AnalysisState<>(state, computedExpressions, aliasing); - } - - @Override - public AnalysisState assign(Identifier id, SymbolicExpression value, ProgramPoint pp) + public AnalysisState assign( + Identifier id, + SymbolicExpression value, + ProgramPoint pp) throws SemanticException { - A s = state.assign(id, value, pp); - return new AnalysisState<>(s, new ExpressionSet<>(id), aliasing); + A s = state.assign(id, value, pp, state); + return new AnalysisState<>(s, new ExpressionSet(id), info); } /** @@ -154,200 +254,276 @@ public AnalysisState assign(Identifier id, SymbolicExpression value, * * @throws SemanticException if an error occurs during the computation */ - public AnalysisState assign(SymbolicExpression id, SymbolicExpression expression, ProgramPoint pp) + public AnalysisState assign( + SymbolicExpression id, + SymbolicExpression expression, + ProgramPoint pp) throws SemanticException { - if (id instanceof Identifier) return assign((Identifier) id, expression, pp); A s = state.bottom(); - ExpressionSet rewritten = rewrite(id, pp); + AnalysisState sem = smallStepSemantics(id, pp); + ExpressionSet rewritten = sem.state.rewrite(id, pp, state); for (SymbolicExpression i : rewritten) - s = s.lub(state.assign((Identifier) i, expression, pp)); - return new AnalysisState<>(s, rewritten, aliasing); - } - - @Override - public AnalysisState smallStepSemantics(SymbolicExpression expression, ProgramPoint pp) - throws SemanticException { - A s = state.smallStepSemantics(expression, pp); - return new AnalysisState<>(s, new ExpressionSet<>(expression), aliasing); + if (!(i instanceof Identifier)) + throw new SemanticException("Rewriting '" + id + "' did not produce an identifier: " + i); + else + s = s.lub(sem.state.assign((Identifier) i, expression, pp, state)); + return new AnalysisState<>(s, rewritten, info); } /** - * Uses the {@link HeapDomain} contained in this state to rewrite the given - * expression. Every expression contained in the result can be safely cast - * to {@link ValueExpression}. + * Yields a copy of this state, that has been modified accordingly to the + * semantics of the given {@code expression}. * - * @param expression the expression to rewrite - * @param pp the program point where the rewrite happens + * @param expression the expression whose semantics need to be computed + * @param pp the program point that where this operation is being + * evaluated * - * @return the rewritten expressions + * @return a copy of this domain, modified accordingly to the semantics of + * {@code expression} * - * @throws SemanticException if something goes wrong while rewriting + * @throws SemanticException if an error occurs during the computation */ - public ExpressionSet rewrite(SymbolicExpression expression, ProgramPoint pp) + public AnalysisState smallStepSemantics( + SymbolicExpression expression, + ProgramPoint pp) throws SemanticException { - Set rewritten = new HashSet<>(); - @SuppressWarnings("unchecked") - H heap = (H) getState().getDomainInstance(HeapDomain.class); - rewritten.addAll(heap.rewrite(expression, pp).elements()); - return new ExpressionSet<>(rewritten); + A s = state.smallStepSemantics(expression, pp, state); + return new AnalysisState<>(s, new ExpressionSet(expression), info); } /** - * Uses the {@link HeapDomain} contained in this state to rewrite the given - * expressions. Every expression contained in the result can be safely cast - * to {@link ValueExpression}. + * Yields a copy of this state, modified by assuming that the given + * expression holds. It is required that the returned domain is in relation + * with this one. A safe (but imprecise) implementation of this method can + * always return {@code this}. * - * @param expressions the expressions to rewrite - * @param pp the program point where the rewrite happens + * @param expression the expression to assume to hold. + * @param src the program point that where this operation is being + * evaluated, corresponding to the one that generated + * the given expression + * @param dest the program point where the execution will move after + * the expression has been assumed * - * @return the rewritten expressions + * @return the (optionally) modified copy of this domain * - * @throws SemanticException if something goes wrong while rewriting + * @throws SemanticException if an error occurs during the computation */ - public ExpressionSet rewrite(ExpressionSet expressions, ProgramPoint pp) - throws SemanticException { - Set rewritten = new HashSet<>(); - @SuppressWarnings("unchecked") - H heap = (H) getState().getDomainInstance(HeapDomain.class); - for (SymbolicExpression expression : expressions) - rewritten.addAll(heap.rewrite(expression, pp).elements()); - return new ExpressionSet<>(rewritten); - } - - @Override - public AnalysisState assume(SymbolicExpression expression, ProgramPoint src, ProgramPoint dest) + public AnalysisState assume( + SymbolicExpression expression, + ProgramPoint src, + ProgramPoint dest) throws SemanticException { - A assume = state.assume(expression, src, dest); + A assume = state.assume(expression, src, dest, state); if (assume.isBottom()) return bottom(); - return new AnalysisState<>(assume, computedExpressions, aliasing); + return new AnalysisState<>(assume, computedExpressions, info); } - @Override - public Satisfiability satisfies(SymbolicExpression expression, ProgramPoint pp) throws SemanticException { - return state.satisfies(expression, pp); + /** + * Checks if the given expression is satisfied by the abstract values of + * this state, returning an instance of {@link Satisfiability}. + * + * @param expression the expression whose satisfiability is to be evaluated + * @param pp the program point that where this operation is being + * evaluated + * + * @return {@link Satisfiability#SATISFIED} is the expression is satisfied + * by the values of this domain, + * {@link Satisfiability#NOT_SATISFIED} if it is not satisfied, + * or {@link Satisfiability#UNKNOWN} if it is either impossible + * to determine if it satisfied, or if it is satisfied by some + * values and not by some others (this is equivalent to a TOP + * boolean value) + * + * @throws SemanticException if an error occurs during the computation + */ + public Satisfiability satisfies( + SymbolicExpression expression, + ProgramPoint pp) + throws SemanticException { + return state.satisfies(expression, pp, state); } @Override - public AnalysisState pushScope(ScopeToken scope) throws SemanticException { + public AnalysisState pushScope( + ScopeToken scope) + throws SemanticException { return new AnalysisState<>( state.pushScope(scope), onAllExpressions(this.computedExpressions, scope, true), - aliasing); + info); } - private static ExpressionSet onAllExpressions( - ExpressionSet computedExpressions, - ScopeToken scope, boolean push) throws SemanticException { + private static ExpressionSet onAllExpressions( + ExpressionSet computedExpressions, + ScopeToken scope, + boolean push) + throws SemanticException { Set result = new HashSet<>(); for (SymbolicExpression exp : computedExpressions) result.add(push ? exp.pushScope(scope) : exp.popScope(scope)); - return new ExpressionSet<>(result); + return new ExpressionSet(result); } @Override - public AnalysisState popScope(ScopeToken scope) throws SemanticException { + public AnalysisState popScope( + ScopeToken scope) + throws SemanticException { return new AnalysisState<>( state.popScope(scope), onAllExpressions(this.computedExpressions, scope, false), - aliasing); + info); } @Override - public AnalysisState lubAux(AnalysisState other) throws SemanticException { + public AnalysisState lubAux( + AnalysisState other) + throws SemanticException { return new AnalysisState<>( state.lub(other.state), computedExpressions.lub(other.computedExpressions), - aliasing.lub(other.aliasing)); + info == null ? other.info : info.lub(other.info)); } @Override - public AnalysisState glbAux(AnalysisState other) throws SemanticException { + public AnalysisState glbAux( + AnalysisState other) + throws SemanticException { return new AnalysisState<>( state.glb(other.state), computedExpressions.glb(other.computedExpressions), - aliasing.glb(other.aliasing)); + info == null ? null : info.glb(other.info)); } @Override - public AnalysisState wideningAux(AnalysisState other) throws SemanticException { + public AnalysisState wideningAux( + AnalysisState other) + throws SemanticException { return new AnalysisState<>( state.widening(other.state), computedExpressions.lub(other.computedExpressions), - aliasing.widening(other.aliasing)); + info == null ? other.info : info.widening(other.info)); } @Override - public AnalysisState narrowingAux(AnalysisState other) throws SemanticException { + public AnalysisState narrowingAux( + AnalysisState other) + throws SemanticException { return new AnalysisState<>( state.narrowing(other.state), computedExpressions.glb(other.computedExpressions), - aliasing.narrowing(other.aliasing)); + info == null ? null : info.narrowing(other.info)); } @Override - public boolean lessOrEqualAux(AnalysisState other) throws SemanticException { + public boolean lessOrEqualAux( + AnalysisState other) + throws SemanticException { return state.lessOrEqual(other.state) && computedExpressions.lessOrEqual(other.computedExpressions) - && aliasing.lessOrEqual(other.aliasing); + && (info == null ? true : info.lessOrEqual(other.info)); } @Override - public AnalysisState top() { - return new AnalysisState<>(state.top(), computedExpressions.top(), aliasing.top()); + public AnalysisState top() { + return new AnalysisState<>(state.top(), computedExpressions.top(), null); } @Override - public AnalysisState bottom() { - return new AnalysisState<>(state.bottom(), computedExpressions.bottom(), aliasing.bottom()); + public AnalysisState bottom() { + return new AnalysisState<>(state.bottom(), computedExpressions.bottom(), FixpointInfo.BOTTOM); } @Override public boolean isTop() { - return state.isTop() && computedExpressions.isTop() && aliasing.isTop(); + return state.isTop() && computedExpressions.isTop() && info == null; } @Override public boolean isBottom() { - return state.isBottom() && computedExpressions.isBottom() && aliasing.isBottom(); + return state.isBottom() && computedExpressions.isBottom() && (info != null && info.isBottom()); } - @Override - public AnalysisState forgetIdentifier(Identifier id) throws SemanticException { - return new AnalysisState<>(state.forgetIdentifier(id), computedExpressions, aliasing); + /** + * Forgets an {@link Identifier}. This means that all information regarding + * the given {@code id} will be lost. This method should be invoked whenever + * an identifier gets out of scope. + * + * @param id the identifier to forget + * + * @return the analysis state without information about the given id + * + * @throws SemanticException if an error occurs during the computation + */ + public AnalysisState forgetIdentifier( + Identifier id) + throws SemanticException { + return new AnalysisState<>(state.forgetIdentifier(id), computedExpressions, info); } - @Override - public AnalysisState forgetIdentifiersIf(Predicate test) throws SemanticException { - return new AnalysisState<>(state.forgetIdentifiersIf(test), computedExpressions, aliasing); + /** + * Forgets all {@link Identifier}s that match the given predicate. This + * means that all information regarding the those identifiers will be lost. + * This method should be invoked whenever an identifier gets out of scope. + * + * @param test the test to identify the targets of the removal + * + * @return the analysis state in without information about the ids + * + * @throws SemanticException if an error occurs during the computation + */ + public AnalysisState forgetIdentifiersIf( + Predicate test) + throws SemanticException { + return new AnalysisState<>(state.forgetIdentifiersIf(test), computedExpressions, info); + } + + /** + * Forgets all the given {@link Identifier}s by invoking + * {@link #forgetIdentifier(Identifier)} on each given identifier. + * + * @param ids the collection of identifiers to forget + * + * @return the analysis state without information about the given ids + * + * @throws SemanticException if an error occurs during the computation + */ + public AnalysisState forgetIdentifiers( + Iterable ids) + throws SemanticException { + AnalysisState result = this; + for (Identifier id : ids) + result = result.forgetIdentifier(id); + return result; } @Override public int hashCode() { final int prime = 31; int result = 1; - result = prime * result + ((aliasing == null) ? 0 : aliasing.hashCode()); + result = prime * result + ((info == null) ? 0 : info.hashCode()); result = prime * result + ((computedExpressions == null) ? 0 : computedExpressions.hashCode()); result = prime * result + ((state == null) ? 0 : state.hashCode()); return result; } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; - AnalysisState other = (AnalysisState) obj; - if (aliasing == null) { - if (other.aliasing != null) + AnalysisState other = (AnalysisState) obj; + if (info == null) { + if (other.info != null) return false; - } else if (!aliasing.equals(other.aliasing)) + } else if (!info.equals(other.info)) return false; if (computedExpressions == null) { if (other.computedExpressions != null) @@ -363,56 +539,73 @@ public boolean equals(Object obj) { } @Override - public DomainRepresentation representation() { + public StructuredRepresentation representation() { if (isBottom()) return Lattice.bottomRepresentation(); if (isTop()) return Lattice.topRepresentation(); - DomainRepresentation stateRepr = state.representation(); - DomainRepresentation exprRepr = computedExpressions.representation(); + StructuredRepresentation stateRepr = state.representation(); + StructuredRepresentation exprRepr = computedExpressions.representation(); return new ObjectRepresentation(Map.of("state", stateRepr, "expressions", exprRepr)); } - @Override - public String toString() { - return representation().toString(); + /** + * Variant of {@link #representation()} that also includes + * {@link #getFixpointInformation()}. + * + * @return the enriched representation + */ + public StructuredRepresentation representationWithInfo() { + if (isBottom()) + return Lattice.bottomRepresentation(); + if (isTop()) + return Lattice.topRepresentation(); + if (info == null || info.isBottom()) + return representation(); + + StructuredRepresentation stateRepr = state.representation(); + StructuredRepresentation exprRepr = computedExpressions.representation(); + StructuredRepresentation infoRepr = info.representation(); + return new ObjectRepresentation(Map.of("state", stateRepr, "expressions", exprRepr, "info", infoRepr)); } @Override - public > Collection getAllDomainInstances(Class domain) { - Collection result = SemanticDomain.super.getAllDomainInstances(domain); - result.addAll(state.getAllDomainInstances(domain)); - return result; + public String toString() { + return representation().toString(); } /** * Yields a copy of this state, but with the {@link AbstractState}'s inner - * {@link HeapDomain} set to top. + * memory abstraction set to top. This is useful to represent effects of + * unknown calls that arbitrarily manipulate the memory. * - * @return the copy with top heap + * @return the copy with top memory */ - public AnalysisState withTopHeap() { - return new AnalysisState<>(state.withTopHeap(), computedExpressions, aliasing); + public AnalysisState withTopMemory() { + return new AnalysisState<>(state.withTopMemory(), computedExpressions, info); } /** * Yields a copy of this state, but with the {@link AbstractState}'s inner - * {@link ValueDomain} set to top. + * value abstraction set to top. This is useful to represent effects of + * unknown calls that arbitrarily manipulate the values of variables. * * @return the copy with top value */ - public AnalysisState withTopValue() { - return new AnalysisState<>(state.withTopValue(), computedExpressions, aliasing); + public AnalysisState withTopValues() { + return new AnalysisState<>(state.withTopValues(), computedExpressions, info); } /** * Yields a copy of this state, but with the {@link AbstractState}'s inner - * {@link TypeDomain} set to top. + * type abstraction set to top. This is useful to represent effects of + * unknown calls that arbitrarily manipulate the values of variables (and + * their type accordingly). * * @return the copy with top type */ - public AnalysisState withTopType() { - return new AnalysisState<>(state.withTopType(), computedExpressions, aliasing); + public AnalysisState withTopTypes() { + return new AnalysisState<>(state.withTopTypes(), computedExpressions, info); } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/AnalyzedCFG.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/AnalyzedCFG.java index 1197de1c4..7abfb60c7 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/AnalyzedCFG.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/AnalyzedCFG.java @@ -1,13 +1,12 @@ package it.unive.lisa.analysis; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.ScopeId; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.edge.Edge; import it.unive.lisa.program.cfg.statement.Expression; import it.unive.lisa.program.cfg.statement.Statement; +import it.unive.lisa.program.cfg.statement.call.Call; +import it.unive.lisa.util.representation.StructuredRepresentation; import java.util.Collection; import java.util.Collections; import java.util.Map; @@ -22,19 +21,12 @@ * * @param the type of {@link AbstractState} contained into the analysis * state - * @param the type of {@link HeapDomain} contained into the computed - * abstract state - * @param the type of {@link ValueDomain} contained into the computed - * abstract state - * @param the type of {@link TypeDomain} embedded into the computed abstract - * state */ -public class AnalyzedCFG, - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> - extends CFG - implements BaseLattice> { +public class AnalyzedCFG> + extends + CFG + implements + BaseLattice> { /** * Error message for the inability to lub two graphs. @@ -64,12 +56,12 @@ public class AnalyzedCFG, /** * The map storing the analysis results. */ - protected final StatementStore results; + protected final StatementStore results; /** * The map storing the entry state of each entry point. */ - protected final StatementStore entryStates; + protected final StatementStore entryStates; /** * An id meant to identify this specific result, based on how it has been @@ -88,7 +80,10 @@ public class AnalyzedCFG, * abstract state of the analysis that was executed, * used to retrieve top and bottom values */ - public AnalyzedCFG(CFG cfg, ScopeId id, AnalysisState singleton) { + public AnalyzedCFG( + CFG cfg, + ScopeId id, + AnalysisState singleton) { this(cfg, id, singleton, Collections.emptyMap(), Collections.emptyMap()); } @@ -105,11 +100,12 @@ public AnalyzedCFG(CFG cfg, ScopeId id, AnalysisState singleton) { * @param entryStates the entry state for each entry point of the cfg * @param results the results of the fixpoint computation */ - public AnalyzedCFG(CFG cfg, + public AnalyzedCFG( + CFG cfg, ScopeId id, - AnalysisState singleton, - Map> entryStates, - Map> results) { + AnalysisState singleton, + Map> entryStates, + Map> results) { super(cfg); this.results = new StatementStore<>(singleton); results.forEach(this.results::put); @@ -128,10 +124,11 @@ public AnalyzedCFG(CFG cfg, * @param entryStates the entry state for each entry point of the cfg * @param results the results of the fixpoint computation */ - public AnalyzedCFG(CFG cfg, + public AnalyzedCFG( + CFG cfg, ScopeId id, - StatementStore entryStates, - StatementStore results) { + StatementStore entryStates, + StatementStore results) { super(cfg); this.results = results; this.entryStates = entryStates; @@ -157,16 +154,35 @@ public ScopeId getId() { * * @throws SemanticException if the lub operator fails */ - public AnalysisState getAnalysisStateBefore(Statement st) throws SemanticException { + public AnalysisState getAnalysisStateBefore( + Statement st) + throws SemanticException { + if (st instanceof Call) { + Call original = (Call) st; + while (original.getSource() != null) + original = original.getSource(); + st = original; + } + + if (!(st instanceof Expression) || ((Expression) st).getParentStatement() == null) + if (getEntrypoints().contains(st)) + return entryStates.getState(st); + else + return lub(predecessorsOf(st), false); + + // st is not a statement + // st is not a root-level expression Statement pred = st.getEvaluationPredecessor(); if (pred != null) - results.getState(pred); + return results.getState(pred); - Statement target = st instanceof Expression ? ((Expression) st).getRootStatement() : st; - if (getEntrypoints().contains(target)) - return entryStates.getState(target); + // last chance: there is no predecessor, so it might be an entry point + // of the analysis + Statement root = ((Expression) st).getRootStatement(); + if (getEntrypoints().contains(root)) + return entryStates.getState(root); - return lub(predecessorsOf(target), false); + return entryStates.lattice.bottom(); } /** @@ -176,7 +192,15 @@ public AnalysisState getAnalysisStateBefore(Statement st) throws Sem * * @return the result computed at the given statement */ - public AnalysisState getAnalysisStateAfter(Statement st) { + public AnalysisState getAnalysisStateAfter( + Statement st) { + if (st instanceof Call) { + Call original = (Call) st; + while (original.getSource() != null) + original = original.getSource(); + st = original; + } + return results.getState(st); } @@ -187,7 +211,7 @@ public AnalysisState getAnalysisStateAfter(Statement st) { * * @throws SemanticException if the lub operator fails */ - public AnalysisState getEntryState() throws SemanticException { + public AnalysisState getEntryState() throws SemanticException { return lub(this.getEntrypoints(), true); } @@ -198,19 +222,24 @@ public AnalysisState getEntryState() throws SemanticException { * * @throws SemanticException if the lub operator fails */ - public AnalysisState getExitState() throws SemanticException { + public AnalysisState getExitState() throws SemanticException { return lub(this.getNormalExitpoints(), false); } - private AnalysisState lub(Collection statements, boolean entry) throws SemanticException { - AnalysisState result = entryStates.lattice.bottom(); + private AnalysisState lub( + Collection statements, + boolean entry) + throws SemanticException { + AnalysisState result = entryStates.lattice.bottom(); for (Statement st : statements) result = result.lub(entry ? getAnalysisStateBefore(st) : getAnalysisStateAfter(st)); return result; } @Override - public AnalyzedCFG lubAux(AnalyzedCFG other) throws SemanticException { + public AnalyzedCFG lubAux( + AnalyzedCFG other) + throws SemanticException { if (!getDescriptor().equals(other.getDescriptor()) || !sameIDs(other)) throw new SemanticException(CANNOT_LUB_ERROR); @@ -222,7 +251,9 @@ public AnalyzedCFG lubAux(AnalyzedCFG other) throws Sema } @Override - public AnalyzedCFG glbAux(AnalyzedCFG other) throws SemanticException { + public AnalyzedCFG glbAux( + AnalyzedCFG other) + throws SemanticException { if (!getDescriptor().equals(other.getDescriptor()) || !sameIDs(other)) throw new SemanticException(CANNOT_GLB_ERROR); @@ -234,7 +265,9 @@ public AnalyzedCFG glbAux(AnalyzedCFG other) throws Sema } @Override - public AnalyzedCFG wideningAux(AnalyzedCFG other) throws SemanticException { + public AnalyzedCFG wideningAux( + AnalyzedCFG other) + throws SemanticException { if (!getDescriptor().equals(other.getDescriptor()) || !sameIDs(other)) throw new SemanticException(CANNOT_WIDEN_ERROR); @@ -246,7 +279,9 @@ public AnalyzedCFG wideningAux(AnalyzedCFG other) throws } @Override - public AnalyzedCFG narrowingAux(AnalyzedCFG other) throws SemanticException { + public AnalyzedCFG narrowingAux( + AnalyzedCFG other) + throws SemanticException { if (!getDescriptor().equals(other.getDescriptor()) || !sameIDs(other)) throw new SemanticException(CANNOT_NARROW_ERROR); @@ -258,7 +293,9 @@ public AnalyzedCFG narrowingAux(AnalyzedCFG other) throw } @Override - public boolean lessOrEqualAux(AnalyzedCFG other) throws SemanticException { + public boolean lessOrEqualAux( + AnalyzedCFG other) + throws SemanticException { if (!getDescriptor().equals(other.getDescriptor()) || !sameIDs(other)) throw new SemanticException(CANNOT_COMPARE_ERROR); @@ -273,7 +310,8 @@ public boolean lessOrEqualAux(AnalyzedCFG other) throws SemanticExce * * @return {@code true} if that condition holds */ - protected boolean sameIDs(AnalyzedCFG other) { + protected boolean sameIDs( + AnalyzedCFG other) { if (id == null) { if (other.id == null) return true; @@ -285,7 +323,7 @@ protected boolean sameIDs(AnalyzedCFG other) { } @Override - public AnalyzedCFG top() { + public AnalyzedCFG top() { return new AnalyzedCFG<>(this, id.startingId(), entryStates.top(), results.top()); } @@ -295,7 +333,7 @@ public boolean isTop() { } @Override - public AnalyzedCFG bottom() { + public AnalyzedCFG bottom() { return new AnalyzedCFG<>(this, id.startingId(), entryStates.bottom(), results.bottom()); } @@ -315,14 +353,15 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; - AnalyzedCFG other = (AnalyzedCFG) obj; + AnalyzedCFG other = (AnalyzedCFG) obj; if (entryStates == null) { if (other.entryStates != null) return false; @@ -340,4 +379,9 @@ public boolean equals(Object obj) { return false; return true; } + + @Override + public StructuredRepresentation representation() { + throw new UnsupportedOperationException(); + } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/BackwardAnalyzedCFG.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/BackwardAnalyzedCFG.java new file mode 100644 index 000000000..a0343578f --- /dev/null +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/BackwardAnalyzedCFG.java @@ -0,0 +1,387 @@ +package it.unive.lisa.analysis; + +import it.unive.lisa.interprocedural.ScopeId; +import it.unive.lisa.program.cfg.CFG; +import it.unive.lisa.program.cfg.edge.Edge; +import it.unive.lisa.program.cfg.statement.Expression; +import it.unive.lisa.program.cfg.statement.Statement; +import it.unive.lisa.program.cfg.statement.call.Call; +import it.unive.lisa.util.representation.StructuredRepresentation; +import java.util.Collection; +import java.util.Collections; +import java.util.Map; + +/** + * A control flow graph, that has {@link Statement}s as nodes and {@link Edge}s + * as edges. It also maps each statement (and its inner expressions) to the + * result of a fixpoint computation, in the form of an {@link AnalysisState} + * instance. + * + * @author Luca Negrini + * + * @param the type of {@link AbstractState} contained into the analysis + * state + */ +public class BackwardAnalyzedCFG> + extends + CFG + implements + BaseLattice> { + + /** + * Error message for the inability to lub two graphs. + */ + protected static final String CANNOT_LUB_ERROR = "Cannot lub two graphs with different descriptor or different IDs"; + + /** + * Error message for the inability to glb two graphs. + */ + protected static final String CANNOT_GLB_ERROR = "Cannot glb two graphs with different descriptor or different IDs"; + + /** + * Error message for the inability to widen two graphs. + */ + protected static final String CANNOT_WIDEN_ERROR = "Cannot widen two graphs with different descriptor or different IDs"; + + /** + * Error message for the inability to narrow two graphs. + */ + protected static final String CANNOT_NARROW_ERROR = "Cannot perform narrow two graphs with different descriptor or different IDs"; + + /** + * Error message for the inability to compare two graphs. + */ + protected static final String CANNOT_COMPARE_ERROR = "Cannot compare two graphs with different descriptor or different IDs"; + + /** + * The map storing the analysis results. + */ + protected final StatementStore results; + + /** + * The map storing the exit state of each exit point. + */ + protected final StatementStore exitStates; + + /** + * An id meant to identify this specific result, based on how it has been + * produced. + */ + protected final ScopeId id; + + /** + * Builds the control flow graph, storing the given mapping between nodes + * and fixpoint computation results. + * + * @param cfg the original control flow graph + * @param id a {@link ScopeId} meant to identify this specific result + * based on how it has been produced + * @param singleton an instance of the {@link AnalysisState} containing the + * abstract state of the analysis that was executed, + * used to retrieve top and bottom values + */ + public BackwardAnalyzedCFG( + CFG cfg, + ScopeId id, + AnalysisState singleton) { + this(cfg, id, singleton, Collections.emptyMap(), Collections.emptyMap()); + } + + /** + * Builds the control flow graph, storing the given mapping between nodes + * and fixpoint computation results. + * + * @param cfg the original control flow graph + * @param id a {@link ScopeId} meant to identify this specific + * result based on how it has been produced + * @param singleton an instance of the {@link AnalysisState} containing the + * abstract state of the analysis that was executed, + * used to retrieve top and bottom values + * @param exitStates the exit state for each exit point of the cfg + * @param results the results of the fixpoint computation + */ + public BackwardAnalyzedCFG( + CFG cfg, + ScopeId id, + AnalysisState singleton, + Map> exitStates, + Map> results) { + super(cfg); + this.results = new StatementStore<>(singleton); + results.forEach(this.results::put); + this.exitStates = new StatementStore<>(singleton); + exitStates.forEach(this.exitStates::put); + this.id = id; + } + + /** + * Builds the control flow graph, storing the given mapping between nodes + * and fixpoint computation results. + * + * @param cfg the original control flow graph + * @param id a {@link ScopeId} meant to identify this specific + * result based on how it has been produced + * @param exitStates the exit state for each exit point of the cfg + * @param results the results of the fixpoint computation + */ + public BackwardAnalyzedCFG( + CFG cfg, + ScopeId id, + StatementStore exitStates, + StatementStore results) { + super(cfg); + this.results = results; + this.exitStates = exitStates; + this.id = id; + } + + /** + * Yields an id meant to identify this specific result, based on how it has + * been produced. This method might return {@code null}. + * + * @return the identifier of this result + */ + public ScopeId getId() { + return id; + } + + /** + * Yields the computed result before a given statement (entry state). + * + * @param st the statement + * + * @return the result computed before the given statement + */ + public AnalysisState getAnalysisStateBefore( + Statement st) { + if (st instanceof Call) { + Call original = (Call) st; + while (original.getSource() != null) + original = original.getSource(); + st = original; + } + + return results.getState(st); + } + + /** + * Yields the computed result at a given statement (exit state). + * + * @param st the statement + * + * @return the result computed at the given statement + * + * @throws SemanticException if the lub operator fails + */ + public AnalysisState getAnalysisStateAfter( + Statement st) + throws SemanticException { + if (st instanceof Call) { + Call original = (Call) st; + while (original.getSource() != null) + original = original.getSource(); + st = original; + } + + if (!(st instanceof Expression) || ((Expression) st).getParentStatement() == null) + if (getAllExitpoints().contains(st)) + return exitStates.getState(st); + else + return lub(followersOf(st), true); + + // st is not a statement + // st is not a root-level expression + Statement succ = st.getEvaluationSuccessor(); + if (succ != null) + return results.getState(succ); + + // last chance: there is no successor, so it might be an exit point of + // the analysis + Statement target = ((Expression) st).getRootStatement(); + if (getAllExitpoints().contains(target)) + return exitStates.getState(target); + + return exitStates.lattice.bottom(); + } + + /** + * Yields the entry state. + * + * @return the entry state of the CFG + * + * @throws SemanticException if the lub operator fails + */ + public AnalysisState getEntryState() throws SemanticException { + return lub(this.getEntrypoints(), true); + } + + /** + * Yields the exit state. + * + * @return the exit state of the CFG + * + * @throws SemanticException if the lub operator fails + */ + public AnalysisState getExitState() throws SemanticException { + return lub(this.getNormalExitpoints(), false); + } + + private AnalysisState lub( + Collection statements, + boolean entry) + throws SemanticException { + AnalysisState result = exitStates.lattice.bottom(); + for (Statement st : statements) + result = result.lub(entry ? getAnalysisStateBefore(st) : getAnalysisStateAfter(st)); + return result; + } + + @Override + public BackwardAnalyzedCFG lubAux( + BackwardAnalyzedCFG other) + throws SemanticException { + if (!getDescriptor().equals(other.getDescriptor()) || !sameIDs(other)) + throw new SemanticException(CANNOT_LUB_ERROR); + + return new BackwardAnalyzedCFG<>( + this, + id, + exitStates.lub(other.exitStates), + results.lub(other.results)); + } + + @Override + public BackwardAnalyzedCFG glbAux( + BackwardAnalyzedCFG other) + throws SemanticException { + if (!getDescriptor().equals(other.getDescriptor()) || !sameIDs(other)) + throw new SemanticException(CANNOT_GLB_ERROR); + + return new BackwardAnalyzedCFG<>( + this, + id, + exitStates.glb(other.exitStates), + results.glb(other.results)); + } + + @Override + public BackwardAnalyzedCFG wideningAux( + BackwardAnalyzedCFG other) + throws SemanticException { + if (!getDescriptor().equals(other.getDescriptor()) || !sameIDs(other)) + throw new SemanticException(CANNOT_WIDEN_ERROR); + + return new BackwardAnalyzedCFG<>( + this, + id, + exitStates.widening(other.exitStates), + results.widening(other.results)); + } + + @Override + public BackwardAnalyzedCFG narrowingAux( + BackwardAnalyzedCFG other) + throws SemanticException { + if (!getDescriptor().equals(other.getDescriptor()) || !sameIDs(other)) + throw new SemanticException(CANNOT_NARROW_ERROR); + + return new BackwardAnalyzedCFG<>( + this, + id, + exitStates.narrowing(other.exitStates), + results.narrowing(other.results)); + } + + @Override + public boolean lessOrEqualAux( + BackwardAnalyzedCFG other) + throws SemanticException { + if (!getDescriptor().equals(other.getDescriptor()) || !sameIDs(other)) + throw new SemanticException(CANNOT_COMPARE_ERROR); + + return exitStates.lessOrEqual(other.exitStates) && results.lessOrEqual(other.results); + } + + /** + * Yields whether or not the {@link #id} of this graph and the given one are + * the same. + * + * @param other the other graph + * + * @return {@code true} if that condition holds + */ + protected boolean sameIDs( + BackwardAnalyzedCFG other) { + if (id == null) { + if (other.id == null) + return true; + return false; + } else if (other.id == null) + return false; + else + return id.equals(other.id); + } + + @Override + public BackwardAnalyzedCFG top() { + return new BackwardAnalyzedCFG<>(this, id.startingId(), exitStates.top(), results.top()); + } + + @Override + public boolean isTop() { + return exitStates.isTop() && results.isTop(); + } + + @Override + public BackwardAnalyzedCFG bottom() { + return new BackwardAnalyzedCFG<>(this, id.startingId(), exitStates.bottom(), results.bottom()); + } + + @Override + public boolean isBottom() { + return exitStates.isBottom() && results.isBottom(); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((exitStates == null) ? 0 : exitStates.hashCode()); + result = prime * result + ((id == null) ? 0 : id.hashCode()); + result = prime * result + ((results == null) ? 0 : results.hashCode()); + return result; + } + + @Override + public boolean equals( + Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + BackwardAnalyzedCFG other = (BackwardAnalyzedCFG) obj; + if (exitStates == null) { + if (other.exitStates != null) + return false; + } else if (!exitStates.equals(other.exitStates)) + return false; + if (id == null) { + if (other.id != null) + return false; + } else if (!id.equals(other.id)) + return false; + if (results == null) { + if (other.results != null) + return false; + } else if (!results.equals(other.results)) + return false; + return true; + } + + @Override + public StructuredRepresentation representation() { + throw new UnsupportedOperationException(); + } +} diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/BackwardOptimizedAnalyzedCFG.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/BackwardOptimizedAnalyzedCFG.java new file mode 100644 index 000000000..413af5cdc --- /dev/null +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/BackwardOptimizedAnalyzedCFG.java @@ -0,0 +1,419 @@ +package it.unive.lisa.analysis; + +import it.unive.lisa.analysis.lattices.ExpressionSet; +import it.unive.lisa.analysis.symbols.SymbolAliasing; +import it.unive.lisa.conf.FixpointConfiguration; +import it.unive.lisa.conf.LiSAConfiguration; +import it.unive.lisa.interprocedural.FixpointResults; +import it.unive.lisa.interprocedural.InterproceduralAnalysis; +import it.unive.lisa.interprocedural.InterproceduralAnalysisException; +import it.unive.lisa.interprocedural.OpenCallPolicy; +import it.unive.lisa.interprocedural.ScopeId; +import it.unive.lisa.interprocedural.callgraph.CallGraph; +import it.unive.lisa.interprocedural.callgraph.CallResolutionException; +import it.unive.lisa.logging.TimerLogger; +import it.unive.lisa.program.Application; +import it.unive.lisa.program.cfg.CFG; +import it.unive.lisa.program.cfg.edge.Edge; +import it.unive.lisa.program.cfg.fixpoints.BackwardAscendingFixpoint; +import it.unive.lisa.program.cfg.fixpoints.CFGFixpoint.CompoundState; +import it.unive.lisa.program.cfg.fixpoints.OptimizedBackwardFixpoint; +import it.unive.lisa.program.cfg.statement.Expression; +import it.unive.lisa.program.cfg.statement.Statement; +import it.unive.lisa.program.cfg.statement.call.CFGCall; +import it.unive.lisa.program.cfg.statement.call.Call; +import it.unive.lisa.program.cfg.statement.call.OpenCall; +import it.unive.lisa.program.cfg.statement.call.UnresolvedCall; +import it.unive.lisa.type.Type; +import it.unive.lisa.util.collections.workset.FIFOWorkingSet; +import it.unive.lisa.util.collections.workset.WorkingSet; +import it.unive.lisa.util.datastructures.graph.algorithms.BackwardFixpoint; +import it.unive.lisa.util.datastructures.graph.algorithms.FixpointException; +import java.util.Collection; +import java.util.HashMap; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * A {@link BackwardAnalyzedCFG} that has been built using an + * {@link OptimizedBackwardFixpoint}. This means that this graph will only + * contain results for widening points (that is, {@link Statement}s that part of + * {@link #getCycleEntries()}), exit statements (that is, {@link Statement}s + * such that {@link Statement#stopsExecution()} holds), and hotspots (that is, + * {@link Statement}s such that {@link LiSAConfiguration#hotspots} holds). + * Approximations for other statements can be retrieved through + * {@link #getUnwindedAnalysisStateBefore(Statement, FixpointConfiguration)}, + * that will first expand the results using + * {@link #unwind(FixpointConfiguration)}. + * + * @author Luca Negrini + * + * @param the type of {@link AbstractState} contained into the analysis + * state + */ +public class BackwardOptimizedAnalyzedCFG> extends BackwardAnalyzedCFG { + + private static final Logger LOG = LogManager.getLogger(BackwardOptimizedAnalyzedCFG.class); + + private final InterproceduralAnalysis interprocedural; + + private StatementStore expanded; + + /** + * Builds the control flow graph, storing the given mapping between nodes + * and fixpoint computation results. + * + * @param cfg the original control flow graph + * @param id a {@link ScopeId} meant to identify this specific + * result based on how it has been produced + * @param singleton an instance of the {@link AnalysisState} + * containing the abstract state of the analysis + * that was executed, used to retrieve top and + * bottom values + * @param interprocedural the analysis that have been used to produce this + * result, and that can be used to unwind the + * results + */ + public BackwardOptimizedAnalyzedCFG( + CFG cfg, + ScopeId id, + AnalysisState singleton, + InterproceduralAnalysis interprocedural) { + super(cfg, id, singleton); + this.interprocedural = interprocedural; + } + + /** + * Builds the control flow graph, storing the given mapping between nodes + * and fixpoint computation results. + * + * @param cfg the original control flow graph + * @param id a {@link ScopeId} meant to identify this specific + * result based on how it has been produced + * @param singleton an instance of the {@link AnalysisState} + * containing the abstract state of the analysis + * that was executed, used to retrieve top and + * bottom values + * @param exitStates the exit state for each exit point of the cfg + * @param results the results of the fixpoint computation + * @param interprocedural the analysis that have been used to produce this + * result, and that can be used to unwind the + * results + */ + public BackwardOptimizedAnalyzedCFG( + CFG cfg, + ScopeId id, + AnalysisState singleton, + Map> exitStates, + Map> results, + InterproceduralAnalysis interprocedural) { + super(cfg, id, singleton, exitStates, results); + this.interprocedural = interprocedural; + } + + /** + * Builds the control flow graph, storing the given mapping between nodes + * and fixpoint computation results. + * + * @param cfg the original control flow graph + * @param id a {@link ScopeId} meant to identify this specific + * result based on how it has been produced + * @param exitStates the exit state for each exit point of the cfg + * @param results the results of the fixpoint computation + * @param interprocedural the analysis that have been used to produce this + * result, and that can be used to unwind the + * results + */ + public BackwardOptimizedAnalyzedCFG( + CFG cfg, + ScopeId id, + StatementStore exitStates, + StatementStore results, + InterproceduralAnalysis interprocedural) { + super(cfg, id, exitStates, results); + this.interprocedural = interprocedural; + } + + private BackwardOptimizedAnalyzedCFG( + CFG cfg, + ScopeId id, + StatementStore exitStates, + StatementStore results, + StatementStore expanded, + InterproceduralAnalysis interprocedural) { + super(cfg, id, exitStates, results); + this.interprocedural = interprocedural; + this.expanded = expanded; + } + + /** + * Yields the computed result at a given statement (exit state). If such a + * state is not available as it was discarded due to optimization, and + * fixpoint's results have not been unwinded yet, a fixpoint iteration is + * executed in-place through {@link #unwind(FixpointConfiguration)}. + * + * @param st the statement + * @param conf the {@link FixpointConfiguration} to use for running the fast + * fixpoint computation + * + * @return the result computed at the given statement + */ + public AnalysisState getUnwindedAnalysisStateBefore( + Statement st, + FixpointConfiguration conf) { + if (results.getKeys().contains(st)) + return results.getState(st); + + if (expanded != null) + return expanded.getState(st); + + unwind(conf); + + return expanded.getState(st); + } + + /** + * Runs an ascending fixpoint computation starting with the results + * available in this graph, with the purpose of propagating the + * approximations held in this result to all the missing nodes. + * + * @param conf the {@link FixpointConfiguration} to use for running the fast + * fixpoint computation + */ + public void unwind( + FixpointConfiguration conf) { + AnalysisState bottom = results.lattice.bottom(); + StatementStore bot = new StatementStore<>(bottom); + Map> starting = new HashMap<>(); + for (Entry> entry : exitStates) + starting.put(entry.getKey(), CompoundState.of(entry.getValue(), bot)); + + Map> existing = new HashMap<>(); + CompoundState fallback = CompoundState.of(bottom, bot); + for (Entry> entry : results) { + Statement stmt = entry.getKey(); + AnalysisState approx = entry.getValue(); + CompoundState def = existing.getOrDefault(stmt, fallback); + + if (!(stmt instanceof Expression) || ((Expression) stmt).getRootStatement() == stmt) + existing.put(stmt, CompoundState.of(approx, def.intermediateStates)); + else { + Expression e = (Expression) stmt; + CompoundState val = existing.computeIfAbsent(e.getRootStatement(), + ex -> CompoundState.of(bottom, bot.bottom())); + val.intermediateStates.put(e, approx); + } + } + + BackwardAscendingFixpoint asc = new BackwardAscendingFixpoint<>(this, new PrecomputedAnalysis(), conf); + BackwardFixpoint> fix = new BackwardFixpoint<>(this, true); + TimerLogger.execAction(LOG, "Unwinding optimizied results of " + this, () -> { + try { + Map> res = fix.fixpoint( + starting, + FIFOWorkingSet.mk(), + asc, + existing); + expanded = new StatementStore<>(bottom); + for (Entry> e : res.entrySet()) { + expanded.put(e.getKey(), e.getValue().postState); + for (Entry> ee : e.getValue().intermediateStates) + expanded.put(ee.getKey(), ee.getValue()); + } + } catch (FixpointException e) { + LOG.error("Unable to unwind optimized results of " + this, e); + } + }); + } + + /** + * Yields whether or not the non-unwinded results of this cfg contain the + * prestate of the given statement. + * + * @param st the statement + * + * @return whether or not a prestate for {@code st} exists + */ + public boolean hasPreStateOf( + Statement st) { + return results.getKeys().contains(st); + } + + /** + * Stores the given prestate for the statement in the non-unwinded results + * of this cfg, overwriting any existing value. + * + * @param st the statement + * @param prestate the prestate + */ + public void storePreStateOf( + Statement st, + AnalysisState prestate) { + results.put(st, prestate); + } + + private class PrecomputedAnalysis implements InterproceduralAnalysis { + + @Override + public void init( + Application app, + CallGraph callgraph, + OpenCallPolicy policy) + throws InterproceduralAnalysisException { + throw new UnsupportedOperationException(); + } + + @Override + public void fixpoint( + AnalysisState exitState, + Class> fixpointWorkingSet, + FixpointConfiguration conf) + throws FixpointException { + throw new UnsupportedOperationException(); + } + + @Override + public Collection> getAnalysisResultsOf( + CFG cfg) { + throw new UnsupportedOperationException(); + } + + @Override + public AnalysisState getAbstractResultOf( + CFGCall call, + AnalysisState exitState, + ExpressionSet[] parameters, + StatementStore expressions) + throws SemanticException { + Call source = call.getSource() == null ? call : call.getSource(); + if (results.getKeys().contains(source)) + return results.getState(source); + + FixpointResults precomputed = interprocedural.getFixpointResults(); + ScopeToken scope = new ScopeToken(call); + ScopeId id = getId().push(call); + AnalysisState state = exitState.bottom(); + for (CFG target : call.getTargetedCFGs()) { + AnalysisState res = precomputed.getState(target).getState(id).getExitState(); + state = state.lub(unscope(call, scope, res)); + } + return state; + } + + @Override + public AnalysisState getAbstractResultOf( + OpenCall call, + AnalysisState exitState, + ExpressionSet[] parameters, + StatementStore expressions) + throws SemanticException { + return interprocedural.getAbstractResultOf(call, exitState, parameters, expressions); + } + + @Override + public Call resolve( + UnresolvedCall call, + Set[] types, + SymbolAliasing aliasing) + throws CallResolutionException { + return interprocedural.resolve(call, types, aliasing); + } + + @Override + public FixpointResults getFixpointResults() { + return interprocedural.getFixpointResults(); + } + + @Override + public boolean needsCallGraph() { + // not really needed + return false; + } + } + + @Override + public BackwardOptimizedAnalyzedCFG lubAux( + BackwardAnalyzedCFG other) + throws SemanticException { + if (!getDescriptor().equals(other.getDescriptor()) || !sameIDs(other) + || !(other instanceof BackwardOptimizedAnalyzedCFG)) + throw new SemanticException(CANNOT_LUB_ERROR); + + BackwardOptimizedAnalyzedCFG o = (BackwardOptimizedAnalyzedCFG) other; + return new BackwardOptimizedAnalyzedCFG( + this, + id, + exitStates.lub(other.exitStates), + results.lub(other.results), + expanded == null ? o.expanded : expanded.lub(o.expanded), + interprocedural); + } + + @Override + public BackwardOptimizedAnalyzedCFG glbAux( + BackwardAnalyzedCFG other) + throws SemanticException { + if (!getDescriptor().equals(other.getDescriptor()) || !sameIDs(other) + || !(other instanceof BackwardOptimizedAnalyzedCFG)) + throw new SemanticException(CANNOT_GLB_ERROR); + + BackwardOptimizedAnalyzedCFG o = (BackwardOptimizedAnalyzedCFG) other; + return new BackwardOptimizedAnalyzedCFG( + this, + id, + exitStates.glb(other.exitStates), + results.glb(other.results), + expanded == null ? o.expanded : expanded.glb(o.expanded), + interprocedural); + } + + @Override + public BackwardOptimizedAnalyzedCFG wideningAux( + BackwardAnalyzedCFG other) + throws SemanticException { + if (!getDescriptor().equals(other.getDescriptor()) || !sameIDs(other) + || !(other instanceof BackwardOptimizedAnalyzedCFG)) + throw new SemanticException(CANNOT_WIDEN_ERROR); + + BackwardOptimizedAnalyzedCFG o = (BackwardOptimizedAnalyzedCFG) other; + return new BackwardOptimizedAnalyzedCFG( + this, + id, + exitStates.widening(other.exitStates), + results.widening(other.results), + expanded == null ? o.expanded : expanded.widening(o.expanded), + interprocedural); + } + + @Override + public BackwardOptimizedAnalyzedCFG narrowingAux( + BackwardAnalyzedCFG other) + throws SemanticException { + if (!getDescriptor().equals(other.getDescriptor()) || !sameIDs(other) + || !(other instanceof BackwardOptimizedAnalyzedCFG)) + throw new SemanticException(CANNOT_NARROW_ERROR); + + BackwardOptimizedAnalyzedCFG o = (BackwardOptimizedAnalyzedCFG) other; + return new BackwardOptimizedAnalyzedCFG( + this, + id, + exitStates.narrowing(other.exitStates), + results.narrowing(other.results), + expanded == null ? o.expanded : expanded.narrowing(o.expanded), + interprocedural); + } + + @Override + public BackwardOptimizedAnalyzedCFG top() { + return new BackwardOptimizedAnalyzedCFG<>(this, id.startingId(), exitStates.top(), results.top(), null, null); + } + + @Override + public BackwardOptimizedAnalyzedCFG bottom() { + return new BackwardOptimizedAnalyzedCFG<>(this, id.startingId(), exitStates.bottom(), results.bottom(), null, + null); + } +} diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/BaseLattice.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/BaseLattice.java index eaa6b83f9..544af7090 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/BaseLattice.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/BaseLattice.java @@ -13,7 +13,9 @@ public interface BaseLattice> extends Lattice { @Override - default boolean lessOrEqual(L other) throws SemanticException { + default boolean lessOrEqual( + L other) + throws SemanticException { if (other == null) return false; @@ -28,7 +30,9 @@ default boolean lessOrEqual(L other) throws SemanticException { @Override @SuppressWarnings("unchecked") - default L lub(L other) throws SemanticException { + default L lub( + L other) + throws SemanticException { if (other == null || other.isBottom() || this.isTop() || this == other || this.equals(other)) return (L) this; @@ -40,7 +44,9 @@ default L lub(L other) throws SemanticException { @Override @SuppressWarnings("unchecked") - default L glb(L other) throws SemanticException { + default L glb( + L other) + throws SemanticException { if (other == null || this.isBottom() || other.isTop() || this == other || this.equals(other)) return (L) this; @@ -52,7 +58,9 @@ default L glb(L other) throws SemanticException { @Override @SuppressWarnings("unchecked") - default L widening(L other) throws SemanticException { + default L widening( + L other) + throws SemanticException { if (other == null || other.isBottom() || this.isTop() || this == other || this.equals(other)) return (L) this; @@ -64,7 +72,9 @@ default L widening(L other) throws SemanticException { @Override @SuppressWarnings("unchecked") - default L narrowing(L other) throws SemanticException { + default L narrowing( + L other) + throws SemanticException { if (other == null || this.isBottom() || this == other || this.equals(other)) return (L) this; @@ -92,7 +102,9 @@ default L narrowing(L other) throws SemanticException { * * @throws SemanticException if an error occurs during the computation */ - public abstract L lubAux(L other) throws SemanticException; + public abstract L lubAux( + L other) + throws SemanticException; /** * Performs the greatest lower bound operation between this lattice element @@ -112,7 +124,9 @@ default L narrowing(L other) throws SemanticException { * * @throws SemanticException if an error occurs during the computation */ - default L glbAux(L other) throws SemanticException { + default L glbAux( + L other) + throws SemanticException { return bottom(); } @@ -137,7 +151,9 @@ default L glbAux(L other) throws SemanticException { * * @throws SemanticException if an error occurs during the computation */ - default L wideningAux(L other) throws SemanticException { + default L wideningAux( + L other) + throws SemanticException { return lubAux(other); } @@ -162,7 +178,9 @@ default L wideningAux(L other) throws SemanticException { * * @throws SemanticException if an error occurs during the computation */ - default L narrowingAux(L other) throws SemanticException { + default L narrowingAux( + L other) + throws SemanticException { return glbAux(other); } @@ -184,10 +202,13 @@ default L narrowingAux(L other) throws SemanticException { * * @throws SemanticException if an error occurs during the computation */ - public abstract boolean lessOrEqualAux(L other) throws SemanticException; + public abstract boolean lessOrEqualAux( + L other) + throws SemanticException; @Override - public abstract boolean equals(Object obj); + public abstract boolean equals( + Object obj); @Override public abstract int hashCode(); diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/FixpointInfo.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/FixpointInfo.java new file mode 100644 index 000000000..cc8b1b786 --- /dev/null +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/FixpointInfo.java @@ -0,0 +1,365 @@ +package it.unive.lisa.analysis; + +import it.unive.lisa.analysis.lattices.FunctionalLattice; +import it.unive.lisa.util.representation.MapRepresentation; +import it.unive.lisa.util.representation.StringRepresentation; +import it.unive.lisa.util.representation.StructuredRepresentation; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; +import org.apache.commons.collections4.SetUtils; + +/** + * A generic mapping from string keys to {@link Lattice} instances that can + * store custom user-defined information inside the {@link AnalysisState}. This + * class itself is a special case of {@link FunctionalLattice} where values are + * not required to have the same type. + * + * @author Luca Negrini + */ +public class FixpointInfo implements BaseLattice, Iterable>> { + + /** + * The unique bottom instance of this class. + */ + public static final FixpointInfo BOTTOM = new FixpointInfo() { + @Override + public boolean isBottom() { + return true; + } + + @Override + public boolean isTop() { + return false; + } + }; + + /** + * The function containing the additional information. + */ + public Map> function; + + /** + * Builds the function. + */ + public FixpointInfo() { + this(null); + } + + /** + * Builds the function by using the given mapping. + * + * @param mapping the mapping to use + */ + public FixpointInfo( + Map> mapping) { + this.function = mapping != null && mapping.isEmpty() ? null : mapping; + } + + private Map> mkNewFunction( + Map> other, + boolean preserveNull) { + if (other == null) + return preserveNull ? null : new HashMap<>(); + return new HashMap<>(other); + } + + /** + * Yields the information associated to the given key. + * + * @param key the key + * + * @return the mapped information + */ + public Lattice get( + String key) { + if (isBottom() || isTop() || function == null) + return null; + return function.get(key); + } + + /** + * Yields the information associated to the given key, casted to the given + * type. + * + * @param the type to cast the return value of this method to + * @param key the key + * @param type the type to cast the retrieved information to + * + * @return the mapped information + */ + @SuppressWarnings("unchecked") + public T get( + String key, + Class type) { + return (T) get(key); + } + + /** + * Yields a new instance of this class where the given information has been + * mapped to the given key. This is a strong update, meaning that the + * information previously mapped to the same key, if any, is lost. For a + * weak update, use {@link #putWeak(String, Lattice)}. + * + * @param key the key + * @param info the information to store + * + * @return a new instance with the updated mapping + */ + public FixpointInfo put( + String key, + Lattice info) { + // we are only adding elements here, so it is fine to not preserve null + Map> result = mkNewFunction(function, false); + result.put(key, info); + return new FixpointInfo(result); + } + + /** + * Yields a new instance of this class where the given information has been + * mapped to the given key. This is a weak update, meaning that the + * information previously mapped to the same key, if any, is lubbed together + * with the given one, and the result is stored inside the mapping instead. + * For a strong update, use {@link #put(String, Lattice)}. + * + * @param key the key + * @param info the information to store + * + * @return a new instance with the updated mapping + * + * @throws SemanticException if something goes wrong during the lub + */ + @SuppressWarnings({ "unchecked", "rawtypes" }) + public FixpointInfo putWeak( + String key, + Lattice info) + throws SemanticException { + Map> result = mkNewFunction(function, false); + // need to leave this raw to not have the compiler complaining about the + // lub invocation + Lattice prev = get(key); + if (prev.getClass() != info.getClass()) + throw new IllegalArgumentException("The given lattice instance has a different type (" + + info.getClass().getName() + ") from the one already associated with the given key (" + + prev.getClass().getName() + ")"); + result.put(key, prev != null ? prev.lub(info) : info); + return new FixpointInfo(result); + } + + @Override + @SuppressWarnings({ "rawtypes", "unchecked" }) + public FixpointInfo lubAux( + FixpointInfo other) + throws SemanticException { + Map> function = mkNewFunction(null, false); + Set keys = SetUtils.union(this.getKeys(), other.getKeys()); + for (String key : keys) + try { + // need to leave this raw to not have the compiler complaining + // about the lub invocation + Lattice v = this.get(key); + Lattice o = other.get(key); + if (v != null && o != null) + function.put(key, v.lub(o)); + else if (v != null) + function.put(key, v); + else + function.put(key, o); + } catch (SemanticException e) { + throw new SemanticException("Exception while operating on '" + key + "'", e); + } + return new FixpointInfo(function); + } + + @Override + @SuppressWarnings({ "rawtypes", "unchecked" }) + public FixpointInfo glbAux( + FixpointInfo other) + throws SemanticException { + Map> function = mkNewFunction(null, false); + Set keys = SetUtils.intersection(this.getKeys(), other.getKeys()); + for (String key : keys) + try { + // need to leave this raw to not have the compiler complaining + // about the lub invocation + Lattice v = this.get(key); + Lattice o = other.get(key); + if (v != null && o != null) + function.put(key, v.glb(o)); + } catch (SemanticException e) { + throw new SemanticException("Exception while operating on '" + key + "'", e); + } + return new FixpointInfo(function); + } + + @Override + @SuppressWarnings({ "rawtypes", "unchecked" }) + public FixpointInfo wideningAux( + FixpointInfo other) + throws SemanticException { + Map> function = mkNewFunction(null, false); + Set keys = SetUtils.union(this.getKeys(), other.getKeys()); + for (String key : keys) + try { + // need to leave this raw to not have the compiler complaining + // about the lub invocation + Lattice v = this.get(key); + Lattice o = other.get(key); + if (v != null && o != null) + function.put(key, v.widening(o)); + else if (v != null) + function.put(key, v); + else + function.put(key, o); + } catch (SemanticException e) { + throw new SemanticException("Exception while operating on '" + key + "'", e); + } + return new FixpointInfo(function); + } + + @Override + @SuppressWarnings({ "rawtypes", "unchecked" }) + public FixpointInfo narrowingAux( + FixpointInfo other) + throws SemanticException { + Map> function = mkNewFunction(null, false); + Set keys = SetUtils.intersection(this.getKeys(), other.getKeys()); + for (String key : keys) + try { + // need to leave this raw to not have the compiler complaining + // about the lub invocation + Lattice v = this.get(key); + Lattice o = other.get(key); + if (v != null && o != null) + function.put(key, v.narrowing(o)); + } catch (SemanticException e) { + throw new SemanticException("Exception while operating on '" + key + "'", e); + } + return new FixpointInfo(function); + } + + @Override + @SuppressWarnings({ "rawtypes", "unchecked" }) + public boolean lessOrEqualAux( + FixpointInfo other) + throws SemanticException { + if (function != null) + for (String key : function.keySet()) { + // need to leave this raw to not have the compiler complaining + // about the lub invocation + Lattice v = get(key); + Lattice o = other.get(key); + if (v != null && (o == null || !v.lessOrEqual(o))) + return false; + } + + return true; + } + + @Override + public FixpointInfo top() { + return new FixpointInfo(); + } + + @Override + public boolean isTop() { + return function == null; + } + + @Override + public FixpointInfo bottom() { + return BOTTOM; + } + + @Override + public boolean isBottom() { + return false; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((function == null) ? 0 : function.hashCode()); + return result; + } + + @Override + public boolean equals( + Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + FixpointInfo other = (FixpointInfo) obj; + if (function == null) { + if (other.function != null) + return false; + } else if (!function.equals(other.function)) + return false; + return true; + } + + @Override + public String toString() { + if (isTop()) + return Lattice.TOP_STRING; + + if (isBottom()) + return Lattice.BOTTOM_STRING; + + return function == null ? "{}" : function.toString(); + } + + @Override + public Iterator>> iterator() { + if (function == null) + return Collections.emptyIterator(); + return function.entrySet().iterator(); + } + + /** + * Yields the set of keys currently in this mapping. + * + * @return the set of keys + */ + public Set getKeys() { + if (function == null) + return Collections.emptySet(); + return function.keySet(); + } + + /** + * Yields the values currently in this mapping. + * + * @return the set of values + */ + public Collection> getValues() { + if (function == null) + return Collections.emptySet(); + return function.values(); + } + + /** + * Yields the map associated with this mapping. + * + * @return the associated map + */ + public Map> getMap() { + return function; + } + + @Override + public StructuredRepresentation representation() { + if (function == null) + return new StringRepresentation("empty"); + + return new MapRepresentation(function, StringRepresentation::new, Lattice::representation); + } +} diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/Lattice.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/Lattice.java index 737264ee8..116a9bd5c 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/Lattice.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/Lattice.java @@ -1,7 +1,8 @@ package it.unive.lisa.analysis; -import it.unive.lisa.analysis.representation.DomainRepresentation; -import it.unive.lisa.analysis.representation.StringRepresentation; +import it.unive.lisa.util.representation.StringRepresentation; +import it.unive.lisa.util.representation.StructuredObject; +import it.unive.lisa.util.representation.StructuredRepresentation; /** * An interface for elements that follow a lattice structure. Implementers of @@ -12,7 +13,7 @@ * * @param the concrete {@link Lattice} instance */ -public interface Lattice> { +public interface Lattice> extends StructuredObject { /** * A string constant that can be used to represent top values. @@ -20,12 +21,12 @@ public interface Lattice> { String TOP_STRING = "#TOP#"; /** - * Yields a fresh {@link DomainRepresentation} that can be used to represent - * top values. + * Yields a fresh {@link StructuredRepresentation} that can be used to + * represent top values through {@link #representation()}. * * @return the representation */ - public static DomainRepresentation topRepresentation() { + public static StructuredRepresentation topRepresentation() { return new StringRepresentation(TOP_STRING); } @@ -35,12 +36,12 @@ public static DomainRepresentation topRepresentation() { String BOTTOM_STRING = "_|_"; /** - * Yields a fresh {@link DomainRepresentation} that can be used to represent - * bottom values. + * Yields a fresh {@link StructuredRepresentation} that can be used to + * represent bottom values through {@link #representation()}. * * @return the representation */ - public static DomainRepresentation bottomRepresentation() { + public static StructuredRepresentation bottomRepresentation() { return new StringRepresentation(BOTTOM_STRING); } @@ -55,7 +56,9 @@ public static DomainRepresentation bottomRepresentation() { * * @throws SemanticException if an error occurs during the computation */ - boolean lessOrEqual(L other) throws SemanticException; + boolean lessOrEqual( + L other) + throws SemanticException; /** * Performs the least upper bound operation between this lattice element and @@ -67,7 +70,9 @@ public static DomainRepresentation bottomRepresentation() { * * @throws SemanticException if an error occurs during the computation */ - L lub(L other) throws SemanticException; + L lub( + L other) + throws SemanticException; /** * Performs the greatest lower upper bound operation between this lattice @@ -79,7 +84,9 @@ public static DomainRepresentation bottomRepresentation() { * * @throws SemanticException if an error occurs during the computation */ - default L glb(L other) throws SemanticException { + default L glb( + L other) + throws SemanticException { return bottom(); } @@ -144,7 +151,9 @@ default boolean isBottom() { * * @throws SemanticException if an error occurs during the computation */ - default L widening(L other) throws SemanticException { + default L widening( + L other) + throws SemanticException { return lub(other); } @@ -160,7 +169,9 @@ default L widening(L other) throws SemanticException { * * @throws SemanticException if an error occurs during the computation */ - default L narrowing(L other) throws SemanticException { + default L narrowing( + L other) + throws SemanticException { return glb(other); } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/OptimizedAnalyzedCFG.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/OptimizedAnalyzedCFG.java index e596bc59f..507c5e6a6 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/OptimizedAnalyzedCFG.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/OptimizedAnalyzedCFG.java @@ -1,10 +1,7 @@ package it.unive.lisa.analysis; -import it.unive.lisa.analysis.heap.HeapDomain; import it.unive.lisa.analysis.lattices.ExpressionSet; import it.unive.lisa.analysis.symbols.SymbolAliasing; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.conf.FixpointConfiguration; import it.unive.lisa.conf.LiSAConfiguration; import it.unive.lisa.interprocedural.FixpointResults; @@ -27,7 +24,6 @@ import it.unive.lisa.program.cfg.statement.call.Call; import it.unive.lisa.program.cfg.statement.call.OpenCall; import it.unive.lisa.program.cfg.statement.call.UnresolvedCall; -import it.unive.lisa.symbolic.SymbolicExpression; import it.unive.lisa.type.Type; import it.unive.lisa.util.collections.workset.FIFOWorkingSet; import it.unive.lisa.util.collections.workset.WorkingSet; @@ -49,32 +45,22 @@ * such that {@link Statement#stopsExecution()} holds), and hotspots (that is, * {@link Statement}s such that {@link LiSAConfiguration#hotspots} holds). * Approximations for other statements can be retrieved through - * {@link #getUnwindedAnalysisStateAfter(Statement)}, that will first expand the - * results using {@link #unwind()}. + * {@link #getUnwindedAnalysisStateAfter(Statement, FixpointConfiguration)}, + * that will first expand the results using + * {@link #unwind(FixpointConfiguration)}. * * @author Luca Negrini * * @param the type of {@link AbstractState} contained into the analysis * state - * @param the type of {@link HeapDomain} contained into the computed - * abstract state - * @param the type of {@link ValueDomain} contained into the computed - * abstract state - * @param the type of {@link TypeDomain} embedded into the computed abstract - * state */ -public class OptimizedAnalyzedCFG< - A extends AbstractState, - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> - extends AnalyzedCFG { +public class OptimizedAnalyzedCFG> extends AnalyzedCFG { private static final Logger LOG = LogManager.getLogger(OptimizedAnalyzedCFG.class); - private final InterproceduralAnalysis interprocedural; + private final InterproceduralAnalysis interprocedural; - private StatementStore expanded; + private StatementStore expanded; /** * Builds the control flow graph, storing the given mapping between nodes @@ -91,10 +77,11 @@ public class OptimizedAnalyzedCFG< * result, and that can be used to unwind the * results */ - public OptimizedAnalyzedCFG(CFG cfg, + public OptimizedAnalyzedCFG( + CFG cfg, ScopeId id, - AnalysisState singleton, - InterproceduralAnalysis interprocedural) { + AnalysisState singleton, + InterproceduralAnalysis interprocedural) { super(cfg, id, singleton); this.interprocedural = interprocedural; } @@ -116,12 +103,13 @@ public OptimizedAnalyzedCFG(CFG cfg, * result, and that can be used to unwind the * results */ - public OptimizedAnalyzedCFG(CFG cfg, + public OptimizedAnalyzedCFG( + CFG cfg, ScopeId id, - AnalysisState singleton, - Map> entryStates, - Map> results, - InterproceduralAnalysis interprocedural) { + AnalysisState singleton, + Map> entryStates, + Map> results, + InterproceduralAnalysis interprocedural) { super(cfg, id, singleton, entryStates, results); this.interprocedural = interprocedural; } @@ -139,21 +127,23 @@ public OptimizedAnalyzedCFG(CFG cfg, * result, and that can be used to unwind the * results */ - public OptimizedAnalyzedCFG(CFG cfg, + public OptimizedAnalyzedCFG( + CFG cfg, ScopeId id, - StatementStore entryStates, - StatementStore results, - InterproceduralAnalysis interprocedural) { + StatementStore entryStates, + StatementStore results, + InterproceduralAnalysis interprocedural) { super(cfg, id, entryStates, results); this.interprocedural = interprocedural; } - private OptimizedAnalyzedCFG(CFG cfg, + private OptimizedAnalyzedCFG( + CFG cfg, ScopeId id, - StatementStore entryStates, - StatementStore results, - StatementStore expanded, - InterproceduralAnalysis interprocedural) { + StatementStore entryStates, + StatementStore results, + StatementStore expanded, + InterproceduralAnalysis interprocedural) { super(cfg, id, entryStates, results); this.interprocedural = interprocedural; this.expanded = expanded; @@ -163,20 +153,24 @@ private OptimizedAnalyzedCFG(CFG cfg, * Yields the computed result at a given statement (exit state). If such a * state is not available as it was discarded due to optimization, and * fixpoint's results have not been unwinded yet, a fixpoint iteration is - * executed in-place through {@link #unwind()}. + * executed in-place through {@link #unwind(FixpointConfiguration)}. * - * @param st the statement + * @param st the statement + * @param conf the {@link FixpointConfiguration} to use for running the fast + * fixpoint computation * * @return the result computed at the given statement */ - public AnalysisState getUnwindedAnalysisStateAfter(Statement st) { + public AnalysisState getUnwindedAnalysisStateAfter( + Statement st, + FixpointConfiguration conf) { if (results.getKeys().contains(st)) return results.getState(st); if (expanded != null) return expanded.getState(st); - unwind(); + unwind(conf); return expanded.getState(st); } @@ -185,44 +179,48 @@ public AnalysisState getUnwindedAnalysisStateAfter(Statement st) { * Runs an ascending fixpoint computation starting with the results * available in this graph, with the purpose of propagating the * approximations held in this result to all the missing nodes. + * + * @param conf the {@link FixpointConfiguration} to use for running the fast + * fixpoint computation */ - public void unwind() { - AnalysisState bottom = results.lattice.bottom(); - StatementStore bot = new StatementStore<>(bottom); - Map> starting = new HashMap<>(); - for (Entry> entry : entryStates) + public void unwind( + FixpointConfiguration conf) { + AnalysisState bottom = results.lattice.bottom(); + StatementStore bot = new StatementStore<>(bottom); + Map> starting = new HashMap<>(); + for (Entry> entry : entryStates) starting.put(entry.getKey(), CompoundState.of(entry.getValue(), bot)); - Map> existing = new HashMap<>(); - CompoundState fallback = CompoundState.of(bottom, bot); - for (Entry> entry : results) { + Map> existing = new HashMap<>(); + CompoundState fallback = CompoundState.of(bottom, bot); + for (Entry> entry : results) { Statement stmt = entry.getKey(); - AnalysisState approx = entry.getValue(); - CompoundState def = existing.getOrDefault(stmt, fallback); + AnalysisState approx = entry.getValue(); + CompoundState def = existing.getOrDefault(stmt, fallback); if (!(stmt instanceof Expression) || ((Expression) stmt).getRootStatement() == stmt) existing.put(stmt, CompoundState.of(approx, def.intermediateStates)); else { Expression e = (Expression) stmt; - CompoundState val = existing.computeIfAbsent(e.getRootStatement(), + CompoundState val = existing.computeIfAbsent(e.getRootStatement(), ex -> CompoundState.of(bottom, bot.bottom())); val.intermediateStates.put(e, approx); } } - AscendingFixpoint asc = new AscendingFixpoint<>(this, 0, new PrecomputedAnalysis()); - Fixpoint> fix = new Fixpoint<>(this, true); + AscendingFixpoint asc = new AscendingFixpoint<>(this, new PrecomputedAnalysis(), conf); + Fixpoint> fix = new Fixpoint<>(this, true); TimerLogger.execAction(LOG, "Unwinding optimizied results of " + this, () -> { try { - Map> res = fix.fixpoint( + Map> res = fix.fixpoint( starting, FIFOWorkingSet.mk(), asc, existing); expanded = new StatementStore<>(bottom); - for (Entry> e : res.entrySet()) { + for (Entry> e : res.entrySet()) { expanded.put(e.getKey(), e.getValue().postState); - for (Entry> ee : e.getValue().intermediateStates) + for (Entry> ee : e.getValue().intermediateStates) expanded.put(ee.getKey(), ee.getValue()); } } catch (FixpointException e) { @@ -239,7 +237,8 @@ public void unwind() { * * @return whether or not a poststate for {@code st} exists */ - public boolean hasPostStateOf(Statement st) { + public boolean hasPostStateOf( + Statement st) { return results.getKeys().contains(st); } @@ -250,14 +249,17 @@ public boolean hasPostStateOf(Statement st) { * @param st the statement * @param postState the poststate */ - public void storePostStateOf(Statement st, AnalysisState postState) { + public void storePostStateOf( + Statement st, + AnalysisState postState) { results.put(st, postState); } - private class PrecomputedAnalysis implements InterproceduralAnalysis { + private class PrecomputedAnalysis implements InterproceduralAnalysis { @Override - public void init(Application app, + public void init( + Application app, CallGraph callgraph, OpenCallPolicy policy) throws InterproceduralAnalysisException { @@ -265,7 +267,8 @@ public void init(Application app, } @Override - public void fixpoint(AnalysisState entryState, + public void fixpoint( + AnalysisState entryState, Class> fixpointWorkingSet, FixpointConfiguration conf) throws FixpointException { @@ -273,59 +276,74 @@ public void fixpoint(AnalysisState entryState, } @Override - public Collection> getAnalysisResultsOf(CFG cfg) { + public Collection> getAnalysisResultsOf( + CFG cfg) { throw new UnsupportedOperationException(); } @Override - public AnalysisState getAbstractResultOf( + public AnalysisState getAbstractResultOf( CFGCall call, - AnalysisState entryState, - ExpressionSet[] parameters, - StatementStore expressions) + AnalysisState entryState, + ExpressionSet[] parameters, + StatementStore expressions) throws SemanticException { Call source = call.getSource() == null ? call : call.getSource(); if (results.getKeys().contains(source)) return results.getState(source); - FixpointResults precomputed = interprocedural.getFixpointResults(); + FixpointResults precomputed = interprocedural.getFixpointResults(); ScopeToken scope = new ScopeToken(call); ScopeId id = getId().push(call); - AnalysisState state = entryState.bottom(); + AnalysisState state = entryState.bottom(); for (CFG target : call.getTargetedCFGs()) { - AnalysisState res = precomputed.getState(target).getState(id).getExitState(); + AnalysisState res = precomputed.getState(target).getState(id).getExitState(); state = state.lub(unscope(call, scope, res)); } return state; } @Override - public AnalysisState getAbstractResultOf(OpenCall call, AnalysisState entryState, - ExpressionSet[] parameters, StatementStore expressions) + public AnalysisState getAbstractResultOf( + OpenCall call, + AnalysisState entryState, + ExpressionSet[] parameters, + StatementStore expressions) throws SemanticException { return interprocedural.getAbstractResultOf(call, entryState, parameters, expressions); } @Override - public Call resolve(UnresolvedCall call, Set[] types, SymbolAliasing aliasing) + public Call resolve( + UnresolvedCall call, + Set[] types, + SymbolAliasing aliasing) throws CallResolutionException { return interprocedural.resolve(call, types, aliasing); } @Override - public FixpointResults getFixpointResults() { + public FixpointResults getFixpointResults() { return interprocedural.getFixpointResults(); } + + @Override + public boolean needsCallGraph() { + // not really needed + return false; + } } @Override - public OptimizedAnalyzedCFG lubAux(AnalyzedCFG other) throws SemanticException { + public OptimizedAnalyzedCFG lubAux( + AnalyzedCFG other) + throws SemanticException { if (!getDescriptor().equals(other.getDescriptor()) || !sameIDs(other) - || !(other instanceof OptimizedAnalyzedCFG)) + || !(other instanceof OptimizedAnalyzedCFG)) throw new SemanticException(CANNOT_LUB_ERROR); - OptimizedAnalyzedCFG o = (OptimizedAnalyzedCFG) other; - return new OptimizedAnalyzedCFG( + OptimizedAnalyzedCFG o = (OptimizedAnalyzedCFG) other; + return new OptimizedAnalyzedCFG( this, id, entryStates.lub(other.entryStates), @@ -335,13 +353,15 @@ public OptimizedAnalyzedCFG lubAux(AnalyzedCFG other) th } @Override - public OptimizedAnalyzedCFG glbAux(AnalyzedCFG other) throws SemanticException { + public OptimizedAnalyzedCFG glbAux( + AnalyzedCFG other) + throws SemanticException { if (!getDescriptor().equals(other.getDescriptor()) || !sameIDs(other) - || !(other instanceof OptimizedAnalyzedCFG)) + || !(other instanceof OptimizedAnalyzedCFG)) throw new SemanticException(CANNOT_GLB_ERROR); - OptimizedAnalyzedCFG o = (OptimizedAnalyzedCFG) other; - return new OptimizedAnalyzedCFG( + OptimizedAnalyzedCFG o = (OptimizedAnalyzedCFG) other; + return new OptimizedAnalyzedCFG( this, id, entryStates.glb(other.entryStates), @@ -351,13 +371,15 @@ public OptimizedAnalyzedCFG glbAux(AnalyzedCFG other) th } @Override - public OptimizedAnalyzedCFG wideningAux(AnalyzedCFG other) throws SemanticException { + public OptimizedAnalyzedCFG wideningAux( + AnalyzedCFG other) + throws SemanticException { if (!getDescriptor().equals(other.getDescriptor()) || !sameIDs(other) - || !(other instanceof OptimizedAnalyzedCFG)) + || !(other instanceof OptimizedAnalyzedCFG)) throw new SemanticException(CANNOT_WIDEN_ERROR); - OptimizedAnalyzedCFG o = (OptimizedAnalyzedCFG) other; - return new OptimizedAnalyzedCFG( + OptimizedAnalyzedCFG o = (OptimizedAnalyzedCFG) other; + return new OptimizedAnalyzedCFG( this, id, entryStates.widening(other.entryStates), @@ -367,13 +389,15 @@ public OptimizedAnalyzedCFG wideningAux(AnalyzedCFG othe } @Override - public OptimizedAnalyzedCFG narrowingAux(AnalyzedCFG other) throws SemanticException { + public OptimizedAnalyzedCFG narrowingAux( + AnalyzedCFG other) + throws SemanticException { if (!getDescriptor().equals(other.getDescriptor()) || !sameIDs(other) - || !(other instanceof OptimizedAnalyzedCFG)) + || !(other instanceof OptimizedAnalyzedCFG)) throw new SemanticException(CANNOT_NARROW_ERROR); - OptimizedAnalyzedCFG o = (OptimizedAnalyzedCFG) other; - return new OptimizedAnalyzedCFG( + OptimizedAnalyzedCFG o = (OptimizedAnalyzedCFG) other; + return new OptimizedAnalyzedCFG( this, id, entryStates.narrowing(other.entryStates), @@ -383,12 +407,12 @@ public OptimizedAnalyzedCFG narrowingAux(AnalyzedCFG oth } @Override - public OptimizedAnalyzedCFG top() { + public OptimizedAnalyzedCFG top() { return new OptimizedAnalyzedCFG<>(this, id.startingId(), entryStates.top(), results.top(), null, null); } @Override - public OptimizedAnalyzedCFG bottom() { + public OptimizedAnalyzedCFG bottom() { return new OptimizedAnalyzedCFG<>(this, id.startingId(), entryStates.bottom(), results.bottom(), null, null); } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/ScopeToken.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/ScopeToken.java index f3c8b2873..0e25a24d1 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/ScopeToken.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/ScopeToken.java @@ -20,7 +20,8 @@ public class ScopeToken { * * @param scoper the code element */ - public ScopeToken(CodeElement scoper) { + public ScopeToken( + CodeElement scoper) { this.scoper = scoper; } @@ -42,7 +43,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/ScopedObject.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/ScopedObject.java new file mode 100644 index 000000000..863b0b281 --- /dev/null +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/ScopedObject.java @@ -0,0 +1,49 @@ +package it.unive.lisa.analysis; + +/** + * An object that can react to the introduction or removal of scopes, modifying + * the variables currently in view. Scoping happens through + * {@link #pushScope(ScopeToken)} and {@link #popScope(ScopeToken)}. + * + * @author Luca Negrini + * + * @param the concrete type of this object, returned by push and pop + * operations + */ +public interface ScopedObject { + + /** + * Pushes a new scope, identified by the give token, in this object. This + * causes all variables not associated with a scope (and thus visible) to be + * mapped to the given scope and hidden away, until the scope is popped with + * {@link #popScope(ScopeToken)}. + * + * @param token the token identifying the scope to push + * + * @return a copy of this object where the local unscoped variables have + * been hidden + * + * @throws SemanticException if an error occurs during the computation + */ + T pushScope( + ScopeToken token) + throws SemanticException; + + /** + * Pops the scope identified by the given token from this object. This + * causes all the visible variables (i.e. that are not mapped to a scope) to + * be removed, while the local variables that were associated to the given + * scope token (and thus hidden) will become visible again. + * + * @param token the token of the scope to be restored + * + * @return a copy of this object where the local variables have been + * removed, while the variables mapped to the given scope are + * visible again + * + * @throws SemanticException if an error occurs during the computation + */ + T popScope( + ScopeToken token) + throws SemanticException; +} diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/SemanticDomain.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/SemanticDomain.java index ef5735fd1..d5b33b634 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/SemanticDomain.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/SemanticDomain.java @@ -1,9 +1,10 @@ package it.unive.lisa.analysis; -import it.unive.lisa.analysis.representation.DomainRepresentation; +import it.unive.lisa.analysis.lattices.Satisfiability; import it.unive.lisa.program.cfg.ProgramPoint; import it.unive.lisa.symbolic.SymbolicExpression; import it.unive.lisa.symbolic.value.Identifier; +import it.unive.lisa.util.representation.StructuredObject; import java.util.Collection; import java.util.HashSet; import java.util.function.Predicate; @@ -20,7 +21,10 @@ * @param the type of variable {@link Identifier} that this domain can * handle */ -public interface SemanticDomain, E extends SymbolicExpression, I extends Identifier> { +public interface SemanticDomain, E extends SymbolicExpression, I extends Identifier> + extends + StructuredObject, + ScopedObject { /** * Yields a copy of this domain, where {@code id} has been assigned to @@ -30,12 +34,18 @@ public interface SemanticDomain, E extends Sym * @param expression the expression to assign * @param pp the program point that where this operation is being * evaluated + * @param oracle the oracle for inter-domain communication * * @return a copy of this domain, modified by the assignment * * @throws SemanticException if an error occurs during the computation */ - D assign(I id, E expression, ProgramPoint pp) throws SemanticException; + D assign( + I id, + E expression, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException; /** * Yields a copy of this domain, that has been modified accordingly to the @@ -44,13 +54,18 @@ public interface SemanticDomain, E extends Sym * @param expression the expression whose semantics need to be computed * @param pp the program point that where this operation is being * evaluated + * @param oracle the oracle for inter-domain communication * * @return a copy of this domain, modified accordingly to the semantics of * {@code expression} * * @throws SemanticException if an error occurs during the computation */ - D smallStepSemantics(E expression, ProgramPoint pp) throws SemanticException; + D smallStepSemantics( + E expression, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException; /** * Yields a copy of this domain, modified by assuming that the given @@ -64,12 +79,29 @@ public interface SemanticDomain, E extends Sym * the given expression * @param dest the program point where the execution will move after * the expression has been assumed + * @param oracle the oracle for inter-domain communication * * @return the (optionally) modified copy of this domain * * @throws SemanticException if an error occurs during the computation */ - D assume(E expression, ProgramPoint src, ProgramPoint dest) throws SemanticException; + D assume( + E expression, + ProgramPoint src, + ProgramPoint dest, + SemanticOracle oracle) + throws SemanticException; + + /** + * Yields {@code true} if this instance is currently tracking abstract + * information for the given identifier. + * + * @param id the identifier + * + * @return whether or not this domain knows about {@code id} + */ + boolean knowsIdentifier( + Identifier id); /** * Forgets an {@link Identifier}. This means that all information regarding @@ -82,7 +114,9 @@ public interface SemanticDomain, E extends Sym * * @throws SemanticException if an error occurs during the computation */ - D forgetIdentifier(Identifier id) throws SemanticException; + D forgetIdentifier( + Identifier id) + throws SemanticException; /** * Forgets all {@link Identifier}s that match the given predicate. This @@ -95,7 +129,9 @@ public interface SemanticDomain, E extends Sym * * @throws SemanticException if an error occurs during the computation */ - D forgetIdentifiersIf(Predicate test) throws SemanticException; + D forgetIdentifiersIf( + Predicate test) + throws SemanticException; /** * Forgets all the given {@link Identifier}s. The default implementation of @@ -108,7 +144,9 @@ public interface SemanticDomain, E extends Sym * * @throws SemanticException if an error occurs during the computation */ - default D forgetIdentifiers(Iterable ids) throws SemanticException { + default D forgetIdentifiers( + Iterable ids) + throws SemanticException { @SuppressWarnings("unchecked") D result = (D) this; for (Identifier id : ids) @@ -123,6 +161,7 @@ default D forgetIdentifiers(Iterable ids) throws SemanticException { * @param expression the expression whose satisfiability is to be evaluated * @param pp the program point that where this operation is being * evaluated + * @param oracle the oracle for inter-domain communication * * @return {@link Satisfiability#SATISFIED} is the expression is satisfied * by the values of this domain, @@ -134,285 +173,11 @@ default D forgetIdentifiers(Iterable ids) throws SemanticException { * * @throws SemanticException if an error occurs during the computation */ - Satisfiability satisfies(E expression, ProgramPoint pp) throws SemanticException; - - /** - * Pushes a new scope, identified by the give token, in the domain. This - * causes information about all variables not associated with a scope (and - * thus visible) to be mapped to the given scope and hidden away, until the - * scope is popped with {@link #popScope(ScopeToken)}. - * - * @param token the token identifying the scope to push - * - * @return a copy of this domain where the local variables have been hidden - * - * @throws SemanticException if an error occurs during the computation - */ - D pushScope(ScopeToken token) throws SemanticException; - - /** - * Pops the scope identified by the given token from the domain. This causes - * all the visible variables (i.e. that are not mapped to a scope) to be - * removed from the domain, while the local variables that were associated - * to the given scope token (and thus hidden) will become visible again. - * - * @param token the token of the scope to be restored - * - * @return a copy of this domain where the local variables have been - * removed, while the variables mapped to the given scope are - * visible again - * - * @throws SemanticException if an error occurs during the computation - */ - D popScope(ScopeToken token) throws SemanticException; - - /** - * The satisfiability of an expression. - * - * @author Luca Negrini - */ - public enum Satisfiability implements Lattice { - /** - * Represent the fact that an expression is satisfied. - */ - SATISFIED { - @Override - public Satisfiability negate() { - return NOT_SATISFIED; - } - - @Override - public Satisfiability and(Satisfiability other) { - return other; - } - - @Override - public Satisfiability or(Satisfiability other) { - return this; - } - - @Override - public Satisfiability lub(Satisfiability other) throws SemanticException { - if (other == UNKNOWN || other == NOT_SATISFIED) - return UNKNOWN; - return this; - } - - @Override - public boolean lessOrEqual(Satisfiability other) throws SemanticException { - return other == this || other == UNKNOWN; - } - - @Override - public Satisfiability glb(Satisfiability other) { - if (other == BOTTOM || other == NOT_SATISFIED) - return BOTTOM; - return this; - } - }, - - /** - * Represent the fact that an expression is not satisfied. - */ - NOT_SATISFIED { - @Override - public Satisfiability negate() { - return SATISFIED; - } - - @Override - public Satisfiability and(Satisfiability other) { - return this; - } - - @Override - public Satisfiability or(Satisfiability other) { - return other; - } - - @Override - public Satisfiability lub(Satisfiability other) throws SemanticException { - if (other == UNKNOWN || other == SATISFIED) - return UNKNOWN; - return this; - } - - @Override - public boolean lessOrEqual(Satisfiability other) throws SemanticException { - return other == this || other == UNKNOWN; - } - - @Override - public Satisfiability glb(Satisfiability other) { - if (other == BOTTOM || other == SATISFIED) - return BOTTOM; - return this; - } - }, - - /** - * Represent the fact that it is not possible to determine whether or - * not an expression is satisfied. - */ - UNKNOWN { - @Override - public Satisfiability negate() { - return this; - } - - @Override - public Satisfiability and(Satisfiability other) { - if (other == NOT_SATISFIED) - return other; - - return this; - } - - @Override - public Satisfiability or(Satisfiability other) { - if (other == SATISFIED) - return other; - - return this; - } - - @Override - public Satisfiability lub(Satisfiability other) throws SemanticException { - return this; - } - - @Override - public boolean lessOrEqual(Satisfiability other) throws SemanticException { - return other == UNKNOWN; - } - - @Override - public Satisfiability glb(Satisfiability other) { - return other; - } - }, - - /** - * Represent the fact that the satisfiability evaluation resulted in an - * error. - */ - BOTTOM { - @Override - public Satisfiability negate() { - return this; - } - - @Override - public Satisfiability and(Satisfiability other) { - return this; - } - - @Override - public Satisfiability or(Satisfiability other) { - return this; - } - - @Override - public Satisfiability lub(Satisfiability other) throws SemanticException { - return other; - } - - @Override - public boolean lessOrEqual(Satisfiability other) throws SemanticException { - return true; - } - - @Override - public Satisfiability glb(Satisfiability other) { - return this; - } - }; - - /** - * Negates the current satisfiability, getting the opposite result. - * - * @return the negation of this satisfiability instance - */ - public abstract Satisfiability negate(); - - /** - * Performs a logical and between this satisfiability and the given one. - * - * @param other the other satisfiability - * - * @return the logical and between the two satisfiability instances - */ - public abstract Satisfiability and(Satisfiability other); - - /** - * Performs a logical or between this satisfiability and the given one. - * - * @param other the other satisfiability - * - * @return the logical or between the two satisfiability instances - */ - public abstract Satisfiability or(Satisfiability other); - - /** - * Performs the greatest lower bound operation between this - * satisfiability and the given one. - * - * @param other the other satisfiability - * - * @return the result of the greatest lower bound - */ - public abstract Satisfiability glb(Satisfiability other); - - /** - * Transforms a boolean value to a {@link Satisfiability} instance. - * - * @param bool the boolean to transform - * - * @return {@link #SATISFIED} if {@code bool} is {@code true}, - * {@link #NOT_SATISFIED} otherwise - */ - public static Satisfiability fromBoolean(boolean bool) { - return bool ? SATISFIED : NOT_SATISFIED; - } - - @Override - public Satisfiability top() { - return UNKNOWN; - } - - @Override - public Satisfiability bottom() { - return BOTTOM; - } - - /** - * Yields whether or not this element can represent a {@code true} - * result. - * - * @return {@code true} if that condition holds - */ - public boolean mightBeTrue() { - return this == SATISFIED || this == UNKNOWN; - } - - /** - * Yields whether or not this element can represent a {@code false} - * result. - * - * @return {@code true} if that condition holds - */ - public boolean mightBeFalse() { - return this == NOT_SATISFIED || this == UNKNOWN; - } - } - - /** - * Yields a {@link DomainRepresentation} of the information contained in - * this domain's instance. - * - * @return the representation - */ - DomainRepresentation representation(); + Satisfiability satisfies( + E expression, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException; /** * Yields a unique instance of the specific domain, of class {@code domain}, @@ -433,7 +198,8 @@ public boolean mightBeFalse() { * @throws SemanticException if an exception happens while lubbing the * results */ - default & Lattice> T getDomainInstance(Class domain) + default & Lattice> T getDomainInstance( + Class domain) throws SemanticException { Collection all = getAllDomainInstances(domain); T result = null; @@ -462,7 +228,8 @@ public boolean mightBeFalse() { * @return the instances of that domain */ @SuppressWarnings("unchecked") - default > Collection getAllDomainInstances(Class domain) { + default > Collection getAllDomainInstances( + Class domain) { Collection result = new HashSet<>(); if (domain.isAssignableFrom(getClass())) result.add((T) this); diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/SemanticEvaluator.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/SemanticEvaluator.java index 9c1ff71d5..fda79b2bf 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/SemanticEvaluator.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/SemanticEvaluator.java @@ -1,7 +1,7 @@ package it.unive.lisa.analysis; +import it.unive.lisa.program.cfg.ProgramPoint; import it.unive.lisa.symbolic.SymbolicExpression; -import it.unive.lisa.symbolic.value.Identifier; /** * An entity that can perform semantic evaluations that is not a @@ -11,25 +11,19 @@ */ public interface SemanticEvaluator { - /** - * Yields {@code true} if the domain tracks information on the identifier - * {@code id}, {@code false} otherwise. - * - * @param id the identifier - * - * @return {@code true} if the domain tracks information on the identifier - * {@code id}, {@code false} otherwise - */ - boolean tracksIdentifiers(Identifier id); - /** * Yields {@code true} if the domain can process {@code expression}, * {@code false} otherwise. * * @param expression the expression + * @param pp the program point where this method is queried + * @param oracle the oracle for inter-domain communication * * @return {@code true} if the domain can process {@code expression}, * {@code false} otherwise. */ - boolean canProcess(SymbolicExpression expression); + boolean canProcess( + SymbolicExpression expression, + ProgramPoint pp, + SemanticOracle oracle); } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/SemanticException.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/SemanticException.java index cbe3c3350..c5b7d1bf8 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/SemanticException.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/SemanticException.java @@ -22,7 +22,9 @@ public SemanticException() { * @param message the message of this exception * @param cause the cause of this exception */ - public SemanticException(String message, Throwable cause) { + public SemanticException( + String message, + Throwable cause) { super(message, cause); } @@ -31,7 +33,8 @@ public SemanticException(String message, Throwable cause) { * * @param message the message of this exception */ - public SemanticException(String message) { + public SemanticException( + String message) { super(message); } @@ -40,7 +43,8 @@ public SemanticException(String message) { * * @param cause the cause of this exception */ - public SemanticException(Throwable cause) { + public SemanticException( + Throwable cause) { super(cause); } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/SemanticExceptionWrapper.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/SemanticExceptionWrapper.java index 385b5a0c3..80a6c7ed4 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/SemanticExceptionWrapper.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/SemanticExceptionWrapper.java @@ -15,7 +15,8 @@ public class SemanticExceptionWrapper extends RuntimeException { * * @param cause the cause of this exception */ - public SemanticExceptionWrapper(SemanticException cause) { + public SemanticExceptionWrapper( + SemanticException cause) { super("A semantic exception happened", cause); } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/SemanticOracle.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/SemanticOracle.java new file mode 100644 index 000000000..b2a0c9ca0 --- /dev/null +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/SemanticOracle.java @@ -0,0 +1,14 @@ +package it.unive.lisa.analysis; + +import it.unive.lisa.analysis.heap.MemoryOracle; +import it.unive.lisa.analysis.type.TypeOracle; +import it.unive.lisa.analysis.value.ValueOracle; + +/** + * An oracle that can be queried for semantic information the program under + * analysis. Instances of this class can be used for inter-domain communication. + * + * @author Luca Negrini + */ +public interface SemanticOracle extends MemoryOracle, ValueOracle, TypeOracle { +} diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/StatementStore.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/StatementStore.java index a75a0099a..87614c447 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/StatementStore.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/StatementStore.java @@ -1,9 +1,6 @@ package it.unive.lisa.analysis; -import it.unive.lisa.analysis.heap.HeapDomain; import it.unive.lisa.analysis.lattices.FunctionalLattice; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.program.cfg.statement.Statement; import java.util.Map; @@ -15,26 +12,24 @@ * @author Luca Negrini * * @param the type of {@link AbstractState} - * @param the type of the {@link HeapDomain} - * @param the type of the {@link ValueDomain} - * @param the type of {@link TypeDomain} */ -public class StatementStore, - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> - extends FunctionalLattice, Statement, AnalysisState> { +public class StatementStore> + extends + FunctionalLattice, Statement, AnalysisState> { /** * Builds the store. * * @param state an instance of the underlying lattice */ - public StatementStore(AnalysisState state) { + public StatementStore( + AnalysisState state) { super(state); } - private StatementStore(AnalysisState state, Map> function) { + private StatementStore( + AnalysisState state, + Map> function) { super(state, function); } @@ -48,7 +43,9 @@ private StatementStore(AnalysisState state, Map put(Statement st, AnalysisState state) { + public AnalysisState put( + Statement st, + AnalysisState state) { if (function == null) function = mkNewFunction(null, false); return function.put(st, state); @@ -59,7 +56,8 @@ public AnalysisState put(Statement st, AnalysisState sta * * @param st the statement whose state needs to be forgotten */ - public void forget(Statement st) { + public void forget( + Statement st) { if (function == null) return; function.remove(st); @@ -68,18 +66,25 @@ public void forget(Statement st) { } @Override - public StatementStore top() { + public StatementStore top() { return new StatementStore<>(lattice.top()); } @Override - public StatementStore bottom() { + public StatementStore bottom() { return new StatementStore<>(lattice.bottom()); } @Override - public StatementStore mk(AnalysisState lattice, - Map> function) { + public StatementStore mk( + AnalysisState lattice, + Map> function) { return new StatementStore<>(lattice, function); } + + @Override + public AnalysisState stateOfUnknown( + Statement key) { + return lattice.bottom(); + } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/dataflow/DataflowDomain.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/dataflow/DataflowDomain.java index a6e5193cf..32490c233 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/dataflow/DataflowDomain.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/dataflow/DataflowDomain.java @@ -3,12 +3,14 @@ import it.unive.lisa.analysis.BaseLattice; import it.unive.lisa.analysis.ScopeToken; import it.unive.lisa.analysis.SemanticException; -import it.unive.lisa.analysis.representation.DomainRepresentation; -import it.unive.lisa.analysis.representation.SetRepresentation; +import it.unive.lisa.analysis.SemanticOracle; +import it.unive.lisa.analysis.lattices.Satisfiability; import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.program.cfg.ProgramPoint; import it.unive.lisa.symbolic.value.Identifier; import it.unive.lisa.symbolic.value.ValueExpression; +import it.unive.lisa.util.representation.SetRepresentation; +import it.unive.lisa.util.representation.StructuredRepresentation; import java.util.Collection; import java.util.HashSet; import java.util.LinkedList; @@ -28,7 +30,9 @@ * domain */ public abstract class DataflowDomain, E extends DataflowElement> - implements BaseLattice, ValueDomain { + implements + BaseLattice, + ValueDomain { private final boolean isTop; @@ -51,7 +55,11 @@ public abstract class DataflowDomain, E extends D * @param isTop whether or not this domain is the top of the lattice * @param isBottom whether or not this domain is the bottom of the lattice */ - public DataflowDomain(E domain, Set elements, boolean isTop, boolean isBottom) { + public DataflowDomain( + E domain, + Set elements, + boolean isTop, + boolean isBottom) { this.elements = elements; this.domain = domain; this.isTop = isTop; @@ -71,23 +79,36 @@ public DataflowDomain(E domain, Set elements, boolean isTop, boolean isBottom * * @return the concrete instance of domain */ - public abstract D mk(E domain, Set elements, boolean isTop, boolean isBottom); + public abstract D mk( + E domain, + Set elements, + boolean isTop, + boolean isBottom); @Override @SuppressWarnings("unchecked") - public D assign(Identifier id, ValueExpression expression, ProgramPoint pp) throws SemanticException { + public D assign( + Identifier id, + ValueExpression expression, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { // if id cannot be tracked by the underlying lattice, // or if the expression cannot be processed, return this - return update(() -> !domain.tracksIdentifiers(id) || !domain.canProcess(expression), + return update(() -> !domain.canProcess(expression, pp, oracle), () -> domain.gen(id, expression, pp, (D) this), () -> domain.kill(id, expression, pp, (D) this)); } @Override @SuppressWarnings("unchecked") - public D smallStepSemantics(ValueExpression expression, ProgramPoint pp) throws SemanticException { + public D smallStepSemantics( + ValueExpression expression, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { // if expression cannot be processed, return this - return update(() -> !domain.canProcess(expression), + return update(() -> !domain.canProcess(expression, pp, oracle), () -> domain.gen(expression, pp, (D) this), () -> domain.kill(expression, pp, (D) this)); } @@ -97,7 +118,10 @@ private interface SemanticElementsSupplier { } @SuppressWarnings("unchecked") - private D update(BooleanSupplier guard, SemanticElementsSupplier gen, SemanticElementsSupplier kill) + private D update( + BooleanSupplier guard, + SemanticElementsSupplier gen, + SemanticElementsSupplier kill) throws SemanticException { if (isBottom()) return (D) this; @@ -116,14 +140,20 @@ private D update(BooleanSupplier guard, SemanticElementsSupplier gen, Semanti @Override @SuppressWarnings("unchecked") - public D assume(ValueExpression expression, ProgramPoint src, ProgramPoint dest) throws SemanticException { - // TODO could be refined + public D assume( + ValueExpression expression, + ProgramPoint src, + ProgramPoint dest, + SemanticOracle oracle) + throws SemanticException { return (D) this; } @Override @SuppressWarnings("unchecked") - public D forgetIdentifier(Identifier id) throws SemanticException { + public D forgetIdentifier( + Identifier id) + throws SemanticException { if (isTop()) return (D) this; @@ -142,7 +172,9 @@ public D forgetIdentifier(Identifier id) throws SemanticException { @Override @SuppressWarnings("unchecked") - public D forgetIdentifiersIf(Predicate test) throws SemanticException { + public D forgetIdentifiersIf( + Predicate test) + throws SemanticException { if (isTop()) return (D) this; @@ -160,8 +192,11 @@ public D forgetIdentifiersIf(Predicate test) throws SemanticExceptio } @Override - public Satisfiability satisfies(ValueExpression expression, ProgramPoint pp) throws SemanticException { - // TODO could be refined + public Satisfiability satisfies( + ValueExpression expression, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { return Satisfiability.UNKNOWN; } @@ -177,7 +212,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -203,7 +239,7 @@ public boolean equals(Object obj) { } @Override - public DomainRepresentation representation() { + public StructuredRepresentation representation() { return new SetRepresentation(elements, DataflowElement::representation); } @@ -238,7 +274,9 @@ public final Set getDataflowElements() { @Override @SuppressWarnings("unchecked") - public D pushScope(ScopeToken scope) throws SemanticException { + public D pushScope( + ScopeToken scope) + throws SemanticException { if (isTop() || isBottom()) return (D) this; @@ -253,7 +291,9 @@ public D pushScope(ScopeToken scope) throws SemanticException { @Override @SuppressWarnings("unchecked") - public D popScope(ScopeToken scope) throws SemanticException { + public D popScope( + ScopeToken scope) + throws SemanticException { if (isTop() || isBottom()) return (D) this; @@ -270,4 +310,10 @@ public D popScope(ScopeToken scope) throws SemanticException { public final String toString() { return representation().toString(); } + + @Override + public boolean knowsIdentifier( + Identifier id) { + return elements.stream().anyMatch(e -> e.getInvolvedIdentifiers().contains(id)); + } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/dataflow/DataflowElement.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/dataflow/DataflowElement.java index e452e78e9..7bc55099f 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/dataflow/DataflowElement.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/dataflow/DataflowElement.java @@ -1,15 +1,18 @@ package it.unive.lisa.analysis.dataflow; -import it.unive.lisa.analysis.ScopeToken; -import it.unive.lisa.analysis.SemanticDomain; +import it.unive.lisa.analysis.ScopedObject; import it.unive.lisa.analysis.SemanticEvaluator; import it.unive.lisa.analysis.SemanticException; -import it.unive.lisa.analysis.representation.DomainRepresentation; +import it.unive.lisa.analysis.SemanticOracle; import it.unive.lisa.program.cfg.ProgramPoint; import it.unive.lisa.symbolic.SymbolicExpression; import it.unive.lisa.symbolic.value.Identifier; +import it.unive.lisa.symbolic.value.PushInv; import it.unive.lisa.symbolic.value.ValueExpression; +import it.unive.lisa.type.Type; +import it.unive.lisa.util.representation.StructuredObject; import java.util.Collection; +import java.util.Set; /** * An element of the dataflow domain, that contains a collection of @@ -27,7 +30,10 @@ * @param the concrete type of {@link DataflowElement} */ public interface DataflowElement, E extends DataflowElement> - extends SemanticEvaluator { + extends + SemanticEvaluator, + StructuredObject, + ScopedObject { /** * Yields all the {@link Identifier}s that are involved in the definition of @@ -53,7 +59,12 @@ public interface DataflowElement, E extends Dataf * * @throws SemanticException if an error occurs during the computation */ - Collection gen(Identifier id, ValueExpression expression, ProgramPoint pp, D domain) throws SemanticException; + Collection gen( + Identifier id, + ValueExpression expression, + ProgramPoint pp, + D domain) + throws SemanticException; /** * The dataflow gen operation, yielding the dataflow elements that @@ -69,7 +80,11 @@ public interface DataflowElement, E extends Dataf * * @throws SemanticException if an error occurs during the computation */ - Collection gen(ValueExpression expression, ProgramPoint pp, D domain) throws SemanticException; + Collection gen( + ValueExpression expression, + ProgramPoint pp, + D domain) + throws SemanticException; /** * The dataflow kill operation, yielding the dataflow elements that @@ -87,7 +102,12 @@ public interface DataflowElement, E extends Dataf * * @throws SemanticException if an error occurs during the computation */ - Collection kill(Identifier id, ValueExpression expression, ProgramPoint pp, D domain) throws SemanticException; + Collection kill( + Identifier id, + ValueExpression expression, + ProgramPoint pp, + D domain) + throws SemanticException; /** * The dataflow kill operation, yielding the dataflow elements that @@ -103,51 +123,37 @@ public interface DataflowElement, E extends Dataf * * @throws SemanticException if an error occurs during the computation */ - Collection kill(ValueExpression expression, ProgramPoint pp, D domain) throws SemanticException; + Collection kill( + ValueExpression expression, + ProgramPoint pp, + D domain) + throws SemanticException; - /** - * Yields a {@link DomainRepresentation} of the information contained in - * this domain's instance. - * - * @return the representation - */ - DomainRepresentation representation(); - - /** - * Push a scope to the dataflow element. - * - * @param token the scope to be pushed - * - * @return the element with the pushed scope - * - * @throws SemanticException if the scope cannot be pushed - * - * @see SemanticDomain#pushScope(ScopeToken) - */ - E pushScope(ScopeToken token) throws SemanticException; + @Override + default boolean canProcess( + SymbolicExpression expression, + ProgramPoint pp, + SemanticOracle oracle) { + if (expression instanceof PushInv) + // the type approximation of a pushinv is bottom, so the below check + // will always fail regardless of the kind of value we are tracking + return expression.getStaticType().isValueType(); - /** - * Pop a scope to the dataflow element. - * - * @param token the scope to be popped - * - * @return the element with the popped scope - * - * @throws SemanticException if the scope cannot be popped - * - * @see SemanticDomain#popScope(ScopeToken) - */ - E popScope(ScopeToken token) throws SemanticException; + Set rts = null; + try { + rts = oracle.getRuntimeTypesOf(expression, pp, oracle); + } catch (SemanticException e) { + return false; + } - @Override - default boolean tracksIdentifiers(Identifier id) { - return canProcess(id); - } + if (rts == null || rts.isEmpty()) + // if we have no runtime types, either the type domain has no type + // information for the given expression (thus it can be anything, + // also something that we can track) or the computation returned + // bottom (and the whole state is likely going to go to bottom + // anyway). + return true; - @Override - default boolean canProcess(SymbolicExpression expression) { - if (expression.hasRuntimeTypes()) - return expression.getRuntimeTypes(null).stream().anyMatch(t -> !t.isPointerType() && !t.isInMemoryType()); - return !expression.getStaticType().isPointerType() && !expression.getStaticType().isInMemoryType(); + return rts.stream().anyMatch(Type::isValueType); } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/dataflow/DefiniteDataflowDomain.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/dataflow/DefiniteDataflowDomain.java new file mode 100644 index 000000000..8273fde47 --- /dev/null +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/dataflow/DefiniteDataflowDomain.java @@ -0,0 +1,72 @@ +package it.unive.lisa.analysis.dataflow; + +import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.lattices.InverseSetLattice; +import java.util.HashSet; +import java.util.Set; +import org.apache.commons.collections4.SetUtils; + +/** + * A {@link DataflowDomain} for definite dataflow analysis. Being + * definite means that this domain is an instance of {@link InverseSetLattice}, + * i.e., is a set whose join operation is the set intersection. + * + * @author Luca Negrini + * + * @param the type of {@link DataflowElement} contained in this domain + */ +public class DefiniteDataflowDomain, E>> + extends + DataflowDomain, E> { + + /** + * Builds an empty domain. + * + * @param domain a singleton instance to be used during semantic operations + * to perform kill and gen operations + */ + public DefiniteDataflowDomain( + E domain) { + this(domain, new HashSet<>(), true, false); + } + + private DefiniteDataflowDomain( + E domain, + Set elements, + boolean isTop, + boolean isBottom) { + super(domain, elements, isTop, isBottom); + } + + @Override + public DefiniteDataflowDomain mk( + E domain, + Set elements, + boolean isTop, + boolean isBottom) { + return new DefiniteDataflowDomain<>(domain, elements, isTop, isBottom); + } + + @Override + public DefiniteDataflowDomain lubAux( + DefiniteDataflowDomain other) + throws SemanticException { + Set intersection = SetUtils.intersection(this.getDataflowElements(), other.getDataflowElements()); + return new DefiniteDataflowDomain<>(domain, intersection, false, false); + } + + @Override + public boolean lessOrEqualAux( + DefiniteDataflowDomain other) + throws SemanticException { + return this.getDataflowElements().containsAll(other.getDataflowElements()); + } + + @Override + public DefiniteDataflowDomain glbAux( + DefiniteDataflowDomain other) + throws SemanticException { + Set intersection = SetUtils.union(this.getDataflowElements(), other.getDataflowElements()); + return new DefiniteDataflowDomain<>(domain, intersection, false, false); + } +} diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/dataflow/DefiniteForwardDataflowDomain.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/dataflow/DefiniteForwardDataflowDomain.java deleted file mode 100644 index 7436a8231..000000000 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/dataflow/DefiniteForwardDataflowDomain.java +++ /dev/null @@ -1,57 +0,0 @@ -package it.unive.lisa.analysis.dataflow; - -import it.unive.lisa.analysis.SemanticException; -import it.unive.lisa.analysis.lattices.InverseSetLattice; -import java.util.HashSet; -import java.util.Set; -import org.apache.commons.collections4.SetUtils; - -/** - * A {@link DataflowDomain} for forward and definite dataflow - * analysis. Being definite means that this domain is an instance of - * {@link InverseSetLattice}, i.e., is a set whose join operation is the set - * intersection. - * - * @author Luca Negrini - * - * @param the type of {@link DataflowElement} contained in this domain - */ -public class DefiniteForwardDataflowDomain, E>> - extends DataflowDomain, E> { - - /** - * Builds an empty domain. - * - * @param domain a singleton instance to be used during semantic operations - * to perform kill and gen operations - */ - public DefiniteForwardDataflowDomain(E domain) { - this(domain, new HashSet<>(), true, false); - } - - private DefiniteForwardDataflowDomain(E domain, Set elements, boolean isTop, boolean isBottom) { - super(domain, elements, isTop, isBottom); - } - - @Override - public DefiniteForwardDataflowDomain mk(E domain, Set elements, boolean isTop, boolean isBottom) { - return new DefiniteForwardDataflowDomain<>(domain, elements, isTop, isBottom); - } - - @Override - public DefiniteForwardDataflowDomain lubAux(DefiniteForwardDataflowDomain other) throws SemanticException { - Set intersection = SetUtils.intersection(this.getDataflowElements(), other.getDataflowElements()); - return new DefiniteForwardDataflowDomain<>(domain, intersection, false, false); - } - - @Override - public boolean lessOrEqualAux(DefiniteForwardDataflowDomain other) throws SemanticException { - return this.getDataflowElements().containsAll(other.getDataflowElements()); - } - - @Override - public DefiniteForwardDataflowDomain glbAux(DefiniteForwardDataflowDomain other) throws SemanticException { - Set intersection = SetUtils.union(this.getDataflowElements(), other.getDataflowElements()); - return new DefiniteForwardDataflowDomain<>(domain, intersection, false, false); - } -} diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/dataflow/PossibleDataflowDomain.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/dataflow/PossibleDataflowDomain.java new file mode 100644 index 000000000..cdb35ed09 --- /dev/null +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/dataflow/PossibleDataflowDomain.java @@ -0,0 +1,72 @@ +package it.unive.lisa.analysis.dataflow; + +import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.lattices.SetLattice; +import java.util.HashSet; +import java.util.Set; +import org.apache.commons.collections4.SetUtils; + +/** + * A {@link DataflowDomain} for possible dataflow analysis. Being + * possible means that this domain is an instance of {@link SetLattice}, i.e., + * is a set whose join operation is the set union. + * + * @author Luca Negrini + * + * @param the type of {@link DataflowElement} contained in this domain + */ +public class PossibleDataflowDomain, E>> + extends + DataflowDomain, E> { + + /** + * Builds an empty domain. + * + * @param domain a singleton instance to be used during semantic operations + * to perform kill and gen operations + */ + public PossibleDataflowDomain( + E domain) { + super(domain, new HashSet<>(), true, false); + } + + private PossibleDataflowDomain( + E domain, + Set elements, + boolean isTop, + boolean isBottom) { + super(domain, elements, isTop, isBottom); + } + + @Override + public PossibleDataflowDomain mk( + E domain, + Set elements, + boolean isTop, + boolean isBottom) { + return new PossibleDataflowDomain<>(domain, elements, isTop, isBottom); + } + + @Override + public PossibleDataflowDomain lubAux( + PossibleDataflowDomain other) + throws SemanticException { + Set union = SetUtils.union(this.getDataflowElements(), other.getDataflowElements()); + return new PossibleDataflowDomain<>(domain, union, false, false); + } + + @Override + public boolean lessOrEqualAux( + PossibleDataflowDomain other) + throws SemanticException { + return other.getDataflowElements().containsAll(this.getDataflowElements()); + } + + @Override + public PossibleDataflowDomain glbAux( + PossibleDataflowDomain other) + throws SemanticException { + Set intersection = SetUtils.intersection(this.getDataflowElements(), other.getDataflowElements()); + return new PossibleDataflowDomain<>(domain, intersection, false, false); + } +} diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/dataflow/PossibleForwardDataflowDomain.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/dataflow/PossibleForwardDataflowDomain.java deleted file mode 100644 index da0bd8454..000000000 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/dataflow/PossibleForwardDataflowDomain.java +++ /dev/null @@ -1,56 +0,0 @@ -package it.unive.lisa.analysis.dataflow; - -import it.unive.lisa.analysis.SemanticException; -import it.unive.lisa.analysis.lattices.SetLattice; -import java.util.HashSet; -import java.util.Set; -import org.apache.commons.collections4.SetUtils; - -/** - * A {@link DataflowDomain} for forward and possible dataflow - * analysis. Being possible means that this domain is an instance of - * {@link SetLattice}, i.e., is a set whose join operation is the set union. - * - * @author Luca Negrini - * - * @param the type of {@link DataflowElement} contained in this domain - */ -public class PossibleForwardDataflowDomain, E>> extends - DataflowDomain, E> { - - /** - * Builds an empty domain. - * - * @param domain a singleton instance to be used during semantic operations - * to perform kill and gen operations - */ - public PossibleForwardDataflowDomain(E domain) { - super(domain, new HashSet<>(), true, false); - } - - private PossibleForwardDataflowDomain(E domain, Set elements, boolean isTop, boolean isBottom) { - super(domain, elements, isTop, isBottom); - } - - @Override - public PossibleForwardDataflowDomain mk(E domain, Set elements, boolean isTop, boolean isBottom) { - return new PossibleForwardDataflowDomain<>(domain, elements, isTop, isBottom); - } - - @Override - public PossibleForwardDataflowDomain lubAux(PossibleForwardDataflowDomain other) throws SemanticException { - Set union = SetUtils.union(this.getDataflowElements(), other.getDataflowElements()); - return new PossibleForwardDataflowDomain<>(domain, union, false, false); - } - - @Override - public boolean lessOrEqualAux(PossibleForwardDataflowDomain other) throws SemanticException { - return other.getDataflowElements().containsAll(this.getDataflowElements()); - } - - @Override - public PossibleForwardDataflowDomain glbAux(PossibleForwardDataflowDomain other) throws SemanticException { - Set intersection = SetUtils.intersection(this.getDataflowElements(), other.getDataflowElements()); - return new PossibleForwardDataflowDomain<>(domain, intersection, false, false); - } -} diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/heap/BaseHeapDomain.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/heap/BaseHeapDomain.java index 22a9894b4..cc71a3c85 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/heap/BaseHeapDomain.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/heap/BaseHeapDomain.java @@ -3,6 +3,7 @@ import it.unive.lisa.analysis.BaseLattice; import it.unive.lisa.analysis.ScopeToken; import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.SemanticOracle; import it.unive.lisa.analysis.lattices.ExpressionSet; import it.unive.lisa.program.cfg.ProgramPoint; import it.unive.lisa.symbolic.ExpressionVisitor; @@ -12,6 +13,7 @@ import it.unive.lisa.symbolic.value.Constant; import it.unive.lisa.symbolic.value.Identifier; import it.unive.lisa.symbolic.value.PushAny; +import it.unive.lisa.symbolic.value.PushInv; import it.unive.lisa.symbolic.value.Skip; import it.unive.lisa.symbolic.value.TernaryExpression; import it.unive.lisa.symbolic.value.UnaryExpression; @@ -21,8 +23,9 @@ /** * A base implementation of the {@link HeapDomain} interface, handling base - * cases of {@link #smallStepSemantics(SymbolicExpression, ProgramPoint)}. All - * implementers of {@link HeapDomain} should inherit from this class for + * cases of + * {@link #smallStepSemantics(SymbolicExpression, ProgramPoint, SemanticOracle)}. + * All implementers of {@link HeapDomain} should inherit from this class for * ensuring a consistent behavior on the base cases, unless explicitly needed. * * @author Luca Negrini @@ -33,32 +36,36 @@ public interface BaseHeapDomain> extends BaseLattice @Override @SuppressWarnings("unchecked") - default H smallStepSemantics(SymbolicExpression expression, ProgramPoint pp) throws SemanticException { + default H smallStepSemantics( + SymbolicExpression expression, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { if (expression instanceof HeapExpression) - return semanticsOf((HeapExpression) expression, pp); + return semanticsOf((HeapExpression) expression, pp, oracle); if (expression instanceof UnaryExpression) { UnaryExpression unary = (UnaryExpression) expression; - return smallStepSemantics(unary.getExpression(), pp); + return smallStepSemantics(unary.getExpression(), pp, oracle); } if (expression instanceof BinaryExpression) { BinaryExpression binary = (BinaryExpression) expression; - H sem = smallStepSemantics(binary.getLeft(), pp); + H sem = smallStepSemantics(binary.getLeft(), pp, oracle); if (sem.isBottom()) return sem; - return sem.smallStepSemantics(binary.getRight(), pp); + return sem.smallStepSemantics(binary.getRight(), pp, oracle); } if (expression instanceof TernaryExpression) { TernaryExpression ternary = (TernaryExpression) expression; - H sem1 = smallStepSemantics(ternary.getLeft(), pp); + H sem1 = smallStepSemantics(ternary.getLeft(), pp, oracle); if (sem1.isBottom()) return sem1; - H sem2 = sem1.smallStepSemantics(ternary.getMiddle(), pp); + H sem2 = sem1.smallStepSemantics(ternary.getMiddle(), pp, oracle); if (sem2.isBottom()) return sem2; - return sem2.smallStepSemantics(ternary.getRight(), pp); + return sem2.smallStepSemantics(ternary.getRight(), pp, oracle); } if (expression instanceof ValueExpression) @@ -77,17 +84,22 @@ default H smallStepSemantics(SymbolicExpression expression, ProgramPoint pp) thr * * @return a new instance of this domain */ - public abstract H mk(H reference); + public abstract H mk( + H reference); @Override @SuppressWarnings("unchecked") - default H pushScope(ScopeToken scope) throws SemanticException { + default H pushScope( + ScopeToken scope) + throws SemanticException { return (H) this; } @Override @SuppressWarnings("unchecked") - default H popScope(ScopeToken scope) throws SemanticException { + default H popScope( + ScopeToken scope) + throws SemanticException { return (H) this; } @@ -98,12 +110,17 @@ default H popScope(ScopeToken scope) throws SemanticException { * @param expression the expression to evaluate * @param pp the program point that where this expression is being * evaluated + * @param oracle the oracle for inter-domain communication * * @return a new instance of this domain * * @throws SemanticException if an error occurs during the computation */ - public abstract H semanticsOf(HeapExpression expression, ProgramPoint pp) throws SemanticException; + public abstract H semanticsOf( + HeapExpression expression, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException; /** * An {@link ExpressionVisitor} that rewrites {@link SymbolicExpression}s to @@ -112,80 +129,99 @@ default H popScope(ScopeToken scope) throws SemanticException { * * @author Luca Negrini */ - public abstract static class Rewriter implements ExpressionVisitor> { + public abstract static class Rewriter implements ExpressionVisitor { @Override - public ExpressionSet visit(UnaryExpression expression, - ExpressionSet arg, - Object... params) throws SemanticException { - Set result = new HashSet<>(); - for (ValueExpression expr : arg) { + public ExpressionSet visit( + UnaryExpression expression, + ExpressionSet arg, + Object... params) + throws SemanticException { + Set result = new HashSet<>(); + for (SymbolicExpression expr : arg) { UnaryExpression e = new UnaryExpression(expression.getStaticType(), expr, expression.getOperator(), expression.getCodeLocation()); - if (expr.hasRuntimeTypes()) - e.setRuntimeTypes(expr.getRuntimeTypes(null)); result.add(e); } - return new ExpressionSet<>(result); + return new ExpressionSet(result); } @Override - public ExpressionSet visit(BinaryExpression expression, - ExpressionSet left, - ExpressionSet right, Object... params) throws SemanticException { - Set result = new HashSet<>(); - for (ValueExpression l : left) - for (ValueExpression r : right) { + public ExpressionSet visit( + BinaryExpression expression, + ExpressionSet left, + ExpressionSet right, + Object... params) + throws SemanticException { + Set result = new HashSet<>(); + for (SymbolicExpression l : left) + for (SymbolicExpression r : right) { BinaryExpression e = new BinaryExpression(expression.getStaticType(), l, r, expression.getOperator(), expression.getCodeLocation()); - if (expression.hasRuntimeTypes()) - e.setRuntimeTypes(expression.getRuntimeTypes(null)); result.add(e); } - return new ExpressionSet<>(result); + return new ExpressionSet(result); } @Override - public ExpressionSet visit(TernaryExpression expression, - ExpressionSet left, - ExpressionSet middle, ExpressionSet right, Object... params) + public ExpressionSet visit( + TernaryExpression expression, + ExpressionSet left, + ExpressionSet middle, + ExpressionSet right, + Object... params) throws SemanticException { - Set result = new HashSet<>(); - for (ValueExpression l : left) - for (ValueExpression m : middle) - for (ValueExpression r : right) { + Set result = new HashSet<>(); + for (SymbolicExpression l : left) + for (SymbolicExpression m : middle) + for (SymbolicExpression r : right) { TernaryExpression e = new TernaryExpression(expression.getStaticType(), l, m, r, expression.getOperator(), expression.getCodeLocation()); - if (expression.hasRuntimeTypes()) - e.setRuntimeTypes(expression.getRuntimeTypes(null)); result.add(e); } - return new ExpressionSet<>(result); + return new ExpressionSet(result); } @Override - public ExpressionSet visit(Skip expression, Object... params) throws SemanticException { - return new ExpressionSet<>(expression); + public ExpressionSet visit( + Skip expression, + Object... params) + throws SemanticException { + return new ExpressionSet(expression); + } + + @Override + public ExpressionSet visit( + PushAny expression, + Object... params) + throws SemanticException { + return new ExpressionSet(expression); } @Override - public ExpressionSet visit(PushAny expression, Object... params) + public ExpressionSet visit( + PushInv expression, + Object... params) throws SemanticException { - return new ExpressionSet<>(expression); + return new ExpressionSet(expression); } @Override - public ExpressionSet visit(Constant expression, Object... params) + public ExpressionSet visit( + Constant expression, + Object... params) throws SemanticException { - return new ExpressionSet<>(expression); + return new ExpressionSet(expression); } @Override - public ExpressionSet visit(Identifier expression, Object... params) + public ExpressionSet visit( + Identifier expression, + Object... params) throws SemanticException { - return new ExpressionSet<>(expression); + return new ExpressionSet(expression); } } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/heap/HeapDomain.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/heap/HeapDomain.java index 75aa07e2c..cfdf5ec15 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/heap/HeapDomain.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/heap/HeapDomain.java @@ -2,16 +2,10 @@ import it.unive.lisa.analysis.Lattice; import it.unive.lisa.analysis.SemanticDomain; -import it.unive.lisa.analysis.SemanticException; -import it.unive.lisa.analysis.lattices.ExpressionSet; -import it.unive.lisa.program.cfg.ProgramPoint; import it.unive.lisa.symbolic.SymbolicExpression; import it.unive.lisa.symbolic.heap.HeapExpression; import it.unive.lisa.symbolic.value.HeapLocation; import it.unive.lisa.symbolic.value.Identifier; -import it.unive.lisa.symbolic.value.ValueExpression; -import java.util.HashSet; -import java.util.Set; /** * A semantic domain that can evaluate the semantic of statements that operate @@ -24,58 +18,9 @@ * @param the concrete type of the {@link HeapDomain} */ public interface HeapDomain> - extends SemanticDomain, Lattice, HeapSemanticOperation { - - /** - * Rewrites a {@link SymbolicExpression}, getting rid of the parts that - * access heap structures, substituting them with synthetic - * {@link HeapLocation}s representing the accessed locations. The expression - * returned by this method should not contain {@link HeapExpression}s.
- *
- * If no rewriting is necessary, the input expression can be returned - * instead.
- * - * @param expression the expression to rewrite - * @param pp the program point that where this expression is being - * rewritten - * - * @return the rewritten expression, or the original one - * - * @throws SemanticException if something goes wrong during the rewriting - */ - ExpressionSet rewrite(SymbolicExpression expression, ProgramPoint pp) throws SemanticException; - - /** - * Rewrites all {@link SymbolicExpression}s, getting rid of the parts that - * access heap structures, substituting them with synthetic - * {@link HeapLocation}s representing the accessed locations. The - * expressions returned by this method should not contain - * {@link HeapExpression}s.
- *
- * If no rewriting is necessary, the returned {@link ExpressionSet} will - * contain the input expressions.
- *
- * The default implementation of this method simply iterates over the input - * expressions, invoking {@link #rewrite(SymbolicExpression, ProgramPoint)} - * on all of them.
- *
- * The collection returned by this method usually contains one expression, - * but instances created through lattice operations (e.g., lub) might - * contain more. - * - * @param expressions the expressions to rewrite - * @param pp the program point that where this expressions are - * being rewritten - * - * @return the rewritten expressions, or the original ones - * - * @throws SemanticException if something goes wrong during the rewriting - */ - default ExpressionSet rewriteAll(ExpressionSet expressions, ProgramPoint pp) - throws SemanticException { - Set result = new HashSet<>(); - for (SymbolicExpression expr : expressions) - result.addAll(rewrite(expr, pp).elements()); - return new ExpressionSet<>(result); - } + extends + MemoryOracle, + SemanticDomain, + Lattice, + HeapSemanticOperation { } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/heap/HeapSemanticOperation.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/heap/HeapSemanticOperation.java index 1bb13cc71..8bb76a423 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/heap/HeapSemanticOperation.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/heap/HeapSemanticOperation.java @@ -67,7 +67,8 @@ public HeapReplacement() { * * @param id the identifier to add */ - public void addSource(Identifier id) { + public void addSource( + Identifier id) { sources.add(id); } @@ -77,7 +78,8 @@ public void addSource(Identifier id) { * * @param id the identifier to add */ - public void addTarget(Identifier id) { + public void addTarget( + Identifier id) { targets.add(id); } @@ -124,7 +126,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/heap/MemoryOracle.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/heap/MemoryOracle.java new file mode 100644 index 000000000..389e031e9 --- /dev/null +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/heap/MemoryOracle.java @@ -0,0 +1,195 @@ +package it.unive.lisa.analysis.heap; + +import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.SemanticOracle; +import it.unive.lisa.analysis.lattices.ExpressionSet; +import it.unive.lisa.analysis.lattices.Satisfiability; +import it.unive.lisa.program.cfg.ProgramPoint; +import it.unive.lisa.symbolic.SymbolicExpression; +import it.unive.lisa.symbolic.heap.HeapExpression; +import it.unive.lisa.symbolic.value.HeapLocation; +import it.unive.lisa.symbolic.value.Identifier; +import it.unive.lisa.symbolic.value.MemoryPointer; +import it.unive.lisa.symbolic.value.ValueExpression; +import java.util.HashSet; +import java.util.Set; + +/** + * An oracle that can be queried for information about the static and dynamic + * memory of the program. + * + * @author Luca Negrini + */ +public interface MemoryOracle { + + /** + * Rewrites the given expression to a simpler form containing no sub + * expressions regarding the heap (that is, {@link HeapExpression}s). Every + * expression contained in the result can be safely cast to + * {@link ValueExpression}. + * + * @param expression the expression to rewrite + * @param pp the program point where the rewrite happens + * @param oracle the oracle for inter-domain communication + * + * @return the rewritten expressions + * + * @throws SemanticException if something goes wrong while rewriting + */ + ExpressionSet rewrite( + SymbolicExpression expression, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException; + + /** + * Rewrites the given expressions to a simpler form containing no sub + * expressions regarding the heap (that is, {@link HeapExpression}s). Every + * expression contained in the result can be safely cast to + * {@link ValueExpression}. + * + * @param expressions the expressions to rewrite + * @param pp the program point where the rewrite happens + * @param oracle the oracle for inter-domain communication + * + * @return the rewritten expressions + * + * @throws SemanticException if something goes wrong while rewriting + */ + default ExpressionSet rewrite( + ExpressionSet expressions, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + Set result = new HashSet<>(); + for (SymbolicExpression expr : expressions) + if (!expr.mightNeedRewriting()) + result.add(expr); + else + result.addAll(rewrite(expr, pp, oracle).elements()); + return new ExpressionSet(result); + } + + /** + * Yields whether or not the two given expressions are aliases, that is, if + * they point to the same region of memory. Note that, for this method to + * return {@link Satisfiability#SATISFIED}, both expressions should be + * pointers to other expressions. + * + * @param x the first expression + * @param y the second expression + * @param pp the {@link ProgramPoint} where the computation happens + * @param oracle the oracle for inter-domain communication + * + * @return whether or not the two expressions are aliases + * + * @throws SemanticException if something goes wrong during the computation + */ + Satisfiability alias( + SymbolicExpression x, + SymbolicExpression y, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException; + + /** + * Yields all the {@link Identifier}s that are reachable starting from the + * {@link Identifier} represented (directly or after rewriting) by the given + * expression. This corresponds to recursively explore the memory region + * reachable by {@code e}, traversing all possible pointers until no more + * are available. + * + * @param e the expression corresponding to the starting point + * @param pp the {@link ProgramPoint} where the computation happens + * @param oracle the oracle for inter-domain communication + * + * @return the expressions representing memory regions reachable from + * {@code e} + * + * @throws SemanticException if something goes wrong during the computation + */ + default ExpressionSet reachableFrom( + SymbolicExpression e, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + Set ws = new HashSet<>(); + ws.add(e); + + Set result = new HashSet<>(); + Set prev = new HashSet<>(); + Set locs = new HashSet<>(); + rewrite(e, pp, oracle).elements().stream().forEach(result::add); + + do { + ws.addAll(locs); + prev = new HashSet<>(result); + for (SymbolicExpression id : ws) { + ExpressionSet rewritten = rewrite(id, pp, oracle); + locs = new HashSet<>(); + for (SymbolicExpression r : rewritten) { + if (r instanceof MemoryPointer) { + HeapLocation l = ((MemoryPointer) r).getReferencedLocation(); + locs.add(l); + result.add(l); + } else + locs.add(r); + } + } + } while (!prev.equals(result)); + + return new ExpressionSet(result); + } + + /** + * Yields whether or not the {@link Identifier} represented (directly or + * after rewriting) by the second expression is reachable starting from the + * {@link Identifier} represented (directly or after rewriting) by the first + * expression. Note that, for this method to return + * {@link Satisfiability#SATISFIED}, not only {@code x} needs to be a + * pointer to another expression, but the latter should be a pointer as + * well, and so on until {@code y} is reached. + * + * @param x the first expression + * @param y the second expression + * @param pp the {@link ProgramPoint} where the computation happens + * @param oracle the oracle for inter-domain communication + * + * @return whether or not the second expression can be reached from the + * first one + * + * @throws SemanticException if something goes wrong during the computation + */ + Satisfiability isReachableFrom( + SymbolicExpression x, + SymbolicExpression y, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException; + + /** + * Yields whether or not the {@link Identifier} represented (directly or + * after rewriting) by the second expression is reachable starting from the + * {@link Identifier} represented (directly or after rewriting) by the first + * expression, and vice versa. This is equivalent to invoking + * {@code isReachableFrom(x, y, pp, oracle).and(isReachableFrom(y, x, pp, oracle))}, + * that corresponds to the default implementation of this method. + * + * @param x the first expression + * @param y the second expression + * @param pp the {@link ProgramPoint} where the computation happens + * @param oracle the oracle for inter-domain communication + * + * @return whether or not the two expressions are mutually reachable + * + * @throws SemanticException if something goes wrong during the computation + */ + default Satisfiability areMutuallyReachable( + SymbolicExpression x, + SymbolicExpression y, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + return isReachableFrom(x, y, pp, oracle).and(isReachableFrom(y, x, pp, oracle)); + } +} diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/lattices/ExpressionInverseSet.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/lattices/ExpressionInverseSet.java new file mode 100644 index 000000000..435a9bfb6 --- /dev/null +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/lattices/ExpressionInverseSet.java @@ -0,0 +1,161 @@ +package it.unive.lisa.analysis.lattices; + +import it.unive.lisa.analysis.ScopeToken; +import it.unive.lisa.analysis.ScopedObject; +import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.SemanticExceptionWrapper; +import it.unive.lisa.symbolic.SymbolicExpression; +import it.unive.lisa.symbolic.value.Identifier; +import it.unive.lisa.util.collections.CollectionUtilities; +import java.util.Collection; +import java.util.Collections; +import java.util.HashSet; +import java.util.Set; +import java.util.function.Predicate; +import java.util.stream.Collectors; + +/** + * An inverse set lattice containing a set of symbolic expressions. + * + * @author Vincenzo Arceri + */ +public class ExpressionInverseSet extends InverseSetLattice + implements + ScopedObject { + + /** + * Builds the empty set lattice element. + */ + public ExpressionInverseSet() { + this(Collections.emptySet(), false); + } + + /** + * Builds a singleton set lattice element. + * + * @param exp the expression + */ + public ExpressionInverseSet( + SymbolicExpression exp) { + this(Collections.singleton(exp), false); + } + + /** + * Builds a set lattice element. + * + * @param set the set of expression + */ + public ExpressionInverseSet( + Set set) { + this(set, false); + } + + private ExpressionInverseSet( + boolean isTop) { + this(Collections.emptySet(), isTop); + } + + private ExpressionInverseSet( + Set set, + boolean isTop) { + super(set, isTop); + } + + @Override + public ExpressionInverseSet top() { + return new ExpressionInverseSet(true); + } + + @Override + public ExpressionInverseSet bottom() { + return new ExpressionInverseSet(); + } + + @Override + public ExpressionInverseSet mk( + Set set) { + return new ExpressionInverseSet(set); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = super.hashCode(); + result = prime * result + (isTop ? 1231 : 1237); + return result; + } + + @Override + public boolean equals( + Object obj) { + if (this == obj) + return true; + if (!super.equals(obj)) + return false; + if (getClass() != obj.getClass()) + return false; + ExpressionInverseSet other = (ExpressionInverseSet) obj; + if (isTop != other.isTop) + return false; + return true; + } + + @Override + public ExpressionInverseSet lubAux( + ExpressionInverseSet other) + throws SemanticException { + Set lub = new HashSet<>(exceptIds()); + lub.retainAll(other.exceptIds()); + + Set idlub = new HashSet<>(); + CollectionUtilities.meet(onlyIds(), other.onlyIds(), idlub, ( + id1, + id2) -> id1.getName().equals(id2.getName()), + ExpressionInverseSet::wrapper); + idlub.forEach(lub::add); + + return new ExpressionInverseSet(lub); + } + + private static Identifier wrapper( + Identifier id1, + Identifier id2) { + try { + // we keep using the lub here as it is basically an equality + // operator, distinguishing only between weak and strong identifiers + return id1.lub(id2); + } catch (SemanticException e) { + throw new SemanticExceptionWrapper(e); + } + } + + private Collection onlyIds() { + return elements.stream().filter(Identifier.class::isInstance).map(Identifier.class::cast) + .collect(Collectors.toSet()); + } + + private Collection exceptIds() { + return elements.stream().filter(Predicate.not(Identifier.class::isInstance)) + .collect(Collectors.toSet()); + } + + @Override + public ExpressionInverseSet pushScope( + ScopeToken token) + throws SemanticException { + Set mapped = new HashSet<>(); + for (SymbolicExpression exp : elements) + mapped.add(exp.pushScope(token)); + return new ExpressionInverseSet(mapped); + } + + @Override + public ExpressionInverseSet popScope( + ScopeToken token) + throws SemanticException { + Set mapped = new HashSet<>(); + for (SymbolicExpression exp : elements) + mapped.add(exp.popScope(token)); + return new ExpressionInverseSet(mapped); + } +} diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/lattices/ExpressionSet.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/lattices/ExpressionSet.java index 6cda8d1db..9891c7d97 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/lattices/ExpressionSet.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/lattices/ExpressionSet.java @@ -1,11 +1,9 @@ package it.unive.lisa.analysis.lattices; import it.unive.lisa.analysis.ScopeToken; +import it.unive.lisa.analysis.ScopedObject; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.SemanticExceptionWrapper; -import it.unive.lisa.analysis.representation.DomainRepresentation; -import it.unive.lisa.analysis.representation.SetRepresentation; -import it.unive.lisa.analysis.representation.StringRepresentation; import it.unive.lisa.symbolic.SymbolicExpression; import it.unive.lisa.symbolic.value.Identifier; import it.unive.lisa.util.collections.CollectionUtilities; @@ -20,10 +18,10 @@ * A set lattice containing a set of symbolic expressions. * * @author Vincenzo Arceri - * - * @param the type of the tracked symbolic expressions */ -public class ExpressionSet extends SetLattice, T> { +public class ExpressionSet extends SetLattice + implements + ScopedObject { /** * Builds the empty set lattice element. @@ -37,7 +35,8 @@ public ExpressionSet() { * * @param exp the expression */ - public ExpressionSet(T exp) { + public ExpressionSet( + SymbolicExpression exp) { this(Collections.singleton(exp), false); } @@ -46,31 +45,36 @@ public ExpressionSet(T exp) { * * @param set the set of expression */ - public ExpressionSet(Set set) { + public ExpressionSet( + Set set) { this(set, false); } - private ExpressionSet(boolean isTop) { + private ExpressionSet( + boolean isTop) { this(Collections.emptySet(), isTop); } - private ExpressionSet(Set set, boolean isTop) { + private ExpressionSet( + Set set, + boolean isTop) { super(set, isTop); } @Override - public ExpressionSet top() { - return new ExpressionSet<>(true); + public ExpressionSet top() { + return new ExpressionSet(true); } @Override - public ExpressionSet bottom() { - return new ExpressionSet<>(); + public ExpressionSet bottom() { + return new ExpressionSet(); } @Override - public ExpressionSet mk(Set set) { - return new ExpressionSet<>(set); + public ExpressionSet mk( + Set set) { + return new ExpressionSet(set); } @Override @@ -82,24 +86,25 @@ public int hashCode() { } @Override - @SuppressWarnings("unchecked") - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; if (getClass() != obj.getClass()) return false; - ExpressionSet other = (ExpressionSet) obj; + ExpressionSet other = (ExpressionSet) obj; if (isTop != other.isTop) return false; return true; } @Override - @SuppressWarnings("unchecked") - public ExpressionSet lubAux(ExpressionSet other) throws SemanticException { - Set lub = new HashSet<>(); + public ExpressionSet lubAux( + ExpressionSet other) + throws SemanticException { + Set lub = new HashSet<>(); // all non-identifiers expressions are part of the lub elements.stream().filter(Predicate.not(Identifier.class::isInstance)).forEach(lub::add); @@ -108,14 +113,18 @@ public ExpressionSet lubAux(ExpressionSet other) throws SemanticException // identifiers are added after lubbing the ones with the same name Set idlub = new HashSet<>(); - CollectionUtilities.join(onlyIds(), other.onlyIds(), idlub, (id1, id2) -> id1.getName().equals(id2.getName()), + CollectionUtilities.join(onlyIds(), other.onlyIds(), idlub, ( + id1, + id2) -> id1.getName().equals(id2.getName()), ExpressionSet::wrapper); - idlub.stream().map(i -> (T) i).forEach(lub::add); + idlub.forEach(lub::add); - return new ExpressionSet<>(lub); + return new ExpressionSet(lub); } - private static Identifier wrapper(Identifier id1, Identifier id2) { + private static Identifier wrapper( + Identifier id1, + Identifier id2) { try { return id1.lub(id2); } catch (SemanticException e) { @@ -128,55 +137,23 @@ private Collection onlyIds() { .collect(Collectors.toSet()); } - /** - * Pushes a new scope, identified by the give token, in the set. This - * recursively invokes {@link SymbolicExpression#pushScope(ScopeToken)} on - * all elements of the set (return type is forced to - * {@code ExpressionSet} since this operation returns - * the root of the hierarchy). - * - * @param token the token identifying the scope to push - * - * @return a copy of this set where the expressions have the given scope - * pushed - * - * @throws SemanticException if an error occurs during the computation - */ - public ExpressionSet pushScope(ScopeToken token) throws SemanticException { + @Override + public ExpressionSet pushScope( + ScopeToken token) + throws SemanticException { Set mapped = new HashSet<>(); - for (T exp : elements) + for (SymbolicExpression exp : elements) mapped.add(exp.pushScope(token)); - return new ExpressionSet<>(mapped); + return new ExpressionSet(mapped); } - /** - * Pops the scope identified by the given token from the set. This - * recursively invokes {@link SymbolicExpression#popScope(ScopeToken)} on - * all elements of the set (return type is forced to - * {@code ExpressionSet} since this operation returns - * the root of the hierarchy). - * - * @param token the token of the scope to be restored - * - * @return a copy of this domain where the the expressions have the given - * scope popped - * - * @throws SemanticException if an error occurs during the computation - */ - public ExpressionSet popScope(ScopeToken token) throws SemanticException { + @Override + public ExpressionSet popScope( + ScopeToken token) + throws SemanticException { Set mapped = new HashSet<>(); - for (T exp : elements) + for (SymbolicExpression exp : elements) mapped.add(exp.popScope(token)); - return new ExpressionSet<>(mapped); - } - - /** - * Yields a {@link DomainRepresentation} of the information contained in - * this set. - * - * @return the representation - */ - public DomainRepresentation representation() { - return new SetRepresentation(elements, StringRepresentation::new); + return new ExpressionSet(mapped); } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/lattices/FunctionalLattice.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/lattices/FunctionalLattice.java index a1d850ca1..0ccfde4cd 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/lattices/FunctionalLattice.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/lattices/FunctionalLattice.java @@ -3,6 +3,9 @@ import it.unive.lisa.analysis.BaseLattice; import it.unive.lisa.analysis.Lattice; import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.util.representation.MapRepresentation; +import it.unive.lisa.util.representation.StringRepresentation; +import it.unive.lisa.util.representation.StructuredRepresentation; import java.util.Collection; import java.util.Collections; import java.util.HashMap; @@ -23,7 +26,9 @@ * @param the concrete {@link Lattice} type of the values of this function */ public abstract class FunctionalLattice, K, V extends Lattice> - implements BaseLattice, Iterable> { + implements + BaseLattice, + Iterable> { /** * The function implemented by this lattice. @@ -40,7 +45,8 @@ public abstract class FunctionalLattice, K, * * @param lattice the underlying lattice */ - public FunctionalLattice(V lattice) { + public FunctionalLattice( + V lattice) { this(lattice, null); } @@ -50,7 +56,9 @@ public FunctionalLattice(V lattice) { * @param lattice the underlying lattice * @param function the function to clone */ - public FunctionalLattice(V lattice, Map function) { + public FunctionalLattice( + V lattice, + Map function) { this.lattice = lattice; this.function = function != null && function.isEmpty() ? null : function; } @@ -66,7 +74,9 @@ public FunctionalLattice(V lattice, Map function) { * * @return a new function */ - public Map mkNewFunction(Map other, boolean preserveNull) { + public Map mkNewFunction( + Map other, + boolean preserveNull) { if (other == null) return preserveNull ? null : new HashMap<>(); return new HashMap<>(other); @@ -84,22 +94,64 @@ public Set getKeys() { } /** - * Yields the state associated to the given key. + * Yields the state associated to the given key. This operation is defined + * in term of lattices: it always returns bottom of {@link #isBottom()} + * holds, top if {@link #isTop()} holds, the stored value when key is part + * of the mapping, or {@link #stateOfUnknown(Object)} otherwise. This method + * is the primary way in which information mapped to a key should be + * extracted from this function. * * @param key the key * * @return the state */ - public V getState(K key) { + public V getState( + K key) { if (isBottom()) return lattice.bottom(); if (isTop()) return lattice.top(); if (function != null && function.containsKey(key)) return function.get(key); - return lattice.bottom(); + return stateOfUnknown(key); } + /** + * Similar to {@link #getState(Object)}, but yields a custom default value + * for keys that are not part of the mapping (instead of using + * {@link #stateOfUnknown(Object)}). This is useful for implementing + * specific operation that need to use an operation-neutral element as + * fallback. + * + * @param key the key + * @param def the default value to return when there is no mapping for + * {@code key} + * + * @return the state + */ + public V getOtDefault( + K key, + V def) { + if (isBottom()) + return lattice.bottom(); + if (isTop()) + return lattice.top(); + if (function != null && function.containsKey(key)) + return function.get(key); + return def; + } + + /** + * Yields the value that should be returned by {@link #getState(Object)} + * whenever the given key is not present in this map. + * + * @param key the key that is missing + * + * @return the lattice element for keys not in the mapping + */ + public abstract V stateOfUnknown( + K key); + /** * Yields an instance of this class equal to the receiver of the call, but * with {@code key} mapped to {@code state}. @@ -109,7 +161,9 @@ public V getState(K key) { * * @return the new instance of this class with the updated mapping */ - public F putState(K key, V state) { + public F putState( + K key, + V state) { // we are only adding elements here, so it is fine to not preserve null Map result = mkNewFunction(function, false); result.put(key, state); @@ -127,26 +181,44 @@ public F putState(K key, V state) { * * @return a new instance of this class */ - public abstract F mk(V lattice, Map function); + public abstract F mk( + V lattice, + Map function); @Override - public F lubAux(F other) throws SemanticException { - return functionalLift(other, this::lubKeys, (o1, o2) -> o1 == null ? o2 : o1.lub(o2)); + public F lubAux( + F other) + throws SemanticException { + return functionalLift(other, lattice.bottom(), this::lubKeys, ( + o1, + o2) -> o1 == null ? o2 : o1.lub(o2)); } @Override - public F glbAux(F other) throws SemanticException { - return functionalLift(other, this::glbKeys, (o1, o2) -> o1 == null ? o2 : o1.glb(o2)); + public F glbAux( + F other) + throws SemanticException { + return functionalLift(other, lattice.top(), this::glbKeys, ( + o1, + o2) -> o1 == null ? o2 : o1.glb(o2)); } @Override - public F wideningAux(F other) throws SemanticException { - return functionalLift(other, this::lubKeys, (o1, o2) -> o1 == null ? o2 : o1.widening(o2)); + public F wideningAux( + F other) + throws SemanticException { + return functionalLift(other, lattice.bottom(), this::lubKeys, ( + o1, + o2) -> o1 == null ? o2 : o1.widening(o2)); } @Override - public F narrowingAux(F other) throws SemanticException { - return functionalLift(other, this::glbKeys, (o1, o2) -> o1 == null ? o2 : o1.narrowing(o2)); + public F narrowingAux( + F other) + throws SemanticException { + return functionalLift(other, lattice.top(), this::glbKeys, ( + o1, + o2) -> o1 == null ? o2 : o1.narrowing(o2)); } /** @@ -170,7 +242,10 @@ public interface FunctionalLift> { * @throws SemanticException if something goes wrong while lifting the * values */ - V lift(V first, V second) throws SemanticException; + V lift( + V first, + V second) + throws SemanticException; } /** @@ -194,13 +269,20 @@ public interface KeyFunctionalLift { * @throws SemanticException if something goes wrong while lifting the * key sets */ - Set keyLift(Set first, Set second) throws SemanticException; + Set keyLift( + Set first, + Set second) + throws SemanticException; } /** * Yields the functional lift between {@code this} and {@code other}. * * @param other the other functional lattice + * @param missing the lattice element to use for the lift when a key has + * no mapping in one of the two functions (e.g., for + * lub, missing should be bottom, while for glb it + * should be top) * @param keyLifter the key lifter * @param valueLifter the value lifter * @@ -209,13 +291,19 @@ public interface KeyFunctionalLift { * @throws SemanticException if something goes wrong while lifting the * lattice elements */ - public F functionalLift(F other, KeyFunctionalLift keyLifter, FunctionalLift valueLifter) + public F functionalLift( + F other, + V missing, + KeyFunctionalLift keyLifter, + FunctionalLift valueLifter) throws SemanticException { Map function = mkNewFunction(null, false); Set keys = keyLifter.keyLift(this.getKeys(), other.getKeys()); for (K key : keys) try { - function.put(key, valueLifter.lift(getState(key), other.getState(key))); + V s1 = getOtDefault(key, missing); + V s2 = other.getOtDefault(key, missing); + function.put(key, valueLifter.lift(s1, s2)); } catch (SemanticException e) { throw new SemanticException("Exception during functional lifting of key '" + key + "'", e); } @@ -232,7 +320,10 @@ public F functionalLift(F other, KeyFunctionalLift keyLifter, FunctionalLift< * * @throws SemanticException if something goes wrong while lifting the keys */ - public Set lubKeys(Set k1, Set k2) throws SemanticException { + public Set lubKeys( + Set k1, + Set k2) + throws SemanticException { Set keys = new HashSet<>(k1); keys.addAll(k2); return keys; @@ -249,18 +340,25 @@ public Set lubKeys(Set k1, Set k2) throws SemanticException { * @throws SemanticException if something goes wrong while lifting the key * sets */ - public Set glbKeys(Set k1, Set k2) throws SemanticException { + public Set glbKeys( + Set k1, + Set k2) + throws SemanticException { Set keys = new HashSet<>(k1); keys.retainAll(k2); return keys; } @Override - public boolean lessOrEqualAux(F other) throws SemanticException { + public boolean lessOrEqualAux( + F other) + throws SemanticException { if (function != null) - for (K key : function.keySet()) - if (getState(key) != null && (!getState(key).lessOrEqual(other.getState(key)))) + for (K key : function.keySet()) { + V state = getState(key); + if (state != null && !state.lessOrEqual(other.getState(key))) return false; + } return true; } @@ -297,7 +395,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -320,13 +419,7 @@ public boolean equals(Object obj) { @Override public String toString() { - if (isTop()) - return Lattice.TOP_STRING; - - if (isBottom()) - return Lattice.BOTTOM_STRING; - - return function == null ? "{}" : function.toString(); + return representation().toString(); } @Override @@ -353,6 +446,22 @@ public Collection getValues() { * @return the map associated with this functional lattice element. */ public Map getMap() { + if (function == null) + return Map.of(); return function; } + + @Override + public StructuredRepresentation representation() { + if (isTop()) + return Lattice.topRepresentation(); + + if (isBottom()) + return Lattice.bottomRepresentation(); + + if (function == null) + return new StringRepresentation("empty"); + + return new MapRepresentation(function, StringRepresentation::new, Lattice::representation); + } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/lattices/GenericInverseSetLattice.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/lattices/GenericInverseSetLattice.java index 73a9b4eb7..b61a71694 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/lattices/GenericInverseSetLattice.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/lattices/GenericInverseSetLattice.java @@ -26,7 +26,8 @@ public GenericInverseSetLattice() { * * @param element the element */ - public GenericInverseSetLattice(E element) { + public GenericInverseSetLattice( + E element) { super(Collections.singleton(element), true); } @@ -35,7 +36,8 @@ public GenericInverseSetLattice(E element) { * * @param elements the elements */ - public GenericInverseSetLattice(Set elements) { + public GenericInverseSetLattice( + Set elements) { super(elements, true); } @@ -47,7 +49,9 @@ public GenericInverseSetLattice(Set elements) { * @param isTop if {@code elements} is empty, specifies if this set * should be considered top or bottom */ - public GenericInverseSetLattice(Set elements, boolean isTop) { + public GenericInverseSetLattice( + Set elements, + boolean isTop) { super(elements, isTop); } @@ -62,7 +66,8 @@ public GenericInverseSetLattice bottom() { } @Override - public GenericInverseSetLattice mk(Set set) { + public GenericInverseSetLattice mk( + Set set) { return new GenericInverseSetLattice<>(set); } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/lattices/GenericMapLattice.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/lattices/GenericMapLattice.java index 584601b58..9516f0e7a 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/lattices/GenericMapLattice.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/lattices/GenericMapLattice.java @@ -14,14 +14,16 @@ * @param the type of values of this map */ public class GenericMapLattice> - extends FunctionalLattice, K, V> { + extends + FunctionalLattice, K, V> { /** * Builds the map. * * @param lattice the underlying lattice of values */ - public GenericMapLattice(V lattice) { + public GenericMapLattice( + V lattice) { super(lattice); } @@ -33,7 +35,9 @@ public GenericMapLattice(V lattice) { * object is top or bottom) * @param function the function containing the mapping */ - public GenericMapLattice(V lattice, Map function) { + public GenericMapLattice( + V lattice, + Map function) { super(lattice, function); } @@ -48,7 +52,15 @@ public GenericMapLattice bottom() { } @Override - public GenericMapLattice mk(V lattice, Map function) { + public GenericMapLattice mk( + V lattice, + Map function) { return new GenericMapLattice<>(lattice, function); } + + @Override + public V stateOfUnknown( + K key) { + return isBottom() ? lattice.bottom() : lattice.top(); + } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/lattices/GenericSetLattice.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/lattices/GenericSetLattice.java index e1421fd38..1fef97e1e 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/lattices/GenericSetLattice.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/lattices/GenericSetLattice.java @@ -26,7 +26,8 @@ public GenericSetLattice() { * * @param element the element */ - public GenericSetLattice(E element) { + public GenericSetLattice( + E element) { super(Collections.singleton(element), true); } @@ -35,7 +36,8 @@ public GenericSetLattice(E element) { * * @param elements the elements */ - public GenericSetLattice(Set elements) { + public GenericSetLattice( + Set elements) { super(elements, true); } @@ -47,7 +49,9 @@ public GenericSetLattice(Set elements) { * @param isTop if {@code elements} is empty, specifies if this set * should be considered top or bottom */ - public GenericSetLattice(Set elements, boolean isTop) { + public GenericSetLattice( + Set elements, + boolean isTop) { super(elements, isTop); } @@ -62,7 +66,8 @@ public GenericSetLattice bottom() { } @Override - public GenericSetLattice mk(Set set) { + public GenericSetLattice mk( + Set set) { return new GenericSetLattice<>(set); } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/lattices/InverseSetLattice.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/lattices/InverseSetLattice.java index ccf227e50..2b619291e 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/lattices/InverseSetLattice.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/lattices/InverseSetLattice.java @@ -3,6 +3,9 @@ import it.unive.lisa.analysis.BaseLattice; import it.unive.lisa.analysis.Lattice; import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.util.representation.SetRepresentation; +import it.unive.lisa.util.representation.StringRepresentation; +import it.unive.lisa.util.representation.StructuredRepresentation; import java.util.HashSet; import java.util.Iterator; import java.util.Set; @@ -44,7 +47,9 @@ public abstract class InverseSetLattice, E> im * @param isTop whether or not this is the top or bottom element of the * lattice, valid only if the set of elements is empty */ - public InverseSetLattice(Set elements, boolean isTop) { + public InverseSetLattice( + Set elements, + boolean isTop) { this.elements = elements; this.isTop = isTop; } @@ -61,17 +66,22 @@ public InverseSetLattice(Set elements, boolean isTop) { * @return a new concrete instance of {@link InverseSetLattice} containing * the elements of the given set */ - public abstract S mk(Set set); + public abstract S mk( + Set set); @Override - public S lubAux(S other) throws SemanticException { + public S lubAux( + S other) + throws SemanticException { Set lub = new HashSet<>(elements); lub.retainAll(other.elements); return mk(lub); } @Override - public S glbAux(S other) throws SemanticException { + public S glbAux( + S other) + throws SemanticException { Set glb = new HashSet<>(elements); glb.addAll(other.elements); return mk(glb); @@ -83,7 +93,9 @@ public Iterator iterator() { } @Override - public boolean lessOrEqualAux(S other) throws SemanticException { + public boolean lessOrEqualAux( + S other) + throws SemanticException { return elements.containsAll(other.elements); } @@ -95,7 +107,8 @@ public boolean lessOrEqualAux(S other) throws SemanticException { * @return {@code true} if the element is contained in this set, * {@code false} otherwise. */ - public boolean contains(E elem) { + public boolean contains( + E elem) { return elements.contains(elem); } @@ -128,7 +141,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -176,4 +190,9 @@ public int size() { public boolean isEmpty() { return elements.isEmpty(); } + + @Override + public StructuredRepresentation representation() { + return new SetRepresentation(elements, StringRepresentation::new); + } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/lattices/Satisfiability.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/lattices/Satisfiability.java new file mode 100644 index 000000000..7625b8ef5 --- /dev/null +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/lattices/Satisfiability.java @@ -0,0 +1,284 @@ +package it.unive.lisa.analysis.lattices; + +import it.unive.lisa.analysis.Lattice; +import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.util.representation.StringRepresentation; +import it.unive.lisa.util.representation.StructuredRepresentation; + +/** + * A lattice representing sets of possible Boolean values: {@code (true)}, + * {@code (false)}, {@code (true, false)} or unknown, {@code ()} or bottom. + * + * @author Luca Negrini + */ +public enum Satisfiability + implements + Lattice { + /** + * Represent the fact that an expression is satisfied. + */ + SATISFIED { + @Override + public Satisfiability negate() { + return NOT_SATISFIED; + } + + @Override + public Satisfiability and( + Satisfiability other) { + return other; + } + + @Override + public Satisfiability or( + Satisfiability other) { + return this; + } + + @Override + public Satisfiability lub( + Satisfiability other) + throws SemanticException { + if (other == UNKNOWN || other == NOT_SATISFIED) + return UNKNOWN; + return this; + } + + @Override + public boolean lessOrEqual( + Satisfiability other) + throws SemanticException { + return other == this || other == UNKNOWN; + } + + @Override + public Satisfiability glb( + Satisfiability other) { + if (other == BOTTOM || other == NOT_SATISFIED) + return BOTTOM; + return this; + } + }, + + /** + * Represent the fact that an expression is not satisfied. + */ + NOT_SATISFIED { + @Override + public Satisfiability negate() { + return SATISFIED; + } + + @Override + public Satisfiability and( + Satisfiability other) { + return this; + } + + @Override + public Satisfiability or( + Satisfiability other) { + return other; + } + + @Override + public Satisfiability lub( + Satisfiability other) + throws SemanticException { + if (other == UNKNOWN || other == SATISFIED) + return UNKNOWN; + return this; + } + + @Override + public boolean lessOrEqual( + Satisfiability other) + throws SemanticException { + return other == this || other == UNKNOWN; + } + + @Override + public Satisfiability glb( + Satisfiability other) { + if (other == BOTTOM || other == SATISFIED) + return BOTTOM; + return this; + } + }, + + /** + * Represent the fact that it is not possible to determine whether or not an + * expression is satisfied. + */ + UNKNOWN { + @Override + public Satisfiability negate() { + return this; + } + + @Override + public Satisfiability and( + Satisfiability other) { + if (other == NOT_SATISFIED) + return other; + + return this; + } + + @Override + public Satisfiability or( + Satisfiability other) { + if (other == SATISFIED) + return other; + + return this; + } + + @Override + public Satisfiability lub( + Satisfiability other) + throws SemanticException { + return this; + } + + @Override + public boolean lessOrEqual( + Satisfiability other) + throws SemanticException { + return other == UNKNOWN; + } + + @Override + public Satisfiability glb( + Satisfiability other) { + return other; + } + }, + + /** + * Represent the fact that the satisfiability evaluation resulted in an + * error. + */ + BOTTOM { + @Override + public Satisfiability negate() { + return this; + } + + @Override + public Satisfiability and( + Satisfiability other) { + return this; + } + + @Override + public Satisfiability or( + Satisfiability other) { + return this; + } + + @Override + public Satisfiability lub( + Satisfiability other) + throws SemanticException { + return other; + } + + @Override + public boolean lessOrEqual( + Satisfiability other) + throws SemanticException { + return true; + } + + @Override + public Satisfiability glb( + Satisfiability other) { + return this; + } + }; + + /** + * Negates the current satisfiability, getting the opposite result. + * + * @return the negation of this satisfiability instance + */ + public abstract Satisfiability negate(); + + /** + * Performs a logical and between this satisfiability and the given one. + * + * @param other the other satisfiability + * + * @return the logical and between the two satisfiability instances + */ + public abstract Satisfiability and( + Satisfiability other); + + /** + * Performs a logical or between this satisfiability and the given one. + * + * @param other the other satisfiability + * + * @return the logical or between the two satisfiability instances + */ + public abstract Satisfiability or( + Satisfiability other); + + /** + * Performs the greatest lower bound operation between this satisfiability + * and the given one. + * + * @param other the other satisfiability + * + * @return the result of the greatest lower bound + */ + public abstract Satisfiability glb( + Satisfiability other); + + /** + * Transforms a boolean value to a {@link Satisfiability} instance. + * + * @param bool the boolean to transform + * + * @return {@link #SATISFIED} if {@code bool} is {@code true}, + * {@link #NOT_SATISFIED} otherwise + */ + public static Satisfiability fromBoolean( + boolean bool) { + return bool ? SATISFIED : NOT_SATISFIED; + } + + @Override + public Satisfiability top() { + return UNKNOWN; + } + + @Override + public Satisfiability bottom() { + return BOTTOM; + } + + /** + * Yields whether or not this element can represent a {@code true} result. + * + * @return {@code true} if that condition holds + */ + public boolean mightBeTrue() { + return this == SATISFIED || this == UNKNOWN; + } + + /** + * Yields whether or not this element can represent a {@code false} result. + * + * @return {@code true} if that condition holds + */ + public boolean mightBeFalse() { + return this == NOT_SATISFIED || this == UNKNOWN; + } + + @Override + public StructuredRepresentation representation() { + return new StringRepresentation(name()); + } +} diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/lattices/SetLattice.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/lattices/SetLattice.java index 5d0d257c3..15a0bdf21 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/lattices/SetLattice.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/lattices/SetLattice.java @@ -3,6 +3,9 @@ import it.unive.lisa.analysis.BaseLattice; import it.unive.lisa.analysis.Lattice; import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.util.representation.SetRepresentation; +import it.unive.lisa.util.representation.StringRepresentation; +import it.unive.lisa.util.representation.StructuredRepresentation; import java.util.HashSet; import java.util.Iterator; import java.util.Set; @@ -45,7 +48,9 @@ public abstract class SetLattice, E> implements BaseL * @param isTop whether or not this is the top or bottom element of the * lattice, valid only if the set of elements is empty */ - public SetLattice(Set elements, boolean isTop) { + public SetLattice( + Set elements, + boolean isTop) { this.elements = elements; this.isTop = isTop; } @@ -62,24 +67,31 @@ public SetLattice(Set elements, boolean isTop) { * @return a new concrete instance of {@link SetLattice} containing the * elements of the given set */ - public abstract S mk(Set set); + public abstract S mk( + Set set); @Override - public S lubAux(S other) throws SemanticException { + public S lubAux( + S other) + throws SemanticException { Set lub = new HashSet<>(elements); lub.addAll(other.elements); return mk(lub); } @Override - public S glbAux(S other) throws SemanticException { + public S glbAux( + S other) + throws SemanticException { Set glb = new HashSet<>(elements); glb.retainAll(other.elements); return mk(glb); } @Override - public boolean lessOrEqualAux(S other) throws SemanticException { + public boolean lessOrEqualAux( + S other) + throws SemanticException { return other.elements.containsAll(elements); } @@ -101,7 +113,8 @@ public boolean isBottom() { * @return {@code true} if the element is contained in this set, * {@code false} otherwise. */ - public boolean contains(E elem) { + public boolean contains( + E elem) { return elements.contains(elem); } @@ -129,7 +142,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -177,4 +191,9 @@ public int size() { public boolean isEmpty() { return elements.isEmpty(); } + + @Override + public StructuredRepresentation representation() { + return new SetRepresentation(elements, StringRepresentation::new); + } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/Environment.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/Environment.java index fa63e944f..c79f4ee2e 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/Environment.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/Environment.java @@ -1,6 +1,7 @@ package it.unive.lisa.analysis.nonrelational; import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.SemanticOracle; import it.unive.lisa.analysis.lattices.FunctionalLattice; import it.unive.lisa.program.cfg.ProgramPoint; import it.unive.lisa.symbolic.SymbolicExpression; @@ -25,7 +26,8 @@ public abstract class Environment, E extends SymbolicExpression, T extends NonRelationalDomain> - extends VariableLift { + extends + VariableLift { /** * Builds an empty environment. @@ -33,7 +35,8 @@ public abstract class Environment, * @param domain a singleton instance to be used during semantic operations * to retrieve top and bottom values */ - public Environment(T domain) { + public Environment( + T domain) { super(domain); } @@ -48,29 +51,34 @@ public Environment(T domain) { * @param function the function representing the mapping contained in the * new environment; can be {@code null} */ - public Environment(T domain, Map function) { + public Environment( + T domain, + Map function) { super(domain, function); } @Override @SuppressWarnings("unchecked") - public M assign(Identifier id, E expression, ProgramPoint pp) throws SemanticException { + public M assign( + Identifier id, + E expression, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { if (isBottom()) return (M) this; - // If id cannot be tracked by the underlying - // lattice, return this - if (!lattice.canProcess(expression) || !lattice.tracksIdentifiers(id)) + if (!lattice.canProcess(expression, pp, oracle)) return (M) this; Map func = mkNewFunction(function, false); - T value = lattice.eval(expression, (M) this, pp); - T v = lattice.variable(id, pp); + T value = lattice.eval(expression, (M) this, pp, oracle); + T v = lattice.fixedVariable(id, pp, oracle); if (!v.isBottom()) // some domains might provide fixed representations // for some variables value = v; - if (id.isWeak() && function != null && function.containsKey(id)) + else if (id.isWeak() && function != null && function.containsKey(id)) // if we have a weak identifier for which we already have // information, we we perform a weak assignment value = value.lub(getState(id)); @@ -80,7 +88,11 @@ public M assign(Identifier id, E expression, ProgramPoint pp) throws SemanticExc @Override @SuppressWarnings("unchecked") - public M smallStepSemantics(E expression, ProgramPoint pp) throws SemanticException { + public M smallStepSemantics( + E expression, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { // environments do not change without assignments return (M) this; } @@ -90,21 +102,31 @@ public M smallStepSemantics(E expression, ProgramPoint pp) throws SemanticExcept * * @param expression the expression to evaluate * @param pp the program point where the evaluation happens + * @param oracle the oracle for inter-domain communication * * @return the abstract result of the evaluation * * @throws SemanticException if an error happens during the evaluation */ @SuppressWarnings("unchecked") - public T eval(E expression, ProgramPoint pp) throws SemanticException { - return lattice.eval(expression, (M) this, pp); + public T eval( + E expression, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + return lattice.eval(expression, (M) this, pp, oracle); } @Override @SuppressWarnings("unchecked") - public M assume(E expression, ProgramPoint src, ProgramPoint dest) throws SemanticException { + public M assume( + E expression, + ProgramPoint src, + ProgramPoint dest, + SemanticOracle oracle) + throws SemanticException { if (isBottom()) return (M) this; - return lattice.assume((M) this, expression, src, dest); + return lattice.assume((M) this, expression, src, dest, oracle); } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/NonRelationalDomain.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/NonRelationalDomain.java index 2bf99447b..03b698120 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/NonRelationalDomain.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/NonRelationalDomain.java @@ -1,6 +1,7 @@ package it.unive.lisa.analysis.nonrelational; import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.SemanticOracle; import it.unive.lisa.analysis.lattices.FunctionalLattice; import it.unive.lisa.program.cfg.ProgramPoint; import it.unive.lisa.symbolic.SymbolicExpression; @@ -24,7 +25,8 @@ public interface NonRelationalDomain, E extends SymbolicExpression, F extends Environment> - extends NonRelationalElement { + extends + NonRelationalElement { /** * Evaluates a {@link SymbolicExpression}, assuming that the values of @@ -35,11 +37,17 @@ public interface NonRelationalDomain, * variables for the evaluation * @param pp the program point that where this operation is being * evaluated + * @param oracle the oracle for inter-domain communication * * @return an new instance of this domain, representing the abstract result * of {@code expression} when evaluated on {@code environment} * * @throws SemanticException if something goes wrong during the computation */ - T eval(E expression, F environment, ProgramPoint pp) throws SemanticException; + T eval( + E expression, + F environment, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException; } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/NonRelationalElement.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/NonRelationalElement.java index 1b13275fe..35e29ded8 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/NonRelationalElement.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/NonRelationalElement.java @@ -1,11 +1,11 @@ package it.unive.lisa.analysis.nonrelational; import it.unive.lisa.analysis.Lattice; -import it.unive.lisa.analysis.SemanticDomain.Satisfiability; import it.unive.lisa.analysis.SemanticEvaluator; import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.SemanticOracle; import it.unive.lisa.analysis.lattices.FunctionalLattice; -import it.unive.lisa.analysis.representation.DomainRepresentation; +import it.unive.lisa.analysis.lattices.Satisfiability; import it.unive.lisa.program.cfg.ProgramPoint; import it.unive.lisa.symbolic.SymbolicExpression; import it.unive.lisa.symbolic.value.Identifier; @@ -27,7 +27,9 @@ public interface NonRelationalElement, E extends SymbolicExpression, F extends FunctionalLattice> - extends Lattice, SemanticEvaluator { + extends + Lattice, + SemanticEvaluator { /** * Checks whether {@code expression} is satisfied in {@code environment}, @@ -39,6 +41,7 @@ public interface NonRelationalElement, * variables for the satisfiability * @param pp the program point that where this operation is being * evaluated + * @param oracle the oracle for inter-domain communication * * @return {@link Satisfiability#SATISFIED} if the expression is satisfied * by the environment, {@link Satisfiability#NOT_SATISFIED} if @@ -49,7 +52,12 @@ public interface NonRelationalElement, * * @throws SemanticException if something goes wrong during the computation */ - Satisfiability satisfies(E expression, F environment, ProgramPoint pp) throws SemanticException; + Satisfiability satisfies( + E expression, + F environment, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException; /** * Yields the environment {@code environment} on which the expression @@ -65,39 +73,61 @@ public interface NonRelationalElement, * the given expression * @param dest the program point where the execution will move after * the expression has been assumed + * @param oracle the oracle for inter-domain communication * * @return the environment {@code environment} where {@code expression} is * assumed to hold * * @throws SemanticException if an error occurs during the computation */ - F assume(F environment, E expression, ProgramPoint src, ProgramPoint dest) throws SemanticException; + F assume( + F environment, + E expression, + ProgramPoint src, + ProgramPoint dest, + SemanticOracle oracle) + throws SemanticException; /** * Yields a fixed abstraction of the given variable. The abstraction does * not depend on the abstract values that get assigned to the variable, but * is instead fixed among all possible execution paths. If this method does * not return the bottom element (as the default implementation does), then - * {@link Environment#assign(Identifier, SymbolicExpression, ProgramPoint)} + * {@link Environment#assign(Identifier, SymbolicExpression, ProgramPoint, SemanticOracle)} * will store that abstract element instead of the one computed starting * from the expression. * - * @param id The identifier representing the variable being assigned - * @param pp the program point that where this operation is being evaluated + * @param id The identifier representing the variable being assigned + * @param pp the program point that where this operation is being + * evaluated + * @param oracle the oracle for inter-domain communication * * @return the fixed abstraction of the variable * * @throws SemanticException if an error occurs during the computation */ - default T variable(Identifier id, ProgramPoint pp) throws SemanticException { + default T fixedVariable( + Identifier id, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { return bottom(); } /** - * Yields a {@link DomainRepresentation} of the information contained in - * this domain's instance. + * Yields the default abstraction returned whenever a functional lattice + * using this element as values is queried for the state of a variable not + * currently part of its mapping. Abstraction for such a variable might have + * been lost, for instance, due to a call to {@link Lattice#top()} on the + * function itself. The default implementation of this method returns + * {@link Lattice#top()}. * - * @return the representation + * @param id the variable that is missing from the mapping + * + * @return a default abstraction for the variable */ - DomainRepresentation representation(); + default T unknownVariable( + Identifier id) { + return top(); + } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/VariableLift.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/VariableLift.java index 673bf328b..cd6ddd8af 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/VariableLift.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/VariableLift.java @@ -1,13 +1,11 @@ package it.unive.lisa.analysis.nonrelational; -import it.unive.lisa.analysis.Lattice; import it.unive.lisa.analysis.ScopeToken; import it.unive.lisa.analysis.SemanticDomain; import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.SemanticOracle; import it.unive.lisa.analysis.lattices.FunctionalLattice; -import it.unive.lisa.analysis.representation.DomainRepresentation; -import it.unive.lisa.analysis.representation.MapRepresentation; -import it.unive.lisa.analysis.representation.StringRepresentation; +import it.unive.lisa.analysis.lattices.Satisfiability; import it.unive.lisa.program.cfg.ProgramPoint; import it.unive.lisa.symbolic.SymbolicExpression; import it.unive.lisa.symbolic.value.Identifier; @@ -40,8 +38,10 @@ public abstract class VariableLift, E extends SymbolicExpression, T extends NonRelationalElement> - extends FunctionalLattice - implements SemanticDomain { + extends + FunctionalLattice + implements + SemanticDomain { /** * Builds an empty lift. @@ -49,7 +49,8 @@ public abstract class VariableLift, * @param domain a singleton instance to be used during semantic operations * to retrieve top and bottom values */ - public VariableLift(T domain) { + public VariableLift( + T domain) { super(domain); } @@ -63,21 +64,29 @@ public VariableLift(T domain) { * @param function the function representing the mapping contained in the * new lift; can be {@code null} */ - public VariableLift(T domain, Map function) { + public VariableLift( + T domain, + Map function) { super(domain, function); } @Override @SuppressWarnings("unchecked") - public Satisfiability satisfies(E expression, ProgramPoint pp) throws SemanticException { + public Satisfiability satisfies( + E expression, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { if (isBottom()) return Satisfiability.BOTTOM; - return lattice.satisfies(expression, (M) this, pp); + return lattice.satisfies(expression, (M) this, pp, oracle); } @Override - public M pushScope(ScopeToken scope) throws SemanticException { + public M pushScope( + ScopeToken scope) + throws SemanticException { AtomicReference holder = new AtomicReference<>(); M result = liftIdentifiers(id -> { @@ -96,7 +105,9 @@ public M pushScope(ScopeToken scope) throws SemanticException { } @Override - public M popScope(ScopeToken scope) throws SemanticException { + public M popScope( + ScopeToken scope) + throws SemanticException { AtomicReference holder = new AtomicReference<>(); M result = liftIdentifiers(id -> { @@ -115,7 +126,9 @@ public M popScope(ScopeToken scope) throws SemanticException { } @SuppressWarnings("unchecked") - private M liftIdentifiers(UnaryOperator lifter) throws SemanticException { + private M liftIdentifiers( + UnaryOperator lifter) + throws SemanticException { if (isBottom() || isTop()) return (M) this; @@ -135,7 +148,9 @@ private M liftIdentifiers(UnaryOperator lifter) throws SemanticExcep @Override @SuppressWarnings("unchecked") - public M forgetIdentifier(Identifier id) throws SemanticException { + public M forgetIdentifier( + Identifier id) + throws SemanticException { if (isTop() || isBottom() || function == null) return (M) this; @@ -148,7 +163,9 @@ public M forgetIdentifier(Identifier id) throws SemanticException { @Override @SuppressWarnings("unchecked") - public M forgetIdentifiersIf(Predicate test) throws SemanticException { + public M forgetIdentifiersIf( + Predicate test) + throws SemanticException { if (isTop() || isBottom() || function == null) return (M) this; @@ -160,24 +177,14 @@ public M forgetIdentifiersIf(Predicate test) throws SemanticExceptio } @Override - public DomainRepresentation representation() { - if (isTop()) - return Lattice.topRepresentation(); - - if (isBottom()) - return Lattice.bottomRepresentation(); - - if (function == null) - return new StringRepresentation("empty"); - - return new MapRepresentation(function, StringRepresentation::new, NonRelationalElement::representation); - } - - @Override - public Set lubKeys(Set k1, Set k2) throws SemanticException { + public Set lubKeys( + Set k1, + Set k2) + throws SemanticException { Set keys = new HashSet<>(); CollectionsDiffBuilder builder = new CollectionsDiffBuilder<>(Identifier.class, k1, k2); + // this is needed for a name-only comparison builder.compute(Comparator.comparing(Identifier::getName)); keys.addAll(builder.getOnlyFirst()); keys.addAll(builder.getOnlySecond()); @@ -189,4 +196,16 @@ public Set lubKeys(Set k1, Set k2) throws Se } return keys; } + + @Override + public T stateOfUnknown( + Identifier key) { + return lattice.unknownVariable(key); + } + + @Override + public boolean knowsIdentifier( + Identifier id) { + return getKeys().contains(id); + } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/heap/HeapEnvironment.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/heap/HeapEnvironment.java index e37019b0b..8ef75fb21 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/heap/HeapEnvironment.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/heap/HeapEnvironment.java @@ -1,14 +1,15 @@ package it.unive.lisa.analysis.nonrelational.heap; import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.SemanticOracle; import it.unive.lisa.analysis.heap.HeapDomain; import it.unive.lisa.analysis.lattices.ExpressionSet; import it.unive.lisa.analysis.lattices.FunctionalLattice; +import it.unive.lisa.analysis.lattices.Satisfiability; import it.unive.lisa.analysis.nonrelational.Environment; import it.unive.lisa.program.cfg.ProgramPoint; import it.unive.lisa.symbolic.SymbolicExpression; import it.unive.lisa.symbolic.value.Identifier; -import it.unive.lisa.symbolic.value.ValueExpression; import java.util.Collections; import java.util.List; import java.util.Map; @@ -27,8 +28,10 @@ * instances are mapped in this environment */ public class HeapEnvironment> - extends Environment, SymbolicExpression, T> - implements HeapDomain> { + extends + Environment, SymbolicExpression, T> + implements + HeapDomain> { /** * The substitution @@ -41,7 +44,8 @@ public class HeapEnvironment> * @param domain a singleton instance to be used during semantic operations * to retrieve top and bottom values */ - public HeapEnvironment(T domain) { + public HeapEnvironment( + T domain) { super(domain); substitution = Collections.emptyList(); } @@ -53,7 +57,9 @@ public HeapEnvironment(T domain) { * to retrieve top and bottom values * @param function the initial mapping of this heap environment */ - public HeapEnvironment(T domain, Map function) { + public HeapEnvironment( + T domain, + Map function) { this(domain, function, Collections.emptyList()); } @@ -70,20 +76,28 @@ public HeapEnvironment(T domain, Map function) { * @param substitution the list of substitutions that has been generated * together with the fresh instance being built */ - public HeapEnvironment(T domain, Map function, List substitution) { + public HeapEnvironment( + T domain, + Map function, + List substitution) { super(domain, function); this.substitution = substitution; } @Override - public HeapEnvironment mk(T lattice, Map function) { + public HeapEnvironment mk( + T lattice, + Map function) { return new HeapEnvironment<>(lattice, function); } @Override - public ExpressionSet rewrite(SymbolicExpression expression, ProgramPoint pp) + public ExpressionSet rewrite( + SymbolicExpression expression, + ProgramPoint pp, + SemanticOracle oracle) throws SemanticException { - return lattice.rewrite(expression, this, pp); + return lattice.rewrite(expression, this, pp, oracle); } @Override @@ -92,11 +106,14 @@ public List getSubstitution() { } @Override - public HeapEnvironment smallStepSemantics(SymbolicExpression expression, ProgramPoint pp) + public HeapEnvironment smallStepSemantics( + SymbolicExpression expression, + ProgramPoint pp, + SemanticOracle oracle) throws SemanticException { if (isBottom()) return this; - T eval = lattice.eval(expression, this, pp); + T eval = lattice.eval(expression, this, pp, oracle); return new HeapEnvironment<>(lattice, function, eval.getSubstitution()); } @@ -125,7 +142,9 @@ public boolean isBottom() { // TODO how do we lub/widen/glb/narrow the substitutions? @Override - public boolean lessOrEqualAux(HeapEnvironment other) throws SemanticException { + public boolean lessOrEqualAux( + HeapEnvironment other) + throws SemanticException { if (!super.lessOrEqualAux(other)) return false; // TODO how do we check the substitutions? @@ -141,7 +160,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (!super.equals(obj)) @@ -156,4 +176,24 @@ public boolean equals(Object obj) { return false; return true; } + + @Override + public Satisfiability alias( + SymbolicExpression x, + SymbolicExpression y, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + return lattice.alias(x, y, this, pp, oracle); + } + + @Override + public Satisfiability isReachableFrom( + SymbolicExpression x, + SymbolicExpression y, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + return lattice.isReachableFrom(x, y, this, pp, oracle); + } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/heap/NonRelationalHeapDomain.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/heap/NonRelationalHeapDomain.java index b83699ed8..c803d7225 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/heap/NonRelationalHeapDomain.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/heap/NonRelationalHeapDomain.java @@ -1,15 +1,16 @@ package it.unive.lisa.analysis.nonrelational.heap; import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.SemanticOracle; import it.unive.lisa.analysis.heap.HeapSemanticOperation; import it.unive.lisa.analysis.lattices.ExpressionSet; +import it.unive.lisa.analysis.lattices.Satisfiability; import it.unive.lisa.analysis.nonrelational.NonRelationalDomain; import it.unive.lisa.program.cfg.ProgramPoint; import it.unive.lisa.symbolic.SymbolicExpression; import it.unive.lisa.symbolic.heap.HeapExpression; import it.unive.lisa.symbolic.value.HeapLocation; import it.unive.lisa.symbolic.value.Identifier; -import it.unive.lisa.symbolic.value.ValueExpression; import java.util.HashSet; import java.util.Set; @@ -24,7 +25,9 @@ * @param the concrete type of the domain */ public interface NonRelationalHeapDomain> - extends NonRelationalDomain>, HeapSemanticOperation { + extends + NonRelationalDomain>, + HeapSemanticOperation { /** * Rewrites a {@link SymbolicExpression}, getting rid of the parts that @@ -44,13 +47,17 @@ public interface NonRelationalHeapDomain> * program variables * @param pp the program point that where this expression is being * rewritten + * @param oracle the oracle for inter-domain communication * * @return the rewritten expressions, or the original one * * @throws SemanticException if something goes wrong during the rewriting */ - ExpressionSet rewrite(SymbolicExpression expression, HeapEnvironment environment, - ProgramPoint pp) + ExpressionSet rewrite( + SymbolicExpression expression, + HeapEnvironment environment, + ProgramPoint pp, + SemanticOracle oracle) throws SemanticException; /** @@ -65,8 +72,8 @@ ExpressionSet rewrite(SymbolicExpression expression, HeapEnviro *
* The default implementation of this method simply iterates over the input * expressions, invoking - * {@link #rewrite(SymbolicExpression, HeapEnvironment, ProgramPoint)} on - * all of them.
+ * {@link #rewrite(SymbolicExpression, HeapEnvironment, ProgramPoint, SemanticOracle)} + * on all of them.
*
* The collection returned by this method usually contains one expression, * but instances created through lattice operations (e.g., lub) might @@ -77,17 +84,75 @@ ExpressionSet rewrite(SymbolicExpression expression, HeapEnviro * program variables * @param pp the program point that where this expressions are * being rewritten + * @param oracle the oracle for inter-domain communication * * @return the rewritten expressions, or the original ones * * @throws SemanticException if something goes wrong during the rewriting */ - default ExpressionSet rewriteAll(ExpressionSet expressions, - HeapEnvironment environment, ProgramPoint pp) throws SemanticException { - Set result = new HashSet<>(); + default ExpressionSet rewrite( + ExpressionSet expressions, + HeapEnvironment environment, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + Set result = new HashSet<>(); for (SymbolicExpression expr : expressions) - result.addAll(rewrite(expr, environment, pp).elements()); - return new ExpressionSet<>(result); + result.addAll(rewrite(expr, environment, pp, oracle).elements()); + return new ExpressionSet(result); } + /** + * Yields whether or not the two given expressions are aliases, that is, if + * they point to the same region of memory. Note that, for this method to + * return {@link Satisfiability#SATISFIED}, both expressions should be + * pointers to other expressions. + * + * @param x the first expression + * @param y the second expression + * @param environment the environment containing information about the + * program variables + * @param pp the {@link ProgramPoint} where the computation happens + * @param oracle the oracle for inter-domain communication + * + * @return whether or not the two expressions are aliases + * + * @throws SemanticException if something goes wrong during the computation + */ + Satisfiability alias( + SymbolicExpression x, + SymbolicExpression y, + HeapEnvironment environment, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException; + + /** + * Yields whether or not the {@link Identifier} represented (directly or + * after rewriting) by the second expression is reachable starting from the + * {@link Identifier} represented (directly or after rewriting) by the first + * expression. Note that, for this method to return + * {@link Satisfiability#SATISFIED}, not only {@code x} needs to be a + * pointer to another expression, but the latter should be a pointer as + * well, and so on until {@code y} is reached. + * + * @param x the first expression + * @param y the second expression + * @param environment the environment containing information about the + * program variables + * @param pp the {@link ProgramPoint} where the computation happens + * @param oracle the oracle for inter-domain communication + * + * @return whether or not the second expression can be reached from the + * first one + * + * @throws SemanticException if something goes wrong during the computation + */ + Satisfiability isReachableFrom( + SymbolicExpression x, + SymbolicExpression y, + HeapEnvironment environment, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException; } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/inference/BaseInferredValue.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/inference/BaseInferredValue.java index dfc8f2c50..e337eff7e 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/inference/BaseInferredValue.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/inference/BaseInferredValue.java @@ -1,8 +1,9 @@ package it.unive.lisa.analysis.nonrelational.inference; import it.unive.lisa.analysis.BaseLattice; -import it.unive.lisa.analysis.SemanticDomain.Satisfiability; import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.SemanticOracle; +import it.unive.lisa.analysis.lattices.Satisfiability; import it.unive.lisa.program.cfg.ProgramPoint; import it.unive.lisa.symbolic.ExpressionVisitor; import it.unive.lisa.symbolic.SymbolicExpression; @@ -15,6 +16,7 @@ import it.unive.lisa.symbolic.value.Identifier; import it.unive.lisa.symbolic.value.NullConstant; import it.unive.lisa.symbolic.value.PushAny; +import it.unive.lisa.symbolic.value.PushInv; import it.unive.lisa.symbolic.value.Skip; import it.unive.lisa.symbolic.value.TernaryExpression; import it.unive.lisa.symbolic.value.UnaryExpression; @@ -27,12 +29,14 @@ import it.unive.lisa.symbolic.value.operator.ternary.TernaryOperator; import it.unive.lisa.symbolic.value.operator.unary.LogicalNegation; import it.unive.lisa.symbolic.value.operator.unary.UnaryOperator; +import it.unive.lisa.type.Type; +import java.util.Set; /** * Base implementation for {@link InferredValue}s. This class extends * {@link BaseLattice} and implements - * {@link InferredValue#eval(ValueExpression, InferenceSystem, ProgramPoint)} by - * taking care of the recursive computation of inner expressions evaluation. + * {@link InferredValue#eval(ValueExpression, InferenceSystem, ProgramPoint, SemanticOracle)} + * by taking care of the recursive computation of inner expressions evaluation. * * @author Luca Negrini * @@ -59,46 +63,68 @@ public class EvaluationVisitor> implements Expres * * @param singleton an instance of the domain using this visitor */ - public EvaluationVisitor(T singleton) { + public EvaluationVisitor( + T singleton) { this.singleton = singleton; } @Override - public InferredPair visit(AccessChild expression, InferredPair receiver, InferredPair child, - Object... params) throws SemanticException { + public InferredPair visit( + AccessChild expression, + InferredPair receiver, + InferredPair child, + Object... params) + throws SemanticException { throw new SemanticException(CANNOT_PROCESS_ERROR); } @Override - public InferredPair visit(MemoryAllocation expression, Object... params) throws SemanticException { + public InferredPair visit( + MemoryAllocation expression, + Object... params) + throws SemanticException { throw new SemanticException(CANNOT_PROCESS_ERROR); } @Override - public InferredPair visit(HeapReference expression, InferredPair arg, Object... params) + public InferredPair visit( + HeapReference expression, + InferredPair arg, + Object... params) throws SemanticException { throw new SemanticException(CANNOT_PROCESS_ERROR); } @Override - public InferredPair visit(HeapDereference expression, InferredPair arg, Object... params) + public InferredPair visit( + HeapDereference expression, + InferredPair arg, + Object... params) throws SemanticException { throw new SemanticException(CANNOT_PROCESS_ERROR); } @Override - public InferredPair visit(UnaryExpression expression, InferredPair arg, Object... params) + public InferredPair visit( + UnaryExpression expression, + InferredPair arg, + Object... params) throws SemanticException { if (arg.getInferred().isBottom()) return arg; return singleton.evalUnaryExpression(expression.getOperator(), arg.getInferred(), - ((InferenceSystem) params[0]).getExecutionState(), (ProgramPoint) params[1]); + ((InferenceSystem) params[0]).getExecutionState(), (ProgramPoint) params[1], + (SemanticOracle) params[2]); } @Override - public InferredPair visit(BinaryExpression expression, InferredPair left, InferredPair right, - Object... params) throws SemanticException { + public InferredPair visit( + BinaryExpression expression, + InferredPair left, + InferredPair right, + Object... params) + throws SemanticException { if (left.getInferred().isBottom()) return left; if (right.getInferred().isBottom()) @@ -106,19 +132,26 @@ public InferredPair visit(BinaryExpression expression, InferredPair left, if (expression.getOperator() == TypeCast.INSTANCE) return singleton.evalTypeCast(expression, left.getInferred(), right.getInferred(), - ((InferenceSystem) params[0]).getExecutionState(), (ProgramPoint) params[1]); + ((InferenceSystem) params[0]).getExecutionState(), (ProgramPoint) params[1], + (SemanticOracle) params[2]); if (expression.getOperator() == TypeConv.INSTANCE) return singleton.evalTypeConv(expression, left.getInferred(), right.getInferred(), - ((InferenceSystem) params[0]).getExecutionState(), (ProgramPoint) params[1]); + ((InferenceSystem) params[0]).getExecutionState(), (ProgramPoint) params[1], + (SemanticOracle) params[2]); return singleton.evalBinaryExpression(expression.getOperator(), left.getInferred(), right.getInferred(), - ((InferenceSystem) params[0]).getExecutionState(), (ProgramPoint) params[1]); + ((InferenceSystem) params[0]).getExecutionState(), (ProgramPoint) params[1], + (SemanticOracle) params[2]); } @Override - public InferredPair visit(TernaryExpression expression, InferredPair left, InferredPair middle, - InferredPair right, Object... params) + public InferredPair visit( + TernaryExpression expression, + InferredPair left, + InferredPair middle, + InferredPair right, + Object... params) throws SemanticException { if (left.getInferred().isBottom()) return left; @@ -129,66 +162,92 @@ public InferredPair visit(TernaryExpression expression, InferredPair left, return singleton.evalTernaryExpression(expression.getOperator(), left.getInferred(), middle.getInferred(), right.getInferred(), ((InferenceSystem) params[0]).getExecutionState(), - (ProgramPoint) params[1]); + (ProgramPoint) params[1], (SemanticOracle) params[2]); } @Override - public InferredPair visit(Skip expression, Object... params) throws SemanticException { + public InferredPair visit( + Skip expression, + Object... params) + throws SemanticException { return singleton.evalSkip(expression, ((InferenceSystem) params[0]).getExecutionState(), - (ProgramPoint) params[1]); + (ProgramPoint) params[1], (SemanticOracle) params[2]); } @Override - public InferredPair visit(PushAny expression, Object... params) throws SemanticException { + public InferredPair visit( + PushAny expression, + Object... params) + throws SemanticException { return singleton.evalPushAny(expression, ((InferenceSystem) params[0]).getExecutionState(), - (ProgramPoint) params[1]); + (ProgramPoint) params[1], (SemanticOracle) params[2]); } @Override - public InferredPair visit(Constant expression, Object... params) throws SemanticException { + public InferredPair visit( + PushInv expression, + Object... params) + throws SemanticException { + return singleton.evalPushInv(expression, ((InferenceSystem) params[0]).getExecutionState(), + (ProgramPoint) params[1], (SemanticOracle) params[2]); + } + + @Override + public InferredPair visit( + Constant expression, + Object... params) + throws SemanticException { if (expression instanceof NullConstant) return singleton.evalNullConstant(((InferenceSystem) params[0]).getExecutionState(), - (ProgramPoint) params[1]); + (ProgramPoint) params[1], (SemanticOracle) params[2]); return singleton.evalNonNullConstant(expression, ((InferenceSystem) params[0]).getExecutionState(), - (ProgramPoint) params[1]); + (ProgramPoint) params[1], (SemanticOracle) params[2]); } @Override - public InferredPair visit(Identifier expression, Object... params) throws SemanticException { - return singleton.evalIdentifier(expression, (InferenceSystem) params[0], (ProgramPoint) params[1]); + public InferredPair visit( + Identifier expression, + Object... params) + throws SemanticException { + return singleton.evalIdentifier(expression, (InferenceSystem) params[0], (ProgramPoint) params[1], + (SemanticOracle) params[2]); } } @Override - default Satisfiability satisfies(ValueExpression expression, InferenceSystem environment, ProgramPoint pp) + default Satisfiability satisfies( + ValueExpression expression, + InferenceSystem environment, + ProgramPoint pp, + SemanticOracle oracle) throws SemanticException { if (expression instanceof Identifier) { - InferredPair eval = evalIdentifier((Identifier) expression, environment, pp); - return satisfiesAbstractValue(eval.getInferred(), eval.getState(), pp); + InferredPair eval = evalIdentifier((Identifier) expression, environment, pp, oracle); + return satisfiesAbstractValue(eval.getInferred(), eval.getState(), pp, oracle); } if (expression instanceof NullConstant) - return satisfiesNullConstant(environment.getExecutionState(), pp); + return satisfiesNullConstant(environment.getExecutionState(), pp, oracle); if (expression instanceof Constant) - return satisfiesNonNullConstant((Constant) expression, environment.getExecutionState(), pp); + return satisfiesNonNullConstant((Constant) expression, environment.getExecutionState(), pp, oracle); if (expression instanceof PushAny) - return satisfiesPushAny((PushAny) expression, environment.getExecutionState()); + return satisfiesPushAny((PushAny) expression, environment.getExecutionState(), oracle); if (expression instanceof UnaryExpression) { UnaryExpression unary = (UnaryExpression) expression; if (unary.getOperator() == LogicalNegation.INSTANCE) - return satisfies((ValueExpression) unary.getExpression(), environment, pp).negate(); + return satisfies((ValueExpression) unary.getExpression(), environment, pp, oracle).negate(); else { - InferredPair arg = eval((ValueExpression) unary.getExpression(), environment, pp); + InferredPair arg = eval((ValueExpression) unary.getExpression(), environment, pp, oracle); if (arg.isBottom()) return Satisfiability.BOTTOM; return satisfiesUnaryExpression(unary.getOperator(), arg.getInferred(), environment.getExecutionState(), - pp); + pp, oracle); } } @@ -196,42 +255,42 @@ default Satisfiability satisfies(ValueExpression expression, InferenceSystem BinaryExpression binary = (BinaryExpression) expression; if (binary.getOperator() == LogicalAnd.INSTANCE) - return satisfies((ValueExpression) binary.getLeft(), environment, pp) - .and(satisfies((ValueExpression) binary.getRight(), environment, pp)); + return satisfies((ValueExpression) binary.getLeft(), environment, pp, oracle) + .and(satisfies((ValueExpression) binary.getRight(), environment, pp, oracle)); else if (binary.getOperator() == LogicalOr.INSTANCE) - return satisfies((ValueExpression) binary.getLeft(), environment, pp) - .or(satisfies((ValueExpression) binary.getRight(), environment, pp)); + return satisfies((ValueExpression) binary.getLeft(), environment, pp, oracle) + .or(satisfies((ValueExpression) binary.getRight(), environment, pp, oracle)); else { - InferredPair left = eval((ValueExpression) binary.getLeft(), environment, pp); + InferredPair left = eval((ValueExpression) binary.getLeft(), environment, pp, oracle); if (left.isBottom()) return Satisfiability.BOTTOM; - InferredPair right = eval((ValueExpression) binary.getRight(), environment, pp); + InferredPair right = eval((ValueExpression) binary.getRight(), environment, pp, oracle); if (right.isBottom()) return Satisfiability.BOTTOM; return satisfiesBinaryExpression(binary.getOperator(), left.getInferred(), right.getInferred(), - environment.getExecutionState(), pp); + environment.getExecutionState(), pp, oracle); } } if (expression instanceof TernaryExpression) { TernaryExpression ternary = (TernaryExpression) expression; - InferredPair left = eval((ValueExpression) ternary.getLeft(), environment, pp); + InferredPair left = eval((ValueExpression) ternary.getLeft(), environment, pp, oracle); if (left.isBottom()) return Satisfiability.BOTTOM; - InferredPair middle = eval((ValueExpression) ternary.getMiddle(), environment, pp); + InferredPair middle = eval((ValueExpression) ternary.getMiddle(), environment, pp, oracle); if (middle.isBottom()) return Satisfiability.BOTTOM; - InferredPair right = eval((ValueExpression) ternary.getRight(), environment, pp); + InferredPair right = eval((ValueExpression) ternary.getRight(), environment, pp, oracle); if (right.isBottom()) return Satisfiability.BOTTOM; return satisfiesTernaryExpression(ternary.getOperator(), left.getInferred(), middle.getInferred(), - right.getInferred(), environment.getExecutionState(), pp); + right.getInferred(), environment.getExecutionState(), pp, oracle); } return Satisfiability.UNKNOWN; @@ -239,9 +298,13 @@ else if (binary.getOperator() == LogicalOr.INSTANCE) @Override @SuppressWarnings("unchecked") - default InferredPair eval(ValueExpression expression, InferenceSystem environment, ProgramPoint pp) + default InferredPair eval( + ValueExpression expression, + InferenceSystem environment, + ProgramPoint pp, + SemanticOracle oracle) throws SemanticException { - return expression.accept(new EvaluationVisitor<>((T) this), environment, pp); + return expression.accept(new EvaluationVisitor<>((T) this), environment, pp, oracle); } /** @@ -251,13 +314,18 @@ default InferredPair eval(ValueExpression expression, InferenceSystem envi * @param environment the environment where the identifier must be evaluated * @param pp the program point that where this operation is being * evaluated + * @param oracle the oracle for inter-domain communication * * @return the evaluation of the identifier * * @throws SemanticException if an error occurs during the computation */ @SuppressWarnings("unchecked") - default InferredPair evalIdentifier(Identifier id, InferenceSystem environment, ProgramPoint pp) + default InferredPair evalIdentifier( + Identifier id, + InferenceSystem environment, + ProgramPoint pp, + SemanticOracle oracle) throws SemanticException { return new InferredPair<>((T) this, environment.getState(id), environment.getExecutionState()); } @@ -265,16 +333,22 @@ default InferredPair evalIdentifier(Identifier id, InferenceSystem environ /** * Yields the evaluation of a skip expression. * - * @param skip the skip expression to be evaluated - * @param state the current execution state - * @param pp the program point that where this operation is being - * evaluated + * @param skip the skip expression to be evaluated + * @param state the current execution state + * @param pp the program point that where this operation is being + * evaluated + * @param oracle the oracle for inter-domain communication * * @return the evaluation of the skip expression * * @throws SemanticException if an error occurs during the computation */ - default InferredPair evalSkip(Skip skip, T state, ProgramPoint pp) throws SemanticException { + default InferredPair evalSkip( + Skip skip, + T state, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { T bot = bottom(); return new InferredPair<>(bot, bot, bot); } @@ -286,28 +360,62 @@ default InferredPair evalSkip(Skip skip, T state, ProgramPoint pp) throws Sem * @param state the current execution state * @param pp the program point that where this operation is being * evaluated + * @param oracle the oracle for inter-domain communication * * @return the evaluation of the push-any expression * * @throws SemanticException if an error occurs during the computation */ - default InferredPair evalPushAny(PushAny pushAny, T state, ProgramPoint pp) throws SemanticException { + default InferredPair evalPushAny( + PushAny pushAny, + T state, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { T top = top(); return new InferredPair<>(top, top, top); } + /** + * Yields the evaluation of a push-inv expression. + * + * @param pushInv the push-inv expression to be evaluated + * @param state the current execution state + * @param pp the program point that where this operation is being + * evaluated + * @param oracle the oracle for inter-domain communication + * + * @return the evaluation of the push-inv expression + * + * @throws SemanticException if an error occurs during the computation + */ + default InferredPair evalPushInv( + PushInv pushInv, + T state, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + T bot = bottom(); + return new InferredPair<>(bot, bot, bot); + } + /** * Yields the evaluation of the null constant {@link NullConstant}. * - * @param state the current execution state - * @param pp the program point that where this operation is being - * evaluated + * @param state the current execution state + * @param pp the program point that where this operation is being + * evaluated + * @param oracle the oracle for inter-domain communication * * @return the evaluation of the constant * * @throws SemanticException if an error occurs during the computation */ - default InferredPair evalNullConstant(T state, ProgramPoint pp) throws SemanticException { + default InferredPair evalNullConstant( + T state, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { T top = top(); return new InferredPair<>(top, top, top); } @@ -319,12 +427,17 @@ default InferredPair evalNullConstant(T state, ProgramPoint pp) throws Semant * @param state the current execution state * @param pp the program point that where this operation is being * evaluated + * @param oracle the oracle for inter-domain communication * * @return the evaluation of the constant * * @throws SemanticException if an error occurs during the computation */ - default InferredPair evalNonNullConstant(Constant constant, T state, ProgramPoint pp) + default InferredPair evalNonNullConstant( + Constant constant, + T state, + ProgramPoint pp, + SemanticOracle oracle) throws SemanticException { T top = top(); return new InferredPair<>(top, top, top); @@ -341,12 +454,18 @@ default InferredPair evalNonNullConstant(Constant constant, T state, ProgramP * @param state the current execution state * @param pp the program point that where this operation is being * evaluated + * @param oracle the oracle for inter-domain communication * * @return the evaluation of the expression * * @throws SemanticException if an error occurs during the computation */ - default InferredPair evalUnaryExpression(UnaryOperator operator, T arg, T state, ProgramPoint pp) + default InferredPair evalUnaryExpression( + UnaryOperator operator, + T arg, + T state, + ProgramPoint pp, + SemanticOracle oracle) throws SemanticException { T top = top(); return new InferredPair<>(top, top, top); @@ -367,12 +486,19 @@ default InferredPair evalUnaryExpression(UnaryOperator operator, T arg, T sta * @param state the current execution state * @param pp the program point that where this operation is being * evaluated + * @param oracle the oracle for inter-domain communication * * @return the evaluation of the expression * * @throws SemanticException if an error occurs during the computation */ - default InferredPair evalBinaryExpression(BinaryOperator operator, T left, T right, T state, ProgramPoint pp) + default InferredPair evalBinaryExpression( + BinaryOperator operator, + T left, + T right, + T state, + ProgramPoint pp, + SemanticOracle oracle) throws SemanticException { T top = top(); return new InferredPair<>(top, top, top); @@ -381,46 +507,60 @@ default InferredPair evalBinaryExpression(BinaryOperator operator, T left, T /** * Yields the evaluation of a type conversion expression. * - * @param conv the type conversion expression - * @param left the left expression, namely the expression to be converted - * @param right the right expression, namely the types to which left should - * be converted - * @param state the current execution state - * @param pp the program point that where this operation is being - * evaluated + * @param conv the type conversion expression + * @param left the left expression, namely the expression to be converted + * @param right the right expression, namely the types to which left should + * be converted + * @param state the current execution state + * @param pp the program point that where this operation is being + * evaluated + * @param oracle the oracle for inter-domain communication * * @return the evaluation of the type conversion expression * * @throws SemanticException if an error occurs during the computation */ @SuppressWarnings("unchecked") - default InferredPair evalTypeConv(BinaryExpression conv, T left, T right, T state, ProgramPoint pp) + default InferredPair evalTypeConv( + BinaryExpression conv, + T left, + T right, + T state, + ProgramPoint pp, + SemanticOracle oracle) throws SemanticException { T bot = bottom(); - return conv.getRuntimeTypes(pp.getProgram().getTypes()).isEmpty() ? new InferredPair<>(bot, bot, bot) + return oracle.getRuntimeTypesOf(conv, pp, oracle).isEmpty() ? new InferredPair<>(bot, bot, bot) : new InferredPair<>((T) this, left, state); } /** * Yields the evaluation of a type cast expression. * - * @param cast the type casted expression - * @param left the left expression, namely the expression to be casted - * @param right the right expression, namely the types to which left should - * be casted - * @param state the current execution state - * @param pp the program point that where this operation is being - * evaluated + * @param cast the type casted expression + * @param left the left expression, namely the expression to be casted + * @param right the right expression, namely the types to which left should + * be casted + * @param state the current execution state + * @param pp the program point that where this operation is being + * evaluated + * @param oracle the oracle for inter-domain communication * * @return the evaluation of the type cast expression * * @throws SemanticException if an error occurs during the computation */ @SuppressWarnings("unchecked") - default InferredPair evalTypeCast(BinaryExpression cast, T left, T right, T state, ProgramPoint pp) + default InferredPair evalTypeCast( + BinaryExpression cast, + T left, + T right, + T state, + ProgramPoint pp, + SemanticOracle oracle) throws SemanticException { T bot = bottom(); - return cast.getRuntimeTypes(pp.getProgram().getTypes()).isEmpty() ? new InferredPair<>(bot, bot, bot) + return oracle.getRuntimeTypesOf(cast, pp, oracle).isEmpty() ? new InferredPair<>(bot, bot, bot) : new InferredPair<>((T) this, left, state); } @@ -441,13 +581,21 @@ default InferredPair evalTypeCast(BinaryExpression cast, T left, T right, T s * @param state the current execution state * @param pp the program point that where this operation is being * evaluated + * @param oracle the oracle for inter-domain communication * * @return the evaluation of the expression * * @throws SemanticException if an error occurs during the computation */ - default InferredPair evalTernaryExpression(TernaryOperator operator, T left, T middle, T right, T state, - ProgramPoint pp) throws SemanticException { + default InferredPair evalTernaryExpression( + TernaryOperator operator, + T left, + T middle, + T right, + T state, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { T top = top(); return new InferredPair<>(top, top, top); } @@ -455,10 +603,11 @@ default InferredPair evalTernaryExpression(TernaryOperator operator, T left, /** * Yields the satisfiability of an abstract value of type {@code }. * - * @param value the abstract value whose satisfiability is to be evaluated - * @param state the current execution state - * @param pp the program point that where this operation is being - * evaluated + * @param value the abstract value whose satisfiability is to be evaluated + * @param state the current execution state + * @param pp the program point that where this operation is being + * evaluated + * @param oracle the oracle for inter-domain communication * * @return {@link Satisfiability#SATISFIED} if the expression is satisfied * by this domain, {@link Satisfiability#NOT_SATISFIED} if it is @@ -469,7 +618,12 @@ default InferredPair evalTernaryExpression(TernaryOperator operator, T left, * * @throws SemanticException if an error occurs during the computation */ - default Satisfiability satisfiesAbstractValue(T value, T state, ProgramPoint pp) throws SemanticException { + default Satisfiability satisfiesAbstractValue( + T value, + T state, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { return Satisfiability.UNKNOWN; } @@ -478,6 +632,7 @@ default Satisfiability satisfiesAbstractValue(T value, T state, ProgramPoint pp) * * @param pushAny the push any expression to satisfy * @param state the current execution state + * @param oracle the oracle for inter-domain communication * * @return {@link Satisfiability#SATISFIED} if the expression is satisfied * by this domain, {@link Satisfiability#NOT_SATISFIED} if it is @@ -488,7 +643,11 @@ default Satisfiability satisfiesAbstractValue(T value, T state, ProgramPoint pp) * * @throws SemanticException if an error occurs during the computation */ - default Satisfiability satisfiesPushAny(PushAny pushAny, T state) throws SemanticException { + default Satisfiability satisfiesPushAny( + PushAny pushAny, + T state, + SemanticOracle oracle) + throws SemanticException { return Satisfiability.UNKNOWN; } @@ -496,9 +655,10 @@ default Satisfiability satisfiesPushAny(PushAny pushAny, T state) throws Semanti * Yields the satisfiability of the null constant {@link NullConstant} on * this abstract domain. * - * @param state the current execution state - * @param pp the program point that where this operation is being - * evaluated + * @param state the current execution state + * @param pp the program point that where this operation is being + * evaluated + * @param oracle the oracle for inter-domain communication * * @return {@link Satisfiability#SATISFIED} if the expression is satisfied * by this domain, {@link Satisfiability#NOT_SATISFIED} if it is @@ -509,7 +669,11 @@ default Satisfiability satisfiesPushAny(PushAny pushAny, T state) throws Semanti * * @throws SemanticException if an error occurs during the computation */ - default Satisfiability satisfiesNullConstant(T state, ProgramPoint pp) throws SemanticException { + default Satisfiability satisfiesNullConstant( + T state, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { return Satisfiability.UNKNOWN; } @@ -521,6 +685,7 @@ default Satisfiability satisfiesNullConstant(T state, ProgramPoint pp) throws Se * @param state the current execution state * @param pp the program point that where this operation is being * evaluated + * @param oracle the oracle for inter-domain communication * * @return {@link Satisfiability#SATISFIED} is the constant is satisfied by * this domain, {@link Satisfiability#NOT_SATISFIED} if it is @@ -531,7 +696,11 @@ default Satisfiability satisfiesNullConstant(T state, ProgramPoint pp) throws Se * * @throws SemanticException if an error occurs during the computation */ - default Satisfiability satisfiesNonNullConstant(Constant constant, T state, ProgramPoint pp) + default Satisfiability satisfiesNonNullConstant( + Constant constant, + T state, + ProgramPoint pp, + SemanticOracle oracle) throws SemanticException { return Satisfiability.UNKNOWN; } @@ -549,6 +718,7 @@ default Satisfiability satisfiesNonNullConstant(Constant constant, T state, Prog * @param state the current execution state * @param pp the program point that where this operation is being * evaluated + * @param oracle the oracle for inter-domain communication * * @return {@link Satisfiability#SATISFIED} if the expression is satisfied * by this domain, {@link Satisfiability#NOT_SATISFIED} if it is @@ -559,7 +729,12 @@ default Satisfiability satisfiesNonNullConstant(Constant constant, T state, Prog * * @throws SemanticException if an error occurs during the computation */ - default Satisfiability satisfiesUnaryExpression(UnaryOperator operator, T arg, T state, ProgramPoint pp) + default Satisfiability satisfiesUnaryExpression( + UnaryOperator operator, + T arg, + T state, + ProgramPoint pp, + SemanticOracle oracle) throws SemanticException { return Satisfiability.UNKNOWN; } @@ -582,6 +757,7 @@ default Satisfiability satisfiesUnaryExpression(UnaryOperator operator, T arg, T * @param state the current execution state * @param pp the program point that where this operation is being * evaluated + * @param oracle the oracle for inter-domain communication * * @return {@link Satisfiability#SATISFIED} if the expression is satisfied * by this domain, {@link Satisfiability#NOT_SATISFIED} if it is @@ -592,8 +768,14 @@ default Satisfiability satisfiesUnaryExpression(UnaryOperator operator, T arg, T * * @throws SemanticException if an error occurs during the computation */ - default Satisfiability satisfiesBinaryExpression(BinaryOperator operator, T left, T right, T state, - ProgramPoint pp) throws SemanticException { + default Satisfiability satisfiesBinaryExpression( + BinaryOperator operator, + T left, + T right, + T state, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { return Satisfiability.UNKNOWN; } @@ -616,6 +798,7 @@ default Satisfiability satisfiesBinaryExpression(BinaryOperator operator, T left * @param state the current execution state * @param pp the program point that where this operation is being * evaluated + * @param oracle the oracle for inter-domain communication * * @return {@link Satisfiability#SATISFIED} if the expression is satisfied * by this domain, {@link Satisfiability#NOT_SATISFIED} if it is @@ -626,35 +809,62 @@ default Satisfiability satisfiesBinaryExpression(BinaryOperator operator, T left * * @throws SemanticException if an error occurs during the computation */ - default Satisfiability satisfiesTernaryExpression(TernaryOperator operator, T left, T middle, T right, T state, - ProgramPoint pp) throws SemanticException { + default Satisfiability satisfiesTernaryExpression( + TernaryOperator operator, + T left, + T middle, + T right, + T state, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { return Satisfiability.UNKNOWN; } @Override - default boolean tracksIdentifiers(Identifier id) { - // As default, base inferred values tracks only non-pointer identifier - return canProcess(id); - } + default boolean canProcess( + SymbolicExpression expression, + ProgramPoint pp, + SemanticOracle oracle) { + if (expression instanceof PushInv) + // the type approximation of a pushinv is bottom, so the below check + // will always fail regardless of the kind of value we are tracking + return expression.getStaticType().isValueType(); + + Set rts = null; + try { + rts = oracle.getRuntimeTypesOf(expression, pp, oracle); + } catch (SemanticException e) { + return false; + } - @Override - default boolean canProcess(SymbolicExpression expression) { - if (expression.hasRuntimeTypes()) - return expression.getRuntimeTypes(null).stream().anyMatch(t -> !t.isPointerType() && !t.isInMemoryType()); - return !expression.getStaticType().isPointerType() && !expression.getStaticType().isInMemoryType(); + if (rts == null || rts.isEmpty()) + // if we have no runtime types, either the type domain has no type + // information for the given expression (thus it can be anything, + // also something that we can track) or the computation returned + // bottom (and the whole state is likely going to go to bottom + // anyway). + return true; + + return rts.stream().anyMatch(Type::isValueType); } @Override - default InferenceSystem assume(InferenceSystem environment, ValueExpression expression, ProgramPoint src, - ProgramPoint dest) throws SemanticException { - Satisfiability sat = satisfies(expression, environment, src); + default InferenceSystem assume( + InferenceSystem environment, + ValueExpression expression, + ProgramPoint src, + ProgramPoint dest, + SemanticOracle oracle) + throws SemanticException { + Satisfiability sat = satisfies(expression, environment, src, oracle); if (sat == Satisfiability.NOT_SATISFIED) return environment.bottom(); if (sat == Satisfiability.SATISFIED) return new InferenceSystem<>( environment.lattice, environment.function, - eval(expression, environment, src).getState()); + eval(expression, environment, src, oracle).getState()); return environment; } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/inference/InferenceSystem.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/inference/InferenceSystem.java index dc30859d2..adcff252c 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/inference/InferenceSystem.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/inference/InferenceSystem.java @@ -1,14 +1,16 @@ package it.unive.lisa.analysis.nonrelational.inference; import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.SemanticOracle; +import it.unive.lisa.analysis.lattices.Satisfiability; import it.unive.lisa.analysis.nonrelational.VariableLift; import it.unive.lisa.analysis.nonrelational.inference.InferredValue.InferredPair; -import it.unive.lisa.analysis.representation.DomainRepresentation; -import it.unive.lisa.analysis.representation.ObjectRepresentation; import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.program.cfg.ProgramPoint; import it.unive.lisa.symbolic.value.Identifier; import it.unive.lisa.symbolic.value.ValueExpression; +import it.unive.lisa.util.representation.ObjectRepresentation; +import it.unive.lisa.util.representation.StructuredRepresentation; import java.util.Map; /** @@ -21,8 +23,10 @@ * @param the type of {@link InferredValue} in this inference system */ public class InferenceSystem> - extends VariableLift, ValueExpression, T> - implements ValueDomain> { + extends + VariableLift, ValueExpression, T> + implements + ValueDomain> { private final T state; @@ -32,7 +36,8 @@ public class InferenceSystem> * @param domain a singleton instance to be used during semantic operations * to retrieve top and bottom values */ - public InferenceSystem(T domain) { + public InferenceSystem( + T domain) { super(domain); state = domain.bottom(); } @@ -44,7 +49,9 @@ public InferenceSystem(T domain) { * @param other the inference system to copy * @param state the new execution state */ - public InferenceSystem(InferenceSystem other, T state) { + public InferenceSystem( + InferenceSystem other, + T state) { this(other.lattice, other.function, state); } @@ -60,31 +67,35 @@ public InferenceSystem(InferenceSystem other, T state) { * new environment; can be {@code null} * @param state the execution state after the last computed expression */ - public InferenceSystem(T domain, Map function, T state) { + public InferenceSystem( + T domain, + Map function, + T state) { super(domain, function); this.state = state; } @Override - public InferenceSystem mk(T lattice, Map function) { + public InferenceSystem mk( + T lattice, + Map function) { return new InferenceSystem<>(lattice, function, state); } @Override - public InferenceSystem assign(Identifier id, ValueExpression expression, ProgramPoint pp) + public InferenceSystem assign( + Identifier id, + ValueExpression expression, + ProgramPoint pp, + SemanticOracle oracle) throws SemanticException { - if (isBottom()) - return this; - - // If id cannot be tracked by the underlying - // lattice, return this - if (!lattice.canProcess(expression) || !lattice.tracksIdentifiers(id)) + if (isBottom() || !lattice.canProcess(expression, pp, oracle)) return this; Map func = mkNewFunction(function, false); - InferredPair eval = lattice.eval(expression, this, pp); + InferredPair eval = lattice.eval(expression, this, pp, oracle); T value = eval.getInferred(); - T v = lattice.variable(id, pp); + T v = lattice.fixedVariable(id, pp, oracle); if (!v.isBottom()) // some domains might provide fixed representations // for some variables @@ -108,26 +119,34 @@ public T getExecutionState() { } @Override - public InferenceSystem smallStepSemantics(ValueExpression expression, ProgramPoint pp) throws SemanticException { + public InferenceSystem smallStepSemantics( + ValueExpression expression, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { if (isBottom()) return this; - return new InferenceSystem<>(lattice, function, lattice.eval(expression, this, pp).getState()); + return new InferenceSystem<>(lattice, function, lattice.eval(expression, this, pp, oracle).getState()); } @Override - public InferenceSystem assume(ValueExpression expression, ProgramPoint src, ProgramPoint dest) + public InferenceSystem assume( + ValueExpression expression, + ProgramPoint src, + ProgramPoint dest, + SemanticOracle oracle) throws SemanticException { if (isBottom()) return this; - Satisfiability sat = lattice.satisfies(expression, this, src); + Satisfiability sat = lattice.satisfies(expression, this, src, oracle); if (sat == Satisfiability.NOT_SATISFIED) return bottom(); if (sat == Satisfiability.SATISFIED) - return new InferenceSystem<>(lattice, function, lattice.eval(expression, this, src).getState()); + return new InferenceSystem<>(lattice, function, lattice.eval(expression, this, src, oracle).getState()); - return lattice.assume(this, expression, src, dest); + return lattice.assume(this, expression, src, dest, oracle); } /** @@ -135,13 +154,18 @@ public InferenceSystem assume(ValueExpression expression, ProgramPoint src, P * * @param expression the expression to evaluate * @param pp the program point where the evaluation happens + * @param oracle the oracle for inter-domain communication * * @return the abstract result of the evaluation * * @throws SemanticException if an error happens during the evaluation */ - public T eval(ValueExpression expression, ProgramPoint pp) throws SemanticException { - return lattice.eval(expression, this, pp).getInferred(); + public T eval( + ValueExpression expression, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + return lattice.eval(expression, this, pp, oracle).getInferred(); } @Override @@ -165,34 +189,41 @@ public boolean isBottom() { } @Override - public InferenceSystem lubAux(InferenceSystem other) + public InferenceSystem lubAux( + InferenceSystem other) throws SemanticException { - InferenceSystem newEnv = functionalLift(other, this::lubKeys, (o1, o2) -> o1 == null ? o2 : o1.lub(o2)); + InferenceSystem newEnv = super.lubAux(other); return new InferenceSystem<>(newEnv.lattice, newEnv.function, state.lub(other.state)); } @Override - public InferenceSystem wideningAux(InferenceSystem other) throws SemanticException { - InferenceSystem< - T> newEnv = functionalLift(other, this::lubKeys, (o1, o2) -> o1 == null ? o2 : o1.widening(o2)); + public InferenceSystem wideningAux( + InferenceSystem other) + throws SemanticException { + InferenceSystem newEnv = super.wideningAux(other); return new InferenceSystem<>(newEnv.lattice, newEnv.function, state.widening(other.state)); } @Override - public InferenceSystem glbAux(InferenceSystem other) throws SemanticException { - InferenceSystem newEnv = functionalLift(other, this::glbKeys, (o1, o2) -> o1 == null ? o2 : o1.glb(o2)); + public InferenceSystem glbAux( + InferenceSystem other) + throws SemanticException { + InferenceSystem newEnv = super.glbAux(other); return new InferenceSystem<>(newEnv.lattice, newEnv.function, state.glb(other.state)); } @Override - public InferenceSystem narrowingAux(InferenceSystem other) throws SemanticException { - InferenceSystem< - T> newEnv = functionalLift(other, this::glbKeys, (o1, o2) -> o1 == null ? o2 : o1.narrowing(o2)); + public InferenceSystem narrowingAux( + InferenceSystem other) + throws SemanticException { + InferenceSystem newEnv = super.narrowingAux(other); return new InferenceSystem<>(newEnv.lattice, newEnv.function, state.narrowing(other.state)); } @Override - public boolean lessOrEqualAux(InferenceSystem other) throws SemanticException { + public boolean lessOrEqualAux( + InferenceSystem other) + throws SemanticException { if (!super.lessOrEqualAux(other)) return false; @@ -208,7 +239,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (!super.equals(obj)) @@ -225,7 +257,7 @@ public boolean equals(Object obj) { } @Override - public DomainRepresentation representation() { + public StructuredRepresentation representation() { if (isBottom() || isTop()) return super.representation(); diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/inference/InferredValue.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/inference/InferredValue.java index f9ebe14e2..75a4d05f7 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/inference/InferredValue.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/inference/InferredValue.java @@ -2,28 +2,30 @@ import it.unive.lisa.analysis.BaseLattice; import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.SemanticOracle; import it.unive.lisa.analysis.nonrelational.NonRelationalDomain; import it.unive.lisa.analysis.nonrelational.NonRelationalElement; -import it.unive.lisa.analysis.representation.DomainRepresentation; -import it.unive.lisa.analysis.representation.ObjectRepresentation; import it.unive.lisa.program.cfg.ProgramPoint; import it.unive.lisa.symbolic.value.ValueExpression; +import it.unive.lisa.util.representation.ObjectRepresentation; +import it.unive.lisa.util.representation.StructuredRepresentation; import java.util.Map; /** * A {@link NonRelationalElement} that can be inferred by * {@link InferenceSystem}s. The main difference between a * {@link NonRelationalDomain} and an {@link InferredValue} is that - * {@link #eval(ValueExpression, InferenceSystem, ProgramPoint)} returns - * instances of {@link InferredPair}, to model the fact that every semantic - * evaluation also modifies the execution state. + * {@link #eval(ValueExpression, InferenceSystem, ProgramPoint, SemanticOracle)} + * returns instances of {@link InferredPair}, to model the fact that every + * semantic evaluation also modifies the execution state. * * @author Luca Negrini * * @param the concrete type of inferred value */ public interface InferredValue> - extends NonRelationalElement> { + extends + NonRelationalElement> { /** * Evaluates a {@link ValueExpression}, assuming that the values of program @@ -34,6 +36,7 @@ public interface InferredValue> * variables for the evaluation * @param pp the program point that where this operation is being * evaluated + * @param oracle the oracle for inter-domain communication * * @return an new instance of this domain, representing the abstract result * of {@code expression} when evaluated on {@code environment}. @@ -42,7 +45,11 @@ public interface InferredValue> * * @throws SemanticException if something goes wrong during the computation */ - InferredPair eval(ValueExpression expression, InferenceSystem environment, ProgramPoint pp) + InferredPair eval( + ValueExpression expression, + InferenceSystem environment, + ProgramPoint pp, + SemanticOracle oracle) throws SemanticException; /** @@ -70,7 +77,10 @@ class InferredPair> implements BaseLattice lubAux(InferredPair other) throws SemanticException { + public InferredPair lubAux( + InferredPair other) + throws SemanticException { return new InferredPair<>(domain, inferred.lub(other.inferred), state.lub(other.state)); } @Override - public InferredPair glbAux(InferredPair other) throws SemanticException { + public InferredPair glbAux( + InferredPair other) + throws SemanticException { return new InferredPair<>(domain, inferred.glb(other.inferred), state.glb(other.state)); } @Override - public InferredPair wideningAux(InferredPair other) throws SemanticException { + public InferredPair wideningAux( + InferredPair other) + throws SemanticException { return new InferredPair<>(domain, inferred.widening(other.inferred), state.widening(other.state)); } @Override - public InferredPair narrowingAux(InferredPair other) throws SemanticException { + public InferredPair narrowingAux( + InferredPair other) + throws SemanticException { return new InferredPair<>(domain, inferred.narrowing(other.inferred), state.narrowing(other.state)); } @Override - public boolean lessOrEqualAux(InferredPair other) throws SemanticException { + public boolean lessOrEqualAux( + InferredPair other) + throws SemanticException { return inferred.lessOrEqual(other.inferred) && state.lessOrEqual(other.state); } @@ -152,7 +172,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -184,12 +205,12 @@ public String toString() { } /** - * Yields a {@link DomainRepresentation} of the information contained in - * this pair. + * Yields a {@link StructuredRepresentation} of the information + * contained in this pair. * * @return the representation */ - public DomainRepresentation representation() { + public StructuredRepresentation representation() { return new ObjectRepresentation( Map.of("value", inferred.representation(), "state", state.representation())); } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/value/BaseNonRelationalTypeDomain.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/value/BaseNonRelationalTypeDomain.java index 66ab6d41a..31a8a95ef 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/value/BaseNonRelationalTypeDomain.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/value/BaseNonRelationalTypeDomain.java @@ -1,8 +1,9 @@ package it.unive.lisa.analysis.nonrelational.value; import it.unive.lisa.analysis.BaseLattice; -import it.unive.lisa.analysis.SemanticDomain.Satisfiability; import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.SemanticOracle; +import it.unive.lisa.analysis.lattices.Satisfiability; import it.unive.lisa.analysis.nonrelational.Environment; import it.unive.lisa.program.cfg.ProgramPoint; import it.unive.lisa.symbolic.ExpressionVisitor; @@ -16,6 +17,7 @@ import it.unive.lisa.symbolic.value.Identifier; import it.unive.lisa.symbolic.value.NullConstant; import it.unive.lisa.symbolic.value.PushAny; +import it.unive.lisa.symbolic.value.PushInv; import it.unive.lisa.symbolic.value.Skip; import it.unive.lisa.symbolic.value.TernaryExpression; import it.unive.lisa.symbolic.value.UnaryExpression; @@ -32,7 +34,7 @@ /** * Base implementation for {@link NonRelationalTypeDomain}s. This class extends * {@link BaseLattice} and implements - * {@link NonRelationalTypeDomain#eval(SymbolicExpression, Environment, ProgramPoint)} + * {@link NonRelationalTypeDomain#eval(SymbolicExpression, Environment, ProgramPoint, SemanticOracle)} * by taking care of the recursive computation of inner expressions evaluation. * * @author Luca Negrini @@ -40,7 +42,9 @@ * @param the concrete type of this domain */ public interface BaseNonRelationalTypeDomain> - extends BaseLattice, NonRelationalTypeDomain { + extends + BaseLattice, + NonRelationalTypeDomain { /** * A {@link ExpressionVisitor} for {@link BaseNonRelationalTypeDomain} @@ -62,56 +66,91 @@ public class EvaluationVisitor> impleme * * @param singleton an instance of the domain using this visitor */ - public EvaluationVisitor(T singleton) { + public EvaluationVisitor( + T singleton) { this.singleton = singleton; } @Override - public T visit(AccessChild expression, T receiver, T child, Object... params) throws SemanticException { + public T visit( + AccessChild expression, + T receiver, + T child, + Object... params) + throws SemanticException { throw new SemanticException(CANNOT_PROCESS_ERROR); } @Override - public T visit(MemoryAllocation expression, Object... params) throws SemanticException { + public T visit( + MemoryAllocation expression, + Object... params) + throws SemanticException { throw new SemanticException(CANNOT_PROCESS_ERROR); } @Override - public T visit(HeapReference expression, T arg, Object... params) throws SemanticException { + public T visit( + HeapReference expression, + T arg, + Object... params) + throws SemanticException { throw new SemanticException(CANNOT_PROCESS_ERROR); } @Override - public T visit(HeapDereference expression, T arg, Object... params) throws SemanticException { + public T visit( + HeapDereference expression, + T arg, + Object... params) + throws SemanticException { throw new SemanticException(CANNOT_PROCESS_ERROR); } @Override - public T visit(UnaryExpression expression, T arg, Object... params) throws SemanticException { + public T visit( + UnaryExpression expression, + T arg, + Object... params) + throws SemanticException { if (arg.isBottom()) return arg; - return singleton.evalUnaryExpression(expression.getOperator(), arg, (ProgramPoint) params[1]); + return singleton.evalUnaryExpression(expression.getOperator(), arg, (ProgramPoint) params[1], + (SemanticOracle) params[2]); } @Override - public T visit(BinaryExpression expression, T left, T right, Object... params) throws SemanticException { + public T visit( + BinaryExpression expression, + T left, + T right, + Object... params) + throws SemanticException { if (left.isBottom()) return left; if (right.isBottom()) return right; if (expression.getOperator() == TypeCast.INSTANCE) - return singleton.evalTypeCast(expression, left, right, (ProgramPoint) params[1]); + return singleton.evalTypeCast(expression, left, right, (ProgramPoint) params[1], + (SemanticOracle) params[2]); if (expression.getOperator() == TypeConv.INSTANCE) - return singleton.evalTypeConv(expression, left, right, (ProgramPoint) params[1]); + return singleton.evalTypeConv(expression, left, right, (ProgramPoint) params[1], + (SemanticOracle) params[2]); - return singleton.evalBinaryExpression(expression.getOperator(), left, right, (ProgramPoint) params[1]); + return singleton.evalBinaryExpression(expression.getOperator(), left, right, (ProgramPoint) params[1], + (SemanticOracle) params[2]); } @Override - public T visit(TernaryExpression expression, T left, T middle, T right, Object... params) + public T visit( + TernaryExpression expression, + T left, + T middle, + T right, + Object... params) throws SemanticException { if (left.isBottom()) return left; @@ -121,55 +160,80 @@ public T visit(TernaryExpression expression, T left, T middle, T right, Object.. return right; return singleton.evalTernaryExpression(expression.getOperator(), left, middle, right, - (ProgramPoint) params[1]); + (ProgramPoint) params[1], (SemanticOracle) params[2]); } @Override - public T visit(Skip expression, Object... params) throws SemanticException { - return singleton.evalSkip(expression, (ProgramPoint) params[1]); + public T visit( + Skip expression, + Object... params) + throws SemanticException { + return singleton.evalSkip(expression, (ProgramPoint) params[1], (SemanticOracle) params[2]); + } + + @Override + public T visit( + PushAny expression, + Object... params) + throws SemanticException { + return singleton.evalPushAny(expression, (ProgramPoint) params[1], (SemanticOracle) params[2]); } @Override - public T visit(PushAny expression, Object... params) throws SemanticException { - return singleton.evalPushAny(expression, (ProgramPoint) params[1]); + public T visit( + PushInv expression, + Object... params) + throws SemanticException { + return singleton.evalPushInv(expression, (ProgramPoint) params[1], (SemanticOracle) params[2]); } @Override - public T visit(Constant expression, Object... params) throws SemanticException { + public T visit( + Constant expression, + Object... params) + throws SemanticException { if (expression instanceof NullConstant) - return singleton.evalNullConstant((ProgramPoint) params[1]); - return singleton.evalNonNullConstant(expression, (ProgramPoint) params[1]); + return singleton.evalNullConstant((ProgramPoint) params[1], (SemanticOracle) params[2]); + return singleton.evalNonNullConstant(expression, (ProgramPoint) params[1], (SemanticOracle) params[2]); } @Override - public T visit(Identifier expression, Object... params) throws SemanticException { - return singleton.evalIdentifier(expression, (TypeEnvironment) params[0], (ProgramPoint) params[1]); + public T visit( + Identifier expression, + Object... params) + throws SemanticException { + return singleton.evalIdentifier(expression, (TypeEnvironment) params[0], (ProgramPoint) params[1], + (SemanticOracle) params[2]); } } @Override - default Satisfiability satisfies(ValueExpression expression, TypeEnvironment environment, - ProgramPoint pp) throws SemanticException { + default Satisfiability satisfies( + ValueExpression expression, + TypeEnvironment environment, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { if (expression instanceof Identifier) - return satisfiesAbstractValue(environment.getState((Identifier) expression), pp); + return satisfiesAbstractValue(environment.getState((Identifier) expression), pp, oracle); if (expression instanceof NullConstant) - return satisfiesNullConstant(pp); + return satisfiesNullConstant(pp, oracle); if (expression instanceof Constant) - return satisfiesNonNullConstant((Constant) expression, pp); + return satisfiesNonNullConstant((Constant) expression, pp, oracle); if (expression instanceof UnaryExpression) { UnaryExpression unary = (UnaryExpression) expression; if (unary.getOperator() == LogicalNegation.INSTANCE) - return satisfies((ValueExpression) unary.getExpression(), environment, pp).negate(); + return satisfies((ValueExpression) unary.getExpression(), environment, pp, oracle).negate(); else { - T arg = eval((ValueExpression) unary.getExpression(), environment, pp); + T arg = eval((ValueExpression) unary.getExpression(), environment, pp, oracle); if (arg.isBottom()) return Satisfiability.BOTTOM; - return satisfiesUnaryExpression(unary.getOperator(), arg, pp); + return satisfiesUnaryExpression(unary.getOperator(), arg, pp, oracle); } } @@ -177,40 +241,40 @@ default Satisfiability satisfies(ValueExpression expression, TypeEnvironment BinaryExpression binary = (BinaryExpression) expression; if (binary.getOperator() == LogicalAnd.INSTANCE) - return satisfies((ValueExpression) binary.getLeft(), environment, pp) - .and(satisfies((ValueExpression) binary.getRight(), environment, pp)); + return satisfies((ValueExpression) binary.getLeft(), environment, pp, oracle) + .and(satisfies((ValueExpression) binary.getRight(), environment, pp, oracle)); else if (binary.getOperator() == LogicalOr.INSTANCE) - return satisfies((ValueExpression) binary.getLeft(), environment, pp) - .or(satisfies((ValueExpression) binary.getRight(), environment, pp)); + return satisfies((ValueExpression) binary.getLeft(), environment, pp, oracle) + .or(satisfies((ValueExpression) binary.getRight(), environment, pp, oracle)); else { - T left = eval((ValueExpression) binary.getLeft(), environment, pp); + T left = eval((ValueExpression) binary.getLeft(), environment, pp, oracle); if (left.isBottom()) return Satisfiability.BOTTOM; - T right = eval((ValueExpression) binary.getRight(), environment, pp); + T right = eval((ValueExpression) binary.getRight(), environment, pp, oracle); if (right.isBottom()) return Satisfiability.BOTTOM; - return satisfiesBinaryExpression(binary.getOperator(), left, right, pp); + return satisfiesBinaryExpression(binary.getOperator(), left, right, pp, oracle); } } if (expression instanceof TernaryExpression) { TernaryExpression ternary = (TernaryExpression) expression; - T left = eval((ValueExpression) ternary.getLeft(), environment, pp); + T left = eval((ValueExpression) ternary.getLeft(), environment, pp, oracle); if (left.isBottom()) return Satisfiability.BOTTOM; - T middle = eval((ValueExpression) ternary.getMiddle(), environment, pp); + T middle = eval((ValueExpression) ternary.getMiddle(), environment, pp, oracle); if (middle.isBottom()) return Satisfiability.BOTTOM; - T right = eval((ValueExpression) ternary.getRight(), environment, pp); + T right = eval((ValueExpression) ternary.getRight(), environment, pp, oracle); if (right.isBottom()) return Satisfiability.BOTTOM; - return satisfiesTernaryExpression(ternary.getOperator(), left, middle, right, pp); + return satisfiesTernaryExpression(ternary.getOperator(), left, middle, right, pp, oracle); } return Satisfiability.UNKNOWN; @@ -218,23 +282,22 @@ else if (binary.getOperator() == LogicalOr.INSTANCE) @Override @SuppressWarnings("unchecked") - default T eval(ValueExpression expression, TypeEnvironment environment, ProgramPoint pp) + default T eval( + ValueExpression expression, + TypeEnvironment environment, + ProgramPoint pp, + SemanticOracle oracle) throws SemanticException { - return expression.accept(new EvaluationVisitor<>((T) this), environment, pp); - } - - @Override - default boolean tracksIdentifiers(Identifier id) { - // As default, base non relational type domains - // tracks only non-pointer identifier - return canProcess(id); + return expression.accept(new EvaluationVisitor<>((T) this), environment, pp, oracle); } @Override - default boolean canProcess(SymbolicExpression expression) { - if (expression.hasRuntimeTypes()) - return expression.getRuntimeTypes(null).stream().anyMatch(t -> !t.isPointerType() && !t.isInMemoryType()); - return !expression.getStaticType().isPointerType() && !expression.getStaticType().isInMemoryType(); + default boolean canProcess( + SymbolicExpression expression, + ProgramPoint pp, + SemanticOracle oracle) { + // Type analysis can process any expression + return true; } /** @@ -244,12 +307,17 @@ default boolean canProcess(SymbolicExpression expression) { * @param environment the environment where the identifier must be evaluated * @param pp the program point that where this operation is being * evaluated + * @param oracle the oracle for inter-domain communication * * @return the evaluation of the identifier * * @throws SemanticException if an error occurs during the computation */ - default T evalIdentifier(Identifier id, TypeEnvironment environment, ProgramPoint pp) + default T evalIdentifier( + Identifier id, + TypeEnvironment environment, + ProgramPoint pp, + SemanticOracle oracle) throws SemanticException { return environment.getState(id); } @@ -257,15 +325,20 @@ default T evalIdentifier(Identifier id, TypeEnvironment environment, ProgramP /** * Yields the evaluation of a skip expression. * - * @param skip the skip expression to be evaluated - * @param pp the program point that where this operation is being - * evaluated + * @param skip the skip expression to be evaluated + * @param pp the program point that where this operation is being + * evaluated + * @param oracle the oracle for inter-domain communication * * @return the evaluation of the skip expression * * @throws SemanticException if an error occurs during the computation */ - default T evalSkip(Skip skip, ProgramPoint pp) throws SemanticException { + default T evalSkip( + Skip skip, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { return bottom(); } @@ -275,61 +348,105 @@ default T evalSkip(Skip skip, ProgramPoint pp) throws SemanticException { * @param pushAny the push-any expression to be evaluated * @param pp the program point that where this operation is being * evaluated + * @param oracle the oracle for inter-domain communication * * @return the evaluation of the push-any expression * * @throws SemanticException if an error occurs during the computation */ - default T evalPushAny(PushAny pushAny, ProgramPoint pp) throws SemanticException { + default T evalPushAny( + PushAny pushAny, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { return top(); } + /** + * Yields the evaluation of a push-inv expression. + * + * @param pushInv the push-inv expression to be evaluated + * @param pp the program point that where this operation is being + * evaluated + * @param oracle the oracle for inter-domain communication + * + * @return the evaluation of the push-inv expression + * + * @throws SemanticException if an error occurs during the computation + */ + default T evalPushInv( + PushInv pushInv, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + return bottom(); + } + /** * Yields the evaluation of a type conversion expression. * - * @param conv the type conversion expression - * @param left the left expression, namely the expression to be converted - * @param right the right expression, namely the types to which left should - * be converted - * @param pp the program point that where this operation is being - * evaluated + * @param conv the type conversion expression + * @param left the left expression, namely the expression to be converted + * @param right the right expression, namely the types to which left should + * be converted + * @param pp the program point that where this operation is being + * evaluated + * @param oracle the oracle for inter-domain communication * * @return the evaluation of the type conversion expression * * @throws SemanticException if an error occurs during the computation */ - default T evalTypeConv(BinaryExpression conv, T left, T right, ProgramPoint pp) throws SemanticException { - return conv.getRuntimeTypes(pp.getProgram().getTypes()).isEmpty() ? bottom() : left; + default T evalTypeConv( + BinaryExpression conv, + T left, + T right, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + return oracle.getRuntimeTypesOf(conv, pp, oracle).isEmpty() ? bottom() : left; } /** * Yields the evaluation of a type cast expression. * - * @param cast the type casted expression - * @param left the left expression, namely the expression to be casted - * @param right the right expression, namely the types to which left should - * be casted - * @param pp the program point that where this operation is being - * evaluated + * @param cast the type casted expression + * @param left the left expression, namely the expression to be casted + * @param right the right expression, namely the types to which left should + * be casted + * @param pp the program point that where this operation is being + * evaluated + * @param oracle the oracle for inter-domain communication * * @return the evaluation of the type cast expression * * @throws SemanticException if an error occurs during the computation */ - default T evalTypeCast(BinaryExpression cast, T left, T right, ProgramPoint pp) throws SemanticException { - return cast.getRuntimeTypes(pp.getProgram().getTypes()).isEmpty() ? bottom() : left; + default T evalTypeCast( + BinaryExpression cast, + T left, + T right, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + return oracle.getRuntimeTypesOf(cast, pp, oracle).isEmpty() ? bottom() : left; } /** * Yields the evaluation of the null constant {@link NullConstant}. * - * @param pp the program point that where this operation is being evaluated + * @param pp the program point that where this operation is being + * evaluated + * @param oracle the oracle for inter-domain communication * * @return the evaluation of the constant * * @throws SemanticException if an error occurs during the computation */ - default T evalNullConstant(ProgramPoint pp) throws SemanticException { + default T evalNullConstant( + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { return top(); } @@ -339,12 +456,17 @@ default T evalNullConstant(ProgramPoint pp) throws SemanticException { * @param constant the constant to evaluate * @param pp the program point that where this operation is being * evaluated + * @param oracle the oracle for inter-domain communication * * @return the evaluation of the constant * * @throws SemanticException if an error occurs during the computation */ - default T evalNonNullConstant(Constant constant, ProgramPoint pp) throws SemanticException { + default T evalNonNullConstant( + Constant constant, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { return top(); } @@ -358,12 +480,18 @@ default T evalNonNullConstant(Constant constant, ProgramPoint pp) throws Semanti * types of the expresion's argument * @param pp the program point that where this operation is being * evaluated + * @param oracle the oracle for inter-domain communication * * @return the evaluation of the expression * * @throws SemanticException if an error occurs during the computation */ - default T evalUnaryExpression(UnaryOperator operator, T arg, ProgramPoint pp) throws SemanticException { + default T evalUnaryExpression( + UnaryOperator operator, + T arg, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { return top(); } @@ -381,12 +509,18 @@ default T evalUnaryExpression(UnaryOperator operator, T arg, ProgramPoint pp) th * value of the right-hand side argument * @param pp the program point that where this operation is being * evaluated + * @param oracle the oracle for inter-domain communication * * @return the evaluation of the expression * * @throws SemanticException if an error occurs during the computation */ - default T evalBinaryExpression(BinaryOperator operator, T left, T right, ProgramPoint pp) + default T evalBinaryExpression( + BinaryOperator operator, + T left, + T right, + ProgramPoint pp, + SemanticOracle oracle) throws SemanticException { return top(); } @@ -406,12 +540,19 @@ default T evalBinaryExpression(BinaryOperator operator, T left, T right, Program * value of the right-hand side argument * @param pp the program point that where this operation is being * evaluated + * @param oracle the oracle for inter-domain communication * * @return the evaluation of the expression * * @throws SemanticException if an error occurs during the computation */ - default T evalTernaryExpression(TernaryOperator operator, T left, T middle, T right, ProgramPoint pp) + default T evalTernaryExpression( + TernaryOperator operator, + T left, + T middle, + T right, + ProgramPoint pp, + SemanticOracle oracle) throws SemanticException { return top(); } @@ -419,9 +560,10 @@ default T evalTernaryExpression(TernaryOperator operator, T left, T middle, T ri /** * Yields the satisfiability of an runtime types of type {@code }. * - * @param value the runtime types whose satisfiability is to be evaluated - * @param pp the program point that where this operation is being - * evaluated + * @param value the runtime types whose satisfiability is to be evaluated + * @param pp the program point that where this operation is being + * evaluated + * @param oracle the oracle for inter-domain communication * * @return {@link Satisfiability#SATISFIED} if the expression is satisfied * by this domain, {@link Satisfiability#NOT_SATISFIED} if it is @@ -432,7 +574,11 @@ default T evalTernaryExpression(TernaryOperator operator, T left, T middle, T ri * * @throws SemanticException if an error occurs during the computation */ - default Satisfiability satisfiesAbstractValue(T value, ProgramPoint pp) throws SemanticException { + default Satisfiability satisfiesAbstractValue( + T value, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { return Satisfiability.UNKNOWN; } @@ -440,7 +586,9 @@ default Satisfiability satisfiesAbstractValue(T value, ProgramPoint pp) throws S * Yields the satisfiability of the null constant {@link NullConstant} on * this abstract domain. * - * @param pp the program point that where this operation is being evaluated + * @param pp the program point that where this operation is being + * evaluated + * @param oracle the oracle for inter-domain communication * * @return {@link Satisfiability#SATISFIED} if the expression is satisfied * by this domain, {@link Satisfiability#NOT_SATISFIED} if it is @@ -451,7 +599,10 @@ default Satisfiability satisfiesAbstractValue(T value, ProgramPoint pp) throws S * * @throws SemanticException if an error occurs during the computation */ - default Satisfiability satisfiesNullConstant(ProgramPoint pp) throws SemanticException { + default Satisfiability satisfiesNullConstant( + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { return Satisfiability.UNKNOWN; } @@ -462,6 +613,7 @@ default Satisfiability satisfiesNullConstant(ProgramPoint pp) throws SemanticExc * @param constant the constant to satisfied * @param pp the program point that where this operation is being * evaluated + * @param oracle the oracle for inter-domain communication * * @return {@link Satisfiability#SATISFIED} is the constant is satisfied by * this domain, {@link Satisfiability#NOT_SATISFIED} if it is @@ -472,7 +624,11 @@ default Satisfiability satisfiesNullConstant(ProgramPoint pp) throws SemanticExc * * @throws SemanticException if an error occurs during the computation */ - default Satisfiability satisfiesNonNullConstant(Constant constant, ProgramPoint pp) throws SemanticException { + default Satisfiability satisfiesNonNullConstant( + Constant constant, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { return Satisfiability.UNKNOWN; } @@ -488,6 +644,7 @@ default Satisfiability satisfiesNonNullConstant(Constant constant, ProgramPoint * argument of the unary expression * @param pp the program point that where this operation is being * evaluated + * @param oracle the oracle for inter-domain communication * * @return {@link Satisfiability#SATISFIED} if the expression is satisfied * by this domain, {@link Satisfiability#NOT_SATISFIED} if it is @@ -498,7 +655,11 @@ default Satisfiability satisfiesNonNullConstant(Constant constant, ProgramPoint * * @throws SemanticException if an error occurs during the computation */ - default Satisfiability satisfiesUnaryExpression(UnaryOperator operator, T arg, ProgramPoint pp) + default Satisfiability satisfiesUnaryExpression( + UnaryOperator operator, + T arg, + ProgramPoint pp, + SemanticOracle oracle) throws SemanticException { return Satisfiability.UNKNOWN; } @@ -520,6 +681,7 @@ default Satisfiability satisfiesUnaryExpression(UnaryOperator operator, T arg, P * expression * @param pp the program point that where this operation is being * evaluated + * @param oracle the oracle for inter-domain communication * * @return {@link Satisfiability#SATISFIED} if the expression is satisfied * by this domain, {@link Satisfiability#NOT_SATISFIED} if it is @@ -530,8 +692,13 @@ default Satisfiability satisfiesUnaryExpression(UnaryOperator operator, T arg, P * * @throws SemanticException if an error occurs during the computation */ - default Satisfiability satisfiesBinaryExpression(BinaryOperator operator, T left, T right, - ProgramPoint pp) throws SemanticException { + default Satisfiability satisfiesBinaryExpression( + BinaryOperator operator, + T left, + T right, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { return Satisfiability.UNKNOWN; } @@ -553,6 +720,7 @@ default Satisfiability satisfiesBinaryExpression(BinaryOperator operator, T left * expression * @param pp the program point that where this operation is being * evaluated + * @param oracle the oracle for inter-domain communication * * @return {@link Satisfiability#SATISFIED} if the expression is satisfied * by this domain, {@link Satisfiability#NOT_SATISFIED} if it is @@ -563,15 +731,26 @@ default Satisfiability satisfiesBinaryExpression(BinaryOperator operator, T left * * @throws SemanticException if an error occurs during the computation */ - default Satisfiability satisfiesTernaryExpression(TernaryOperator operator, T left, T middle, T right, - ProgramPoint pp) throws SemanticException { + default Satisfiability satisfiesTernaryExpression( + TernaryOperator operator, + T left, + T middle, + T right, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { return Satisfiability.UNKNOWN; } @Override - default TypeEnvironment assume(TypeEnvironment environment, ValueExpression expression, - ProgramPoint src, ProgramPoint dest) throws SemanticException { - Satisfiability sat = satisfies(expression, environment, src); + default TypeEnvironment assume( + TypeEnvironment environment, + ValueExpression expression, + ProgramPoint src, + ProgramPoint dest, + SemanticOracle oracle) + throws SemanticException { + Satisfiability sat = satisfies(expression, environment, src, oracle); if (sat == Satisfiability.NOT_SATISFIED) return environment.bottom(); if (sat == Satisfiability.SATISFIED) @@ -585,32 +764,32 @@ default TypeEnvironment assume(TypeEnvironment environment, ValueExpressio // It is possible that the expression cannot be rewritten (e.g., // !true) hence we recursively call assume iff something changed if (rewritten != unary) - return assume(environment, rewritten, src, dest); + return assume(environment, rewritten, src, dest, oracle); } return assumeUnaryExpression(environment, unary.getOperator(), (ValueExpression) unary.getExpression(), - src, dest); + src, dest, oracle); } if (expression instanceof BinaryExpression) { BinaryExpression binary = (BinaryExpression) expression; if (binary.getOperator() == LogicalAnd.INSTANCE) - return assume(environment, (ValueExpression) binary.getLeft(), src, dest) - .glb(assume(environment, (ValueExpression) binary.getRight(), src, dest)); + return assume(environment, (ValueExpression) binary.getLeft(), src, dest, oracle) + .glb(assume(environment, (ValueExpression) binary.getRight(), src, dest, oracle)); else if (binary.getOperator() == LogicalOr.INSTANCE) - return assume(environment, (ValueExpression) binary.getLeft(), src, dest) - .lub(assume(environment, (ValueExpression) binary.getRight(), src, dest)); + return assume(environment, (ValueExpression) binary.getLeft(), src, dest, oracle) + .lub(assume(environment, (ValueExpression) binary.getRight(), src, dest, oracle)); else return assumeBinaryExpression(environment, binary.getOperator(), (ValueExpression) binary.getLeft(), - (ValueExpression) binary.getRight(), src, dest); + (ValueExpression) binary.getRight(), src, dest, oracle); } if (expression instanceof TernaryExpression) { TernaryExpression ternary = (TernaryExpression) expression; return assumeTernaryExpression(environment, ternary.getOperator(), (ValueExpression) ternary.getLeft(), - (ValueExpression) ternary.getMiddle(), (ValueExpression) ternary.getRight(), src, dest); + (ValueExpression) ternary.getMiddle(), (ValueExpression) ternary.getRight(), src, dest, oracle); } return environment; @@ -633,6 +812,7 @@ else if (binary.getOperator() == LogicalOr.INSTANCE) * the given expression * @param dest the program point where the execution will move after * the expression has been assumed + * @param oracle the oracle for inter-domain communication * * @return the environment {@code environment} assuming that a ternary * expression with operator {@code operator}, left argument @@ -641,9 +821,16 @@ else if (binary.getOperator() == LogicalOr.INSTANCE) * * @throws SemanticException if something goes wrong during the assumption */ - default TypeEnvironment assumeTernaryExpression(TypeEnvironment environment, - TernaryOperator operator, ValueExpression left, ValueExpression middle, ValueExpression right, - ProgramPoint src, ProgramPoint dest) throws SemanticException { + default TypeEnvironment assumeTernaryExpression( + TypeEnvironment environment, + TernaryOperator operator, + ValueExpression left, + ValueExpression middle, + ValueExpression right, + ProgramPoint src, + ProgramPoint dest, + SemanticOracle oracle) + throws SemanticException { return environment; } @@ -664,6 +851,7 @@ default TypeEnvironment assumeTernaryExpression(TypeEnvironment environmen * the given expression * @param dest the program point where the execution will move after * the expression has been assumed + * @param oracle the oracle for inter-domain communication * * @return the environment {@code environment} assuming that a binary * expression with operator {@code operator}, left argument @@ -671,9 +859,15 @@ default TypeEnvironment assumeTernaryExpression(TypeEnvironment environmen * * @throws SemanticException if something goes wrong during the assumption */ - default TypeEnvironment assumeBinaryExpression(TypeEnvironment environment, - BinaryOperator operator, ValueExpression left, ValueExpression right, ProgramPoint src, - ProgramPoint dest) throws SemanticException { + default TypeEnvironment assumeBinaryExpression( + TypeEnvironment environment, + BinaryOperator operator, + ValueExpression left, + ValueExpression right, + ProgramPoint src, + ProgramPoint dest, + SemanticOracle oracle) + throws SemanticException { return environment; } @@ -691,6 +885,7 @@ default TypeEnvironment assumeBinaryExpression(TypeEnvironment environment * the given expression * @param dest the program point where the execution will move after * the expression has been assumed + * @param oracle the oracle for inter-domain communication * * @return the environment {@code environment} assuming that an unary * expression with operator {@code operator} and argument @@ -698,8 +893,13 @@ default TypeEnvironment assumeBinaryExpression(TypeEnvironment environment * * @throws SemanticException if something goes wrong during the assumption */ - default TypeEnvironment assumeUnaryExpression(TypeEnvironment environment, - UnaryOperator operator, ValueExpression expression, ProgramPoint src, ProgramPoint dest) + default TypeEnvironment assumeUnaryExpression( + TypeEnvironment environment, + UnaryOperator operator, + ValueExpression expression, + ProgramPoint src, + ProgramPoint dest, + SemanticOracle oracle) throws SemanticException { return environment; } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/value/BaseNonRelationalValueDomain.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/value/BaseNonRelationalValueDomain.java index cc54f8877..9ba2e9270 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/value/BaseNonRelationalValueDomain.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/value/BaseNonRelationalValueDomain.java @@ -1,8 +1,9 @@ package it.unive.lisa.analysis.nonrelational.value; import it.unive.lisa.analysis.BaseLattice; -import it.unive.lisa.analysis.SemanticDomain.Satisfiability; import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.SemanticOracle; +import it.unive.lisa.analysis.lattices.Satisfiability; import it.unive.lisa.analysis.nonrelational.Environment; import it.unive.lisa.program.cfg.ProgramPoint; import it.unive.lisa.symbolic.ExpressionVisitor; @@ -16,6 +17,7 @@ import it.unive.lisa.symbolic.value.Identifier; import it.unive.lisa.symbolic.value.NullConstant; import it.unive.lisa.symbolic.value.PushAny; +import it.unive.lisa.symbolic.value.PushInv; import it.unive.lisa.symbolic.value.Skip; import it.unive.lisa.symbolic.value.TernaryExpression; import it.unive.lisa.symbolic.value.UnaryExpression; @@ -28,11 +30,13 @@ import it.unive.lisa.symbolic.value.operator.ternary.TernaryOperator; import it.unive.lisa.symbolic.value.operator.unary.LogicalNegation; import it.unive.lisa.symbolic.value.operator.unary.UnaryOperator; +import it.unive.lisa.type.Type; +import java.util.Set; /** * Base implementation for {@link NonRelationalValueDomain}s. This class extends * {@link BaseLattice} and implements - * {@link NonRelationalValueDomain#eval(SymbolicExpression, Environment, ProgramPoint)} + * {@link NonRelationalValueDomain#eval(SymbolicExpression, Environment, ProgramPoint, SemanticOracle)} * by taking care of the recursive computation of inner expressions evaluation. * * @author Luca Negrini @@ -40,7 +44,9 @@ * @param the concrete type of this domain */ public interface BaseNonRelationalValueDomain> - extends BaseLattice, NonRelationalValueDomain { + extends + BaseLattice, + NonRelationalValueDomain { /** * A {@link ExpressionVisitor} for {@link BaseNonRelationalValueDomain} @@ -62,56 +68,91 @@ public class EvaluationVisitor> implem * * @param singleton an instance of the domain using this visitor */ - public EvaluationVisitor(T singleton) { + public EvaluationVisitor( + T singleton) { this.singleton = singleton; } @Override - public T visit(AccessChild expression, T receiver, T child, Object... params) throws SemanticException { + public T visit( + AccessChild expression, + T receiver, + T child, + Object... params) + throws SemanticException { throw new SemanticException(CANNOT_PROCESS_ERROR); } @Override - public T visit(MemoryAllocation expression, Object... params) throws SemanticException { + public T visit( + MemoryAllocation expression, + Object... params) + throws SemanticException { throw new SemanticException(CANNOT_PROCESS_ERROR); } @Override - public T visit(HeapReference expression, T arg, Object... params) throws SemanticException { + public T visit( + HeapReference expression, + T arg, + Object... params) + throws SemanticException { throw new SemanticException(CANNOT_PROCESS_ERROR); } @Override - public T visit(HeapDereference expression, T arg, Object... params) throws SemanticException { + public T visit( + HeapDereference expression, + T arg, + Object... params) + throws SemanticException { throw new SemanticException(CANNOT_PROCESS_ERROR); } @Override - public T visit(UnaryExpression expression, T arg, Object... params) throws SemanticException { + public T visit( + UnaryExpression expression, + T arg, + Object... params) + throws SemanticException { if (arg.isBottom()) return arg; - return singleton.evalUnaryExpression(expression.getOperator(), arg, (ProgramPoint) params[1]); + return singleton.evalUnaryExpression(expression.getOperator(), arg, (ProgramPoint) params[1], + (SemanticOracle) params[2]); } @Override - public T visit(BinaryExpression expression, T left, T right, Object... params) throws SemanticException { + public T visit( + BinaryExpression expression, + T left, + T right, + Object... params) + throws SemanticException { if (left.isBottom()) return left; if (right.isBottom()) return right; + ProgramPoint pp = (ProgramPoint) params[1]; + SemanticOracle oracle = (SemanticOracle) params[2]; + if (expression.getOperator() == TypeCast.INSTANCE) - return singleton.evalTypeCast(expression, left, right, (ProgramPoint) params[1]); + return singleton.evalTypeCast(expression, left, right, pp, oracle); if (expression.getOperator() == TypeConv.INSTANCE) - return singleton.evalTypeConv(expression, left, right, (ProgramPoint) params[1]); + return singleton.evalTypeConv(expression, left, right, pp, oracle); - return singleton.evalBinaryExpression(expression.getOperator(), left, right, (ProgramPoint) params[1]); + return singleton.evalBinaryExpression(expression.getOperator(), left, right, pp, oracle); } @Override - public T visit(TernaryExpression expression, T left, T middle, T right, Object... params) + public T visit( + TernaryExpression expression, + T left, + T middle, + T right, + Object... params) throws SemanticException { if (left.isBottom()) return left; @@ -121,55 +162,80 @@ public T visit(TernaryExpression expression, T left, T middle, T right, Object.. return right; return singleton.evalTernaryExpression(expression.getOperator(), left, middle, right, - (ProgramPoint) params[1]); + (ProgramPoint) params[1], (SemanticOracle) params[2]); + } + + @Override + public T visit( + Skip expression, + Object... params) + throws SemanticException { + return singleton.evalSkip(expression, (ProgramPoint) params[1], (SemanticOracle) params[2]); } @Override - public T visit(Skip expression, Object... params) throws SemanticException { - return singleton.evalSkip(expression, (ProgramPoint) params[1]); + public T visit( + PushAny expression, + Object... params) + throws SemanticException { + return singleton.evalPushAny(expression, (ProgramPoint) params[1], (SemanticOracle) params[2]); } @Override - public T visit(PushAny expression, Object... params) throws SemanticException { - return singleton.evalPushAny(expression, (ProgramPoint) params[1]); + public T visit( + PushInv expression, + Object... params) + throws SemanticException { + return singleton.evalPushInv(expression, (ProgramPoint) params[1], (SemanticOracle) params[2]); } @Override - public T visit(Constant expression, Object... params) throws SemanticException { + public T visit( + Constant expression, + Object... params) + throws SemanticException { if (expression instanceof NullConstant) - return singleton.evalNullConstant((ProgramPoint) params[1]); - return singleton.evalNonNullConstant(expression, (ProgramPoint) params[1]); + return singleton.evalNullConstant((ProgramPoint) params[1], (SemanticOracle) params[2]); + return singleton.evalNonNullConstant(expression, (ProgramPoint) params[1], (SemanticOracle) params[2]); } @Override - public T visit(Identifier expression, Object... params) throws SemanticException { - return singleton.evalIdentifier(expression, (ValueEnvironment) params[0], (ProgramPoint) params[1]); + public T visit( + Identifier expression, + Object... params) + throws SemanticException { + return singleton.evalIdentifier(expression, (ValueEnvironment) params[0], (ProgramPoint) params[1], + (SemanticOracle) params[2]); } } @Override - default Satisfiability satisfies(ValueExpression expression, ValueEnvironment environment, - ProgramPoint pp) throws SemanticException { + default Satisfiability satisfies( + ValueExpression expression, + ValueEnvironment environment, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { if (expression instanceof Identifier) - return satisfiesAbstractValue(environment.getState((Identifier) expression), pp); + return satisfiesAbstractValue(environment.getState((Identifier) expression), pp, oracle); if (expression instanceof NullConstant) - return satisfiesNullConstant(pp); + return satisfiesNullConstant(pp, oracle); if (expression instanceof Constant) - return satisfiesNonNullConstant((Constant) expression, pp); + return satisfiesNonNullConstant((Constant) expression, pp, oracle); if (expression instanceof UnaryExpression) { UnaryExpression unary = (UnaryExpression) expression; if (unary.getOperator() == LogicalNegation.INSTANCE) - return satisfies((ValueExpression) unary.getExpression(), environment, pp).negate(); + return satisfies((ValueExpression) unary.getExpression(), environment, pp, oracle).negate(); else { - T arg = eval((ValueExpression) unary.getExpression(), environment, pp); + T arg = eval((ValueExpression) unary.getExpression(), environment, pp, oracle); if (arg.isBottom()) return Satisfiability.BOTTOM; - return satisfiesUnaryExpression(unary.getOperator(), arg, pp); + return satisfiesUnaryExpression(unary.getOperator(), arg, pp, oracle); } } @@ -177,40 +243,40 @@ default Satisfiability satisfies(ValueExpression expression, ValueEnvironment BinaryExpression binary = (BinaryExpression) expression; if (binary.getOperator() == LogicalAnd.INSTANCE) - return satisfies((ValueExpression) binary.getLeft(), environment, pp) - .and(satisfies((ValueExpression) binary.getRight(), environment, pp)); + return satisfies((ValueExpression) binary.getLeft(), environment, pp, oracle) + .and(satisfies((ValueExpression) binary.getRight(), environment, pp, oracle)); else if (binary.getOperator() == LogicalOr.INSTANCE) - return satisfies((ValueExpression) binary.getLeft(), environment, pp) - .or(satisfies((ValueExpression) binary.getRight(), environment, pp)); + return satisfies((ValueExpression) binary.getLeft(), environment, pp, oracle) + .or(satisfies((ValueExpression) binary.getRight(), environment, pp, oracle)); else { - T left = eval((ValueExpression) binary.getLeft(), environment, pp); + T left = eval((ValueExpression) binary.getLeft(), environment, pp, oracle); if (left.isBottom()) return Satisfiability.BOTTOM; - T right = eval((ValueExpression) binary.getRight(), environment, pp); + T right = eval((ValueExpression) binary.getRight(), environment, pp, oracle); if (right.isBottom()) return Satisfiability.BOTTOM; - return satisfiesBinaryExpression(binary.getOperator(), left, right, pp); + return satisfiesBinaryExpression(binary.getOperator(), left, right, pp, oracle); } } if (expression instanceof TernaryExpression) { TernaryExpression ternary = (TernaryExpression) expression; - T left = eval((ValueExpression) ternary.getLeft(), environment, pp); + T left = eval((ValueExpression) ternary.getLeft(), environment, pp, oracle); if (left.isBottom()) return Satisfiability.BOTTOM; - T middle = eval((ValueExpression) ternary.getMiddle(), environment, pp); + T middle = eval((ValueExpression) ternary.getMiddle(), environment, pp, oracle); if (middle.isBottom()) return Satisfiability.BOTTOM; - T right = eval((ValueExpression) ternary.getRight(), environment, pp); + T right = eval((ValueExpression) ternary.getRight(), environment, pp, oracle); if (right.isBottom()) return Satisfiability.BOTTOM; - return satisfiesTernaryExpression(ternary.getOperator(), left, middle, right, pp); + return satisfiesTernaryExpression(ternary.getOperator(), left, middle, right, pp, oracle); } return Satisfiability.UNKNOWN; @@ -218,23 +284,41 @@ else if (binary.getOperator() == LogicalOr.INSTANCE) @Override @SuppressWarnings("unchecked") - default T eval(ValueExpression expression, ValueEnvironment environment, ProgramPoint pp) + default T eval( + ValueExpression expression, + ValueEnvironment environment, + ProgramPoint pp, + SemanticOracle oracle) throws SemanticException { - return expression.accept(new EvaluationVisitor<>((T) this), environment, pp, this); + return expression.accept(new EvaluationVisitor<>((T) this), environment, pp, oracle); } @Override - default boolean tracksIdentifiers(Identifier id) { - // As default, base non relational values domains - // tracks only non-pointer identifier - return canProcess(id); - } + default boolean canProcess( + SymbolicExpression expression, + ProgramPoint pp, + SemanticOracle oracle) { + if (expression instanceof PushInv) + // the type approximation of a pushinv is bottom, so the below check + // will always fail regardless of the kind of value we are tracking + return expression.getStaticType().isValueType(); + + Set rts = null; + try { + rts = oracle.getRuntimeTypesOf(expression, pp, oracle); + } catch (SemanticException e) { + return false; + } - @Override - default boolean canProcess(SymbolicExpression expression) { - if (expression.hasRuntimeTypes()) - return expression.getRuntimeTypes(null).stream().anyMatch(t -> !t.isPointerType() && !t.isInMemoryType()); - return !expression.getStaticType().isPointerType() && !expression.getStaticType().isInMemoryType(); + if (rts == null || rts.isEmpty()) + // if we have no runtime types, either the type domain has no type + // information for the given expression (thus it can be anything, + // also something that we can track) or the computation returned + // bottom (and the whole state is likely going to go to bottom + // anyway). + return true; + + return rts.stream().anyMatch(Type::isValueType); } /** @@ -244,12 +328,17 @@ default boolean canProcess(SymbolicExpression expression) { * @param environment the environment where the identifier must be evaluated * @param pp the program point that where this operation is being * evaluated + * @param oracle the oracle for inter-domain communication * * @return the evaluation of the identifier * * @throws SemanticException if an error occurs during the computation */ - default T evalIdentifier(Identifier id, ValueEnvironment environment, ProgramPoint pp) + default T evalIdentifier( + Identifier id, + ValueEnvironment environment, + ProgramPoint pp, + SemanticOracle oracle) throws SemanticException { return environment.getState(id); } @@ -257,15 +346,20 @@ default T evalIdentifier(Identifier id, ValueEnvironment environment, Program /** * Yields the evaluation of a skip expression. * - * @param skip the skip expression to be evaluated - * @param pp the program point that where this operation is being - * evaluated + * @param skip the skip expression to be evaluated + * @param pp the program point that where this operation is being + * evaluated + * @param oracle the oracle for inter-domain communication * * @return the evaluation of the skip expression * * @throws SemanticException if an error occurs during the computation */ - default T evalSkip(Skip skip, ProgramPoint pp) throws SemanticException { + default T evalSkip( + Skip skip, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { return bottom(); } @@ -275,61 +369,105 @@ default T evalSkip(Skip skip, ProgramPoint pp) throws SemanticException { * @param pushAny the push-any expression to be evaluated * @param pp the program point that where this operation is being * evaluated + * @param oracle the oracle for inter-domain communication * * @return the evaluation of the push-any expression * * @throws SemanticException if an error occurs during the computation */ - default T evalPushAny(PushAny pushAny, ProgramPoint pp) throws SemanticException { + default T evalPushAny( + PushAny pushAny, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { return top(); } + /** + * Yields the evaluation of a push-inv expression. + * + * @param pushInv the push-inv expression to be evaluated + * @param pp the program point that where this operation is being + * evaluated + * @param oracle the oracle for inter-domain communication + * + * @return the evaluation of the push-inv expression + * + * @throws SemanticException if an error occurs during the computation + */ + default T evalPushInv( + PushInv pushInv, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + return bottom(); + } + /** * Yields the evaluation of a type conversion expression. * - * @param conv the type conversion expression - * @param left the left expression, namely the expression to be converted - * @param right the right expression, namely the types to which left should - * be converted - * @param pp the program point that where this operation is being - * evaluated + * @param conv the type conversion expression + * @param left the left expression, namely the expression to be converted + * @param right the right expression, namely the types to which left should + * be converted + * @param pp the program point that where this operation is being + * evaluated + * @param oracle the oracle for inter-domain communication * * @return the evaluation of the type conversion expression * * @throws SemanticException if an error occurs during the computation */ - default T evalTypeConv(BinaryExpression conv, T left, T right, ProgramPoint pp) throws SemanticException { - return conv.getRuntimeTypes(pp.getProgram().getTypes()).isEmpty() ? bottom() : left; + default T evalTypeConv( + BinaryExpression conv, + T left, + T right, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + return oracle.getRuntimeTypesOf(conv, pp, oracle).isEmpty() ? bottom() : left; } /** * Yields the evaluation of a type cast expression. * - * @param cast the type casted expression - * @param left the left expression, namely the expression to be casted - * @param right the right expression, namely the types to which left should - * be casted - * @param pp the program point that where this operation is being - * evaluated + * @param cast the type casted expression + * @param left the left expression, namely the expression to be casted + * @param right the right expression, namely the types to which left should + * be casted + * @param pp the program point that where this operation is being + * evaluated + * @param oracle the oracle for inter-domain communication * * @return the evaluation of the type cast expression * * @throws SemanticException if an error occurs during the computation */ - default T evalTypeCast(BinaryExpression cast, T left, T right, ProgramPoint pp) throws SemanticException { - return cast.getRuntimeTypes(pp.getProgram().getTypes()).isEmpty() ? bottom() : left; + default T evalTypeCast( + BinaryExpression cast, + T left, + T right, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + return oracle.getRuntimeTypesOf(cast, pp, oracle).isEmpty() ? bottom() : left; } /** * Yields the evaluation of the null constant {@link NullConstant}. * - * @param pp the program point that where this operation is being evaluated + * @param pp the program point that where this operation is being + * evaluated + * @param oracle the oracle for inter-domain communication * * @return the evaluation of the constant * * @throws SemanticException if an error occurs during the computation */ - default T evalNullConstant(ProgramPoint pp) throws SemanticException { + default T evalNullConstant( + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { return top(); } @@ -339,12 +477,17 @@ default T evalNullConstant(ProgramPoint pp) throws SemanticException { * @param constant the constant to evaluate * @param pp the program point that where this operation is being * evaluated + * @param oracle the oracle for inter-domain communication * * @return the evaluation of the constant * * @throws SemanticException if an error occurs during the computation */ - default T evalNonNullConstant(Constant constant, ProgramPoint pp) throws SemanticException { + default T evalNonNullConstant( + Constant constant, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { return top(); } @@ -358,12 +501,18 @@ default T evalNonNullConstant(Constant constant, ProgramPoint pp) throws Semanti * value of the expresion's argument * @param pp the program point that where this operation is being * evaluated + * @param oracle the oracle for inter-domain communication * * @return the evaluation of the expression * * @throws SemanticException if an error occurs during the computation */ - default T evalUnaryExpression(UnaryOperator operator, T arg, ProgramPoint pp) throws SemanticException { + default T evalUnaryExpression( + UnaryOperator operator, + T arg, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { return top(); } @@ -381,12 +530,18 @@ default T evalUnaryExpression(UnaryOperator operator, T arg, ProgramPoint pp) th * value of the right-hand side argument * @param pp the program point that where this operation is being * evaluated + * @param oracle the oracle for inter-domain communication * * @return the evaluation of the expression * * @throws SemanticException if an error occurs during the computation */ - default T evalBinaryExpression(BinaryOperator operator, T left, T right, ProgramPoint pp) + default T evalBinaryExpression( + BinaryOperator operator, + T left, + T right, + ProgramPoint pp, + SemanticOracle oracle) throws SemanticException { return top(); } @@ -407,12 +562,19 @@ default T evalBinaryExpression(BinaryOperator operator, T left, T right, Program * value of the right-hand side argument * @param pp the program point that where this operation is being * evaluated + * @param oracle the oracle for inter-domain communication * * @return the evaluation of the expression * * @throws SemanticException if an error occurs during the computation */ - default T evalTernaryExpression(TernaryOperator operator, T left, T middle, T right, ProgramPoint pp) + default T evalTernaryExpression( + TernaryOperator operator, + T left, + T middle, + T right, + ProgramPoint pp, + SemanticOracle oracle) throws SemanticException { return top(); } @@ -420,9 +582,10 @@ default T evalTernaryExpression(TernaryOperator operator, T left, T middle, T ri /** * Yields the satisfiability of an abstract value of type {@code }. * - * @param value the abstract value whose satisfiability is to be evaluated - * @param pp the program point that where this operation is being - * evaluated + * @param value the abstract value whose satisfiability is to be evaluated + * @param pp the program point that where this operation is being + * evaluated + * @param oracle the oracle for inter-domain communication * * @return {@link Satisfiability#SATISFIED} if the expression is satisfied * by this domain, {@link Satisfiability#NOT_SATISFIED} if it is @@ -433,7 +596,11 @@ default T evalTernaryExpression(TernaryOperator operator, T left, T middle, T ri * * @throws SemanticException if an error occurs during the computation */ - default Satisfiability satisfiesAbstractValue(T value, ProgramPoint pp) throws SemanticException { + default Satisfiability satisfiesAbstractValue( + T value, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { return Satisfiability.UNKNOWN; } @@ -441,7 +608,9 @@ default Satisfiability satisfiesAbstractValue(T value, ProgramPoint pp) throws S * Yields the satisfiability of the null constant {@link NullConstant} on * this abstract domain. * - * @param pp the program point that where this operation is being evaluated + * @param pp the program point that where this operation is being + * evaluated + * @param oracle the oracle for inter-domain communication * * @return {@link Satisfiability#SATISFIED} if the expression is satisfied * by this domain, {@link Satisfiability#NOT_SATISFIED} if it is @@ -452,7 +621,10 @@ default Satisfiability satisfiesAbstractValue(T value, ProgramPoint pp) throws S * * @throws SemanticException if an error occurs during the computation */ - default Satisfiability satisfiesNullConstant(ProgramPoint pp) throws SemanticException { + default Satisfiability satisfiesNullConstant( + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { return Satisfiability.UNKNOWN; } @@ -463,6 +635,7 @@ default Satisfiability satisfiesNullConstant(ProgramPoint pp) throws SemanticExc * @param constant the constant to satisfied * @param pp the program point that where this operation is being * evaluated + * @param oracle the oracle for inter-domain communication * * @return {@link Satisfiability#SATISFIED} is the constant is satisfied by * this domain, {@link Satisfiability#NOT_SATISFIED} if it is @@ -473,7 +646,11 @@ default Satisfiability satisfiesNullConstant(ProgramPoint pp) throws SemanticExc * * @throws SemanticException if an error occurs during the computation */ - default Satisfiability satisfiesNonNullConstant(Constant constant, ProgramPoint pp) throws SemanticException { + default Satisfiability satisfiesNonNullConstant( + Constant constant, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { return Satisfiability.UNKNOWN; } @@ -489,6 +666,7 @@ default Satisfiability satisfiesNonNullConstant(Constant constant, ProgramPoint * argument of the unary expression * @param pp the program point that where this operation is being * evaluated + * @param oracle the oracle for inter-domain communication * * @return {@link Satisfiability#SATISFIED} if the expression is satisfied * by this domain, {@link Satisfiability#NOT_SATISFIED} if it is @@ -499,7 +677,11 @@ default Satisfiability satisfiesNonNullConstant(Constant constant, ProgramPoint * * @throws SemanticException if an error occurs during the computation */ - default Satisfiability satisfiesUnaryExpression(UnaryOperator operator, T arg, ProgramPoint pp) + default Satisfiability satisfiesUnaryExpression( + UnaryOperator operator, + T arg, + ProgramPoint pp, + SemanticOracle oracle) throws SemanticException { return Satisfiability.UNKNOWN; } @@ -521,6 +703,7 @@ default Satisfiability satisfiesUnaryExpression(UnaryOperator operator, T arg, P * expression * @param pp the program point that where this operation is being * evaluated + * @param oracle the oracle for inter-domain communication * * @return {@link Satisfiability#SATISFIED} if the expression is satisfied * by this domain, {@link Satisfiability#NOT_SATISFIED} if it is @@ -531,8 +714,13 @@ default Satisfiability satisfiesUnaryExpression(UnaryOperator operator, T arg, P * * @throws SemanticException if an error occurs during the computation */ - default Satisfiability satisfiesBinaryExpression(BinaryOperator operator, T left, T right, - ProgramPoint pp) throws SemanticException { + default Satisfiability satisfiesBinaryExpression( + BinaryOperator operator, + T left, + T right, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { return Satisfiability.UNKNOWN; } @@ -554,6 +742,7 @@ default Satisfiability satisfiesBinaryExpression(BinaryOperator operator, T left * expression * @param pp the program point that where this operation is being * evaluated + * @param oracle the oracle for inter-domain communication * * @return {@link Satisfiability#SATISFIED} if the expression is satisfied * by this domain, {@link Satisfiability#NOT_SATISFIED} if it is @@ -564,15 +753,26 @@ default Satisfiability satisfiesBinaryExpression(BinaryOperator operator, T left * * @throws SemanticException if an error occurs during the computation */ - default Satisfiability satisfiesTernaryExpression(TernaryOperator operator, T left, T middle, T right, - ProgramPoint pp) throws SemanticException { + default Satisfiability satisfiesTernaryExpression( + TernaryOperator operator, + T left, + T middle, + T right, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { return Satisfiability.UNKNOWN; } @Override - default ValueEnvironment assume(ValueEnvironment environment, ValueExpression expression, - ProgramPoint src, ProgramPoint dest) throws SemanticException { - Satisfiability sat = satisfies(expression, environment, src); + default ValueEnvironment assume( + ValueEnvironment environment, + ValueExpression expression, + ProgramPoint src, + ProgramPoint dest, + SemanticOracle oracle) + throws SemanticException { + Satisfiability sat = satisfies(expression, environment, src, oracle); if (sat == Satisfiability.NOT_SATISFIED) return environment.bottom(); if (sat == Satisfiability.SATISFIED) @@ -586,32 +786,37 @@ default ValueEnvironment assume(ValueEnvironment environment, ValueExpress // It is possible that the expression cannot be rewritten (e.g., // !true) hence we recursively call assume iff something changed if (rewritten != unary) - return assume(environment, rewritten, src, dest); + return assume(environment, rewritten, src, dest, oracle); } - return assumeUnaryExpression(environment, unary.getOperator(), (ValueExpression) unary.getExpression(), src, - dest); + return assumeUnaryExpression( + environment, + unary.getOperator(), + (ValueExpression) unary.getExpression(), + src, + dest, + oracle); } if (expression instanceof BinaryExpression) { BinaryExpression binary = (BinaryExpression) expression; if (binary.getOperator() == LogicalAnd.INSTANCE) - return assume(environment, (ValueExpression) binary.getLeft(), src, dest) - .glb(assume(environment, (ValueExpression) binary.getRight(), src, dest)); + return assume(environment, (ValueExpression) binary.getLeft(), src, dest, oracle) + .glb(assume(environment, (ValueExpression) binary.getRight(), src, dest, oracle)); else if (binary.getOperator() == LogicalOr.INSTANCE) - return assume(environment, (ValueExpression) binary.getLeft(), src, dest) - .lub(assume(environment, (ValueExpression) binary.getRight(), src, dest)); + return assume(environment, (ValueExpression) binary.getLeft(), src, dest, oracle) + .lub(assume(environment, (ValueExpression) binary.getRight(), src, dest, oracle)); else return assumeBinaryExpression(environment, binary.getOperator(), (ValueExpression) binary.getLeft(), - (ValueExpression) binary.getRight(), src, dest); + (ValueExpression) binary.getRight(), src, dest, oracle); } if (expression instanceof TernaryExpression) { TernaryExpression ternary = (TernaryExpression) expression; return assumeTernaryExpression(environment, ternary.getOperator(), (ValueExpression) ternary.getLeft(), - (ValueExpression) ternary.getMiddle(), (ValueExpression) ternary.getRight(), src, dest); + (ValueExpression) ternary.getMiddle(), (ValueExpression) ternary.getRight(), src, dest, oracle); } return environment; @@ -634,6 +839,7 @@ else if (binary.getOperator() == LogicalOr.INSTANCE) * the given expression * @param dest the program point where the execution will move after * the expression has been assumed + * @param oracle the oracle for inter-domain communication * * @return the environment {@code environment} assuming that a ternary * expression with operator {@code operator}, left argument @@ -642,9 +848,16 @@ else if (binary.getOperator() == LogicalOr.INSTANCE) * * @throws SemanticException if something goes wrong during the assumption */ - default ValueEnvironment assumeTernaryExpression(ValueEnvironment environment, - TernaryOperator operator, ValueExpression left, ValueExpression middle, ValueExpression right, - ProgramPoint src, ProgramPoint dest) throws SemanticException { + default ValueEnvironment assumeTernaryExpression( + ValueEnvironment environment, + TernaryOperator operator, + ValueExpression left, + ValueExpression middle, + ValueExpression right, + ProgramPoint src, + ProgramPoint dest, + SemanticOracle oracle) + throws SemanticException { return environment; } @@ -665,6 +878,7 @@ default ValueEnvironment assumeTernaryExpression(ValueEnvironment environm * the given expression * @param dest the program point where the execution will move after * the expression has been assumed + * @param oracle the oracle for inter-domain communication * * @return the environment {@code environment} assuming that a binary * expression with operator {@code operator}, left argument @@ -672,9 +886,15 @@ default ValueEnvironment assumeTernaryExpression(ValueEnvironment environm * * @throws SemanticException if something goes wrong during the assumption */ - default ValueEnvironment assumeBinaryExpression(ValueEnvironment environment, - BinaryOperator operator, ValueExpression left, ValueExpression right, ProgramPoint src, - ProgramPoint dest) throws SemanticException { + default ValueEnvironment assumeBinaryExpression( + ValueEnvironment environment, + BinaryOperator operator, + ValueExpression left, + ValueExpression right, + ProgramPoint src, + ProgramPoint dest, + SemanticOracle oracle) + throws SemanticException { return environment; } @@ -692,6 +912,7 @@ default ValueEnvironment assumeBinaryExpression(ValueEnvironment environme * the given expression * @param dest the program point where the execution will move after * the expression has been assumed + * @param oracle the oracle for inter-domain communication * * @return the environment {@code environment} assuming that an unary * expression with operator {@code operator} and argument @@ -699,8 +920,13 @@ default ValueEnvironment assumeBinaryExpression(ValueEnvironment environme * * @throws SemanticException if something goes wrong during the assumption */ - default ValueEnvironment assumeUnaryExpression(ValueEnvironment environment, - UnaryOperator operator, ValueExpression expression, ProgramPoint src, ProgramPoint dest) + default ValueEnvironment assumeUnaryExpression( + ValueEnvironment environment, + UnaryOperator operator, + ValueExpression expression, + ProgramPoint src, + ProgramPoint dest, + SemanticOracle oracle) throws SemanticException { return environment; } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/value/NonRelationalTypeDomain.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/value/NonRelationalTypeDomain.java index d06bf6666..88a030026 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/value/NonRelationalTypeDomain.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/value/NonRelationalTypeDomain.java @@ -17,7 +17,8 @@ * @param the concrete type of the domain */ public interface NonRelationalTypeDomain> - extends NonRelationalDomain> { + extends + NonRelationalDomain> { /** * Yields the set containing the types held by this instance. diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/value/NonRelationalValueDomain.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/value/NonRelationalValueDomain.java index 151c71a06..27378ba85 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/value/NonRelationalValueDomain.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/value/NonRelationalValueDomain.java @@ -15,5 +15,6 @@ * @param the concrete type of the domain */ public interface NonRelationalValueDomain> - extends NonRelationalDomain> { + extends + NonRelationalDomain> { } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/value/TypeEnvironment.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/value/TypeEnvironment.java index afb4145bc..21a3ff862 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/value/TypeEnvironment.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/value/TypeEnvironment.java @@ -1,15 +1,18 @@ package it.unive.lisa.analysis.nonrelational.value; import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.SemanticOracle; +import it.unive.lisa.analysis.lattices.ExpressionSet; import it.unive.lisa.analysis.lattices.FunctionalLattice; import it.unive.lisa.analysis.nonrelational.Environment; -import it.unive.lisa.analysis.value.TypeDomain; +import it.unive.lisa.analysis.type.TypeDomain; import it.unive.lisa.program.cfg.ProgramPoint; +import it.unive.lisa.symbolic.SymbolicExpression; import it.unive.lisa.symbolic.value.Identifier; import it.unive.lisa.symbolic.value.ValueExpression; import it.unive.lisa.type.Type; import it.unive.lisa.type.Untyped; -import java.util.Collections; +import java.util.HashSet; import java.util.Map; import java.util.Set; @@ -20,9 +23,10 @@ * (identifiers) to values (instances of the domain), and lattice operations are * automatically lifted for individual elements of the environment if they are * mapped to the same key. An expression can be typed through - * {@link #getRuntimeTypesOf(ValueExpression, ProgramPoint)} (and - * {@link #getDynamicTypeOf(ValueExpression, ProgramPoint)} yields the lub of - * such types). + * {@link #getRuntimeTypesOf(SymbolicExpression, ProgramPoint, SemanticOracle)} + * (and + * {@link #getDynamicTypeOf(SymbolicExpression, ProgramPoint, SemanticOracle)} + * yields the lub of such types). * * @author Luca Negrini * @@ -30,8 +34,10 @@ * instances are mapped in this environment */ public class TypeEnvironment> - extends Environment, ValueExpression, T> - implements TypeDomain> { + extends + Environment, ValueExpression, T> + implements + TypeDomain> { /** * Builds an empty environment. @@ -39,7 +45,8 @@ public class TypeEnvironment> * @param domain a singleton instance to be used during semantic operations * to retrieve top and bottom values */ - public TypeEnvironment(T domain) { + public TypeEnvironment( + T domain) { super(domain); } @@ -54,12 +61,16 @@ public TypeEnvironment(T domain) { * @param function the function representing the mapping contained in the * new environment; can be {@code null} */ - public TypeEnvironment(T domain, Map function) { + public TypeEnvironment( + T domain, + Map function) { super(domain, function); } @Override - public TypeEnvironment mk(T lattice, Map function) { + public TypeEnvironment mk( + T lattice, + Map function) { return new TypeEnvironment<>(lattice, function); } @@ -74,17 +85,30 @@ public TypeEnvironment bottom() { } @Override - public Set getRuntimeTypesOf(ValueExpression e, ProgramPoint pp) { - try { - return eval(e, pp).getRuntimeTypes(); - } catch (SemanticException e1) { - return Collections.emptySet(); - } + public Set getRuntimeTypesOf( + SymbolicExpression e, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + if (!e.mightNeedRewriting() || e instanceof Identifier) + // we shortcut the evaluation of identifiers as those will be in the + // mapping if we know something about them + return eval((ValueExpression) e, pp, oracle).getRuntimeTypes(); + + ExpressionSet vexps = oracle.rewrite(e, pp, oracle); + Set result = new HashSet<>(); + for (SymbolicExpression vexp : vexps) + result.addAll(eval((ValueExpression) vexp, pp, oracle).getRuntimeTypes()); + return result; } @Override - public Type getDynamicTypeOf(ValueExpression e, ProgramPoint pp) { - Set types = getRuntimeTypesOf(e, pp); + public Type getDynamicTypeOf( + SymbolicExpression e, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + Set types = getRuntimeTypesOf(e, pp, oracle); if (types.isEmpty()) return Untyped.INSTANCE; return Type.commonSupertype(types, Untyped.INSTANCE); diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/value/ValueEnvironment.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/value/ValueEnvironment.java index 81b436043..ca79606be 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/value/ValueEnvironment.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/nonrelational/value/ValueEnvironment.java @@ -21,8 +21,10 @@ * whose instances are mapped in this environment */ public class ValueEnvironment> - extends Environment, ValueExpression, T> - implements ValueDomain> { + extends + Environment, ValueExpression, T> + implements + ValueDomain> { /** * Builds an empty environment. @@ -30,7 +32,8 @@ public class ValueEnvironment> * @param domain a singleton instance to be used during semantic operations * to retrieve top and bottom values */ - public ValueEnvironment(T domain) { + public ValueEnvironment( + T domain) { super(domain); } @@ -45,12 +48,16 @@ public ValueEnvironment(T domain) { * @param function the function representing the mapping contained in the * new environment; can be {@code null} */ - public ValueEnvironment(T domain, Map function) { + public ValueEnvironment( + T domain, + Map function) { super(domain, function); } @Override - public ValueEnvironment mk(T lattice, Map function) { + public ValueEnvironment mk( + T lattice, + Map function) { return new ValueEnvironment<>(lattice, function); } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/symbols/Aliases.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/symbols/Aliases.java index 8278d8f66..ce594c091 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/symbols/Aliases.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/symbols/Aliases.java @@ -27,7 +27,8 @@ public Aliases() { * * @param symbol the only symbol contained in this set */ - public Aliases(Symbol symbol) { + public Aliases( + Symbol symbol) { this(Collections.singleton(symbol), false); } @@ -36,11 +37,14 @@ public Aliases(Symbol symbol) { * * @param symbols the symbols contained in this set */ - public Aliases(Set symbols) { + public Aliases( + Set symbols) { this(symbols, false); } - private Aliases(Set symbols, boolean isTop) { + private Aliases( + Set symbols, + boolean isTop) { super(symbols, isTop); } @@ -55,7 +59,8 @@ public Aliases bottom() { } @Override - public Aliases mk(Set set) { + public Aliases mk( + Set set) { return new Aliases(set); } @@ -69,7 +74,8 @@ public Aliases mk(Set set) { * * @return a {@link CastIterable} that casts the elements */ - public Iterable castElements(Class type) { + public Iterable castElements( + Class type) { return new CastIterable<>(this, type); } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/symbols/NameSymbol.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/symbols/NameSymbol.java index f370bb65f..ac35dfc6f 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/symbols/NameSymbol.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/symbols/NameSymbol.java @@ -14,7 +14,8 @@ public class NameSymbol implements Symbol { * * @param name the name represented by this symbol */ - public NameSymbol(String name) { + public NameSymbol( + String name) { this.name = name; } @@ -36,7 +37,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/symbols/QualifiedNameSymbol.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/symbols/QualifiedNameSymbol.java index 9209137b1..172c66130 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/symbols/QualifiedNameSymbol.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/symbols/QualifiedNameSymbol.java @@ -18,7 +18,9 @@ public class QualifiedNameSymbol implements Symbol { * @param qualifier the qualifier represented by this symbol * @param name the name represented by this symbol */ - public QualifiedNameSymbol(String qualifier, String name) { + public QualifiedNameSymbol( + String qualifier, + String name) { this.qualifier = qualifier; this.name = name; } @@ -51,7 +53,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/symbols/QualifierSymbol.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/symbols/QualifierSymbol.java index 4cc52575a..6c4336fc3 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/symbols/QualifierSymbol.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/symbols/QualifierSymbol.java @@ -14,7 +14,8 @@ public class QualifierSymbol implements Symbol { * * @param qualifier the qualifier represented by this symbol */ - public QualifierSymbol(String qualifier) { + public QualifierSymbol( + String qualifier) { this.qualifier = qualifier; } @@ -36,7 +37,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/symbols/SymbolAliasing.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/symbols/SymbolAliasing.java index abdd8fb03..579b93627 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/symbols/SymbolAliasing.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/symbols/SymbolAliasing.java @@ -1,5 +1,6 @@ package it.unive.lisa.analysis.symbols; +import it.unive.lisa.analysis.FixpointInfo; import it.unive.lisa.analysis.lattices.FunctionalLattice; import java.util.Map; @@ -7,12 +8,20 @@ * A {@link FunctionalLattice} mapping {@link Symbol}s to {@link Aliases}, that * is, sets of symbols. Instances of this domain can be used to resolve targets * of calls when the names used in the call are different from the ones in the - * target's signature. + * target's signature. This lattice is designed to be stored within the + * analysis' {@link FixpointInfo} instance, using key {@value #INFO_KEY} (from + * field {@link #INFO_KEY}). * * @author Luca Negrini */ public class SymbolAliasing extends FunctionalLattice { + /** + * The key to use for accessing instances of this class within a + * {@link FixpointInfo} instance. + */ + public static final String INFO_KEY = "sym-aliasing"; + /** * Builds an empty map of aliases. */ @@ -20,7 +29,9 @@ public SymbolAliasing() { super(new Aliases()); } - private SymbolAliasing(Aliases lattice, Map function) { + private SymbolAliasing( + Aliases lattice, + Map function) { super(lattice, function); } @@ -33,7 +44,9 @@ private SymbolAliasing(Aliases lattice, Map function) { * * @return a copy of this domain, with the new alias */ - public SymbolAliasing putState(Symbol toAlias, Symbol alias) { + public SymbolAliasing putState( + Symbol toAlias, + Symbol alias) { return super.putState(toAlias, new Aliases(alias)); } @@ -48,7 +61,30 @@ public SymbolAliasing bottom() { } @Override - public SymbolAliasing mk(Aliases lattice, Map function) { + public SymbolAliasing mk( + Aliases lattice, + Map function) { return new SymbolAliasing(lattice, function); } + + @Override + public Aliases stateOfUnknown( + Symbol key) { + return lattice.bottom(); + } + + /** + * Registers an alias for the given symbol. Any previous aliases will be + * deleted. + * + * @param toAlias the symbol being aliased + * @param alias the alias for {@code toAlias} + * + * @return a copy of this analysis state, with the new alias + */ + public SymbolAliasing alias( + Symbol toAlias, + Symbol alias) { + return putState(toAlias, alias); + } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/type/TypeDomain.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/type/TypeDomain.java new file mode 100644 index 000000000..32209a031 --- /dev/null +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/type/TypeDomain.java @@ -0,0 +1,56 @@ +package it.unive.lisa.analysis.type; + +import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.SemanticOracle; +import it.unive.lisa.analysis.heap.HeapDomain; +import it.unive.lisa.analysis.heap.HeapSemanticOperation.HeapReplacement; +import it.unive.lisa.analysis.value.ValueDomain; +import it.unive.lisa.program.cfg.ProgramPoint; +import it.unive.lisa.symbolic.value.Identifier; + +/** + * An domain that is able to determine the runtime types of an expression given + * the runtime types of its operands. + * + * @author Luca Negrini + * + * @param the concrete type of the {@link TypeDomain} + */ +public interface TypeDomain> extends TypeOracle, ValueDomain { + + /** + * Applies a substitution of identifiers that is caused by a modification of + * the abstraction provided in the {@link HeapDomain} of the analysis. A + * substitution is composed by a list of {@link HeapReplacement} instances, + * that must be applied in order. + * + * @param r the replacement to apply + * @param pp the program point that where this operation is being + * evaluated + * @param oracle the oracle for inter-domain communication + * + * @return the type domain instance modified by the substitution + * + * @throws SemanticException if an error occurs during the computation + */ + @SuppressWarnings("unchecked") + default T applyReplacement( + HeapReplacement r, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + if (isTop() || isBottom() || r.getSources().isEmpty()) + return (T) this; + + T result = (T) this; + T lub = bottom(); + for (Identifier source : r.getSources()) { + T partial = result; + for (Identifier target : r.getTargets()) + partial = partial.assign(target, source, pp, oracle); + lub = lub.lub(partial); + } + return lub.forgetIdentifiers(r.getIdsToForget()); + + } +} diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/type/TypeOracle.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/type/TypeOracle.java new file mode 100644 index 000000000..773dceaf7 --- /dev/null +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/type/TypeOracle.java @@ -0,0 +1,53 @@ +package it.unive.lisa.analysis.type; + +import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.SemanticOracle; +import it.unive.lisa.program.cfg.ProgramPoint; +import it.unive.lisa.symbolic.SymbolicExpression; +import it.unive.lisa.type.Type; +import java.util.Set; + +/** + * An oracle that can be queried for runtime type information. + * + * @author Luca Negrini + */ +public interface TypeOracle { + + /** + * Yields the runtime types that this analysis infers for the given + * expression. + * + * @param e the expression to type + * @param pp the program point where the types are required + * @param oracle the oracle for inter-domain communication + * + * @return the runtime types + * + * @throws SemanticException if something goes wrong during the computation + */ + Set getRuntimeTypesOf( + SymbolicExpression e, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException; + + /** + * Yields the dynamic type that this analysis infers for the given + * expression. The dynamic type is the least common supertype of all its + * runtime types. + * + * @param e the expression to type + * @param pp the program point where the types are required + * @param oracle the oracle for inter-domain communication + * + * @return the dynamic type + * + * @throws SemanticException if something goes wrong during the computation + */ + Type getDynamicTypeOf( + SymbolicExpression e, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException; +} diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/value/TypeDomain.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/value/TypeDomain.java deleted file mode 100644 index ef2a23f01..000000000 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/value/TypeDomain.java +++ /dev/null @@ -1,40 +0,0 @@ -package it.unive.lisa.analysis.value; - -import it.unive.lisa.program.cfg.ProgramPoint; -import it.unive.lisa.symbolic.value.ValueExpression; -import it.unive.lisa.type.Type; -import java.util.Set; - -/** - * An domain that is able to determine the runtime types of an expression given - * the runtime types of its operands. - * - * @author Luca Negrini - * - * @param the concrete type of the {@link TypeDomain} - */ -public interface TypeDomain> extends ValueDomain { - - /** - * Yields the runtime types that this analysis infers for the given - * expression. - * - * @param e the expression to type - * @param pp the program point where the types are required - * - * @return the runtime types - */ - Set getRuntimeTypesOf(ValueExpression e, ProgramPoint pp); - - /** - * Yields the dynamic type that this analysis infers for the given - * expression. The dynamic type is the least common supertype of all its - * runtime types. - * - * @param e the expression to type - * @param pp the program point where the types are required - * - * @return the dynamic type - */ - Type getDynamicTypeOf(ValueExpression e, ProgramPoint pp); -} diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/value/ValueDomain.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/value/ValueDomain.java index 7dc8389fb..bb0a4622e 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/value/ValueDomain.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/value/ValueDomain.java @@ -3,6 +3,7 @@ import it.unive.lisa.analysis.Lattice; import it.unive.lisa.analysis.SemanticDomain; import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.SemanticOracle; import it.unive.lisa.analysis.heap.HeapDomain; import it.unive.lisa.analysis.heap.HeapSemanticOperation.HeapReplacement; import it.unive.lisa.program.cfg.ProgramPoint; @@ -21,7 +22,10 @@ * @param the concrete type of the {@link ValueDomain} */ public interface ValueDomain> - extends SemanticDomain, Lattice { + extends + ValueOracle, + SemanticDomain, + Lattice { /** * Applies a substitution of identifiers that is caused by a modification of @@ -29,15 +33,21 @@ public interface ValueDomain> * substitution is composed by a list of {@link HeapReplacement} instances, * that must be applied in order. * - * @param r the replacement to apply - * @param pp the program point that where this operation is being evaluated + * @param r the replacement to apply + * @param pp the program point that where this operation is being + * evaluated + * @param oracle the oracle for inter-domain communication * * @return the value domain instance modified by the substitution * * @throws SemanticException if an error occurs during the computation */ @SuppressWarnings("unchecked") - default D applyReplacement(HeapReplacement r, ProgramPoint pp) throws SemanticException { + default D applyReplacement( + HeapReplacement r, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { if (isTop() || isBottom() || r.getSources().isEmpty()) return (D) this; @@ -46,7 +56,7 @@ default D applyReplacement(HeapReplacement r, ProgramPoint pp) throws SemanticEx for (Identifier source : r.getSources()) { D partial = result; for (Identifier target : r.getTargets()) - partial = partial.assign(target, source, pp); + partial = partial.assign(target, source, pp, oracle); lub = lub.lub(partial); } return lub.forgetIdentifiers(r.getIdsToForget()); diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/value/ValueOracle.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/value/ValueOracle.java new file mode 100644 index 000000000..b30d21ed4 --- /dev/null +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/value/ValueOracle.java @@ -0,0 +1,10 @@ +package it.unive.lisa.analysis.value; + +/** + * An oracle that can be queried for information about values being computed + * during program execution. + * + * @author Luca Negrini + */ +public interface ValueOracle { +} diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/checks/Check.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/checks/Check.java index 0ad3584cc..b2e75cd9c 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/checks/Check.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/checks/Check.java @@ -33,7 +33,8 @@ public interface Check extends GraphVisitor { * @param tool the auxiliary tool that this check can use during the * execution */ - default void beforeExecution(T tool) { + default void beforeExecution( + T tool) { } /** @@ -44,7 +45,8 @@ default void beforeExecution(T tool) { * @param tool the auxiliary tool that this check can use during the * execution */ - default void afterExecution(T tool) { + default void afterExecution( + T tool) { } /** @@ -58,7 +60,9 @@ default void afterExecution(T tool) { * returns. If this method returns {@code false}, all members of * the unit will not be visited. */ - default boolean visitUnit(T tool, Unit unit) { + default boolean visitUnit( + T tool, + Unit unit) { return true; } @@ -71,6 +75,10 @@ default boolean visitUnit(T tool, Unit unit) { * @param instance whether or not the global is an instance member of the * unit */ - default void visitGlobal(T tool, Unit unit, Global global, boolean instance) { + default void visitGlobal( + T tool, + Unit unit, + Global global, + boolean instance) { } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/checks/ChecksExecutor.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/checks/ChecksExecutor.java index c5be79fde..0b3341dfd 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/checks/ChecksExecutor.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/checks/ChecksExecutor.java @@ -34,7 +34,9 @@ private ChecksExecutor() { * @param app the application to analyze * @param checks the checks to execute */ - public static , T> void executeAll(T tool, Application app, + public static , T> void executeAll( + T tool, + Application app, Iterable checks) { checks.forEach(c -> c.beforeExecution(tool)); @@ -44,7 +46,10 @@ public static , T> void executeAll(T tool, Application app, checks.forEach(c -> c.afterExecution(tool)); } - private static > void visitProgram(T tool, Program program, Iterable checks) { + private static > void visitProgram( + T tool, + Program program, + Iterable checks) { for (Global global : iterate(LOG, program.getGlobals(), "Analyzing program globals...", "Globals")) checks.forEach(c -> c.visitGlobal(tool, program, global, false)); @@ -56,7 +61,10 @@ private static > void visitProgram(T tool, Program program checks.forEach(c -> visitUnit(tool, unit, c)); } - private static , T> void visitUnit(T tool, Unit unit, C c) { + private static , T> void visitUnit( + T tool, + Unit unit, + C c) { if (!c.visitUnit(tool, unit)) return; diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/checks/semantic/CheckToolWithAnalysisResults.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/checks/semantic/CheckToolWithAnalysisResults.java index 4e07b6c8d..9930b3807 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/checks/semantic/CheckToolWithAnalysisResults.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/checks/semantic/CheckToolWithAnalysisResults.java @@ -4,9 +4,6 @@ import it.unive.lisa.analysis.AnalyzedCFG; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.checks.syntactic.CheckTool; import it.unive.lisa.conf.LiSAConfiguration; import it.unive.lisa.interprocedural.callgraph.CallGraph; @@ -27,16 +24,10 @@ * @author Luca Negrini * * @param the type of {@link AbstractState} contained in the results - * @param the type of {@link HeapDomain} contained in the results - * @param the type of {@link ValueDomain} contained in the results - * @param the type of {@link TypeDomain} contained in the results */ -public class CheckToolWithAnalysisResults, - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> extends CheckTool { +public class CheckToolWithAnalysisResults> extends CheckTool { - private final Map>> results; + private final Map>> results; private final CallGraph callgraph; @@ -49,8 +40,10 @@ public class CheckToolWithAnalysisResults, * @param callgraph the callgraph that has been built during the * analysis */ - public CheckToolWithAnalysisResults(LiSAConfiguration configuration, FileManager fileManager, - Map>> results, + public CheckToolWithAnalysisResults( + LiSAConfiguration configuration, + FileManager fileManager, + Map>> results, CallGraph callgraph) { super(configuration, fileManager); this.results = results; @@ -64,8 +57,9 @@ public CheckToolWithAnalysisResults(LiSAConfiguration configuration, FileManager * @param results the results to store * @param callgraph the callgraph that has been built during the analysis */ - public CheckToolWithAnalysisResults(CheckTool other, - Map>> results, + public CheckToolWithAnalysisResults( + CheckTool other, + Map>> results, CallGraph callgraph) { super(other); this.results = results; @@ -80,10 +74,20 @@ public CheckToolWithAnalysisResults(CheckTool other, * * @return the results on the given cfg */ - public Collection> getResultOf(CFG cfg) { + public Collection> getResultOf( + CFG cfg) { return results.get(cfg); } + /** + * Yields the {@link CallGraph} constructed during the analysis. + * + * @return the callgraph + */ + public CallGraph getCallGraph() { + return callgraph; + } + /** * Yields all the {@link CodeMember}s that call the given one, according to * the {@link CallGraph} that has been built during the analysis. @@ -92,7 +96,8 @@ public Collection> getResultOf(CFG cfg) { * * @return the collection of callers code members */ - public Collection getCallers(CodeMember cm) { + public Collection getCallers( + CodeMember cm) { return callgraph.getCallers(cm); } @@ -105,7 +110,8 @@ public Collection getCallers(CodeMember cm) { * * @return the collection of called code members */ - public Collection getCallees(CodeMember cm) { + public Collection getCallees( + CodeMember cm) { return callgraph.getCallees(cm); } @@ -118,7 +124,8 @@ public Collection getCallees(CodeMember cm) { * * @return the collection of calls that target the code member */ - public Collection getCallSites(CodeMember cm) { + public Collection getCallSites( + CodeMember cm) { return callgraph.getCallSites(cm); } @@ -134,8 +141,11 @@ public Collection getCallSites(CodeMember cm) { * * @throws SemanticException if something goes wrong during the computation */ - public Call getResolvedVersion(UnresolvedCall call, AnalyzedCFG result) throws SemanticException { - StatementStore store = new StatementStore<>(result.getEntryState().bottom()); + public Call getResolvedVersion( + UnresolvedCall call, + AnalyzedCFG result) + throws SemanticException { + StatementStore store = new StatementStore<>(result.getEntryState().bottom()); for (Expression e : call.getParameters()) store.put(e, result.getAnalysisStateAfter(e)); diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/checks/semantic/SemanticCheck.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/checks/semantic/SemanticCheck.java index b7e228d99..23ac4bf53 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/checks/semantic/SemanticCheck.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/checks/semantic/SemanticCheck.java @@ -1,9 +1,6 @@ package it.unive.lisa.checks.semantic; import it.unive.lisa.analysis.AbstractState; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.checks.Check; /** @@ -15,12 +12,6 @@ * @author Luca Negrini * * @param the type of {@link AbstractState} contained in the results - * @param the type of {@link HeapDomain} contained in the results - * @param the type of {@link ValueDomain} contained in the results - * @param the type of {@link TypeDomain} contained in the results */ -public interface SemanticCheck, - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> extends Check> { +public interface SemanticCheck> extends Check> { } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/checks/syntactic/CheckTool.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/checks/syntactic/CheckTool.java index 269528a37..1678d0121 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/checks/syntactic/CheckTool.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/checks/syntactic/CheckTool.java @@ -49,7 +49,9 @@ public class CheckTool { * @param configuration the configuration of the analysis * @param fileManager the file manager of the analysis */ - public CheckTool(LiSAConfiguration configuration, FileManager fileManager) { + public CheckTool( + LiSAConfiguration configuration, + FileManager fileManager) { warnings = Collections.newSetFromMap(new ConcurrentHashMap<>()); this.configuration = configuration; this.fileManager = fileManager; @@ -78,7 +80,8 @@ public FileManager getFileManager() { * * @param other the original tool to copy */ - protected CheckTool(CheckTool other) { + protected CheckTool( + CheckTool other) { this(other.configuration, other.fileManager); warnings.addAll(other.warnings); } @@ -91,7 +94,8 @@ protected CheckTool(CheckTool other) { * * @param message the message of the warning */ - public void warn(String message) { + public void warn( + String message) { warnings.add(new Warning(message)); } @@ -102,7 +106,9 @@ public void warn(String message) { * @param unit the unit to warn on * @param message the message of the warning */ - public void warnOn(Unit unit, String message) { + public void warnOn( + Unit unit, + String message) { warnings.add(new UnitWarning(unit, message)); } @@ -114,7 +120,10 @@ public void warnOn(Unit unit, String message) { * @param global the global to warn on * @param message the message of the warning */ - public void warnOn(Unit unit, Global global, String message) { + public void warnOn( + Unit unit, + Global global, + String message) { warnings.add(new GlobalWarning(unit, global, message)); } @@ -125,7 +134,9 @@ public void warnOn(Unit unit, Global global, String message) { * @param cfg the cfg to warn on * @param message the message of the warning */ - public void warnOn(CFG cfg, String message) { + public void warnOn( + CFG cfg, + String message) { warnings.add(new CFGWarning(cfg, message)); } @@ -136,7 +147,9 @@ public void warnOn(CFG cfg, String message) { * @param descriptor the descriptor cfg to warn on * @param message the message of the warning */ - public void warnOn(CodeMemberDescriptor descriptor, String message) { + public void warnOn( + CodeMemberDescriptor descriptor, + String message) { warnings.add(new CFGDescriptorWarning(descriptor, message)); } @@ -148,7 +161,9 @@ public void warnOn(CodeMemberDescriptor descriptor, String message) { * @param statement the statement to warn on * @param message the message of the warning */ - public void warnOn(Statement statement, String message) { + public void warnOn( + Statement statement, + String message) { if (statement instanceof Expression) warnOn((Expression) statement, message); else @@ -161,7 +176,9 @@ public void warnOn(Statement statement, String message) { * @param expression the expression to warn on * @param message the message of the warning */ - public void warnOn(Expression expression, String message) { + public void warnOn( + Expression expression, + String message) { warnings.add(new ExpressionWarning(expression, message)); } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/checks/warnings/CFGDescriptorWarning.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/checks/warnings/CFGDescriptorWarning.java index 65a21dbbd..90f6ee605 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/checks/warnings/CFGDescriptorWarning.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/checks/warnings/CFGDescriptorWarning.java @@ -22,7 +22,9 @@ public class CFGDescriptorWarning extends WarningWithLocation { * @param descriptor the descriptor where this warning was reported on * @param message the message of this warning */ - public CFGDescriptorWarning(CodeMemberDescriptor descriptor, String message) { + public CFGDescriptorWarning( + CodeMemberDescriptor descriptor, + String message) { super(descriptor.getLocation(), message); this.descriptor = descriptor; } @@ -37,7 +39,8 @@ public CodeMemberDescriptor getDescriptor() { } @Override - public int compareTo(Warning o) { + public int compareTo( + Warning o) { int cmp; if ((cmp = super.compareTo(o)) != 0) return cmp; @@ -61,7 +64,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (!super.equals(obj)) diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/checks/warnings/CFGWarning.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/checks/warnings/CFGWarning.java index 34599f5ac..78cd9489f 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/checks/warnings/CFGWarning.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/checks/warnings/CFGWarning.java @@ -21,7 +21,9 @@ public class CFGWarning extends WarningWithLocation { * @param cfg the cfg where this warning was reported on * @param message the message of this warning */ - public CFGWarning(CFG cfg, String message) { + public CFGWarning( + CFG cfg, + String message) { super(cfg.getDescriptor().getLocation(), message); this.cfg = cfg; } @@ -36,7 +38,8 @@ public final CFG getCFG() { } @Override - public int compareTo(Warning o) { + public int compareTo( + Warning o) { int cmp; if ((cmp = super.compareTo(o)) != 0) return cmp; @@ -60,7 +63,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (!super.equals(obj)) diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/checks/warnings/ExpressionWarning.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/checks/warnings/ExpressionWarning.java index 7ca7a42ba..153ebb287 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/checks/warnings/ExpressionWarning.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/checks/warnings/ExpressionWarning.java @@ -15,7 +15,9 @@ public class ExpressionWarning extends StatementWarning { * @param expression the expression where this warning was reported on * @param message the message of this warning */ - public ExpressionWarning(Expression expression, String message) { + public ExpressionWarning( + Expression expression, + String message) { super(expression, message); } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/checks/warnings/GlobalWarning.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/checks/warnings/GlobalWarning.java index 044207f75..94d5454a8 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/checks/warnings/GlobalWarning.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/checks/warnings/GlobalWarning.java @@ -29,7 +29,10 @@ public class GlobalWarning extends WarningWithLocation { * @param global the global where this warning was reported on * @param message the message of this warning */ - public GlobalWarning(Unit unit, Global global, String message) { + public GlobalWarning( + Unit unit, + Global global, + String message) { super(global.getLocation(), message); this.unit = unit; this.global = global; @@ -54,7 +57,8 @@ public Global getGlobal() { } @Override - public int compareTo(Warning o) { + public int compareTo( + Warning o) { int cmp; if ((cmp = super.compareTo(o)) != 0) return cmp; @@ -81,7 +85,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (!super.equals(obj)) diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/checks/warnings/StatementWarning.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/checks/warnings/StatementWarning.java index 227d13e64..beb629152 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/checks/warnings/StatementWarning.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/checks/warnings/StatementWarning.java @@ -20,7 +20,9 @@ public class StatementWarning extends WarningWithLocation { * @param statement the statement where this warning was reported on * @param message the message of this warning */ - public StatementWarning(Statement statement, String message) { + public StatementWarning( + Statement statement, + String message) { super(statement.getLocation(), message); this.statement = statement; } @@ -35,7 +37,8 @@ public Statement getStatement() { } @Override - public int compareTo(Warning o) { + public int compareTo( + Warning o) { int cmp; if ((cmp = super.compareTo(o)) != 0) return cmp; @@ -59,7 +62,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (!super.equals(obj)) diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/checks/warnings/UnitWarning.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/checks/warnings/UnitWarning.java index 728133650..598c154f3 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/checks/warnings/UnitWarning.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/checks/warnings/UnitWarning.java @@ -23,7 +23,9 @@ public class UnitWarning extends WarningWithLocation { * @param unit the unit where this warning was reported on * @param message the message of this warning */ - public UnitWarning(Unit unit, String message) { + public UnitWarning( + Unit unit, + String message) { super(unit instanceof ClassUnit ? ((ClassUnit) unit).getLocation() : SyntheticLocation.INSTANCE, message); this.unit = unit; @@ -39,7 +41,8 @@ public Unit getUnit() { } @Override - public int compareTo(Warning o) { + public int compareTo( + Warning o) { int cmp; if ((cmp = super.compareTo(o)) != 0) return cmp; @@ -63,7 +66,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (!super.equals(obj)) diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/checks/warnings/Warning.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/checks/warnings/Warning.java index 2b4bd72e0..790e32ade 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/checks/warnings/Warning.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/checks/warnings/Warning.java @@ -19,7 +19,8 @@ public class Warning implements Comparable { * * @param message the message of this warning */ - public Warning(String message) { + public Warning( + String message) { this.message = message; } @@ -52,7 +53,8 @@ public final String getTaggedMessage() { } @Override - public int compareTo(Warning o) { + public int compareTo( + Warning o) { return StringUtils.compare(message, o.message); } @@ -65,7 +67,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/checks/warnings/WarningWithLocation.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/checks/warnings/WarningWithLocation.java index ed855d3d6..1e99105c4 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/checks/warnings/WarningWithLocation.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/checks/warnings/WarningWithLocation.java @@ -21,7 +21,9 @@ public abstract class WarningWithLocation extends Warning { * @param location the location in the program where this warning is located * @param message the message of this warning */ - protected WarningWithLocation(CodeLocation location, String message) { + protected WarningWithLocation( + CodeLocation location, + String message) { super(message); Objects.requireNonNull(location, "The location of a warning with location cannot be null"); this.location = location; @@ -47,7 +49,8 @@ public final String getLocationWithBrackets() { } @Override - public int compareTo(Warning o) { + public int compareTo( + Warning o) { if (!(o instanceof WarningWithLocation)) return super.compareTo(o); @@ -69,7 +72,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (!super.equals(obj)) diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/conf/BaseConfiguration.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/conf/BaseConfiguration.java index df1836d1d..99504b8eb 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/conf/BaseConfiguration.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/conf/BaseConfiguration.java @@ -27,7 +27,8 @@ public final int hashCode() { } @Override - public final boolean equals(Object obj) { + public final boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/conf/FixpointConfiguration.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/conf/FixpointConfiguration.java index 1c67e9885..ed69bbf9b 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/conf/FixpointConfiguration.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/conf/FixpointConfiguration.java @@ -36,6 +36,11 @@ public class FixpointConfiguration extends BaseConfiguration { */ public final boolean optimize; + /** + * Holder of {@link LiSAConfiguration#useWideningPoints}. + */ + public final boolean useWideningPoints; + /** * Holder of {@link LiSAConfiguration#hotspots}. */ @@ -46,12 +51,14 @@ public class FixpointConfiguration extends BaseConfiguration { * * @param parent the root configuration to draw data from. */ - public FixpointConfiguration(LiSAConfiguration parent) { + public FixpointConfiguration( + LiSAConfiguration parent) { this.wideningThreshold = parent.wideningThreshold; this.recursionWideningThreshold = parent.recursionWideningThreshold; this.glbThreshold = parent.glbThreshold; this.descendingPhaseType = parent.descendingPhaseType; this.optimize = parent.optimize; this.hotspots = parent.hotspots; + this.useWideningPoints = parent.useWideningPoints; } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/conf/LiSAConfiguration.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/conf/LiSAConfiguration.java index 7e21f3775..84b8a1db3 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/conf/LiSAConfiguration.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/conf/LiSAConfiguration.java @@ -1,7 +1,6 @@ package it.unive.lisa.conf; import it.unive.lisa.LiSA; -import it.unive.lisa.LiSAFactory; import it.unive.lisa.analysis.AbstractState; import it.unive.lisa.analysis.Lattice; import it.unive.lisa.checks.semantic.SemanticCheck; @@ -12,6 +11,8 @@ import it.unive.lisa.interprocedural.WorstCasePolicy; import it.unive.lisa.interprocedural.callgraph.CallGraph; import it.unive.lisa.program.cfg.CFG; +import it.unive.lisa.program.cfg.controlFlow.ControlFlowExtractor; +import it.unive.lisa.program.cfg.controlFlow.ControlFlowStructure; import it.unive.lisa.program.cfg.statement.Statement; import it.unive.lisa.program.cfg.statement.call.OpenCall; import it.unive.lisa.util.collections.CollectionUtilities; @@ -136,27 +137,19 @@ public static enum DescendingPhaseType { * through {@link #callGraph}) that has been built. Defaults to an empty * set. */ - public final Collection> semanticChecks = new HashSet<>(); + public final Collection> semanticChecks = new HashSet<>(); /** * The {@link CallGraph} instance to use during the analysis. Defaults to - * {@code null}. Setting this field is optional: if an analysis is to be - * executed (that is, if {@link #abstractState} has been set), a default - * {@link CallGraph} instance will be created through - * {@link LiSAFactory#getDefaultFor(Class, Object...)} in order to perform - * the analysis. + * {@code null}. */ public CallGraph callGraph; /** * The {@link InterproceduralAnalysis} instance to use during the analysis. - * Defaults to {@code null}. Setting this field is optional: if an analysis - * is to be executed (that is, if {@link #abstractState} has been set), a - * default {@link InterproceduralAnalysis} instance will be created through - * {@link LiSAFactory#getDefaultFor(Class, Object...)} in order to perform - * the analysis. + * Defaults to {@code null}. */ - public InterproceduralAnalysis interproceduralAnalysis; + public InterproceduralAnalysis interproceduralAnalysis; /** * The {@link AbstractState} instance to run during the analysis. This will @@ -164,7 +157,7 @@ public static enum DescendingPhaseType { * analysis, and can thus be any lattice element. If no value is set for * this field, no analysis will be executed. Defaults to {@code null}. */ - public AbstractState abstractState; + public AbstractState abstractState; /** * Sets the format to use for dumping graph files, named @@ -221,9 +214,10 @@ public static enum DescendingPhaseType { * The number of fixpoint iteration on a given node after which calls to * {@link Lattice#lub(Lattice)} gets replaced with * {@link Lattice#widening(Lattice)}. Defaults to - * {@link #DEFAULT_WIDENING_THRESHOLD}. Note that widening is only invoked - * on widening points (that is, on loop guards) to reduce cost and increase - * precision. Use to always apply lubs. + * {@link #DEFAULT_WIDENING_THRESHOLD}. Note that widening can be invoked + * only on widening points (that is, on loop guards) to reduce cost and + * increase precision by setting {@link #useWideningPoints} to {@code true}. + * Use 0 or a negative number to always apply lubs. */ public int wideningThreshold = DEFAULT_WIDENING_THRESHOLD; @@ -239,7 +233,8 @@ public static enum DescendingPhaseType { * The number of descending fixpoint iteration on a given node where * {@link Lattice#glb(Lattice)} can be applied. After the threshold is * reached, no more glbs will be applied on that node and the descending - * chain will stop. Defaults to {@link #DEFAULT_GLB_THRESHOLD}. + * chain will stop. Defaults to {@link #DEFAULT_GLB_THRESHOLD}. Use 0 or a + * negative number to never apply glbs. */ public int glbThreshold = DEFAULT_GLB_THRESHOLD; @@ -271,9 +266,24 @@ public static enum DescendingPhaseType { * of a non-widening point is queried, a fast fixpoint iteration will be ran * to unwind (that is, re-propagate) the results and compute the missing * states. Note that results are not unwinded for dumping results. + * Defaults to {@code false}. + */ + public boolean optimize = false; + + /** + * If {@code true}, will cause fixpoint iterations to use widening (and + * narrowing) only on widening points, using lub (or glb) on all other nodes + * regardless of the threshold. As widening is typically more expensive, + * this reduces resource consumption. Note that widening points correspond + * to the conditions of loops, as identified by + * {@link CFG#getCycleEntries()}. The latter relies on the + * {@link ControlFlowStructure}s of each CFG (either provided during + * construction of the CFG itself or extracted by a + * {@link ControlFlowExtractor}): this option should thus be set to + * {@code false} whenever such structures are not available by-design. * Defaults to {@code true}. */ - public boolean optimize = true; + public boolean useWideningPoints = true; /** * When {@link #optimize} is {@code true}, this predicate will be used to diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/CFGResults.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/CFGResults.java index 9f9f69155..233edf4f2 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/CFGResults.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/CFGResults.java @@ -4,10 +4,7 @@ import it.unive.lisa.analysis.AnalyzedCFG; import it.unive.lisa.analysis.Lattice; import it.unive.lisa.analysis.SemanticException; -import it.unive.lisa.analysis.heap.HeapDomain; import it.unive.lisa.analysis.lattices.FunctionalLattice; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import java.util.Collection; import java.util.Collections; import java.util.Map; @@ -22,18 +19,10 @@ * * @param the type of {@link AbstractState} contained into the analysis * state - * @param the type of {@link HeapDomain} contained into the computed - * abstract state - * @param the type of {@link ValueDomain} contained into the computed - * abstract state - * @param the type of {@link TypeDomain} contained into the computed - * abstract state */ -public class CFGResults, - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> - extends FunctionalLattice, ScopeId, AnalyzedCFG> { +public class CFGResults> + extends + FunctionalLattice, ScopeId, AnalyzedCFG> { /** * Builds a new result. @@ -41,12 +30,14 @@ public class CFGResults, * @param lattice a singleton instance used for retrieving top and bottom * values */ - public CFGResults(AnalyzedCFG lattice) { + public CFGResults( + AnalyzedCFG lattice) { super(lattice); } - private CFGResults(AnalyzedCFG lattice, - Map> function) { + private CFGResults( + AnalyzedCFG lattice, + Map> function) { super(lattice, function); } @@ -76,8 +67,9 @@ private CFGResults(AnalyzedCFG lattice, * * @throws SemanticException if something goes wrong during the update */ - public Pair> putResult(ScopeId token, - AnalyzedCFG result) + public Pair> putResult( + ScopeId token, + AnalyzedCFG result) throws SemanticException { if (function == null) { // no previous result @@ -86,7 +78,7 @@ public Pair> putResult(ScopeId token, return Pair.of(false, result); } - AnalyzedCFG previousResult = function.get(token); + AnalyzedCFG previousResult = function.get(token); if (previousResult == null) { // no previous result function.put(token, result); @@ -106,7 +98,7 @@ public Pair> putResult(ScopeId token, return Pair.of(false, previousResult); } else { // result and previous are not comparable - AnalyzedCFG lub = previousResult.lub(result); + AnalyzedCFG lub = previousResult.lub(result); function.put(token, lub); return Pair.of(true, lub); } @@ -119,7 +111,8 @@ public Pair> putResult(ScopeId token, * * @return {@code true} if that condition holds */ - public boolean contains(ScopeId token) { + public boolean contains( + ScopeId token) { return function != null && function.containsKey(token); } @@ -133,7 +126,8 @@ public boolean contains(ScopeId token) { * * @return the result, or {@code null} */ - public AnalyzedCFG get(ScopeId token) { + public AnalyzedCFG get( + ScopeId token) { return function == null ? null : function.get(token); } @@ -143,23 +137,30 @@ public AnalyzedCFG get(ScopeId token) { * * @return the results */ - public Collection> getAll() { + public Collection> getAll() { return function == null ? Collections.emptySet() : function.values(); } @Override - public CFGResults top() { + public CFGResults top() { return new CFGResults<>(lattice.top()); } @Override - public CFGResults bottom() { + public CFGResults bottom() { return new CFGResults<>(lattice.bottom()); } @Override - public CFGResults mk(AnalyzedCFG lattice, - Map> function) { + public CFGResults mk( + AnalyzedCFG lattice, + Map> function) { return new CFGResults<>(lattice, function); } + + @Override + public AnalyzedCFG stateOfUnknown( + ScopeId key) { + return lattice.bottom(); + } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/FixpointResults.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/FixpointResults.java index f400d725e..9a5320045 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/FixpointResults.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/FixpointResults.java @@ -4,10 +4,7 @@ import it.unive.lisa.analysis.AnalyzedCFG; import it.unive.lisa.analysis.Lattice; import it.unive.lisa.analysis.SemanticException; -import it.unive.lisa.analysis.heap.HeapDomain; import it.unive.lisa.analysis.lattices.FunctionalLattice; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.program.cfg.CFG; import java.util.Map; import org.apache.commons.lang3.tuple.Pair; @@ -21,18 +18,10 @@ * * @param the type of {@link AbstractState} contained into the analysis * state - * @param the type of {@link HeapDomain} contained into the computed - * abstract state - * @param the type of {@link ValueDomain} contained into the computed - * abstract state - * @param the type of {@link TypeDomain} contained into the computed - * abstract state */ -public class FixpointResults, - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> - extends FunctionalLattice, CFG, CFGResults> { +public class FixpointResults> + extends + FunctionalLattice, CFG, CFGResults> { /** * Builds a new result. @@ -40,11 +29,14 @@ public class FixpointResults, * @param lattice a singleton instance used for retrieving top and bottom * values */ - public FixpointResults(CFGResults lattice) { + public FixpointResults( + CFGResults lattice) { super(lattice); } - private FixpointResults(CFGResults lattice, Map> function) { + private FixpointResults( + CFGResults lattice, + Map> function) { super(lattice, function); } @@ -62,12 +54,14 @@ private FixpointResults(CFGResults lattice, Map> putResult(CFG cfg, ScopeId token, - AnalyzedCFG result) + public Pair> putResult( + CFG cfg, + ScopeId token, + AnalyzedCFG result) throws SemanticException { if (function == null) function = mkNewFunction(null, false); - CFGResults res = function.computeIfAbsent(cfg, c -> new CFGResults<>(result.top())); + CFGResults res = function.computeIfAbsent(cfg, c -> new CFGResults<>(result.top())); return res.putResult(token, result); } @@ -78,7 +72,8 @@ public Pair> putResult(CFG cfg, ScopeId token, * * @return {@code true} if that condition holds */ - public boolean contains(CFG cfg) { + public boolean contains( + CFG cfg) { return function != null && function.containsKey(cfg); } @@ -92,17 +87,18 @@ public boolean contains(CFG cfg) { * * @return the result, or {@code null} */ - public CFGResults get(CFG cfg) { + public CFGResults get( + CFG cfg) { return function == null ? null : function.get(cfg); } @Override - public FixpointResults top() { + public FixpointResults top() { return new FixpointResults<>(lattice.top()); } @Override - public FixpointResults bottom() { + public FixpointResults bottom() { return new FixpointResults<>(lattice.bottom()); } @@ -111,7 +107,8 @@ public FixpointResults bottom() { * * @param cfg the cfg to forget */ - public void forget(CFG cfg) { + public void forget( + CFG cfg) { if (function == null) return; function.remove(cfg); @@ -120,8 +117,15 @@ public void forget(CFG cfg) { } @Override - public FixpointResults mk(CFGResults lattice, - Map> function) { + public FixpointResults mk( + CFGResults lattice, + Map> function) { return new FixpointResults<>(lattice, function); } + + @Override + public CFGResults stateOfUnknown( + CFG key) { + return lattice.bottom(); + } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/InterproceduralAnalysis.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/InterproceduralAnalysis.java index 1e80e0270..2644fc240 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/InterproceduralAnalysis.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/InterproceduralAnalysis.java @@ -6,11 +6,8 @@ import it.unive.lisa.analysis.ScopeToken; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; import it.unive.lisa.analysis.lattices.ExpressionSet; import it.unive.lisa.analysis.symbols.SymbolAliasing; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.conf.FixpointConfiguration; import it.unive.lisa.interprocedural.callgraph.CallGraph; import it.unive.lisa.interprocedural.callgraph.CallResolutionException; @@ -28,6 +25,7 @@ import it.unive.lisa.program.cfg.statement.call.UnresolvedCall; import it.unive.lisa.symbolic.SymbolicExpression; import it.unive.lisa.symbolic.value.Identifier; +import it.unive.lisa.symbolic.value.PushInv; import it.unive.lisa.symbolic.value.Skip; import it.unive.lisa.type.Type; import it.unive.lisa.type.VoidType; @@ -44,18 +42,18 @@ * * @param the type of {@link AbstractState} contained into the analysis * state - * @param the type of {@link HeapDomain} contained into the computed - * abstract state - * @param the type of {@link ValueDomain} contained into the computed - * abstract state - * @param the type of {@link TypeDomain} contained into the computed - * abstract state */ -public interface InterproceduralAnalysis< - A extends AbstractState, - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> { +public interface InterproceduralAnalysis> { + + /** + * Yields {@code true} if this analysis needs a {@link CallGraph} instance + * to function. If this method return {@code false} and a {@link CallGraph} + * is passed to LiSA in its configuration, the latter will be ignored and + * won't be initialized nor constructed. + * + * @return whether or not this analysis needs a call graph + */ + boolean needsCallGraph(); /** * Initializes the interprocedural analysis of the given program. A call to @@ -72,7 +70,11 @@ public interface InterproceduralAnalysis< * performing the * interprocedural analysis */ - void init(Application app, CallGraph callgraph, OpenCallPolicy policy) throws InterproceduralAnalysisException; + void init( + Application app, + CallGraph callgraph, + OpenCallPolicy policy) + throws InterproceduralAnalysisException; /** * Computes a fixpoint over the whole control flow graph, producing a @@ -92,7 +94,8 @@ public interface InterproceduralAnalysis< * @throws FixpointException if something goes wrong while evaluating the * fixpoint */ - void fixpoint(AnalysisState entryState, + void fixpoint( + AnalysisState entryState, Class> fixpointWorkingSet, FixpointConfiguration conf) throws FixpointException; @@ -106,7 +109,8 @@ void fixpoint(AnalysisState entryState, * @return the result of the fixpoint computation of {@code valueDomain} * over {@code cfg} */ - Collection> getAnalysisResultsOf(CFG cfg); + Collection> getAnalysisResultsOf( + CFG cfg); /** * Computes an analysis state that abstracts the execution of the possible @@ -132,11 +136,11 @@ void fixpoint(AnalysisState entryState, * * @throws SemanticException if something goes wrong during the computation */ - AnalysisState getAbstractResultOf( + AnalysisState getAbstractResultOf( CFGCall call, - AnalysisState entryState, - ExpressionSet[] parameters, - StatementStore expressions) + AnalysisState entryState, + ExpressionSet[] parameters, + StatementStore expressions) throws SemanticException; /** @@ -160,11 +164,11 @@ AnalysisState getAbstractResultOf( * * @throws SemanticException if something goes wrong during the computation */ - AnalysisState getAbstractResultOf( + AnalysisState getAbstractResultOf( OpenCall call, - AnalysisState entryState, - ExpressionSet[] parameters, - StatementStore expressions) + AnalysisState entryState, + ExpressionSet[] parameters, + StatementStore expressions) throws SemanticException; /** @@ -182,7 +186,11 @@ AnalysisState getAbstractResultOf( * @throws CallResolutionException if this analysis is unable to resolve the * given call */ - Call resolve(UnresolvedCall call, Set[] types, SymbolAliasing aliasing) throws CallResolutionException; + Call resolve( + UnresolvedCall call, + Set[] types, + SymbolAliasing aliasing) + throws CallResolutionException; /** * Yields the results of the fixpoint computation over the whole @@ -190,7 +198,7 @@ AnalysisState getAbstractResultOf( * * @return the results of the fixpoint */ - FixpointResults getFixpointResults(); + FixpointResults getFixpointResults(); /** * Converts the pre-state of {@code call} to a valid entry state for one of @@ -211,14 +219,13 @@ AnalysisState getAbstractResultOf( * * @throws SemanticException if something goes wrong during the computation */ - @SuppressWarnings("unchecked") - default Pair, ExpressionSet[]> scope( - AnalysisState state, + default Pair, ExpressionSet[]> scope( + AnalysisState state, ScopeToken scope, - ExpressionSet[] actuals) + ExpressionSet[] actuals) throws SemanticException { - ExpressionSet[] locals = new ExpressionSet[actuals.length]; - AnalysisState callState = state.pushScope(scope); + ExpressionSet[] locals = new ExpressionSet[actuals.length]; + AnalysisState callState = state.pushScope(scope); for (int i = 0; i < actuals.length; i++) locals[i] = actuals[i].pushScope(scope); return Pair.of(callState, locals); @@ -242,16 +249,23 @@ default Pair, ExpressionSet[]> sco * * @throws SemanticException if something goes wrong during the computation */ - default AnalysisState unscope( + default AnalysisState unscope( CFGCall call, ScopeToken scope, - AnalysisState state) + AnalysisState state) throws SemanticException { if (returnsVoid(call, state)) return state.popScope(scope); - AnalysisState tmp = state.bottom(); Identifier meta = (Identifier) call.getMetaVariable().pushScope(scope); + + if (state.getComputedExpressions().isEmpty()) { + // a return value is expected, but nothing is left on the stack + PushInv inv = new PushInv(meta.getStaticType(), call.getLocation()); + return state.assign(meta, inv, call).popScope(scope); + } + + AnalysisState tmp = state.bottom(); for (SymbolicExpression ret : state.getComputedExpressions()) tmp = tmp.lub(state.assign(meta, ret, call)); @@ -268,7 +282,9 @@ default AnalysisState unscope( * * @return {@code true} if that condition holds */ - default boolean returnsVoid(Call call, AnalysisState returned) { + default boolean returnsVoid( + Call call, + AnalysisState returned) { if (call.getStaticType().isVoidType()) return true; diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/InterproceduralAnalysisException.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/InterproceduralAnalysisException.java index 9cc6ab0b9..e7a95a972 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/InterproceduralAnalysisException.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/InterproceduralAnalysisException.java @@ -23,7 +23,9 @@ public InterproceduralAnalysisException() { * @param message the message of this exception * @param cause the cause of this exception */ - public InterproceduralAnalysisException(String message, Throwable cause) { + public InterproceduralAnalysisException( + String message, + Throwable cause) { super(message, cause); } @@ -32,7 +34,8 @@ public InterproceduralAnalysisException(String message, Throwable cause) { * * @param message the message of this exception */ - public InterproceduralAnalysisException(String message) { + public InterproceduralAnalysisException( + String message) { super(message); } @@ -41,7 +44,8 @@ public InterproceduralAnalysisException(String message) { * * @param cause the cause of this exception */ - public InterproceduralAnalysisException(Throwable cause) { + public InterproceduralAnalysisException( + Throwable cause) { super(cause); } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/OpenCallPolicy.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/OpenCallPolicy.java index bdd39cb66..b46c9712c 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/OpenCallPolicy.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/OpenCallPolicy.java @@ -3,12 +3,8 @@ import it.unive.lisa.analysis.AbstractState; import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; -import it.unive.lisa.analysis.heap.HeapDomain; import it.unive.lisa.analysis.lattices.ExpressionSet; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.program.cfg.statement.call.OpenCall; -import it.unive.lisa.symbolic.SymbolicExpression; /** * Policy that determines what happens to the {@link AnalysisState} when an @@ -24,12 +20,6 @@ public interface OpenCallPolicy { * * @param the type of {@link AbstractState} contained into the * analysis state - * @param the type of {@link HeapDomain} contained into the - * computed abstract state - * @param the type of {@link ValueDomain} contained into the - * computed abstract state - * @param the type of {@link TypeDomain} contained into the - * computed abstract state * @param call the {@link OpenCall} under evaluation * @param entryState the state when the call is executed * @param params the symbolic expressions representing the computed @@ -40,12 +30,9 @@ public interface OpenCallPolicy { * * @throws SemanticException if something goes wrong during the computation */ - , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState apply( - OpenCall call, - AnalysisState entryState, - ExpressionSet[] params) - throws SemanticException; + > AnalysisState apply( + OpenCall call, + AnalysisState entryState, + ExpressionSet[] params) + throws SemanticException; } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/ReturnTopPolicy.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/ReturnTopPolicy.java index 95b01e4bb..a733da264 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/ReturnTopPolicy.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/ReturnTopPolicy.java @@ -3,12 +3,8 @@ import it.unive.lisa.analysis.AbstractState; import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; -import it.unive.lisa.analysis.heap.HeapDomain; import it.unive.lisa.analysis.lattices.ExpressionSet; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.program.cfg.statement.call.OpenCall; -import it.unive.lisa.symbolic.SymbolicExpression; import it.unive.lisa.symbolic.value.Identifier; import it.unive.lisa.symbolic.value.PushAny; import it.unive.lisa.symbolic.value.Skip; @@ -32,14 +28,11 @@ private ReturnTopPolicy() { } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState apply( - OpenCall call, - AnalysisState entryState, - ExpressionSet[] params) - throws SemanticException { + public > AnalysisState apply( + OpenCall call, + AnalysisState entryState, + ExpressionSet[] params) + throws SemanticException { if (call.getStaticType().isVoidType()) return entryState.smallStepSemantics(new Skip(call.getLocation()), call); diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/ScopeId.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/ScopeId.java index d0794c3bf..9e4cd4f0f 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/ScopeId.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/ScopeId.java @@ -34,5 +34,6 @@ public interface ScopeId { * * @return the (optionally) updated id */ - ScopeId push(CFGCall c); + ScopeId push( + CFGCall c); } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/UniqueScope.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/UniqueScope.java index f984d5e3f..6960d1a0f 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/UniqueScope.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/UniqueScope.java @@ -16,7 +16,8 @@ public ScopeId startingId() { } @Override - public ScopeId push(CFGCall scopeToken) { + public ScopeId push( + CFGCall scopeToken) { return this; } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/WorstCasePolicy.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/WorstCasePolicy.java index 7ebf5e212..5221d4c50 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/WorstCasePolicy.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/WorstCasePolicy.java @@ -3,12 +3,8 @@ import it.unive.lisa.analysis.AbstractState; import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; -import it.unive.lisa.analysis.heap.HeapDomain; import it.unive.lisa.analysis.lattices.ExpressionSet; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.program.cfg.statement.call.OpenCall; -import it.unive.lisa.symbolic.SymbolicExpression; import it.unive.lisa.symbolic.value.Identifier; import it.unive.lisa.symbolic.value.Skip; @@ -30,15 +26,12 @@ private WorstCasePolicy() { } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState apply( - OpenCall call, - AnalysisState entryState, - ExpressionSet[] params) - throws SemanticException { - AnalysisState poststate = entryState.top(); + public > AnalysisState apply( + OpenCall call, + AnalysisState entryState, + ExpressionSet[] params) + throws SemanticException { + AnalysisState poststate = entryState.top(); if (call.getStaticType().isVoidType()) return poststate.smallStepSemantics(new Skip(call.getLocation()), call); diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/callgraph/BaseCallGraph.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/callgraph/BaseCallGraph.java index 3dea3f822..f3ba0fb2f 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/callgraph/BaseCallGraph.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/callgraph/BaseCallGraph.java @@ -61,7 +61,9 @@ public abstract class BaseCallGraph extends CallGraph { private final Map>, Call>> resolvedCache = new IdentityHashMap<>(); @Override - public void init(Application app) throws CallGraphConstructionException { + public void init( + Application app) + throws CallGraphConstructionException { super.init(app); this.app = app; this.callsites.clear(); @@ -69,7 +71,8 @@ public void init(Application app) throws CallGraphConstructionException { } @Override - public void registerCall(CFGCall call) { + public void registerCall( + CFGCall call) { if (call.getSource() != null) // this call has been generated through the resolution of an // UnresolvedCall, and that one has already been registered @@ -91,27 +94,35 @@ public void registerCall(CFGCall call) { @Override @SuppressWarnings("unchecked") - public Call resolve(UnresolvedCall call, Set[] types, SymbolAliasing aliasing) + public Call resolve( + UnresolvedCall call, + Set[] types, + SymbolAliasing aliasing) throws CallResolutionException { List> typeList = Arrays.asList(types); Call cached = resolvedCache.getOrDefault(call, Map.of()).get(typeList); if (cached != null) return cached; - if (types == null) + Expression[] params = call.getParameters(); + if (types == null || types.length != params.length) // we allow types to be null only for calls that we already resolved throw new CallResolutionException("Cannot resolve call without runtime types"); - if (aliasing == null) - // we allow aliasing to be null only for calls that we already - // resolved - throw new CallResolutionException("Cannot resolve call without symbol aliasing"); + + if (Arrays.stream(types).anyMatch(rts -> rts == null || rts.isEmpty())) { + // if we do not have runtime types of a parameter, we consider it to + // be of any possible type compatible with its static one + types = Arrays.copyOf(types, types.length); + for (int i = 0; i < types.length; i++) + if (types[i] == null || types[i].isEmpty()) + types[i] = params[i].getStaticType().allInstances(call.getProgram().getTypes()); + } Collection targets = new HashSet<>(); Collection nativeTargets = new HashSet<>(); Collection targetsNoRec = new HashSet<>(); Collection nativeTargetsNoRec = new HashSet<>(); - Expression[] params = call.getParameters(); switch (call.getCallType()) { case INSTANCE: resolveInstance(call, types, targets, nativeTargets, aliasing); @@ -208,7 +219,9 @@ else if (onlyNativeCFGTargets(targets, nativeTargets, targetsNoRec, nativeTarget return resolved; } - private boolean onlyNativeCFGTargets(Collection targets, Collection nativeTargets, + private boolean onlyNativeCFGTargets( + Collection targets, + Collection nativeTargets, Collection targetsNoRec, Collection nativeTargetsNoRec) { return targets.isEmpty() @@ -217,7 +230,9 @@ private boolean onlyNativeCFGTargets(Collection targets, Collection targets, Collection nativeTargets, + private boolean onlyCFGTargets( + Collection targets, + Collection nativeTargets, Collection targetsNoRec, Collection nativeTargetsNoRec) { return !targets.isEmpty() @@ -226,7 +241,9 @@ private boolean onlyCFGTargets(Collection targets, Collection na && nativeTargetsNoRec.isEmpty(); } - private boolean onlyRewritingTargets(Collection targets, Collection nativeTargets, + private boolean onlyRewritingTargets( + Collection targets, + Collection nativeTargets, Collection targetsNoRec, Collection nativeTargetsNoRec) { return targets.isEmpty() @@ -235,7 +252,9 @@ private boolean onlyRewritingTargets(Collection targets, Collection targets, Collection nativeTargets, + private boolean onlyRewritingNativeTargets( + Collection targets, + Collection nativeTargets, Collection targetsNoRec, Collection nativeTargetsNoRec) { return targets.isEmpty() @@ -244,7 +263,9 @@ private boolean onlyRewritingNativeTargets(Collection targets, Collection targets, Collection nativeTargets, + private boolean onlyRewritingCFGTargets( + Collection targets, + Collection nativeTargets, Collection targetsNoRec, Collection nativeTargetsNoRec) { return targets.isEmpty() @@ -253,7 +274,9 @@ private boolean onlyRewritingCFGTargets(Collection targets, Collection targets, Collection nativeTargets, + private boolean onlyNonRewritingTargets( + Collection targets, + Collection nativeTargets, Collection targetsNoRec, Collection nativeTargetsNoRec) { return !targets.isEmpty() @@ -262,7 +285,9 @@ private boolean onlyNonRewritingTargets(Collection targets, Collection targets, Collection nativeTargets, + private boolean onlyNonRewritingNativeTargets( + Collection targets, + Collection nativeTargets, Collection targetsNoRec, Collection nativeTargetsNoRec) { return targets.isEmpty() @@ -271,7 +296,9 @@ private boolean onlyNonRewritingNativeTargets(Collection targets, Collectio && nativeTargetsNoRec.isEmpty(); } - private boolean onlyNonRewritingCFGTargets(Collection targets, Collection nativeTargets, + private boolean onlyNonRewritingCFGTargets( + Collection targets, + Collection nativeTargets, Collection targetsNoRec, Collection nativeTargetsNoRec) { return !targets.isEmpty() @@ -280,7 +307,9 @@ private boolean onlyNonRewritingCFGTargets(Collection targets, Collection targets, Collection nativeTargets, + private boolean noTargets( + Collection targets, + Collection nativeTargets, Collection targetsNoRec, Collection nativeTargetsNoRec) { return targets.isEmpty() @@ -305,8 +334,12 @@ private boolean noTargets(Collection targets, Collection nativeT * @throws CallResolutionException if something goes wrong while resolving * the call */ - public void resolveNonInstance(UnresolvedCall call, Set[] types, Collection targets, - Collection natives, SymbolAliasing aliasing) + public void resolveNonInstance( + UnresolvedCall call, + Set[] types, + Collection targets, + Collection natives, + SymbolAliasing aliasing) throws CallResolutionException { for (CodeMember cm : app.getAllCodeCodeMembers()) checkMember(call, types, targets, natives, aliasing, cm, false); @@ -328,8 +361,12 @@ public void resolveNonInstance(UnresolvedCall call, Set[] types, Collectio * @throws CallResolutionException if something goes wrong while resolving * the call */ - public void resolveInstance(UnresolvedCall call, Set[] types, Collection targets, - Collection natives, SymbolAliasing aliasing) + public void resolveInstance( + UnresolvedCall call, + Set[] types, + Collection targets, + Collection natives, + SymbolAliasing aliasing) throws CallResolutionException { if (call.getParameters().length == 0) throw new CallResolutionException( @@ -389,35 +426,37 @@ public void checkMember( String qualifier = descr.getUnit().getName(); String name = descr.getName(); - Aliases nAlias = aliasing.getState(new NameSymbol(name)); - Aliases qAlias = aliasing.getState(new QualifierSymbol(qualifier)); - Aliases qnAlias = aliasing.getState(new QualifiedNameSymbol(qualifier, name)); - boolean add = false; - // we first check the qualified name, then the qualifier and the - // name individually - if (!qnAlias.isEmpty()) { - for (QualifiedNameSymbol alias : qnAlias.castElements(QualifiedNameSymbol.class)) - if (matchCodeMemberName(call, alias.getQualifier(), alias.getName())) { - add = true; - break; - } - } + if (aliasing != null) { + Aliases nAlias = aliasing.getState(new NameSymbol(name)); + Aliases qAlias = aliasing.getState(new QualifierSymbol(qualifier)); + Aliases qnAlias = aliasing.getState(new QualifiedNameSymbol(qualifier, name)); + + // we first check the qualified name, then the qualifier and the + // name individually + if (!qnAlias.isEmpty()) { + for (QualifiedNameSymbol alias : qnAlias.castElements(QualifiedNameSymbol.class)) + if (matchCodeMemberName(call, alias.getQualifier(), alias.getName())) { + add = true; + break; + } + } - if (!add && !qAlias.isEmpty()) { - for (QualifierSymbol alias : qAlias.castElements(QualifierSymbol.class)) - if (matchCodeMemberName(call, alias.getQualifier(), name)) { - add = true; - break; - } - } + if (!add && !qAlias.isEmpty()) { + for (QualifierSymbol alias : qAlias.castElements(QualifierSymbol.class)) + if (matchCodeMemberName(call, alias.getQualifier(), name)) { + add = true; + break; + } + } - if (!add && !nAlias.isEmpty()) { - for (NameSymbol alias : nAlias.castElements(NameSymbol.class)) - if (matchCodeMemberName(call, qualifier, alias.getName())) { - add = true; - break; - } + if (!add && !nAlias.isEmpty()) { + for (NameSymbol alias : nAlias.castElements(NameSymbol.class)) + if (matchCodeMemberName(call, qualifier, alias.getName())) { + add = true; + break; + } + } } if (!add) @@ -443,7 +482,10 @@ public void checkMember( * @return {@code true} if the qualifier and name are compatible with the * ones of the call's target */ - public boolean matchCodeMemberName(UnresolvedCall call, String qualifier, String name) { + public boolean matchCodeMemberName( + UnresolvedCall call, + String qualifier, + String name) { if (!name.equals(call.getTargetName())) return false; if (StringUtils.isBlank(call.getQualifier())) @@ -464,11 +506,14 @@ public boolean matchCodeMemberName(UnresolvedCall call, String qualifier, String * * @throws CallResolutionException if the types cannot be computed */ - public abstract Collection getPossibleTypesOfReceiver(Expression receiver, Set types) + public abstract Collection getPossibleTypesOfReceiver( + Expression receiver, + Set types) throws CallResolutionException; @Override - public Collection getCallSites(CodeMember cm) { + public Collection getCallSites( + CodeMember cm) { return callsites.getOrDefault(cm, Collections.emptyList()); } } \ No newline at end of file diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/callgraph/CallGraph.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/callgraph/CallGraph.java index 9e8078969..0ea576ec1 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/callgraph/CallGraph.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/callgraph/CallGraph.java @@ -34,7 +34,9 @@ public abstract class CallGraph extends BaseGraph[] types, SymbolAliasing aliasing) + public abstract Call resolve( + UnresolvedCall call, + Set[] types, + SymbolAliasing aliasing) throws CallResolutionException; /** @@ -60,7 +65,8 @@ public abstract Call resolve(UnresolvedCall call, Set[] types, SymbolAlias * * @param call the call to register */ - public abstract void registerCall(CFGCall call); + public abstract void registerCall( + CFGCall call); /** * Yields all the {@link Call}s that target the given {@link CodeMember}. @@ -71,7 +77,8 @@ public abstract Call resolve(UnresolvedCall call, Set[] types, SymbolAlias * * @return the collection of calls that target the code member */ - public abstract Collection getCallSites(CodeMember cm); + public abstract Collection getCallSites( + CodeMember cm); /** * Yields all the {@link Call}s that target at least one of the given @@ -82,7 +89,8 @@ public abstract Call resolve(UnresolvedCall call, Set[] types, SymbolAlias * * @return the collection of calls that target the code members */ - public Collection getCallSites(Collection cms) { + public Collection getCallSites( + Collection cms) { Set result = new HashSet<>(); cms.forEach(cm -> getCallSites(cm).stream().forEach(result::add)); return result; @@ -97,7 +105,8 @@ public Collection getCallSites(Collection cms) { * * @return the collection of callers code members */ - public Collection getCallers(Collection cms) { + public Collection getCallers( + Collection cms) { Set result = new HashSet<>(); cms.forEach(cm -> getCallers(cm).stream().forEach(result::add)); return result; @@ -112,7 +121,8 @@ public Collection getCallers(Collection cms) { * * @return the collection of callers code members computed transitively */ - public Collection getCallersTransitively(CodeMember cm) { + public Collection getCallersTransitively( + CodeMember cm) { VisitOnceWorkingSet ws = VisitOnceFIFOWorkingSet.mk(); getCallers(cm).stream().forEach(ws::push); while (!ws.isEmpty()) @@ -129,7 +139,8 @@ public Collection getCallersTransitively(CodeMember cm) { * * @return the collection of callers code members computed transitively */ - public Collection getCallersTransitively(Collection cms) { + public Collection getCallersTransitively( + Collection cms) { VisitOnceWorkingSet ws = VisitOnceFIFOWorkingSet.mk(); cms.forEach(cm -> getCallers(cm).stream().forEach(ws::push)); while (!ws.isEmpty()) @@ -146,7 +157,8 @@ public Collection getCallersTransitively(Collection cms) * * @return the collection of callees code members */ - public Collection getCallees(Collection cms) { + public Collection getCallees( + Collection cms) { Set result = new HashSet<>(); cms.forEach(cm -> getCallees(cm).stream().forEach(result::add)); return result; @@ -161,7 +173,8 @@ public Collection getCallees(Collection cms) { * * @return the collection of callees code members computed transitively */ - public Collection getCalleesTransitively(CodeMember cm) { + public Collection getCalleesTransitively( + CodeMember cm) { VisitOnceWorkingSet ws = VisitOnceFIFOWorkingSet.mk(); getCallees(cm).stream().forEach(ws::push); while (!ws.isEmpty()) @@ -178,7 +191,8 @@ public Collection getCalleesTransitively(CodeMember cm) { * * @return the collection of callees code members computed transitively */ - public Collection getCalleesTransitively(Collection cms) { + public Collection getCalleesTransitively( + Collection cms) { VisitOnceWorkingSet ws = VisitOnceFIFOWorkingSet.mk(); cms.forEach(cm -> getCallees(cm).stream().forEach(ws::push)); while (!ws.isEmpty()) @@ -195,7 +209,8 @@ public Collection getCalleesTransitively(Collection cms) * * @return the collection of called code members */ - public Collection getCallees(CodeMember cm) { + public Collection getCallees( + CodeMember cm) { return followersOf(new CallGraphNode(this, cm)).stream() .map(CallGraphNode::getCodeMember) .collect(Collectors.toList()); @@ -210,7 +225,8 @@ public Collection getCallees(CodeMember cm) { * * @return the collection of callers code members */ - public Collection getCallers(CodeMember cm) { + public Collection getCallers( + CodeMember cm) { return predecessorsOf(new CallGraphNode(this, cm)).stream() .map(CallGraphNode::getCodeMember) .collect(Collectors.toList()); @@ -243,7 +259,8 @@ public Collection> getRecursions() { * * @return the recursions */ - public Collection> getRecursionsContaining(CodeMember cm) { + public Collection> getRecursionsContaining( + CodeMember cm) { Collection> sccs = new SCCs< CallGraph, CallGraphNode, diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/callgraph/CallGraphConstructionException.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/callgraph/CallGraphConstructionException.java index be16f2d11..3e1593332 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/callgraph/CallGraphConstructionException.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/callgraph/CallGraphConstructionException.java @@ -22,7 +22,9 @@ public CallGraphConstructionException() { * @param message the message of this exception * @param cause the cause of this exception */ - public CallGraphConstructionException(String message, Throwable cause) { + public CallGraphConstructionException( + String message, + Throwable cause) { super(message, cause); } @@ -31,7 +33,8 @@ public CallGraphConstructionException(String message, Throwable cause) { * * @param message the message of this exception */ - public CallGraphConstructionException(String message) { + public CallGraphConstructionException( + String message) { super(message); } @@ -40,7 +43,8 @@ public CallGraphConstructionException(String message) { * * @param cause the cause of this exception */ - public CallGraphConstructionException(Throwable cause) { + public CallGraphConstructionException( + Throwable cause) { super(cause); } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/callgraph/CallGraphEdge.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/callgraph/CallGraphEdge.java index b2a33213c..77cc6a2b7 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/callgraph/CallGraphEdge.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/callgraph/CallGraphEdge.java @@ -19,7 +19,9 @@ public class CallGraphEdge implements Edge boolean accept(GraphVisitor visitor, V tool) { + public boolean accept( + GraphVisitor visitor, + V tool) { return visitor.visit(tool, source.getGraph(), this); } @@ -49,7 +53,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/callgraph/CallGraphNode.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/callgraph/CallGraphNode.java index 722e8cf23..23da2406e 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/callgraph/CallGraphNode.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/callgraph/CallGraphNode.java @@ -20,7 +20,9 @@ public class CallGraphNode implements Node boolean accept(GraphVisitor visitor, V tool) { + public boolean accept( + GraphVisitor visitor, + V tool) { return visitor.visit(tool, graph, this); } @@ -57,7 +61,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/callgraph/CallResolutionException.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/callgraph/CallResolutionException.java index 34b2a90d8..fb3f527cc 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/callgraph/CallResolutionException.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/interprocedural/callgraph/CallResolutionException.java @@ -24,7 +24,9 @@ public CallResolutionException() { * @param message the message of this exception * @param cause the cause of this exception */ - public CallResolutionException(String message, Throwable cause) { + public CallResolutionException( + String message, + Throwable cause) { super(message, cause); } @@ -33,7 +35,8 @@ public CallResolutionException(String message, Throwable cause) { * * @param message the message of this exception */ - public CallResolutionException(String message) { + public CallResolutionException( + String message) { super(message); } @@ -42,7 +45,8 @@ public CallResolutionException(String message) { * * @param cause the cause of this exception */ - public CallResolutionException(Throwable cause) { + public CallResolutionException( + Throwable cause) { super(cause); } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/logging/Counter.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/logging/Counter.java index 87432cc3a..a3116e392 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/logging/Counter.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/logging/Counter.java @@ -70,7 +70,13 @@ public final class Counter { * @param updateFactor the percentage of {@code cap} to use as interval * between different log updates */ - public Counter(Logger logger, Level level, String message, String objects, int cap, double updateFactor) { + public Counter( + Logger logger, + Level level, + String message, + String objects, + int cap, + double updateFactor) { this.level = level; this.logging = false; this.count = 0; diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/logging/CountingIterable.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/logging/CountingIterable.java index 95195860e..4c72b3eed 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/logging/CountingIterable.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/logging/CountingIterable.java @@ -25,7 +25,9 @@ final class CountingIterable implements Iterable { * @param iterable the iterable to wrap * @param counter the counter to use */ - CountingIterable(Iterable iterable, Counter counter) { + CountingIterable( + Iterable iterable, + Counter counter) { Iterator it = iterable.iterator(); this.iterator = new Iterator() { diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/logging/IterationLogger.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/logging/IterationLogger.java index 02b39df72..09408456d 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/logging/IterationLogger.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/logging/IterationLogger.java @@ -34,7 +34,11 @@ private IterationLogger() { * * @return an iterable that automatically logs while traversing the array */ - public static Iterable iterate(Logger logger, E[] array, String message, String objects) { + public static Iterable iterate( + Logger logger, + E[] array, + String message, + String objects) { return iterate(logger, Level.INFO, new IterableArray<>(array), message, objects, array.length); } @@ -51,7 +55,12 @@ public static Iterable iterate(Logger logger, E[] array, String message, * * @return an iterable that automatically logs while traversing the array */ - public static Iterable iterate(Logger logger, Level level, E[] array, String message, String objects) { + public static Iterable iterate( + Logger logger, + Level level, + E[] array, + String message, + String objects) { return iterate(logger, level, new IterableArray<>(array), message, objects, array.length); } @@ -69,7 +78,11 @@ public static Iterable iterate(Logger logger, Level level, E[] array, Str * @return an iterable that automatically logs while traversing the * collection */ - public static Iterable iterate(Logger logger, Collection collection, String message, String objects) { + public static Iterable iterate( + Logger logger, + Collection collection, + String message, + String objects) { return iterate(logger, Level.INFO, collection, message, objects, collection.size()); } @@ -87,7 +100,11 @@ public static Iterable iterate(Logger logger, Collection collection, S * @return an iterable that automatically logs while traversing the * collection */ - public static Iterable iterate(Logger logger, Level level, Collection collection, String message, + public static Iterable iterate( + Logger logger, + Level level, + Collection collection, + String message, String objects) { return iterate(logger, level, collection, message, objects, collection.size()); } @@ -105,7 +122,11 @@ public static Iterable iterate(Logger logger, Level level, Collection * * @return an iterable that automatically logs while traversing the iterable */ - public static Iterable iterate(Logger logger, Iterable iterable, String message, String objects) { + public static Iterable iterate( + Logger logger, + Iterable iterable, + String message, + String objects) { return iterate(logger, Level.INFO, iterable, message, objects); } @@ -122,7 +143,11 @@ public static Iterable iterate(Logger logger, Iterable iterable, Strin * * @return an iterable that automatically logs while traversing the iterable */ - public static Iterable iterate(Logger logger, Level level, Iterable iterable, String message, + public static Iterable iterate( + Logger logger, + Level level, + Iterable iterable, + String message, String objects) { int size; Iterator it; @@ -145,7 +170,11 @@ public static Iterable iterate(Logger logger, Level level, Iterable it * @return an iterable that automatically logs while traversing the * collection created from the stream */ - public static Iterable iterate(Logger logger, Stream stream, String message, String objects) { + public static Iterable iterate( + Logger logger, + Stream stream, + String message, + String objects) { return iterate(logger, Level.INFO, stream, message, objects); } @@ -163,13 +192,22 @@ public static Iterable iterate(Logger logger, Stream stream, String me * @return an iterable that automatically logs while traversing the * collection created from the stream */ - public static Iterable iterate(Logger logger, Level level, Stream stream, String message, + public static Iterable iterate( + Logger logger, + Level level, + Stream stream, + String message, String objects) { List list = stream.collect(Collectors.toList()); return iterate(logger, level, list, message, objects, list.size()); } - private static Iterable iterate(Logger logger, Level level, Iterable it, String message, String objects, + private static Iterable iterate( + Logger logger, + Level level, + Iterable it, + String message, + String objects, int size) { return new CountingIterable<>(it, new Counter(logger, level, message, objects, size, 0.025)); } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/logging/TimeFormat.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/logging/TimeFormat.java index ede545081..4ec2910ee 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/logging/TimeFormat.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/logging/TimeFormat.java @@ -14,7 +14,8 @@ public enum TimeFormat { */ NANOS { @Override - public String format(long nanos) { + public String format( + long nanos) { return String.valueOf(nanos) + UNIT_NANOS; } }, @@ -24,7 +25,8 @@ public String format(long nanos) { */ MILLIS { @Override - public String format(long nanos) { + public String format( + long nanos) { return String.valueOf(TimeUnit.NANOSECONDS.toMillis(nanos)) + UNIT_MILLIS; } }, @@ -34,7 +36,8 @@ public String format(long nanos) { */ SECONDS { @Override - public String format(long nanos) { + public String format( + long nanos) { return String.valueOf(TimeUnit.NANOSECONDS.toSeconds(nanos)) + UNIT_SECONDS; } }, @@ -44,7 +47,8 @@ public String format(long nanos) { */ MINUTES { @Override - public String format(long nanos) { + public String format( + long nanos) { return String.valueOf(TimeUnit.NANOSECONDS.toMinutes(nanos)) + UNIT_MINUTES; } }, @@ -54,7 +58,8 @@ public String format(long nanos) { */ HOURS { @Override - public String format(long nanos) { + public String format( + long nanos) { return String.valueOf(TimeUnit.NANOSECONDS.toHours(nanos)) + UNIT_HOURS; } }, @@ -64,7 +69,8 @@ public String format(long nanos) { */ SECONDS_AND_MILLIS { @Override - public String format(long nanos) { + public String format( + long nanos) { long seconds = TimeUnit.NANOSECONDS.toSeconds(nanos); if (seconds == 0) return MILLIS.format(nanos); @@ -78,7 +84,8 @@ public String format(long nanos) { */ MINUTES_AND_SECONDS { @Override - public String format(long nanos) { + public String format( + long nanos) { long minutes = TimeUnit.NANOSECONDS.toMinutes(nanos); if (minutes == 0) return SECONDS.format(nanos); @@ -92,7 +99,8 @@ public String format(long nanos) { */ UP_TO_MILLIS { @Override - public String format(long nanos) { + public String format( + long nanos) { long millis = TimeUnit.NANOSECONDS.toMillis(nanos); if (millis == 0) return NANOS.format(nanos); @@ -106,7 +114,8 @@ public String format(long nanos) { */ UP_TO_SECONDS { @Override - public String format(long nanos) { + public String format( + long nanos) { long seconds = TimeUnit.NANOSECONDS.toSeconds(nanos); long diff = nanos - TimeUnit.SECONDS.toNanos(seconds); long millis = TimeUnit.NANOSECONDS.toMillis(diff); @@ -126,7 +135,8 @@ public String format(long nanos) { */ UP_TO_MINUTES { @Override - public String format(long nanos) { + public String format( + long nanos) { long minutes = TimeUnit.NANOSECONDS.toMinutes(nanos); long diff = nanos - TimeUnit.MINUTES.toNanos(minutes); long seconds = TimeUnit.NANOSECONDS.toSeconds(diff); @@ -150,7 +160,8 @@ public String format(long nanos) { */ UP_TO_HOURS { @Override - public String format(long nanos) { + public String format( + long nanos) { long hours = TimeUnit.NANOSECONDS.toHours(nanos); long diff = nanos - TimeUnit.HOURS.toNanos(hours); long minutes = TimeUnit.NANOSECONDS.toMinutes(diff); @@ -186,7 +197,8 @@ public String format(long nanos) { * * @return the formatted string */ - public String format(long nanos) { + public String format( + long nanos) { return String.valueOf(nanos); } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/logging/TimerLogger.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/logging/TimerLogger.java index 57368b14f..de1a8c268 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/logging/TimerLogger.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/logging/TimerLogger.java @@ -25,7 +25,10 @@ private TimerLogger() { * @param message the message to display * @param action the action to execute */ - public static void execAction(Logger logger, String message, LoggableAction action) { + public static void execAction( + Logger logger, + String message, + LoggableAction action) { execAction(logger, Level.INFO, TimeFormat.UP_TO_MINUTES, message, action); } @@ -38,7 +41,11 @@ public static void execAction(Logger logger, String message, LoggableAction acti * @param message the message to display * @param action the action to execute */ - public static void execAction(Logger logger, Level logLevel, String message, LoggableAction action) { + public static void execAction( + Logger logger, + Level logLevel, + String message, + LoggableAction action) { execAction(logger, logLevel, TimeFormat.UP_TO_MINUTES, message, action); } @@ -52,7 +59,11 @@ public static void execAction(Logger logger, Level logLevel, String message, Log * @param message the message to display * @param action the action to execute */ - public static void execAction(Logger logger, Level logLevel, TimeFormat formatter, String message, + public static void execAction( + Logger logger, + Level logLevel, + TimeFormat formatter, + String message, LoggableAction action) { execAux(logger, logLevel, formatter, message, action); } @@ -69,7 +80,10 @@ public static void execAction(Logger logger, Level logLevel, TimeFormat formatte * * @return the supplied value */ - public static T execSupplier(Logger logger, String message, LoggableSupplier supplier) { + public static T execSupplier( + Logger logger, + String message, + LoggableSupplier supplier) { return execSupplier(logger, Level.INFO, TimeFormat.UP_TO_MINUTES, message, supplier); } @@ -85,7 +99,11 @@ public static T execSupplier(Logger logger, String message, LoggableSupplier * * @return the supplied value */ - public static T execSupplier(Logger logger, Level logLevel, String message, LoggableSupplier supplier) { + public static T execSupplier( + Logger logger, + Level logLevel, + String message, + LoggableSupplier supplier) { return execSupplier(logger, logLevel, TimeFormat.UP_TO_MINUTES, message, supplier); } @@ -102,14 +120,22 @@ public static T execSupplier(Logger logger, Level logLevel, String message, * * @return the supplied value */ - public static T execSupplier(Logger logger, Level logLevel, TimeFormat formatter, String message, + public static T execSupplier( + Logger logger, + Level logLevel, + TimeFormat formatter, + String message, LoggableSupplier supplier) { Wrapper w = new Wrapper<>(); execAux(logger, logLevel, formatter, message, () -> w.ret = supplier.run()); return w.ret; } - private static void execAux(Logger logger, Level logLevel, TimeFormat formatter, String message, + private static void execAux( + Logger logger, + Level logLevel, + TimeFormat formatter, + String message, LoggableAction action) { long startTime = System.nanoTime(); logger.log(logLevel, "{} [start]", message); diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/DotGraph.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/DotGraph.java index e55fb474e..824786af0 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/DotGraph.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/DotGraph.java @@ -112,13 +112,15 @@ public class DotGraph extends GraphStreamWrapper { * * @param title the title of the graph, if any */ - public DotGraph(String title) { + public DotGraph( + String title) { super(); this.legend = new Legend().graph; this.title = title; } - private static String dotEscape(String extraLabel) { + private static String dotEscape( + String extraLabel) { String escapeHtml4 = StringEscapeUtils.escapeHtml4(extraLabel); String replace = escapeHtml4.replace("\n", "
"); replace = replace.replace("\\", "\\\\"); @@ -137,7 +139,11 @@ private static String dotEscape(String extraLabel) { * @param label the additional label that can be added to each node's text * (can be {@code null}) */ - public void addNode(SerializableNode node, boolean entry, boolean exit, SerializableValue label) { + public void addNode( + SerializableNode node, + boolean entry, + boolean exit, + SerializableValue label) { Node n = graph.addNode(nodeName(node.getId())); n.setAttribute(SHAPE, NODE_SHAPE); @@ -156,7 +162,8 @@ public void addNode(SerializableNode node, boolean entry, boolean exit, Serializ n.setAttribute(LABEL, "<" + l + extra + ">"); } - private static String format(SerializableValue value) { + private static String format( + SerializableValue value) { if (value instanceof SerializableString) { return value.toString(); } else if (value instanceof SerializableArray) { @@ -199,7 +206,8 @@ private static String format(SerializableValue value) { * * @param edge the source edge */ - public void addEdge(SerializableEdge edge) { + public void addEdge( + SerializableEdge edge) { long id = edge.getSourceId(); long id1 = edge.getDestId(); @@ -222,7 +230,9 @@ public void addEdge(SerializableEdge edge) { } @Override - public void dump(Writer writer) throws IOException { + public void dump( + Writer writer) + throws IOException { FileSinkDOT sink = new CustomDotSink() { @Override protected void outputEndOfFile() throws IOException { @@ -250,7 +260,9 @@ protected void outputEndOfFile() throws IOException { * * @throws IOException if an I/O error occurs while reading */ - public static DotGraph readDot(Reader reader) throws IOException { + public static DotGraph readDot( + Reader reader) + throws IOException { // we have to re-add the quotes wrapping the labels, otherwise the // parser will break String content; @@ -309,7 +321,10 @@ protected void outputHeader() throws IOException { } @Override - protected String outputAttribute(String key, Object value, boolean first) { + protected String outputAttribute( + String key, + Object value, + boolean first) { boolean quote = true; if (value instanceof Number || key.equals(LABEL)) @@ -322,7 +337,8 @@ protected String outputAttribute(String key, Object value, boolean first) { } @Override - protected String outputAttributes(Element e) { + protected String outputAttributes( + Element e) { if (e.getAttributeCount() == 0) return ""; diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/GraphStreamWrapper.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/GraphStreamWrapper.java index c2ddaf47a..a80efbf2a 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/GraphStreamWrapper.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/GraphStreamWrapper.java @@ -38,7 +38,8 @@ public String toString() { * * @return the name of the node */ - protected static String nodeName(long code) { + protected static String nodeName( + long code) { return "node" + code; } @@ -52,7 +53,9 @@ protected static String nodeName(long code) { * * @return the name of the edge */ - protected static String edgeName(long src, long dest) { + protected static String edgeName( + long src, + long dest) { return "edge-" + src + "-" + dest; } @@ -63,5 +66,7 @@ protected static String edgeName(long src, long dest) { * * @throws IOException if an I/O error occurs while writing */ - public abstract void dump(Writer writer) throws IOException; + public abstract void dump( + Writer writer) + throws IOException; } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/GraphmlGraph.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/GraphmlGraph.java index 0286c639e..6e720b3bf 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/GraphmlGraph.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/GraphmlGraph.java @@ -58,7 +58,8 @@ public class GraphmlGraph extends GraphStreamWrapper { * * @param title the title of the graph, if any */ - public GraphmlGraph(String title) { + public GraphmlGraph( + String title) { super(); this.graph.setAttribute(GRAPH_TITLE, title); this.title = title; @@ -85,7 +86,11 @@ public String getTitle() { * @param label the additional label that can be added to each node as a * subnode */ - public void addNode(SerializableNode node, boolean entry, boolean exit, SerializableValue label) { + public void addNode( + SerializableNode node, + boolean entry, + boolean exit, + SerializableValue label) { Node n = graph.addNode(nodeName(node.getId())); if (entry) @@ -111,17 +116,25 @@ public void addNode(SerializableNode node, boolean entry, boolean exit, Serializ } } - private void populate(String prefix, int depth, MultiGraph g, SerializableValue value) { + private void populate( + String prefix, + int depth, + MultiGraph g, + SerializableValue value) { if (value instanceof SerializableString) { Node node = g.addNode(prefix + ELEMENT_QUALIFIER); node.setAttribute(LABEL_TEXT, value.toString()); - value.getProperties().forEach((k, v) -> node.setAttribute(k, v)); + value.getProperties().forEach(( + k, + v) -> node.setAttribute(k, v)); } else if (value instanceof SerializableArray) { SerializableArray array = (SerializableArray) value; if (array.getElements().stream().allMatch(SerializableString.class::isInstance)) { Node node = g.addNode(prefix + ELEMENT_QUALIFIER); node.setAttribute(LABEL_TEXT, value.toString()); - value.getProperties().forEach((k, v) -> node.setAttribute(k, v)); + value.getProperties().forEach(( + k, + v) -> node.setAttribute(k, v)); } else for (int i = 0; i < array.getElements().size(); i++) { String graphname = prefix + QUALIFIER + depth + ARRAY_QUALIFIER + QUALIFIER + i; @@ -131,7 +144,9 @@ private void populate(String prefix, int depth, MultiGraph g, SerializableValue populate(graphname, depth + 1, labelgraph, array_element); node.setAttribute(LABEL_ARRAY, labelgraph); node.setAttribute(LABEL_TEXT, "Element " + i); - array_element.getProperties().forEach((k, v) -> node.setAttribute(k, v)); + array_element.getProperties().forEach(( + k, + v) -> node.setAttribute(k, v)); } } else if (value instanceof SerializableObject) { SerializableObject object = (SerializableObject) value; @@ -142,7 +157,9 @@ private void populate(String prefix, int depth, MultiGraph g, SerializableValue populate(graphname, depth + 1, labelgraph, field.getValue()); node.setAttribute(LABEL_FIELD_PREFIX + field.getKey(), labelgraph); node.setAttribute(LABEL_TEXT, field.getKey()); - field.getValue().getProperties().forEach((k, v) -> node.setAttribute(k, v)); + field.getValue().getProperties().forEach(( + k, + v) -> node.setAttribute(k, v)); } } else throw new IllegalArgumentException("Unknown value type: " + value.getClass().getName()); @@ -156,7 +173,9 @@ private void populate(String prefix, int depth, MultiGraph g, SerializableValue * @param node the parent node * @param inner the subnode */ - public void markSubNode(SerializableNode node, SerializableNode inner) { + public void markSubNode( + SerializableNode node, + SerializableNode inner) { Node sub = graph.removeNode(nodeName(inner.getId())); Node outer = graph.getNode(nodeName(node.getId())); @@ -176,7 +195,8 @@ public void markSubNode(SerializableNode node, SerializableNode inner) { * * @param edge the source edge */ - public void addEdge(SerializableEdge edge) { + public void addEdge( + SerializableEdge edge) { long id = edge.getSourceId(); long id1 = edge.getDestId(); @@ -185,7 +205,9 @@ public void addEdge(SerializableEdge edge) { } @Override - public void dump(Writer writer) throws IOException { + public void dump( + Writer writer) + throws IOException { dump(writer, true); } @@ -198,7 +220,10 @@ public void dump(Writer writer) throws IOException { * * @throws IOException if an I/O error occurs while writing */ - public void dump(Writer writer, boolean format) throws IOException { + public void dump( + Writer writer, + boolean format) + throws IOException { FileSinkGraphML sink = new CustomGraphMLSink(format); sink.writeAll(graph, writer); } @@ -210,11 +235,16 @@ private static class CustomGraphMLSink extends FileSinkGraphML { private final boolean format; - private CustomGraphMLSink(boolean format) { + private CustomGraphMLSink( + boolean format) { this.format = format; } - private void print(int indent, String format, Object... args) throws IOException { + private void print( + int indent, + String format, + Object... args) + throws IOException { String out = ""; if (this.format) out += "\t".repeat(indent); @@ -241,13 +271,15 @@ protected void outputHeader() throws IOException { print(1, " http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd\">"); } - private static String escapeXmlString(String string) { + private static String escapeXmlString( + String string) { return string.replace("&", "&").replace("<", "<").replace(">", ">").replace("\"", """) .replace("'", "'"); } @Override - protected void exportGraph(Graph g) { + protected void exportGraph( + Graph g) { Map nodeAttributes = new TreeMap<>(); Map edgeAttributes = new TreeMap<>(); collectKeys(g, nodeAttributes, edgeAttributes); @@ -255,8 +287,12 @@ protected void exportGraph(Graph g) { dumpGraph(g, nodeAttributes, edgeAttributes); } - protected void processAttribute(String key, Object value, Map attributes, - Map nodeAttributes, Map edgeAttributes) { + protected void processAttribute( + String key, + Object value, + Map attributes, + Map nodeAttributes, + Map edgeAttributes) { String type; if (value == null) @@ -286,7 +322,10 @@ else if (!attributes.get(key).equals(type)) throw new OutputDumpingException("Attributes with the same name have different value type"); } - protected void collectKeys(Graph g, Map nodeAttributes, Map edgeAttributes) { + protected void collectKeys( + Graph g, + Map nodeAttributes, + Map edgeAttributes) { g.nodes().forEach(n -> n.attributeKeys().forEach( k -> processAttribute(k, n.getAttribute(k), nodeAttributes, nodeAttributes, edgeAttributes))); @@ -294,7 +333,8 @@ protected void collectKeys(Graph g, Map nodeAttributes, Map processAttribute(k, e.getAttribute(k), edgeAttributes, nodeAttributes, edgeAttributes))); } - protected void dumpKeys(Map nodeAttributes, + protected void dumpKeys( + Map nodeAttributes, Map edgeAttributes) { for (Entry entry : nodeAttributes.entrySet()) try { @@ -317,7 +357,9 @@ protected void dumpKeys(Map nodeAttributes, } } - protected void dumpGraph(Graph g, Map nodeAttributes, + protected void dumpGraph( + Graph g, + Map nodeAttributes, Map edgeAttributes) { try { print(1, "", escapeXmlString(g.getId())); diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/HtmlGraph.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/HtmlGraph.java index 9b6b320f1..de19369e4 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/HtmlGraph.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/HtmlGraph.java @@ -47,9 +47,12 @@ public class HtmlGraph extends GraphStreamWrapper { * @param descriptionLabel the display name of the descriptions, used as * label in the collapse/expand toggles */ - public HtmlGraph(GraphmlGraph graph, boolean includeSubnodes, + public HtmlGraph( + GraphmlGraph graph, + boolean includeSubnodes, SortedMap> map, - String description, String descriptionLabel) { + String description, + String descriptionLabel) { super(); this.graph = graph; this.descriptions = map; @@ -59,7 +62,9 @@ public HtmlGraph(GraphmlGraph graph, boolean includeSubnodes, } @Override - public void dump(Writer writer) throws IOException { + public void dump( + Writer writer) + throws IOException { StringWriter graphWriter = new StringWriter(); graph.dump(graphWriter, false); String graphText = graphWriter.toString() @@ -104,7 +109,10 @@ public void dump(Writer writer) throws IOException { } } - private static void populate(StringBuilder descrs, int depth, SerializableValue value) { + private static void populate( + StringBuilder descrs, + int depth, + SerializableValue value) { if (value instanceof SerializableString) { descrs.append(value.toString()); } else if (value instanceof SerializableArray) { @@ -150,7 +158,8 @@ private static void populate(StringBuilder descrs, int depth, SerializableValue throw new IllegalArgumentException("Unknown value type: " + value.getClass().getName()); } - private static boolean isStringLike(SerializableValue value) { + private static boolean isStringLike( + SerializableValue value) { return value instanceof SerializableString || (value instanceof SerializableArray && ((SerializableArray) value).getElements().stream() .allMatch(SerializableString.class::isInstance)); diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/OutputDumpingException.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/OutputDumpingException.java index f8d4d4be6..6fb5a8539 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/OutputDumpingException.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/OutputDumpingException.java @@ -23,7 +23,9 @@ public OutputDumpingException() { * @param message the message of this exception * @param cause the cause of this exception */ - public OutputDumpingException(String message, Throwable cause) { + public OutputDumpingException( + String message, + Throwable cause) { super(message, cause); } @@ -32,7 +34,8 @@ public OutputDumpingException(String message, Throwable cause) { * * @param message the message of this exception */ - public OutputDumpingException(String message) { + public OutputDumpingException( + String message) { super(message); } @@ -41,7 +44,8 @@ public OutputDumpingException(String message) { * * @param cause the cause of this exception */ - public OutputDumpingException(Throwable cause) { + public OutputDumpingException( + Throwable cause) { super(cause); } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/compare/JsonReportComparer.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/compare/JsonReportComparer.java index 9941f32e5..df2c4d43d 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/compare/JsonReportComparer.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/compare/JsonReportComparer.java @@ -151,7 +151,10 @@ public interface DiffAlgorithm { * @param reported the collection of elements that are part of the * report */ - void report(REPORTED_COMPONENT component, REPORT_TYPE type, Collection reported); + void report( + REPORTED_COMPONENT component, + REPORT_TYPE type, + Collection reported); /** * Callback invoked by a {@link JsonReportComparer} whenever files from @@ -163,7 +166,10 @@ public interface DiffAlgorithm { * second file * @param message the message reporting the difference */ - void fileDiff(String first, String second, String message); + void fileDiff( + String first, + String second, + String message); /** * Callback invoked by a {@link JsonReportComparer} whenever an analysis @@ -173,7 +179,10 @@ public interface DiffAlgorithm { * @param first the value in the first report * @param second the value in the second report */ - void infoDiff(String key, String first, String second); + void infoDiff( + String key, + String first, + String second); /** * Callback invoked by a {@link JsonReportComparer} whenever a @@ -183,7 +192,10 @@ public interface DiffAlgorithm { * @param first the value in the first report * @param second the value in the second report */ - void configurationDiff(String key, String first, String second); + void configurationDiff( + String key, + String first, + String second); /** * If {@code true}, analysis configurations @@ -253,7 +265,8 @@ default boolean shouldFailFast() { * * @return {@code true} if that condition holds */ - default boolean isJsonGraph(String path) { + default boolean isJsonGraph( + String path) { return FilenameUtils.getExtension(path).equals("json"); } @@ -266,7 +279,8 @@ default boolean isJsonGraph(String path) { * * @return {@code true} if that condition holds */ - default boolean isVisualizationFile(String path) { + default boolean isVisualizationFile( + String path) { String ext = FilenameUtils.getExtension(path); return ext.equals("dot") || ext.equals("graphml") @@ -287,7 +301,9 @@ default boolean isVisualizationFile(String path) { * supported for the given * file type */ - default boolean customFileCompare(File expected, File actual) { + default boolean customFileCompare( + File expected, + File actual) { throw new UnsupportedOperationException(format(CANNOT_COMPARE, expected.toString(), actual.toString())); } @@ -403,7 +419,8 @@ private static boolean compareFileContents( File secondFileRoot, DiffAlgorithm diff, CollectionsDiffBuilder files) - throws FileNotFoundException, IOException { + throws FileNotFoundException, + IOException { boolean diffFound = false; for (Pair pair : files.getCommons()) { File left = new File(firstFileRoot, pair.getLeft()); @@ -456,7 +473,10 @@ private static boolean compareConfs( first.getConfiguration(), second.getConfiguration(), diff, - (key, fvalue, svalue) -> diff.configurationDiff(key, fvalue, svalue), + ( + key, + fvalue, + svalue) -> diff.configurationDiff(key, fvalue, svalue), key -> false); } @@ -471,7 +491,10 @@ private static boolean compareInfos( first.getInfo(), second.getInfo(), diff, - (key, fvalue, svalue) -> diff.infoDiff(key, fvalue, svalue), + ( + key, + fvalue, + svalue) -> diff.infoDiff(key, fvalue, svalue), // we are really only interested in code metrics here, // information like timestamps and version are not useful - we // still use a blacklist approach to ensure that new fields are @@ -538,7 +561,8 @@ private static boolean matchJsonGraphs( DiffAlgorithm diff, File left, File right) - throws IOException, FileNotFoundException { + throws IOException, + FileNotFoundException { boolean diffFound = false; try (Reader l = new InputStreamReader(new FileInputStream(left), StandardCharsets.UTF_8); @@ -666,11 +690,14 @@ public static class BaseDiffAlgorithm implements DiffAlgorithm { private static final String WARNINGS_ONLY = "Warnings only in the {} report:"; private static final String INFOS_ONLY = "Run info keys only in the {} report:"; private static final String CONFS_ONLY = "Configuration keys only in the {} report:"; - private static final String FILE_DIFF = "['{}', '{}'] {}"; + private static final String FILE_DIFF = "['{}'] {}"; private static final String VALUE_DIFF = "Different values for {} key '{}': '{}' and '{}'"; @Override - public void report(REPORTED_COMPONENT component, REPORT_TYPE type, Collection reported) { + public void report( + REPORTED_COMPONENT component, + REPORT_TYPE type, + Collection reported) { if (type == REPORT_TYPE.COMMON) return; @@ -710,29 +737,45 @@ public void report(REPORTED_COMPONENT component, REPORT_TYPE type, Collection } @Override - public void fileDiff(String first, String second, String message) { - LOG.warn(FILE_DIFF, first, second, message); + public void fileDiff( + String first, + String second, + String message) { + String fname = FilenameUtils.getName(first); + LOG.warn(FILE_DIFF, fname, message); } @Override - public void infoDiff(String key, String first, String second) { + public void infoDiff( + String key, + String first, + String second) { LOG.warn(VALUE_DIFF, "run info", key, first, second); } @Override - public void configurationDiff(String key, String first, String second) { + public void configurationDiff( + String key, + String first, + String second) { LOG.warn(VALUE_DIFF, "configuration", key, first, second); } } - private static final String diff(SerializableValue first, SerializableValue second) { + private static final String diff( + SerializableValue first, + SerializableValue second) { StringBuilder builder = new StringBuilder(); diff(0, builder, first, second); + // this removes empty/whitespace lines in the middle return builder.toString().replaceAll("(?m)^[ \t]*\r?\n", "").trim(); } - private static final boolean diff(int depth, StringBuilder builder, - SerializableValue first, SerializableValue second) { + private static final boolean diff( + int depth, + StringBuilder builder, + SerializableValue first, + SerializableValue second) { if (first.getClass() != second.getClass()) { fillWithDiff(depth, builder, first, second); return true; @@ -747,7 +790,10 @@ private static final boolean diff(int depth, StringBuilder builder, return diff(depth, builder, (SerializableObject) first, (SerializableObject) second); } - private static final boolean diff(int depth, StringBuilder builder, SerializableString first, + private static final boolean diff( + int depth, + StringBuilder builder, + SerializableString first, SerializableString second) { if (!first.getValue().equals(second.getValue())) { fillWithDiff(depth, builder, first, second); @@ -756,7 +802,10 @@ private static final boolean diff(int depth, StringBuilder builder, Serializable return false; } - private static final boolean diff(int depth, StringBuilder builder, SerializableArray first, + private static final boolean diff( + int depth, + StringBuilder builder, + SerializableArray first, SerializableArray second) { List felements = first.getElements(); List selements = second.getElements(); @@ -813,7 +862,10 @@ private static final boolean diff(int depth, StringBuilder builder, Serializable return atLeastOne; } - private static final boolean diff(int depth, StringBuilder builder, SerializableObject first, + private static final boolean diff( + int depth, + StringBuilder builder, + SerializableObject first, SerializableObject second) { SortedMap felements = first.getFields(); SortedMap selements = second.getFields(); @@ -873,8 +925,11 @@ private static final boolean diff(int depth, StringBuilder builder, Serializable return atLeastOne; } - private static final void fillWithDiff(int depth, StringBuilder builder, - SerializableValue first, SerializableValue second) { + private static final void fillWithDiff( + int depth, + StringBuilder builder, + SerializableValue first, + SerializableValue second) { builder.append("\t".repeat(depth)) .append(first) .append("\n") diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/json/JsonReport.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/json/JsonReport.java index 9f4facc13..da162ce52 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/json/JsonReport.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/json/JsonReport.java @@ -43,12 +43,16 @@ public JsonReport() { * * @param report the original report */ - public JsonReport(LiSAReport report) { + public JsonReport( + LiSAReport report) { this(report.getWarnings(), report.getCreatedFiles(), report.getInfo().toPropertyBag(), report.getConfiguration().toPropertyBag()); } - private JsonReport(Collection warnings, Collection files, Map info, + private JsonReport( + Collection warnings, + Collection files, + Map info, Map configuration) { this.files = new TreeSet<>(files); this.info = info; @@ -110,7 +114,9 @@ public Map getInfo() { * * @throws IOException if some I/O error happens while writing to the writer */ - public void dump(Writer writer) throws IOException { + public void dump( + Writer writer) + throws IOException { ObjectMapper mapper = new ObjectMapper(); mapper.configure(SerializationFeature.INDENT_OUTPUT, true); mapper.writeValue(writer, this); @@ -127,7 +133,9 @@ public void dump(Writer writer) throws IOException { * @throws IOException if some I/O error happens while reading from the * reader */ - public static JsonReport read(Reader reader) throws IOException { + public static JsonReport read( + Reader reader) + throws IOException { ObjectMapper mapper = new ObjectMapper(); return mapper.readValue(reader, JsonReport.class); } @@ -144,7 +152,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -203,7 +212,8 @@ public JsonWarning() { * * @param warning the warning to clone */ - public JsonWarning(Warning warning) { + public JsonWarning( + Warning warning) { this.message = warning.toString(); } @@ -221,7 +231,8 @@ public String getMessage() { * * @param message the message */ - public void setMessage(String message) { + public void setMessage( + String message) { this.message = message; } @@ -239,7 +250,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -256,7 +268,8 @@ public boolean equals(Object obj) { } @Override - public int compareTo(JsonWarning o) { + public int compareTo( + JsonWarning o) { return message.compareTo(o.message); } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/serializableGraph/SerializableArray.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/serializableGraph/SerializableArray.java index 96647213d..636c147f0 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/serializableGraph/SerializableArray.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/serializableGraph/SerializableArray.java @@ -31,7 +31,9 @@ public SerializableArray() { * @param properties the additional properties to use as metadata * @param elements the elements of the array */ - public SerializableArray(SortedMap properties, List elements) { + public SerializableArray( + SortedMap properties, + List elements) { super(properties); this.elements = elements; } @@ -62,7 +64,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (!super.equals(obj)) @@ -84,7 +87,8 @@ public String toString() { } @Override - public int compareTo(SerializableValue o) { + public int compareTo( + SerializableValue o) { // arrays in the middle if (o instanceof SerializableString) return 1; diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/serializableGraph/SerializableCFG.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/serializableGraph/SerializableCFG.java index f1f410e33..009a730b4 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/serializableGraph/SerializableCFG.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/serializableGraph/SerializableCFG.java @@ -36,7 +36,8 @@ private SerializableCFG() { * * @return the serializable version of that cfg */ - public static SerializableGraph fromCFG(CFG source) { + public static SerializableGraph fromCFG( + CFG source) { return fromCFG(source, null); } @@ -51,12 +52,13 @@ public static SerializableGraph fromCFG(CFG source) { * * @return the serializable version of that cfg */ - public static SerializableGraph fromCFG(CFG source, + public static SerializableGraph fromCFG( + CFG source, BiFunction descriptionGenerator) { String name = source.getDescriptor().getFullSignatureWithParNames(); String desc; - if (source instanceof AnalyzedCFG && !((AnalyzedCFG) source).getId().isStartingId()) - desc = ((AnalyzedCFG) source).getId().toString(); + if (source instanceof AnalyzedCFG && !((AnalyzedCFG) source).getId().isStartingId()) + desc = ((AnalyzedCFG) source).getId().toString(); else desc = null; @@ -100,10 +102,14 @@ private static void addNode( } private static class InnerNodeExtractor - implements GraphVisitor>> { + implements + GraphVisitor>> { @Override - public boolean visit(Map> tool, CFG graph, Statement node) { + public boolean visit( + Map> tool, + CFG graph, + Statement node) { List inners = tool.computeIfAbsent(node, st -> new LinkedList<>()); if (node instanceof NaryStatement) inners.addAll(Arrays.asList(((NaryStatement) node).getSubExpressions())); diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/serializableGraph/SerializableEdge.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/serializableGraph/SerializableEdge.java index 226db9402..fe0a11b7c 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/serializableGraph/SerializableEdge.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/serializableGraph/SerializableEdge.java @@ -39,7 +39,10 @@ public SerializableEdge() { * @param destId the id of the destination {@link SerializableNode} * @param kind the kind of this edge */ - public SerializableEdge(int sourceId, int destId, String kind) { + public SerializableEdge( + int sourceId, + int destId, + String kind) { this.sourceId = sourceId; this.destId = destId; this.kind = kind; @@ -90,7 +93,9 @@ public Map otherFields() { * @param value the value of the field */ @JsonAnySetter - public void setOtherField(String name, String value) { + public void setOtherField( + String name, + String value) { unknownFields.put(name, value); } @@ -106,7 +111,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -137,7 +143,8 @@ public String toString() { } @Override - public int compareTo(SerializableEdge o) { + public int compareTo( + SerializableEdge o) { int cmp; if ((cmp = Integer.compare(sourceId, o.sourceId)) != 0) return cmp; diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/serializableGraph/SerializableGraph.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/serializableGraph/SerializableGraph.java index 7cd43064f..837fc5cb0 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/serializableGraph/SerializableGraph.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/serializableGraph/SerializableGraph.java @@ -131,7 +131,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -181,7 +182,9 @@ public String toString() { * * @throws IOException if an I/O error occurs while writing */ - public void dump(Writer writer) throws IOException { + public void dump( + Writer writer) + throws IOException { ObjectMapper mapper = new ObjectMapper(); mapper.configure(SerializationFeature.INDENT_OUTPUT, System.getProperty("lisa.json.indent") != null); mapper.writeValue(writer, this); @@ -195,7 +198,8 @@ public void dump(Writer writer) throws IOException { * @throws IllegalArgumentException if a node with the same id already * exists in the graph */ - public void addNode(SerializableNode node) { + public void addNode( + SerializableNode node) { if (nodes.stream().map(n -> n.getId()).anyMatch(i -> i == node.getId())) throw new IllegalArgumentException("A node with the same id " + node.getId() + " is already in the graph"); nodes.add(node); @@ -209,7 +213,8 @@ public void addNode(SerializableNode node) { * @throws IllegalArgumentException if a description for the same node * already exists in the graph */ - public void addNodeDescription(SerializableNodeDescription desc) { + public void addNodeDescription( + SerializableNodeDescription desc) { if (descriptions.stream().map(d -> d.getNodeId()).anyMatch(i -> i == desc.getNodeId())) throw new IllegalArgumentException( "A description for node " + desc.getNodeId() + " is already in the graph"); @@ -221,7 +226,8 @@ public void addNodeDescription(SerializableNodeDescription desc) { * * @param edge the edge to add */ - public void addEdge(SerializableEdge edge) { + public void addEdge( + SerializableEdge edge) { edges.add(edge); } @@ -264,7 +270,8 @@ public DotGraph toDot() { * * @return the converted graph */ - public GraphmlGraph toGraphml(boolean includeSubnodes) { + public GraphmlGraph toGraphml( + boolean includeSubnodes) { GraphmlGraph graph = new GraphmlGraph(name); Set hasFollows = new HashSet<>(); @@ -321,7 +328,9 @@ public GraphmlGraph toGraphml(boolean includeSubnodes) { * * @return the converted graph */ - public HtmlGraph toHtml(boolean includeSubnodes, String descriptionLabel) { + public HtmlGraph toHtml( + boolean includeSubnodes, + String descriptionLabel) { SerializableGraph g = new SerializableGraph(name, description, nodes, edges, Collections.emptySortedSet()); GraphmlGraph graphml = g.toGraphml(includeSubnodes); @@ -345,7 +354,9 @@ public HtmlGraph toHtml(boolean includeSubnodes, String descriptionLabel) { * * @throws IOException if an I/O error occurs while reading */ - public static SerializableGraph readGraph(Reader reader) throws IOException { + public static SerializableGraph readGraph( + Reader reader) + throws IOException { ObjectMapper mapper = new ObjectMapper(); return mapper.readValue(reader, SerializableGraph.class); } @@ -361,7 +372,8 @@ public static SerializableGraph readGraph(Reader reader) throws IOException { * @return {@code true} if the given graph has the same structure as this * one */ - public boolean sameStructure(SerializableGraph other) { + public boolean sameStructure( + SerializableGraph other) { if (name == null) { if (other.name != null) return false; diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/serializableGraph/SerializableNode.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/serializableGraph/SerializableNode.java index 1b403cc74..bb25ed9f0 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/serializableGraph/SerializableNode.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/serializableGraph/SerializableNode.java @@ -44,7 +44,10 @@ public SerializableNode() { * order they appear * @param text the text of this node */ - public SerializableNode(int id, List subNodes, String text) { + public SerializableNode( + int id, + List subNodes, + String text) { this.id = id; this.subNodes = subNodes; this.text = text; @@ -99,12 +102,15 @@ public Map otherFields() { * @param value the value of the field */ @JsonAnySetter - public void setOtherField(String name, String value) { + public void setOtherField( + String name, + String value) { unknownFields.put(name, value); } @Override - public int compareTo(SerializableNode o) { + public int compareTo( + SerializableNode o) { int cmp; if ((cmp = Integer.compare(id, o.id)) != 0) return cmp; @@ -151,7 +157,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/serializableGraph/SerializableNodeDescription.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/serializableGraph/SerializableNodeDescription.java index 2cede5894..e6b76c552 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/serializableGraph/SerializableNodeDescription.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/serializableGraph/SerializableNodeDescription.java @@ -27,7 +27,9 @@ public SerializableNodeDescription() { * @param description the {@link SerializableValue} to be used as * description */ - public SerializableNodeDescription(int id, SerializableValue description) { + public SerializableNodeDescription( + int id, + SerializableValue description) { this.nodeId = id; this.description = description; } @@ -61,7 +63,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -85,7 +88,8 @@ public String toString() { } @Override - public int compareTo(SerializableNodeDescription o) { + public int compareTo( + SerializableNodeDescription o) { int cmp; if ((cmp = Integer.compare(nodeId, o.nodeId)) != 0) return cmp; diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/serializableGraph/SerializableObject.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/serializableGraph/SerializableObject.java index cc21299e7..dc81f5494 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/serializableGraph/SerializableObject.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/serializableGraph/SerializableObject.java @@ -31,7 +31,9 @@ public SerializableObject() { * @param properties the additional properties to use as metadata * @param fields the fields of this object */ - public SerializableObject(SortedMap properties, SortedMap fields) { + public SerializableObject( + SortedMap properties, + SortedMap fields) { super(properties); this.fields = fields; } @@ -62,7 +64,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (!super.equals(obj)) @@ -89,7 +92,8 @@ public String toString() { } @Override - public int compareTo(SerializableValue o) { + public int compareTo( + SerializableValue o) { if (!(o instanceof SerializableObject)) // maps last return 1; diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/serializableGraph/SerializableString.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/serializableGraph/SerializableString.java index f608e0e3b..a25e4e2da 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/serializableGraph/SerializableString.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/serializableGraph/SerializableString.java @@ -27,7 +27,9 @@ public SerializableString() { * @param properties the additional properties to use as metadata * @param value the textual representation of the value */ - public SerializableString(SortedMap properties, String value) { + public SerializableString( + SortedMap properties, + String value) { super(properties); this.value = value; } @@ -55,7 +57,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (!super.equals(obj)) @@ -77,7 +80,8 @@ public String toString() { } @Override - public int compareTo(SerializableValue o) { + public int compareTo( + SerializableValue o) { if (!(o instanceof SerializableString)) // string first return -1; diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/serializableGraph/SerializableValue.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/serializableGraph/SerializableValue.java index 0d019e88f..d9e472c0e 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/serializableGraph/SerializableValue.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/serializableGraph/SerializableValue.java @@ -33,7 +33,8 @@ protected SerializableValue() { * * @param properties the additional properties to use as metadata */ - protected SerializableValue(SortedMap properties) { + protected SerializableValue( + SortedMap properties) { this.properties = properties; } @@ -53,7 +54,9 @@ public SortedMap getProperties() { * @param key the key of the property * @param value the value of the property */ - public void setProperty(String key, String value) { + public void setProperty( + String key, + String value) { properties.put(key, value); } @@ -76,7 +79,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -93,7 +97,8 @@ public boolean equals(Object obj) { } @Override - public int compareTo(SerializableValue o) { + public int compareTo( + SerializableValue o) { int cmp; if ((cmp = Integer.compare(properties.keySet().size(), o.properties.keySet().size())) != 0) return cmp; diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/serializableGraph/ValueDeserializer.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/serializableGraph/ValueDeserializer.java index 1870b5619..124a46700 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/serializableGraph/ValueDeserializer.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/serializableGraph/ValueDeserializer.java @@ -35,13 +35,17 @@ public ValueDeserializer() { * * @param t the class to be deserialized */ - public ValueDeserializer(Class t) { + public ValueDeserializer( + Class t) { super(t); } @Override - public SerializableValue deserialize(JsonParser p, DeserializationContext ctxt) - throws IOException, JsonProcessingException { + public SerializableValue deserialize( + JsonParser p, + DeserializationContext ctxt) + throws IOException, + JsonProcessingException { JsonNode node = p.getCodec().readTree(p); JsonNode props = node.get(ValueSerializer.LISA_PROPERTIES_FIELD); SortedMap properties = new TreeMap<>(); diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/serializableGraph/ValueSerializer.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/serializableGraph/ValueSerializer.java index a40239712..c5cd15508 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/serializableGraph/ValueSerializer.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/outputs/serializableGraph/ValueSerializer.java @@ -51,12 +51,17 @@ public ValueSerializer() { * * @param t the class to be serialized */ - public ValueSerializer(Class t) { + public ValueSerializer( + Class t) { super(t); } @Override - public void serialize(SerializableValue value, JsonGenerator gen, SerializerProvider provider) throws IOException { + public void serialize( + SerializableValue value, + JsonGenerator gen, + SerializerProvider provider) + throws IOException { SortedMap props = value.getProperties(); boolean hasProps = !props.isEmpty(); if (hasProps) { diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/AbstractClassUnit.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/AbstractClassUnit.java index b3a5515a5..80dcbd34c 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/AbstractClassUnit.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/AbstractClassUnit.java @@ -22,7 +22,11 @@ public class AbstractClassUnit extends ClassUnit { * cannot be used as super unit of other compilation * units */ - public AbstractClassUnit(CodeLocation location, Program program, String name, boolean sealed) { + public AbstractClassUnit( + CodeLocation location, + Program program, + String name, + boolean sealed) { super(location, program, name, sealed); } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/Application.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/Application.java index ed7938de8..5c017aff1 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/Application.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/Application.java @@ -27,7 +27,8 @@ public class Application { * * @param programs the programs composing the application */ - public Application(Program... programs) { + public Application( + Program... programs) { this.programs = programs; } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/ClassUnit.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/ClassUnit.java index 9d895143b..cf3207852 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/ClassUnit.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/ClassUnit.java @@ -37,7 +37,11 @@ public class ClassUnit extends CompilationUnit { * cannot be used as super unit of other compilation * units */ - public ClassUnit(CodeLocation location, Program program, String name, boolean sealed) { + public ClassUnit( + CodeLocation location, + Program program, + String name, + boolean sealed) { super(location, program, name, sealed); Objects.requireNonNull(location, "The location of a unit cannot be null."); superclasses = new LinkedList<>(); @@ -75,7 +79,8 @@ public List getInterfaces() { * @return {@code true} if the collection of superclasses changed as a * result of the call */ - public final boolean addSuperclass(ClassUnit unit) { + public final boolean addSuperclass( + ClassUnit unit) { return superclasses.add(unit); } @@ -87,18 +92,22 @@ public final boolean addSuperclass(ClassUnit unit) { * @return {@code true} if the collection of interfaces changed as a result * of the call */ - public final boolean addInterface(InterfaceUnit unit) { + public final boolean addInterface( + InterfaceUnit unit) { return interfaces.add(unit); } @Override - public boolean isInstanceOf(CompilationUnit unit) { + public boolean isInstanceOf( + CompilationUnit unit) { return this == unit || unit.instances.contains(this) || getImmediateAncestors().stream().anyMatch(u -> u.isInstanceOf(unit)); } @Override - public void addInstance(Unit unit) throws ProgramValidationException { + public void addInstance( + Unit unit) + throws ProgramValidationException { if (superclasses.contains(unit) || interfaces.contains(unit)) throw new ProgramValidationException("Found loop in compilation units hierarchy: " + unit + " is both an ancestor and an instance of " + this); @@ -117,7 +126,8 @@ public boolean canBeInstantiated() { } @Override - public boolean addAncestor(CompilationUnit unit) { + public boolean addAncestor( + CompilationUnit unit) { if (unit instanceof ClassUnit) return superclasses.add((ClassUnit) unit); else diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/CodeUnit.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/CodeUnit.java index b5d6d9f07..b539b11cc 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/CodeUnit.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/CodeUnit.java @@ -18,7 +18,10 @@ public class CodeUnit extends ProgramUnit { * @param program the program where this unit is defined * @param name the name of the unit */ - public CodeUnit(CodeLocation location, Program program, String name) { + public CodeUnit( + CodeLocation location, + Program program, + String name) { super(location, program, name); } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/CompilationUnit.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/CompilationUnit.java index 781a56e18..d9a8e8f6e 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/CompilationUnit.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/CompilationUnit.java @@ -62,7 +62,11 @@ public abstract class CompilationUnit extends ProgramUnit { * @param name the name of the unit * @param sealed whether or not this unit can be inherited from */ - protected CompilationUnit(CodeLocation location, Program program, String name, boolean sealed) { + protected CompilationUnit( + CodeLocation location, + Program program, + String name, + boolean sealed) { super(location, program, name); this.sealed = sealed; instanceCodeMembers = new TreeMap<>(); @@ -90,7 +94,8 @@ public boolean isSealed() { * @return {@code true} if the collection of ancestors changed as a result * of the call */ - public abstract boolean addAncestor(CompilationUnit unit); + public abstract boolean addAncestor( + CompilationUnit unit); /** * Adds the given unit as an instance of this one, thus marking the former @@ -100,7 +105,9 @@ public boolean isSealed() { * * @throws ProgramValidationException if the given unit cannot be added */ - public abstract void addInstance(Unit unit) throws ProgramValidationException; + public abstract void addInstance( + Unit unit) + throws ProgramValidationException; /** * {@inheritDoc}
@@ -136,7 +143,8 @@ public Collection getGlobalsRecursively() { * * @return the collection of instance code members */ - public Collection getInstanceCodeMembers(boolean traverseHierarchy) { + public Collection getInstanceCodeMembers( + boolean traverseHierarchy) { return searchCodeMembers(cm -> true, traverseHierarchy); } @@ -150,7 +158,8 @@ public Collection getInstanceCodeMembers(boolean traverseHierarchy) * * @return the collection of instance globals */ - public Collection getInstanceGlobals(boolean traverseHierarchy) { + public Collection getInstanceGlobals( + boolean traverseHierarchy) { return searchGlobals(g -> true, traverseHierarchy); } @@ -167,7 +176,8 @@ public Collection getInstanceGlobals(boolean traverseHierarchy) { * * @return the collection of instance cfgs */ - public Collection getInstanceCFGs(boolean traverseHierarchy) { + public Collection getInstanceCFGs( + boolean traverseHierarchy) { return searchCodeMembers(cm -> cm instanceof CFG, traverseHierarchy); } @@ -184,7 +194,8 @@ public Collection getInstanceCFGs(boolean traverseHierarchy) { * * @return the collection of signature cfgs */ - public Collection getAbstractCodeMembers(boolean traverseHierarchy) { + public Collection getAbstractCodeMembers( + boolean traverseHierarchy) { return searchCodeMembers(cm -> cm instanceof AbstractCodeMember, traverseHierarchy); } @@ -201,7 +212,8 @@ public Collection getAbstractCodeMembers(boolean traverseHie * * @return the collection of instance constructs */ - public Collection getInstanceConstructs(boolean traverseHierarchy) { + public Collection getInstanceConstructs( + boolean traverseHierarchy) { return searchCodeMembers(cm -> cm instanceof NativeCFG, traverseHierarchy); } @@ -236,7 +248,8 @@ public Annotations getAnnotations() { * * @param ann the annotation to be added */ - public void addAnnotation(Annotation ann) { + public void addAnnotation( + Annotation ann) { annotations.addAnnotation(ann); } @@ -259,7 +272,8 @@ public void addAnnotation(Annotation ann) { * * @return {@code true} only if that condition holds */ - public abstract boolean isInstanceOf(CompilationUnit unit); + public abstract boolean isInstanceOf( + CompilationUnit unit); /** * Searches among instance code members, returning a collection containing @@ -275,7 +289,8 @@ public void addAnnotation(Annotation ann) { * @return the collection of matching code members */ @SuppressWarnings("unchecked") - public Collection searchCodeMembers(Predicate filter, + public Collection searchCodeMembers( + Predicate filter, boolean traverseHierarchy) { Collection result = new HashSet<>(); @@ -308,7 +323,9 @@ public Collection searchCodeMembers(Predicate searchGlobals(Predicate filter, boolean traverseHierarchy) { + public Collection searchGlobals( + Predicate filter, + boolean traverseHierarchy) { Map result = new HashMap<>(); for (Global g : instanceGlobals.values()) if (filter.test(g)) @@ -339,7 +356,8 @@ public Collection searchGlobals(Predicate filter, boolean traver * this method returns {@code false}, the given global is * discarded. */ - public boolean addInstanceGlobal(Global global) { + public boolean addInstanceGlobal( + Global global) { return instanceGlobals.putIfAbsent(global.getName(), global) == null; } @@ -356,7 +374,8 @@ public boolean addInstanceGlobal(Global global) { * If this method returns {@code false}, the given code member * is discarded. */ - public boolean addInstanceCodeMember(CodeMember cm) { + public boolean addInstanceCodeMember( + CodeMember cm) { CodeMember c = instanceCodeMembers.putIfAbsent(cm.getDescriptor().getSignature(), cm); if (sealed) if (c == null) @@ -378,7 +397,9 @@ public boolean addInstanceCodeMember(CodeMember cm) { * @return the instance code member with the given signature, or * {@code null} */ - public CodeMember getInstanceCodeMember(String signature, boolean traverseHierarchy) { + public CodeMember getInstanceCodeMember( + String signature, + boolean traverseHierarchy) { Collection res = searchCodeMembers(cm -> cm.getDescriptor().getSignature().equals(signature), traverseHierarchy); if (res.isEmpty()) @@ -396,7 +417,9 @@ public CodeMember getInstanceCodeMember(String signature, boolean traverseHierar * * @return the instance global with the given name, or {@code null} */ - public Global getInstanceGlobal(String name, boolean traverseHierarchy) { + public Global getInstanceGlobal( + String name, + boolean traverseHierarchy) { Collection res = searchGlobals(cm -> cm.getName().equals(name), traverseHierarchy); if (res.isEmpty()) return null; @@ -413,7 +436,9 @@ public Global getInstanceGlobal(String name, boolean traverseHierarchy) { * * @return the collection of instance members with the given name */ - public Collection getInstanceCodeMembersByName(String name, boolean traverseHierarchy) { + public Collection getInstanceCodeMembersByName( + String name, + boolean traverseHierarchy) { return searchCodeMembers(cm -> cm.getDescriptor().getName().equals(name), traverseHierarchy); } @@ -429,7 +454,8 @@ public Collection getInstanceCodeMembersByName(String name, boolean * @return the collection of instance code members that match the given * signature */ - public Collection getMatchingInstanceCodeMembers(CodeMemberDescriptor signature, + public Collection getMatchingInstanceCodeMembers( + CodeMemberDescriptor signature, boolean traverseHierarchy) { return searchCodeMembers(cm -> cm.getDescriptor().matchesSignature(signature), traverseHierarchy); } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/ConstantGlobal.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/ConstantGlobal.java index 2973079dd..dc3932a4e 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/ConstantGlobal.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/ConstantGlobal.java @@ -25,7 +25,11 @@ public class ConstantGlobal extends Global { * @param name the name of this global * @param constant the constant value of this global */ - public ConstantGlobal(CodeLocation location, Unit container, String name, Constant constant) { + public ConstantGlobal( + CodeLocation location, + Unit container, + String name, + Constant constant) { this(location, container, name, constant, new Annotations()); } @@ -40,7 +44,11 @@ public ConstantGlobal(CodeLocation location, Unit container, String name, Consta * @param constant the constant value of this global * @param annotations the annotations of this global variable */ - public ConstantGlobal(CodeLocation location, Unit container, String name, Constant constant, + public ConstantGlobal( + CodeLocation location, + Unit container, + String name, + Constant constant, Annotations annotations) { super(location, container, name, false, constant.getStaticType(), annotations); Objects.requireNonNull(constant, "The constant of a constant global cannot be null"); @@ -65,7 +73,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (!super.equals(obj)) diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/Global.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/Global.java index ec29918a8..85cf3ca15 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/Global.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/Global.java @@ -44,7 +44,11 @@ public class Global implements CodeElement { * @param name the name of this global * @param isInstance whether or not this is an instance global */ - public Global(CodeLocation location, Unit container, String name, boolean isInstance) { + public Global( + CodeLocation location, + Unit container, + String name, + boolean isInstance) { this(location, container, name, isInstance, Untyped.INSTANCE); } @@ -60,7 +64,12 @@ public Global(CodeLocation location, Unit container, String name, boolean isInst * @param staticType the type of this global. If unknown, use * {@link Untyped#INSTANCE} */ - public Global(CodeLocation location, Unit container, String name, boolean isInstance, Type staticType) { + public Global( + CodeLocation location, + Unit container, + String name, + boolean isInstance, + Type staticType) { this(location, container, name, isInstance, staticType, new Annotations()); } @@ -77,7 +86,12 @@ public Global(CodeLocation location, Unit container, String name, boolean isInst * {@link Untyped#INSTANCE} * @param annotations the annotations of this global variable */ - public Global(CodeLocation location, Unit container, String name, boolean isInstance, Type staticType, + public Global( + CodeLocation location, + Unit container, + String name, + boolean isInstance, + Type staticType, Annotations annotations) { Objects.requireNonNull(name, "The name of a global cannot be null"); Objects.requireNonNull(staticType, "The type of a global cannot be null"); @@ -141,7 +155,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -203,7 +218,8 @@ public Annotations getAnnotations() { * * @param ann the annotation to be added */ - public void addAnnotation(Annotation ann) { + public void addAnnotation( + Annotation ann) { annotations.addAnnotation(ann); } @@ -215,7 +231,8 @@ public void addAnnotation(Annotation ann) { * * @return the variable representing this parameter */ - public Variable toSymbolicVariable(CodeLocation where) { + public Variable toSymbolicVariable( + CodeLocation where) { return new Variable(staticType, name, annotations, where); } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/InterfaceUnit.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/InterfaceUnit.java index 68e108168..a246b5408 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/InterfaceUnit.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/InterfaceUnit.java @@ -29,7 +29,11 @@ public class InterfaceUnit extends CompilationUnit { * @param name the name of the unit * @param sealed whether or not this unit can be inherited from */ - public InterfaceUnit(CodeLocation location, Program program, String name, boolean sealed) { + public InterfaceUnit( + CodeLocation location, + Program program, + String name, + boolean sealed) { super(location, program, name, sealed); superinterfaces = new LinkedList<>(); } @@ -47,7 +51,8 @@ public boolean canBeInstantiated() { * * @return {@code true} only if the list has changed */ - public boolean addSuperinterface(InterfaceUnit unit) { + public boolean addSuperinterface( + InterfaceUnit unit) { return superinterfaces.add(unit); } @@ -57,7 +62,9 @@ public Collection getImmediateAncestors() { } @Override - public void addInstance(Unit unit) throws ProgramValidationException { + public void addInstance( + Unit unit) + throws ProgramValidationException { if (superinterfaces.contains(unit)) throw new ProgramValidationException("Found loop in compilation units hierarchy: " + unit + " is both a super unit and an instance of " + this); @@ -68,13 +75,15 @@ public void addInstance(Unit unit) throws ProgramValidationException { } @Override - public boolean isInstanceOf(CompilationUnit unit) { + public boolean isInstanceOf( + CompilationUnit unit) { return this == unit || unit.instances.contains(this) || superinterfaces.stream().anyMatch(u -> u.isInstanceOf(unit)); } @Override - public boolean addAncestor(CompilationUnit unit) { + public boolean addAncestor( + CompilationUnit unit) { if (unit instanceof InterfaceUnit) return superinterfaces.add((InterfaceUnit) unit); else diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/Program.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/Program.java index 36c1aef29..5a89a48d3 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/Program.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/Program.java @@ -53,7 +53,9 @@ public class Program extends Unit { * @param types the type system knowing about the types that appear in * the program */ - public Program(LanguageFeatures features, TypeSystem types) { + public Program( + LanguageFeatures features, + TypeSystem types) { super(PROGRAM_NAME); this.features = features; this.types = types; @@ -94,7 +96,8 @@ public TypeSystem getTypes() { * @throws IllegalArgumentException if the given unit is an instance of this * class */ - public final boolean addUnit(Unit unit) { + public final boolean addUnit( + Unit unit) { if (unit instanceof Program) throw new IllegalArgumentException("Cannot add a program to another one"); return units.putIfAbsent(unit.getName(), unit) == null; @@ -108,7 +111,8 @@ public final boolean addUnit(Unit unit) { * @return {@code true} if the entry point was successfully added. If this * method returns {@code false}, the given cfg is discarded. */ - public final boolean addEntryPoint(CFG cm) { + public final boolean addEntryPoint( + CFG cm) { return entrypoints.add(cm); } @@ -141,7 +145,8 @@ public final Collection getUnits() { * * @return the compilation unit with the given name, or {@code null} */ - public final Unit getUnit(String name) { + public final Unit getUnit( + String name) { return units.get(name); } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/ProgramUnit.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/ProgramUnit.java index 784e5b3cb..420c3a28e 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/ProgramUnit.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/ProgramUnit.java @@ -27,7 +27,10 @@ public abstract class ProgramUnit extends Unit implements CodeElement { * @param program the program where this unit is defined * @param name the name of the unit */ - public ProgramUnit(CodeLocation location, Program program, String name) { + public ProgramUnit( + CodeLocation location, + Program program, + String name) { super(name); this.program = program; this.location = location; diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/ProgramValidationException.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/ProgramValidationException.java index c20397807..56bc438ed 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/ProgramValidationException.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/ProgramValidationException.java @@ -24,7 +24,9 @@ public ProgramValidationException() { * @param message the message of this exception * @param cause the cause of this exception */ - public ProgramValidationException(String message, Throwable cause) { + public ProgramValidationException( + String message, + Throwable cause) { super(message, cause); } @@ -33,7 +35,8 @@ public ProgramValidationException(String message, Throwable cause) { * * @param message the message of this exception */ - public ProgramValidationException(String message) { + public ProgramValidationException( + String message) { super(message); } @@ -42,7 +45,8 @@ public ProgramValidationException(String message) { * * @param cause the cause of this exception */ - public ProgramValidationException(Throwable cause) { + public ProgramValidationException( + Throwable cause) { super(cause); } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/SourceCodeLocation.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/SourceCodeLocation.java index 8ef715696..dc22f4a23 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/SourceCodeLocation.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/SourceCodeLocation.java @@ -42,7 +42,10 @@ public class SourceCodeLocation implements CodeLocation { * @param col the column where this code element happens in the * source file. If unknown, use {@code -1} */ - public SourceCodeLocation(String sourceFile, int line, int col) { + public SourceCodeLocation( + String sourceFile, + int line, + int col) { Objects.requireNonNull(sourceFile, "The source file cannot be null"); if (line == -1) throw new IllegalArgumentException("Line number cannot be negative"); @@ -104,7 +107,8 @@ public String toString() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -125,7 +129,8 @@ public boolean equals(Object obj) { } @Override - public int compareTo(CodeLocation other) { + public int compareTo( + CodeLocation other) { if (!(other instanceof SourceCodeLocation)) return -1; diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/SyntheticLocation.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/SyntheticLocation.java index 26a5f11ce..02f83361a 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/SyntheticLocation.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/SyntheticLocation.java @@ -23,7 +23,8 @@ public String getCodeLocation() { } @Override - public int compareTo(CodeLocation o) { + public int compareTo( + CodeLocation o) { return o instanceof SyntheticLocation ? 0 : -1; } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/Unit.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/Unit.java index 03f25af40..c4442980c 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/Unit.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/Unit.java @@ -44,7 +44,8 @@ public abstract class Unit { * * @param name the name of the unit */ - protected Unit(String name) { + protected Unit( + String name) { this.name = name; this.globals = new TreeMap<>(); this.codeMembers = new TreeMap<>(); @@ -90,7 +91,8 @@ public final Collection getCodeMembers() { * * @return the global with the given name, or {@code null} */ - public final Global getGlobal(String name) { + public final Global getGlobal( + String name) { return globals.get(name); } @@ -102,7 +104,8 @@ public final Global getGlobal(String name) { * * @return the code member with the given signature, or {@code null} */ - public final CodeMember getCodeMember(String signature) { + public final CodeMember getCodeMember( + String signature) { return codeMembers.get(signature); } @@ -114,7 +117,8 @@ public final CodeMember getCodeMember(String signature) { * * @return the collection of code members with the given name */ - public final Collection getCodeMembersByName(String name) { + public final Collection getCodeMembersByName( + String name) { return codeMembers.values().stream().filter(c -> c.getDescriptor().getName().equals(name)) .collect(Collectors.toList()); } @@ -151,7 +155,8 @@ public Collection getCodeMembersRecursively() { * the same name, {@code false} otherwise. If this method * returns {@code false}, the given global is discarded. */ - public final boolean addGlobal(Global global) { + public final boolean addGlobal( + Global global) { return globals.putIfAbsent(global.getName(), global) == null; } @@ -165,7 +170,8 @@ public final boolean addGlobal(Global global) { * the same signature, {@code false} otherwise. If this method * returns {@code false}, the given member is discarded. */ - public final boolean addCodeMember(CodeMember member) { + public final boolean addCodeMember( + CodeMember member) { return codeMembers.putIfAbsent(member.getDescriptor().getSignature(), member) == null; } @@ -183,7 +189,8 @@ public final String toString() { * * @return the collection of code members that match the given signature */ - public final Collection getMatchingCodeMember(CodeMemberDescriptor signature) { + public final Collection getMatchingCodeMember( + CodeMemberDescriptor signature) { Collection result = new HashSet<>(); for (CodeMember member : codeMembers.values()) diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/Annotation.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/Annotation.java index c51dcd2f6..3f8f30e92 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/Annotation.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/Annotation.java @@ -22,7 +22,8 @@ public class Annotation implements Comparable { * * @param annotationName the name of the annotation */ - public Annotation(String annotationName) { + public Annotation( + String annotationName) { this(annotationName, Collections.emptyList(), false); } @@ -32,7 +33,9 @@ public Annotation(String annotationName) { * @param annotationName the name of the annotation * @param inherited denotes whether the annotation can be inherited */ - public Annotation(String annotationName, boolean inherited) { + public Annotation( + String annotationName, + boolean inherited) { this(annotationName, Collections.emptyList(), inherited); } @@ -43,7 +46,9 @@ public Annotation(String annotationName, boolean inherited) { * @param annotationName the name of the annotation * @param annotationMembers the annotation members */ - public Annotation(String annotationName, List annotationMembers) { + public Annotation( + String annotationName, + List annotationMembers) { this(annotationName, annotationMembers, false); } @@ -54,7 +59,10 @@ public Annotation(String annotationName, List annotationMember * @param annotationMembers the annotation members * @param inherited denotes whether the annotation can be inherited */ - public Annotation(String annotationName, List annotationMembers, boolean inherited) { + public Annotation( + String annotationName, + List annotationMembers, + boolean inherited) { this.annotationMembers = annotationMembers; this.annotationName = annotationName; this.inherited = inherited; @@ -89,7 +97,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -132,7 +141,8 @@ public String toString() { } @Override - public int compareTo(Annotation o) { + public int compareTo( + Annotation o) { int cmp = 0; if ((cmp = annotationName.compareTo(o.annotationName)) != 0) return cmp; diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/AnnotationMember.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/AnnotationMember.java index c381d69da..f136976db 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/AnnotationMember.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/AnnotationMember.java @@ -19,7 +19,9 @@ public class AnnotationMember implements Comparable { * @param id the identifier * @param value the annotation value */ - public AnnotationMember(String id, AnnotationValue value) { + public AnnotationMember( + String id, + AnnotationValue value) { this.id = id; this.value = value; } @@ -52,7 +54,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -79,7 +82,8 @@ public String toString() { } @Override - public int compareTo(AnnotationMember o) { + public int compareTo( + AnnotationMember o) { int cmp = 0; if ((cmp = id.compareTo(o.id)) != 0) return cmp; diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/Annotations.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/Annotations.java index 7e7dbbc4e..e6f92fcb2 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/Annotations.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/Annotations.java @@ -22,11 +22,13 @@ public class Annotations implements Iterable { * * @param annotations the array of annotations */ - public Annotations(Annotation... annotations) { + public Annotations( + Annotation... annotations) { this(make(annotations)); } - private static Set make(Annotation... annotations) { + private static Set make( + Annotation... annotations) { Set annots = new TreeSet<>(); for (Annotation a : annotations) annots.add(a); @@ -38,7 +40,8 @@ private static Set make(Annotation... annotations) { * * @param annotations the collection of annotations */ - public Annotations(Collection annotations) { + public Annotations( + Collection annotations) { this.annotations = annotations instanceof TreeSet ? (TreeSet) annotations : new TreeSet<>(annotations); @@ -67,7 +70,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -93,7 +97,8 @@ public String toString() { * * @param ann the annotation to be added */ - public void addAnnotation(Annotation ann) { + public void addAnnotation( + Annotation ann) { annotations.add(ann); } @@ -106,7 +111,8 @@ public void addAnnotation(Annotation ann) { * @return {@code true} if {@code matcher} matches at least one of this * annotations, {@code false} otherwise */ - public final boolean contains(AnnotationMatcher m) { + public final boolean contains( + AnnotationMatcher m) { return annotations.stream().anyMatch(m::matches); } @@ -117,7 +123,8 @@ public final boolean contains(AnnotationMatcher m) { * * @return the annotations that are matched by the matcher {@code m} */ - public final Annotations getAnnotations(AnnotationMatcher m) { + public final Annotations getAnnotations( + AnnotationMatcher m) { return new Annotations(annotations.stream().filter(m::matches).collect(Collectors.toSet())); } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/matcher/AnnotationMatcher.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/matcher/AnnotationMatcher.java index 48a1a54ce..89bba7daa 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/matcher/AnnotationMatcher.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/matcher/AnnotationMatcher.java @@ -19,5 +19,6 @@ public interface AnnotationMatcher { * @return {@code true} if this matcher matches the input annotation, * {@code false} otherwise */ - boolean matches(Annotation annotation); + boolean matches( + Annotation annotation); } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/matcher/BasicAnnotationMatcher.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/matcher/BasicAnnotationMatcher.java index 06bc425d2..0d4ea502e 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/matcher/BasicAnnotationMatcher.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/matcher/BasicAnnotationMatcher.java @@ -16,7 +16,8 @@ public class BasicAnnotationMatcher implements AnnotationMatcher { * * @param annotation the annotation whose name is to be matched */ - public BasicAnnotationMatcher(Annotation annotation) { + public BasicAnnotationMatcher( + Annotation annotation) { this.annotationName = annotation.getAnnotationName(); } @@ -25,12 +26,14 @@ public BasicAnnotationMatcher(Annotation annotation) { * * @param annotationName the name of the annotation */ - public BasicAnnotationMatcher(String annotationName) { + public BasicAnnotationMatcher( + String annotationName) { this.annotationName = annotationName; } @Override - public boolean matches(Annotation annotation) { + public boolean matches( + Annotation annotation) { return annotation.getAnnotationName().equals(annotationName); } @@ -43,7 +46,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/values/ArrayAnnotationValue.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/values/ArrayAnnotationValue.java index 03dbee2c9..b7769999f 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/values/ArrayAnnotationValue.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/values/ArrayAnnotationValue.java @@ -19,7 +19,8 @@ public class ArrayAnnotationValue implements AnnotationValue { * * @param arr the array of basic annotation values */ - public ArrayAnnotationValue(BasicAnnotationValue[] arr) { + public ArrayAnnotationValue( + BasicAnnotationValue[] arr) { this.arr = arr; } @@ -32,7 +33,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -51,7 +53,8 @@ public String toString() { } @Override - public int compareTo(AnnotationValue o) { + public int compareTo( + AnnotationValue o) { if (!(o instanceof ArrayAnnotationValue)) return getClass().getName().compareTo(o.getClass().getName()); diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/values/BoolAnnotationValue.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/values/BoolAnnotationValue.java index bb5af18c3..56c4cb10f 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/values/BoolAnnotationValue.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/values/BoolAnnotationValue.java @@ -14,7 +14,8 @@ public class BoolAnnotationValue implements BasicAnnotationValue { * * @param b the boolean value */ - public BoolAnnotationValue(boolean b) { + public BoolAnnotationValue( + boolean b) { this.b = b; } @@ -27,7 +28,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -46,7 +48,8 @@ public String toString() { } @Override - public int compareTo(AnnotationValue o) { + public int compareTo( + AnnotationValue o) { if (!(o instanceof BoolAnnotationValue)) return getClass().getName().compareTo(o.getClass().getName()); diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/values/ByteAnnotationValue.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/values/ByteAnnotationValue.java index 805c5eefe..6397ede54 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/values/ByteAnnotationValue.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/values/ByteAnnotationValue.java @@ -14,7 +14,8 @@ public class ByteAnnotationValue implements BasicAnnotationValue { * * @param b the byte value */ - public ByteAnnotationValue(byte b) { + public ByteAnnotationValue( + byte b) { this.b = b; } @@ -27,7 +28,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -46,7 +48,8 @@ public String toString() { } @Override - public int compareTo(AnnotationValue o) { + public int compareTo( + AnnotationValue o) { if (!(o instanceof ByteAnnotationValue)) return getClass().getName().compareTo(o.getClass().getName()); diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/values/CharAnnotationValue.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/values/CharAnnotationValue.java index c9225c160..126b6eacc 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/values/CharAnnotationValue.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/values/CharAnnotationValue.java @@ -14,7 +14,8 @@ public class CharAnnotationValue implements BasicAnnotationValue { * * @param c the char value */ - public CharAnnotationValue(char c) { + public CharAnnotationValue( + char c) { this.c = c; } @@ -27,7 +28,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -46,7 +48,8 @@ public String toString() { } @Override - public int compareTo(AnnotationValue o) { + public int compareTo( + AnnotationValue o) { if (!(o instanceof CharAnnotationValue)) return getClass().getName().compareTo(o.getClass().getName()); diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/values/CompilationUnitAnnotationValue.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/values/CompilationUnitAnnotationValue.java index 50a93d82b..0ff4d41e7 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/values/CompilationUnitAnnotationValue.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/values/CompilationUnitAnnotationValue.java @@ -14,7 +14,8 @@ public class CompilationUnitAnnotationValue implements BasicAnnotationValue { * * @param unitName the name of the compilation unit */ - public CompilationUnitAnnotationValue(String unitName) { + public CompilationUnitAnnotationValue( + String unitName) { this.unitName = unitName; } @@ -27,7 +28,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -49,7 +51,8 @@ public String toString() { } @Override - public int compareTo(AnnotationValue o) { + public int compareTo( + AnnotationValue o) { if (!(o instanceof CompilationUnitAnnotationValue)) return getClass().getName().compareTo(o.getClass().getName()); diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/values/DoubleAnnotationValue.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/values/DoubleAnnotationValue.java index b60b552e8..74e25e381 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/values/DoubleAnnotationValue.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/values/DoubleAnnotationValue.java @@ -14,7 +14,8 @@ public class DoubleAnnotationValue implements BasicAnnotationValue { * * @param d the double value */ - public DoubleAnnotationValue(double d) { + public DoubleAnnotationValue( + double d) { this.d = d; } @@ -29,7 +30,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -48,7 +50,8 @@ public String toString() { } @Override - public int compareTo(AnnotationValue o) { + public int compareTo( + AnnotationValue o) { if (!(o instanceof DoubleAnnotationValue)) return getClass().getName().compareTo(o.getClass().getName()); diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/values/EnumAnnotationValue.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/values/EnumAnnotationValue.java index ac28ea517..900e0a358 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/values/EnumAnnotationValue.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/values/EnumAnnotationValue.java @@ -16,7 +16,9 @@ public class EnumAnnotationValue implements BasicAnnotationValue { * @param name the name of the enum * @param field the field of the enum */ - public EnumAnnotationValue(String name, String field) { + public EnumAnnotationValue( + String name, + String field) { this.name = name; this.field = field; } @@ -31,7 +33,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -58,7 +61,8 @@ public String toString() { } @Override - public int compareTo(AnnotationValue o) { + public int compareTo( + AnnotationValue o) { if (!(o instanceof EnumAnnotationValue)) return getClass().getName().compareTo(o.getClass().getName()); diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/values/FloatAnnotationValue.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/values/FloatAnnotationValue.java index d86c5266a..e1bc31d57 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/values/FloatAnnotationValue.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/values/FloatAnnotationValue.java @@ -14,7 +14,8 @@ public class FloatAnnotationValue implements BasicAnnotationValue { * * @param f the float value */ - public FloatAnnotationValue(float f) { + public FloatAnnotationValue( + float f) { this.f = f; } @@ -27,7 +28,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -46,7 +48,8 @@ public String toString() { } @Override - public int compareTo(AnnotationValue o) { + public int compareTo( + AnnotationValue o) { if (!(o instanceof FloatAnnotationValue)) return getClass().getName().compareTo(o.getClass().getName()); diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/values/IntAnnotationValue.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/values/IntAnnotationValue.java index acb8ca05b..ab0b40ea4 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/values/IntAnnotationValue.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/values/IntAnnotationValue.java @@ -14,7 +14,8 @@ public class IntAnnotationValue implements BasicAnnotationValue { * * @param i the integer value */ - public IntAnnotationValue(int i) { + public IntAnnotationValue( + int i) { this.i = i; } @@ -27,7 +28,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -46,7 +48,8 @@ public String toString() { } @Override - public int compareTo(AnnotationValue o) { + public int compareTo( + AnnotationValue o) { if (!(o instanceof IntAnnotationValue)) return getClass().getName().compareTo(o.getClass().getName()); diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/values/LongAnnotationValue.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/values/LongAnnotationValue.java index a1e15a08a..d549672e0 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/values/LongAnnotationValue.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/values/LongAnnotationValue.java @@ -14,7 +14,8 @@ public class LongAnnotationValue implements BasicAnnotationValue { * * @param l the long value */ - public LongAnnotationValue(long l) { + public LongAnnotationValue( + long l) { this.l = l; } @@ -27,7 +28,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -46,7 +48,8 @@ public String toString() { } @Override - public int compareTo(AnnotationValue o) { + public int compareTo( + AnnotationValue o) { if (!(o instanceof LongAnnotationValue)) return getClass().getName().compareTo(o.getClass().getName()); diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/values/ShortAnnotationValue.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/values/ShortAnnotationValue.java index 237bb1fd7..d1e3ddda4 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/values/ShortAnnotationValue.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/values/ShortAnnotationValue.java @@ -14,7 +14,8 @@ public class ShortAnnotationValue implements BasicAnnotationValue { * * @param s the short value */ - public ShortAnnotationValue(short s) { + public ShortAnnotationValue( + short s) { this.s = s; } @@ -27,7 +28,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -46,7 +48,8 @@ public String toString() { } @Override - public int compareTo(AnnotationValue o) { + public int compareTo( + AnnotationValue o) { if (!(o instanceof ShortAnnotationValue)) return getClass().getName().compareTo(o.getClass().getName()); diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/values/StringAnnotationValue.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/values/StringAnnotationValue.java index ecca62b0a..b613086f2 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/values/StringAnnotationValue.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/annotations/values/StringAnnotationValue.java @@ -14,7 +14,8 @@ public class StringAnnotationValue implements BasicAnnotationValue { * * @param s the string value */ - public StringAnnotationValue(String s) { + public StringAnnotationValue( + String s) { this.s = s; } @@ -27,7 +28,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -49,7 +51,8 @@ public String toString() { } @Override - public int compareTo(AnnotationValue o) { + public int compareTo( + AnnotationValue o) { if (!(o instanceof StringAnnotationValue)) return getClass().getName().compareTo(o.getClass().getName()); diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/AbstractCodeMember.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/AbstractCodeMember.java index 710e953f6..5cbcf5087 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/AbstractCodeMember.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/AbstractCodeMember.java @@ -21,7 +21,8 @@ public class AbstractCodeMember implements CodeMember { * * @param descriptor the descriptor of this signature cfg */ - public AbstractCodeMember(CodeMemberDescriptor descriptor) { + public AbstractCodeMember( + CodeMemberDescriptor descriptor) { this.descriptor = descriptor; } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/CFG.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/CFG.java index fab8d45c2..0e26a3445 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/CFG.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/CFG.java @@ -3,12 +3,9 @@ import it.unive.lisa.analysis.AbstractState; import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.AnalyzedCFG; -import it.unive.lisa.analysis.Lattice; +import it.unive.lisa.analysis.BackwardAnalyzedCFG; import it.unive.lisa.analysis.OptimizedAnalyzedCFG; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.conf.FixpointConfiguration; import it.unive.lisa.conf.LiSAConfiguration.DescendingPhaseType; import it.unive.lisa.interprocedural.InterproceduralAnalysis; @@ -17,6 +14,7 @@ import it.unive.lisa.outputs.serializableGraph.SerializableGraph; import it.unive.lisa.outputs.serializableGraph.SerializableValue; import it.unive.lisa.program.ProgramValidationException; +import it.unive.lisa.program.SyntheticLocation; import it.unive.lisa.program.cfg.controlFlow.ControlFlowExtractor; import it.unive.lisa.program.cfg.controlFlow.ControlFlowStructure; import it.unive.lisa.program.cfg.controlFlow.IfThenElse; @@ -24,9 +22,11 @@ import it.unive.lisa.program.cfg.edge.Edge; import it.unive.lisa.program.cfg.edge.SequentialEdge; import it.unive.lisa.program.cfg.fixpoints.AscendingFixpoint; +import it.unive.lisa.program.cfg.fixpoints.BackwardAscendingFixpoint; import it.unive.lisa.program.cfg.fixpoints.CFGFixpoint.CompoundState; import it.unive.lisa.program.cfg.fixpoints.DescendingGLBFixpoint; import it.unive.lisa.program.cfg.fixpoints.DescendingNarrowingFixpoint; +import it.unive.lisa.program.cfg.fixpoints.OptimizedBackwardFixpoint; import it.unive.lisa.program.cfg.fixpoints.OptimizedFixpoint; import it.unive.lisa.program.cfg.statement.Expression; import it.unive.lisa.program.cfg.statement.NoOp; @@ -36,6 +36,7 @@ import it.unive.lisa.util.collections.workset.VisitOnceWorkingSet; import it.unive.lisa.util.collections.workset.WorkingSet; import it.unive.lisa.util.datastructures.graph.AdjacencyMatrix; +import it.unive.lisa.util.datastructures.graph.algorithms.BackwardFixpoint; import it.unive.lisa.util.datastructures.graph.algorithms.Fixpoint; import it.unive.lisa.util.datastructures.graph.algorithms.FixpointException; import it.unive.lisa.util.datastructures.graph.code.CodeGraph; @@ -89,7 +90,8 @@ public class CFG extends CodeGraph implements CodeMember { * * @param descriptor the descriptor of this cfg */ - public CFG(CodeMemberDescriptor descriptor) { + public CFG( + CodeMemberDescriptor descriptor) { super(new SequentialEdge()); this.descriptor = descriptor; this.cfStructs = new LinkedList<>(); @@ -104,7 +106,9 @@ public CFG(CodeMemberDescriptor descriptor) { * @param list the node list containing all the statements and the * edges that will be part of this cfg */ - public CFG(CodeMemberDescriptor descriptor, Collection entrypoints, + public CFG( + CodeMemberDescriptor descriptor, + Collection entrypoints, NodeList list) { super(entrypoints, list); this.descriptor = descriptor; @@ -116,7 +120,8 @@ public CFG(CodeMemberDescriptor descriptor, Collection entrypoints, * * @param other the original cfg */ - public CFG(CFG other) { + public CFG( + CFG other) { super(other.entrypoints, other.list); this.descriptor = other.descriptor; this.cfStructs = other.cfStructs; @@ -169,7 +174,8 @@ public Collection getAllExitpoints() { * @throws IllegalArgumentException if a control flow structure for the same * condition already exists */ - public void addControlFlowStructure(ControlFlowStructure cf) { + public void addControlFlowStructure( + ControlFlowStructure cf) { if (cfStructs.stream().anyMatch(c -> c.getCondition().equals(cf.getCondition()))) throw new IllegalArgumentException( "Cannot have more than one conditional structure happening on the same condition: " @@ -199,7 +205,8 @@ public Collection getControlFlowStructures() { * * @param extractor the extractor to run */ - public void extractControlFlowStructures(ControlFlowExtractor extractor) { + public void extractControlFlowStructures( + ControlFlowExtractor extractor) { LOG.debug("Extracting control flow structures from " + this); extractor.extract(this).forEach(cfStructs::add); } @@ -228,13 +235,8 @@ public void simplify() { /** * Computes a fixpoint over this control flow graph. This method returns a * {@link AnalyzedCFG} instance mapping each {@link Statement} to the - * {@link AnalysisState} computed by this method. The computation uses - * {@link Lattice#lub(Lattice)} to compose results obtained at different - * iterations, up to {@code widenAfter * predecessors_number} times, where - * {@code predecessors_number} is the number of expressions that are - * predecessors of the one being processed. After overcoming that threshold, - * {@link Lattice#widening(Lattice)} is used. The computation starts at the - * statements returned by {@link #getEntrypoints()}, using + * {@link AnalysisState} computed by this method. The computation starts at + * the statements returned by {@link #getEntrypoints()}, using * {@code entryState} as entry state for all of them. * {@code interprocedural} will be invoked to get the approximation of all * invoked cfgs, while {@code ws} is used as working set for the statements @@ -242,12 +244,6 @@ public void simplify() { * * @param
the type of {@link AbstractState} contained into * the analysis state - * @param the type of {@link HeapDomain} contained into the - * computed abstract state - * @param the type of {@link ValueDomain} contained into the - * computed abstract state - * @param the type of {@link TypeDomain} contained into the - * computed abstract state * @param entryState the entry states to apply to each * {@link Statement} returned by * {@link #getEntrypoints()} @@ -271,16 +267,14 @@ public void simplify() { * unknown/invalid statement ends up in the * working set */ - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalyzedCFG fixpoint( - AnalysisState entryState, - InterproceduralAnalysis interprocedural, - WorkingSet ws, - FixpointConfiguration conf, - ScopeId id) throws FixpointException { - Map> start = new HashMap<>(); + public > AnalyzedCFG fixpoint( + AnalysisState entryState, + InterproceduralAnalysis interprocedural, + WorkingSet ws, + FixpointConfiguration conf, + ScopeId id) + throws FixpointException { + Map> start = new HashMap<>(); entrypoints.forEach(e -> start.put(e, entryState)); return fixpoint(entryState, start, interprocedural, ws, conf, id); } @@ -288,32 +282,22 @@ T extends TypeDomain> AnalyzedCFG fixpoint( /** * Computes a fixpoint over this control flow graph. This method returns a * {@link AnalyzedCFG} instance mapping each {@link Statement} to the - * {@link AnalysisState} computed by this method. The computation uses - * {@link Lattice#lub(Lattice)} to compose results obtained at different - * iterations, up to {@code widenAfter * predecessors_number} times, where - * {@code predecessors_number} is the number of expressions that are - * predecessors of the one being processed. After overcoming that threshold, - * {@link Lattice#widening(Lattice)} is used. The computation starts at the - * statements in {@code entrypoints}, using {@code entryState} as entry + * {@link AnalysisState} computed by this method. The computation starts at + * the statements in {@code entrypoints}, using {@code entryState} as entry * state for all of them. {@code interprocedural} will be invoked to get the * approximation of all invoked cfgs, while {@code ws} is used as working * set for the statements to process. * * @param the type of {@link AbstractState} contained into * the analysis state - * @param the type of {@link HeapDomain} contained into the - * computed abstract state - * @param the type of {@link ValueDomain} contained into the - * computed abstract state - * @param the type of {@link TypeDomain} contained into the - * computed abstract state * @param entrypoints the collection of {@link Statement}s that to use * as a starting point of the computation (that * must be nodes of this cfg) * @param entryState the entry states to apply to each * {@link Statement} in {@code entrypoints} - * @param interprocedural the callgraph that can be queried when a call - * towards an other cfg is encountered + * @param interprocedural the interprocedural analysis that can be queried + * when a call towards an other cfg is + * encountered * @param ws the {@link WorkingSet} instance to use for this * computation * @param conf the {@link FixpointConfiguration} containing the @@ -331,17 +315,15 @@ T extends TypeDomain> AnalyzedCFG fixpoint( * unknown/invalid statement ends up in the * working set */ - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalyzedCFG fixpoint( - Collection entrypoints, - AnalysisState entryState, - InterproceduralAnalysis interprocedural, - WorkingSet ws, - FixpointConfiguration conf, - ScopeId id) throws FixpointException { - Map> start = new HashMap<>(); + public > AnalyzedCFG fixpoint( + Collection entrypoints, + AnalysisState entryState, + InterproceduralAnalysis interprocedural, + WorkingSet ws, + FixpointConfiguration conf, + ScopeId id) + throws FixpointException { + Map> start = new HashMap<>(); entrypoints.forEach(e -> start.put(e, entryState)); return fixpoint(entryState, start, interprocedural, ws, conf, id); } @@ -349,25 +331,14 @@ T extends TypeDomain> AnalyzedCFG fixpoint( /** * Computes a fixpoint over this control flow graph. This method returns a * {@link AnalyzedCFG} instance mapping each {@link Statement} to the - * {@link AnalysisState} computed by this method. The computation uses - * {@link Lattice#lub(Lattice)} to compose results obtained at different - * iterations, up to {@code widenAfter * predecessors_number} times, where - * {@code predecessors_number} is the number of expressions that are - * predecessors of the one being processed. After overcoming that threshold, - * {@link Lattice#widening(Lattice)} is used. The computation starts at the - * statements in {@code startingPoints}, using as its entry state their + * {@link AnalysisState} computed by this method. The computation starts at + * the statements in {@code startingPoints}, using as its entry state their * respective value. {@code interprocedural} will be invoked to get the * approximation of all invoked cfgs, while {@code ws} is used as working * set for the statements to process. * * @param the type of {@link AbstractState} contained into * the analysis state - * @param the type of {@link HeapDomain} contained into the - * computed abstract state - * @param the type of {@link ValueDomain} contained into the - * computed abstract state - * @param the type of {@link TypeDomain} contained into the - * computed abstract state * @param singleton an instance of the {@link AnalysisState} * containing the abstract state of the analysis * to run, used to retrieve top and bottom values @@ -375,8 +346,9 @@ T extends TypeDomain> AnalyzedCFG fixpoint( * starting point of the computation (that must * be nodes of this cfg) and the entry states to * apply on them - * @param interprocedural the callgraph that can be queried when a call - * towards an other cfg is encountered + * @param interprocedural the interprocedural analysis that can be queried + * when a call towards an other cfg is + * encountered * @param ws the {@link WorkingSet} instance to use for this * computation * @param conf the {@link FixpointConfiguration} containing the @@ -394,45 +366,42 @@ T extends TypeDomain> AnalyzedCFG fixpoint( * unknown/invalid statement ends up in the * working set */ - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalyzedCFG fixpoint( - AnalysisState singleton, - Map> startingPoints, - InterproceduralAnalysis interprocedural, - WorkingSet ws, - FixpointConfiguration conf, - ScopeId id) throws FixpointException { + public > AnalyzedCFG fixpoint( + AnalysisState singleton, + Map> startingPoints, + InterproceduralAnalysis interprocedural, + WorkingSet ws, + FixpointConfiguration conf, + ScopeId id) + throws FixpointException { // we disable optimizations for ascending phases if there is a // descending one: the latter will need full results to start applying // glbs/narrowings from a post-fixpoint boolean isOptimized = conf.optimize && conf.descendingPhaseType == DescendingPhaseType.NONE; - Fixpoint> fix = isOptimized + Fixpoint> fix = isOptimized ? new OptimizedFixpoint<>(this, false, conf.hotspots) : new Fixpoint<>(this, false); - AscendingFixpoint asc = new AscendingFixpoint<>(this, conf.wideningThreshold, interprocedural); + AscendingFixpoint asc = new AscendingFixpoint<>(this, interprocedural, conf); - Map> starting = new HashMap<>(); - StatementStore bot = new StatementStore<>(singleton.bottom()); - startingPoints.forEach((st, state) -> starting.put(st, CompoundState.of(state, bot))); - Map> ascending = fix.fixpoint(starting, ws, asc); + Map> starting = new HashMap<>(); + StatementStore bot = new StatementStore<>(singleton.bottom()); + startingPoints.forEach(( + st, + state) -> starting.put(st, CompoundState.of(state, bot))); + Map> ascending = fix.fixpoint(starting, ws, asc); if (conf.descendingPhaseType == DescendingPhaseType.NONE) return flatten(isOptimized, singleton, startingPoints, interprocedural, id, ascending); fix = conf.optimize ? new OptimizedFixpoint<>(this, true, conf.hotspots) : new Fixpoint<>(this, true); - Map> descending; + Map> descending; switch (conf.descendingPhaseType) { case GLB: - DescendingGLBFixpoint dg = new DescendingGLBFixpoint<>( - this, - conf.glbThreshold, - interprocedural); + DescendingGLBFixpoint dg = new DescendingGLBFixpoint<>(this, interprocedural, conf); descending = fix.fixpoint(starting, ws, dg, ascending); break; case NARROWING: - DescendingNarrowingFixpoint dn = new DescendingNarrowingFixpoint<>(this, interprocedural); + DescendingNarrowingFixpoint dn = new DescendingNarrowingFixpoint<>(this, interprocedural, conf); descending = fix.fixpoint(starting, ws, dn, ascending); break; case NONE: @@ -445,25 +414,22 @@ T extends TypeDomain> AnalyzedCFG fixpoint( return flatten(conf.optimize, singleton, startingPoints, interprocedural, id, descending); } - private , - T extends TypeDomain, - A extends AbstractState, - H extends HeapDomain> AnalyzedCFG flatten( - boolean isOptimized, - AnalysisState singleton, - Map> startingPoints, - InterproceduralAnalysis interprocedural, - ScopeId id, - Map> fixpointResults) { - Map> finalResults = new HashMap<>(fixpointResults.size()); - for (Entry> e : fixpointResults.entrySet()) { + private > AnalyzedCFG flatten( + boolean isOptimized, + AnalysisState singleton, + Map> startingPoints, + InterproceduralAnalysis interprocedural, + ScopeId id, + Map> fixpointResults) { + Map> finalResults = new HashMap<>(fixpointResults.size()); + for (Entry> e : fixpointResults.entrySet()) { finalResults.put(e.getKey(), e.getValue().postState); - for (Entry> ee : e.getValue().intermediateStates) + for (Entry> ee : e.getValue().intermediateStates) finalResults.put(ee.getKey(), ee.getValue()); } return isOptimized - ? new OptimizedAnalyzedCFG( + ? new OptimizedAnalyzedCFG( this, id, singleton, @@ -478,18 +444,203 @@ H extends HeapDomain> AnalyzedCFG flatten( finalResults); } + /** + * Computes a backward fixpoint over this control flow graph. This method + * returns a {@link BackwardAnalyzedCFG} instance mapping each + * {@link Statement} to the {@link AnalysisState} computed by this method. + * The computation starts at the statements returned by + * {@link #getAllExitpoints()}, using {@code exitState} as exit state for + * all of them. {@code interprocedural} will be invoked to get the + * approximation of all invoked cfgs, while {@code ws} is used as working + * set for the statements to process. + * + * @param the type of {@link AbstractState} contained into + * the analysis state + * @param exitState the exit states to apply to each {@link Statement} + * returned by {@link #getAllExitpoints()} + * @param interprocedural the interprocedural analysis that can be queried + * when a call towards an other cfg is + * encountered + * @param ws the {@link WorkingSet} instance to use for this + * computation + * @param conf the {@link FixpointConfiguration} containing the + * parameters tuning fixpoint behavior + * @param id a {@link ScopeId} meant to identify this specific + * result based on how it has been produced, that + * will be embedded in the returned cfg + * + * @return a {@link BackwardAnalyzedCFG} instance that is equivalent to this + * control flow graph, and that stores for each + * {@link Statement} the result of the fixpoint computation + * + * @throws FixpointException if an error occurs during the semantic + * computation of a statement, or if some + * unknown/invalid statement ends up in the + * working set + */ + public > AnalyzedCFG backwardFixpoint( + AnalysisState exitState, + InterproceduralAnalysis interprocedural, + WorkingSet ws, + FixpointConfiguration conf, + ScopeId id) + throws FixpointException { + Map> start = new HashMap<>(); + getAllExitpoints().forEach(e -> start.put(e, exitState)); + return backwardFixpoint(exitState, start, interprocedural, ws, conf, id); + } + + /** + * Computes a backward fixpoint over this control flow graph. This method + * returns a {@link BackwardAnalyzedCFG} instance mapping each + * {@link Statement} to the {@link AnalysisState} computed by this method. + * The computation starts at the statements in {@code exitpoints}, using + * {@code exitState} as exit state for all of them. {@code interprocedural} + * will be invoked to get the approximation of all invoked cfgs, while + * {@code ws} is used as working set for the statements to process. + * + * @param the type of {@link AbstractState} contained into + * the analysis state + * @param exitpoints the collection of {@link Statement}s that to use + * as a starting point of the computation (that + * must be nodes of this cfg) + * @param exitState the exit states to apply to each {@link Statement} + * in {@code exitpoints} + * @param interprocedural the interprocedural analysis that can be queried + * when a call towards an other cfg is + * encountered + * @param ws the {@link WorkingSet} instance to use for this + * computation + * @param conf the {@link FixpointConfiguration} containing the + * parameters tuning fixpoint behavior + * @param id a {@link ScopeId} meant to identify this specific + * result based on how it has been produced, that + * will be embedded in the returned cfg + * + * @return a {@link BackwardAnalyzedCFG} instance that is equivalent to this + * control flow graph, and that stores for each + * {@link Statement} the result of the fixpoint computation + * + * @throws FixpointException if an error occurs during the semantic + * computation of a statement, or if some + * unknown/invalid statement ends up in the + * working set + */ + public > AnalyzedCFG backwardFixpoint( + Collection exitpoints, + AnalysisState exitState, + InterproceduralAnalysis interprocedural, + WorkingSet ws, + FixpointConfiguration conf, + ScopeId id) + throws FixpointException { + Map> start = new HashMap<>(); + exitpoints.forEach(e -> start.put(e, exitState)); + return backwardFixpoint(exitState, start, interprocedural, ws, conf, id); + } + + /** + * Computes a backward fixpoint over this control flow graph. This method + * returns a {@link BackwardAnalyzedCFG} instance mapping each + * {@link Statement} to the {@link AnalysisState} computed by this method. + * The computation starts at the statements in {@code startingPoints}, using + * as its exit state their respective value. {@code interprocedural} will be + * invoked to get the approximation of all invoked cfgs, while {@code ws} is + * used as working set for the statements to process. + * + * @param the type of {@link AbstractState} contained into + * the analysis state + * @param singleton an instance of the {@link AnalysisState} + * containing the abstract state of the analysis + * to run, used to retrieve top and bottom values + * @param startingPoints a map between {@link Statement}s to use as a + * starting point of the computation (that must + * be nodes of this cfg) and the exit states to + * apply on them + * @param interprocedural the interprocedural analysis that can be queried + * when a call towards an other cfg is + * encountered + * @param ws the {@link WorkingSet} instance to use for this + * computation + * @param conf the {@link FixpointConfiguration} containing the + * parameters tuning fixpoint behavior + * @param id a {@link ScopeId} meant to identify this specific + * result based on how it has been produced, that + * will be embedded in the returned cfg + * + * @return a {@link BackwardAnalyzedCFG} instance that is equivalent to this + * control flow graph, and that stores for each + * {@link Statement} the result of the fixpoint computation + * + * @throws FixpointException if an error occurs during the semantic + * computation of a statement, or if some + * unknown/invalid statement ends up in the + * working set + */ + public > AnalyzedCFG backwardFixpoint( + AnalysisState singleton, + Map> startingPoints, + InterproceduralAnalysis interprocedural, + WorkingSet ws, + FixpointConfiguration conf, + ScopeId id) + throws FixpointException { + // we disable optimizations for ascending phases if there is a + // descending one: the latter will need full results to start applying + // glbs/narrowings from a post-fixpoint + boolean isOptimized = conf.optimize && conf.descendingPhaseType == DescendingPhaseType.NONE; + BackwardFixpoint> fix = isOptimized + ? new OptimizedBackwardFixpoint<>(this, false, conf.hotspots) + : new BackwardFixpoint<>(this, false); + BackwardAscendingFixpoint asc = new BackwardAscendingFixpoint<>(this, interprocedural, conf); + + Map> starting = new HashMap<>(); + StatementStore bot = new StatementStore<>(singleton.bottom()); + startingPoints.forEach(( + st, + state) -> starting.put(st, CompoundState.of(state, bot))); + Map> ascending = fix.fixpoint(starting, ws, asc); + + if (conf.descendingPhaseType == DescendingPhaseType.NONE) + return flatten(isOptimized, singleton, startingPoints, interprocedural, id, ascending); + + fix = conf.optimize ? new OptimizedBackwardFixpoint<>(this, true, conf.hotspots) + : new BackwardFixpoint<>(this, true); + Map> descending; + switch (conf.descendingPhaseType) { + case GLB: + DescendingGLBFixpoint dg = new DescendingGLBFixpoint<>(this, interprocedural, conf); + descending = fix.fixpoint(starting, ws, dg, ascending); + break; + case NARROWING: + DescendingNarrowingFixpoint dn = new DescendingNarrowingFixpoint<>(this, interprocedural, conf); + descending = fix.fixpoint(starting, ws, dn, ascending); + break; + case NONE: + default: + // should never happen + descending = ascending; + break; + } + + return flatten(conf.optimize, singleton, startingPoints, interprocedural, id, descending); + } + @Override - public SerializableGraph toSerializableGraph(BiFunction descriptionGenerator) { + public SerializableGraph toSerializableGraph( + BiFunction descriptionGenerator) { return SerializableCFG.fromCFG(this, descriptionGenerator); } @Override - public void preSimplify(Statement node) { + public void preSimplify( + Statement node) { shiftVariableScopes(node); shiftControlFlowStructuresEnd(node); } - private void shiftControlFlowStructuresEnd(Statement node) { + private void shiftControlFlowStructuresEnd( + Statement node) { Collection followers = followersOf(node); Statement candidate; @@ -510,7 +661,8 @@ else if (followers.size() == 1) } } - private Statement firstNonNoOpDeterministicFollower(Statement st) { + private Statement firstNonNoOpDeterministicFollower( + Statement st) { Statement current = st; while (current instanceof NoOp) { Collection followers = followersOf(current); @@ -523,7 +675,8 @@ private Statement firstNonNoOpDeterministicFollower(Statement st) { return current; } - private void shiftVariableScopes(Statement node) { + private void shiftVariableScopes( + Statement node) { Collection< VariableTableEntry> starting = descriptor.getVariables().stream().filter(v -> v.getScopeStart() == node) .collect(Collectors.toList()); @@ -613,7 +766,7 @@ public String toString() { @Override public CodeLocation getLocation() { - return null; + return SyntheticLocation.INSTANCE; } }; } @@ -666,7 +819,8 @@ public void validate() throws ProgramValidationException { + new HashSet<>(entrypoints).retainAll(list.getNodes())); } - private Collection getControlFlowsContaining(ProgramPoint pp) { + private Collection getControlFlowsContaining( + ProgramPoint pp) { if (!(pp instanceof Statement)) // synthetic pp return Collections.emptyList(); @@ -702,7 +856,8 @@ private Collection getControlFlowsContaining(ProgramPoint * * @return {@code true} if {@code pp} is inside a control flow structure */ - public boolean isGuarded(ProgramPoint pp) { + public boolean isGuarded( + ProgramPoint pp) { return !getControlFlowsContaining(pp).isEmpty(); } @@ -718,7 +873,8 @@ public boolean isGuarded(ProgramPoint pp) { * * @return {@code true} if {@code pp} is inside a loop */ - public boolean isInsideLoop(ProgramPoint pp) { + public boolean isInsideLoop( + ProgramPoint pp) { return getControlFlowsContaining(pp).stream().anyMatch(Loop.class::isInstance); } @@ -734,7 +890,8 @@ public boolean isInsideLoop(ProgramPoint pp) { * * @return {@code true} if {@code pp} is inside an if-then-else */ - public boolean isInsideIfThenElse(ProgramPoint pp) { + public boolean isInsideIfThenElse( + ProgramPoint pp) { return getControlFlowsContaining(pp).stream().anyMatch(IfThenElse.class::isInstance); } @@ -753,7 +910,8 @@ public boolean isInsideIfThenElse(ProgramPoint pp) { * @return the collection of the guards of all structures containing * {@code pp} */ - public Collection getGuards(ProgramPoint pp) { + public Collection getGuards( + ProgramPoint pp) { return getControlFlowsContaining(pp).stream().map(ControlFlowStructure::getCondition) .collect(Collectors.toList()); } @@ -771,7 +929,8 @@ public Collection getGuards(ProgramPoint pp) { * * @return the collection of the guards of all loops containing {@code pp} */ - public Collection getLoopGuards(ProgramPoint pp) { + public Collection getLoopGuards( + ProgramPoint pp) { return getControlFlowsContaining(pp).stream().filter(Loop.class::isInstance) .map(ControlFlowStructure::getCondition).collect(Collectors.toList()); } @@ -790,12 +949,15 @@ public Collection getLoopGuards(ProgramPoint pp) { * @return the collection of the guards of all if-then-elses containing * {@code pp} */ - public Collection getIfThenElseGuards(ProgramPoint pp) { + public Collection getIfThenElseGuards( + ProgramPoint pp) { return getControlFlowsContaining(pp).stream().filter(IfThenElse.class::isInstance) .map(ControlFlowStructure::getCondition).collect(Collectors.toList()); } - private Statement getRecent(ProgramPoint pp, Predicate filter) { + private Statement getRecent( + ProgramPoint pp, + Predicate filter) { if (!(pp instanceof Statement)) // synthetic pp return null; @@ -835,7 +997,8 @@ private Statement getRecent(ProgramPoint pp, Predicate fil * * @return the most recent if-then-else guard, or {@code null} */ - public Statement getMostRecentGuard(ProgramPoint pp) { + public Statement getMostRecentGuard( + ProgramPoint pp) { return getRecent(pp, cf -> true); } @@ -852,7 +1015,8 @@ public Statement getMostRecentGuard(ProgramPoint pp) { * * @return the most recent loop guard, or {@code null} */ - public Statement getMostRecentLoopGuard(ProgramPoint pp) { + public Statement getMostRecentLoopGuard( + ProgramPoint pp) { return getRecent(pp, Loop.class::isInstance); } @@ -869,7 +1033,8 @@ public Statement getMostRecentLoopGuard(ProgramPoint pp) { * * @return the most recent if-then-else guard, or {@code null} */ - public Statement getMostRecentIfThenElseGuard(ProgramPoint pp) { + public Statement getMostRecentIfThenElseGuard( + ProgramPoint pp) { return getRecent(pp, IfThenElse.class::isInstance); } @@ -881,7 +1046,8 @@ public Statement getMostRecentIfThenElseGuard(ProgramPoint pp) { * * @return the control flow structure, or {@code null} */ - public ControlFlowStructure getControlFlowStructureOf(ProgramPoint guard) { + public ControlFlowStructure getControlFlowStructureOf( + ProgramPoint guard) { for (ControlFlowStructure struct : getControlFlowStructures()) if (struct.getCondition().equals(guard)) return struct; diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/CodeMemberDescriptor.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/CodeMemberDescriptor.java index e5aed24a2..76a037b43 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/CodeMemberDescriptor.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/CodeMemberDescriptor.java @@ -82,7 +82,11 @@ public class CodeMemberDescriptor implements CodeElement { * @param formals the formal parametersof the CFG associated with this * descriptor */ - public CodeMemberDescriptor(CodeLocation location, Unit unit, boolean instance, String name, + public CodeMemberDescriptor( + CodeLocation location, + Unit unit, + boolean instance, + String name, Parameter... formals) { this(location, unit, instance, name, Untyped.INSTANCE, formals); } @@ -102,8 +106,13 @@ public CodeMemberDescriptor(CodeLocation location, Unit unit, boolean instance, * @param formals the formal parameters of the CFG associated with this * descriptor */ - public CodeMemberDescriptor(CodeLocation location, Unit unit, boolean instance, String name, - Type returnType, Parameter... formals) { + public CodeMemberDescriptor( + CodeLocation location, + Unit unit, + boolean instance, + String name, + Type returnType, + Parameter... formals) { this(location, unit, instance, name, returnType, new Annotations(), formals); } @@ -124,8 +133,14 @@ public CodeMemberDescriptor(CodeLocation location, Unit unit, boolean instance, * @param formals the formal parameters of the CFG associated with this * descriptor */ - public CodeMemberDescriptor(CodeLocation location, Unit unit, boolean instance, String name, - Type returnType, Annotations annotations, Parameter... formals) { + public CodeMemberDescriptor( + CodeLocation location, + Unit unit, + boolean instance, + String name, + Type returnType, + Annotations annotations, + Parameter... formals) { Objects.requireNonNull(unit, "The unit of a CFG cannot be null"); Objects.requireNonNull(name, "The name of a CFG cannot be null"); Objects.requireNonNull(formals, "The array of formal parameters of a CFG cannot be null"); @@ -262,7 +277,8 @@ public List getVariables() { * * @param variable the entry to add */ - public void addVariable(VariableTableEntry variable) { + public void addVariable( + VariableTableEntry variable) { if (variable.getIndex() != variables.size()) variable.setIndex(variables.size()); variables.add(variable); @@ -285,7 +301,8 @@ public boolean isOverridable() { * * @param overridable the overridability of the cfg */ - public void setOverridable(boolean overridable) { + public void setOverridable( + boolean overridable) { this.overridable = overridable; } @@ -337,7 +354,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -417,7 +435,8 @@ public String toString() { * @return {@code true} if the two signatures are compatible, {@code false} * otherwise */ - public boolean matchesSignature(CodeMemberDescriptor reference) { + public boolean matchesSignature( + CodeMemberDescriptor reference) { if (!name.equals(reference.name)) return false; @@ -451,7 +470,8 @@ public Annotations getAnnotations() { * * @param ann the annotation to be added */ - public void addAnnotation(Annotation ann) { + public void addAnnotation( + Annotation ann) { annotations.addAnnotation(ann); } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/NativeCFG.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/NativeCFG.java index 93975dddf..ad5545994 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/NativeCFG.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/NativeCFG.java @@ -49,7 +49,9 @@ public class NativeCFG implements CodeMember { * @throws IllegalArgumentException if the class of the construct does not * implement {@link PluggableStatement} */ - public NativeCFG(CodeMemberDescriptor descriptor, Class construct) { + public NativeCFG( + CodeMemberDescriptor descriptor, + Class construct) { if (!PluggableStatement.class.isAssignableFrom(construct)) throw new IllegalArgumentException(construct + " must implement the " + PluggableStatement.class.getName() + " to be used within native cfgs"); @@ -82,7 +84,9 @@ public String toString() { * @throws CallResolutionException if something goes wrong while creating * the native call */ - public NaryExpression rewrite(Statement original, Expression... params) + public NaryExpression rewrite( + Statement original, + Expression... params) throws CallResolutionException { try { diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/Parameter.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/Parameter.java index 87f7098df..ba259c4fb 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/Parameter.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/Parameter.java @@ -43,7 +43,9 @@ public class Parameter implements CodeElement { * @param location the location of this parameter * @param name the name of this parameter */ - public Parameter(CodeLocation location, String name) { + public Parameter( + CodeLocation location, + String name) { this(location, name, Untyped.INSTANCE, null, new Annotations()); } @@ -57,7 +59,10 @@ public Parameter(CodeLocation location, String name) { * @param staticType the type of this parameter. If unknown, use * {@link Untyped#INSTANCE} */ - public Parameter(CodeLocation location, String name, Type staticType) { + public Parameter( + CodeLocation location, + String name, + Type staticType) { this(location, name, staticType, null, new Annotations()); } @@ -71,7 +76,10 @@ public Parameter(CodeLocation location, String name, Type staticType) { * @param defaultValue the default value for this parameter that can be used * when a call does not specify a value for it */ - public Parameter(CodeLocation location, String name, Expression defaultValue) { + public Parameter( + CodeLocation location, + String name, + Expression defaultValue) { this(location, name, defaultValue.getStaticType(), defaultValue, new Annotations()); } @@ -88,7 +96,11 @@ public Parameter(CodeLocation location, String name, Expression defaultValue) { * when a call does not specify a value for it * @param annotations the annotations of this parameter */ - public Parameter(CodeLocation location, String name, Type staticType, Expression defaultValue, + public Parameter( + CodeLocation location, + String name, + Type staticType, + Expression defaultValue, Annotations annotations) { Objects.requireNonNull(name, "The name of a parameter cannot be null"); Objects.requireNonNull(staticType, "The type of a parameter cannot be null"); @@ -130,7 +142,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -185,7 +198,8 @@ public Annotations getAnnotations() { * * @param ann the annotation to be added */ - public void addAnnotation(Annotation ann) { + public void addAnnotation( + Annotation ann) { annotations.addAnnotation(ann); } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/VariableTableEntry.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/VariableTableEntry.java index feb3dd906..dc890c0f3 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/VariableTableEntry.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/VariableTableEntry.java @@ -60,7 +60,10 @@ public class VariableTableEntry implements CodeElement { * @param index the index of the variable entry * @param name the name of this variable */ - public VariableTableEntry(CodeLocation location, int index, String name) { + public VariableTableEntry( + CodeLocation location, + int index, + String name) { this(location, index, null, null, name, Untyped.INSTANCE); } @@ -78,7 +81,12 @@ public VariableTableEntry(CodeLocation location, int index, String name) { * until the end of the cfg * @param name the name of this variable */ - public VariableTableEntry(CodeLocation location, int index, Statement scopeStart, Statement scopeEnd, String name) { + public VariableTableEntry( + CodeLocation location, + int index, + Statement scopeStart, + Statement scopeEnd, + String name) { this(location, index, scopeStart, scopeEnd, name, Untyped.INSTANCE); } @@ -99,8 +107,13 @@ public VariableTableEntry(CodeLocation location, int index, Statement scopeStart * @param staticType the type of this variable. If unknown, use * {@link Untyped#INSTANCE} */ - public VariableTableEntry(CodeLocation location, int index, Statement scopeStart, Statement scopeEnd, - String name, Type staticType) { + public VariableTableEntry( + CodeLocation location, + int index, + Statement scopeStart, + Statement scopeEnd, + String name, + Type staticType) { this(location, index, scopeStart, scopeEnd, name, staticType, new Annotations()); } @@ -123,8 +136,14 @@ public VariableTableEntry(CodeLocation location, int index, Statement scopeStart * {@link Untyped#INSTANCE} * @param annotations the annotations of this variable */ - public VariableTableEntry(CodeLocation location, int index, Statement scopeStart, Statement scopeEnd, - String name, Type staticType, Annotations annotations) { + public VariableTableEntry( + CodeLocation location, + int index, + Statement scopeStart, + Statement scopeEnd, + String name, + Type staticType, + Annotations annotations) { Objects.requireNonNull(name, "The name of a variable cannot be null"); Objects.requireNonNull(staticType, "The type of a variable cannot be null"); Objects.requireNonNull(location, "The location of a variable cannot be null"); @@ -151,7 +170,8 @@ public int getIndex() { * * @param index the new index of this variable */ - public void setIndex(int index) { + public void setIndex( + int index) { this.index = index; } @@ -174,7 +194,8 @@ public Statement getScopeStart() { * * @param scopeStart the scope start, or {@code null} */ - public void setScopeStart(Statement scopeStart) { + public void setScopeStart( + Statement scopeStart) { this.scopeStart = scopeStart; } @@ -196,7 +217,8 @@ public Statement getScopeEnd() { * * @param scopeEnd the scope end, or {@code null} */ - public void setScopeEnd(Statement scopeEnd) { + public void setScopeEnd( + Statement scopeEnd) { this.scopeEnd = scopeEnd; } @@ -226,7 +248,8 @@ public Type getStaticType() { * * @return a reference to the variable depicted by this entry */ - public VariableRef createReference(CFG cfg) { + public VariableRef createReference( + CFG cfg) { return new VariableRef(cfg, cfg.getDescriptor().getLocation(), name, staticType); } @@ -245,7 +268,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -312,7 +336,8 @@ public Annotations getAnnotations() { * * @param ann the annotation to be added */ - public void addAnnotation(Annotation ann) { + public void addAnnotation( + Annotation ann) { annotations.addAnnotation(ann); } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/controlFlow/ControlFlowExtractor.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/controlFlow/ControlFlowExtractor.java index 0ca8c708a..411224a22 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/controlFlow/ControlFlowExtractor.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/controlFlow/ControlFlowExtractor.java @@ -42,7 +42,8 @@ public class ControlFlowExtractor { * * @return the collection of extracted structures */ - public Collection extract(CFG target) { + public Collection extract( + CFG target) { Collection conditionals = new LinkedList<>(); target.accept(new ConditionalsExtractor(), conditionals); if (conditionals.isEmpty()) @@ -74,7 +75,10 @@ private static class LoopReconstructor { private final Statement conditional; private final Statement tail; - private LoopReconstructor(CFG target, Statement conditional, Statement tail) { + private LoopReconstructor( + CFG target, + Statement conditional, + Statement tail) { this.target = target; this.conditional = conditional; this.tail = tail; @@ -104,7 +108,8 @@ private Loop build() { return new Loop(target.getNodeList(), conditional, exit.getDestination(), body.getNodes()); } - private Edge findExitEdge(NodeList body) { + private Edge findExitEdge( + NodeList body) { Edge exit = null; for (Edge out : target.getOutgoingEdges(conditional)) // in empty loops, the conditional is a follower of itself @@ -131,7 +136,10 @@ private static class IfReconstructor { private final Map computed; - private IfReconstructor(CFG target, Statement conditional, Map computed) { + private IfReconstructor( + CFG target, + Statement conditional, + Map computed) { this.target = target; this.conditional = conditional; this.computed = computed; @@ -267,7 +275,9 @@ private ControlFlowStructure build() { } } - private ControlFlowStructure tryClose(Statement trueNext, Statement falseNext) { + private ControlFlowStructure tryClose( + Statement trueNext, + Statement falseNext) { if (falseBranch.containsNode(trueNext)) { // need to cut the extra part from the false branch falseBranch.removeFrom(trueNext); @@ -291,13 +301,16 @@ private ControlFlowStructure tryClose(Statement trueNext, Statement falseNext) { return null; } - private ControlFlowStructure store(ControlFlowStructure struct) { + private ControlFlowStructure store( + ControlFlowStructure struct) { computed.put(struct.getCondition(), struct); return struct; } } - private static boolean isConditional(CFG graph, Statement node) { + private static boolean isConditional( + CFG graph, + Statement node) { Collection out = graph.getOutgoingEdges(node); if (out.size() != 2) return false; @@ -318,7 +331,10 @@ private static boolean isConditional(CFG graph, Statement node) { private static class ConditionalsExtractor implements GraphVisitor> { @Override - public boolean visit(Collection tool, CFG graph, Statement node) { + public boolean visit( + Collection tool, + CFG graph, + Statement node) { if (node instanceof Expression && ((Expression) node).getRootStatement() != node) // we only consider root statements return true; diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/controlFlow/ControlFlowStructure.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/controlFlow/ControlFlowStructure.java index e220c8403..2b00645ee 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/controlFlow/ControlFlowStructure.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/controlFlow/ControlFlowStructure.java @@ -32,7 +32,9 @@ public abstract class ControlFlowStructure { * @param condition the condition of the structure * @param firstFollower the first statement after the structure exits */ - protected ControlFlowStructure(NodeList cfgMatrix, Statement condition, + protected ControlFlowStructure( + NodeList cfgMatrix, + Statement condition, Statement firstFollower) { this.cfgMatrix = cfgMatrix; this.condition = condition; @@ -64,7 +66,8 @@ public final Statement getFirstFollower() { * * @param firstFollower the new follower */ - public void setFirstFollower(Statement firstFollower) { + public void setFirstFollower( + Statement firstFollower) { this.firstFollower = firstFollower; } @@ -98,7 +101,8 @@ public final Collection allStatements() { * * @return {@code true} if {@code st} is in the body of this structure */ - public abstract boolean contains(Statement st); + public abstract boolean contains( + Statement st); /** * Simplifies this structure, removing all {@link NoOp}s from its body. @@ -117,7 +121,8 @@ public final Collection allStatements() { * @return the minimum distance, in terms of number of edges to traverse, * between the condition and the given node */ - public int distance(Statement st) { + public int distance( + Statement st) { if (st == condition) return 0; @@ -164,7 +169,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/controlFlow/IfThenElse.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/controlFlow/IfThenElse.java index 8d4801cf4..bb7f848ba 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/controlFlow/IfThenElse.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/controlFlow/IfThenElse.java @@ -29,8 +29,12 @@ public class IfThenElse extends ControlFlowStructure { * @param trueBranch the statements in the true branch * @param falseBranch the statements in the false branch */ - public IfThenElse(NodeList cfgMatrix, Statement condition, Statement firstFollower, - Collection trueBranch, Collection falseBranch) { + public IfThenElse( + NodeList cfgMatrix, + Statement condition, + Statement firstFollower, + Collection trueBranch, + Collection falseBranch) { super(cfgMatrix, condition, firstFollower); this.trueBranch = trueBranch; this.falseBranch = falseBranch; @@ -64,7 +68,8 @@ public Collection getFalseBranch() { } @Override - public boolean contains(Statement st) { + public boolean contains( + Statement st) { return trueBranch.contains(st) || falseBranch.contains(st); } @@ -84,7 +89,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (!super.equals(obj)) diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/controlFlow/Loop.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/controlFlow/Loop.java index 7c515db13..fc035e056 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/controlFlow/Loop.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/controlFlow/Loop.java @@ -25,7 +25,10 @@ public class Loop extends ControlFlowStructure { * @param firstFollower the first statement after the loop exits * @param body the statements in the loop body */ - public Loop(NodeList cfgMatrix, Statement condition, Statement firstFollower, + public Loop( + NodeList cfgMatrix, + Statement condition, + Statement firstFollower, Collection body) { super(cfgMatrix, condition, firstFollower); this.body = body; @@ -46,7 +49,8 @@ public Collection getBody() { } @Override - public boolean contains(Statement st) { + public boolean contains( + Statement st) { return body.contains(st); } @@ -64,7 +68,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (!super.equals(obj)) diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/edge/Edge.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/edge/Edge.java index 0f2068c16..b3c937bdc 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/edge/Edge.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/edge/Edge.java @@ -3,9 +3,6 @@ import it.unive.lisa.analysis.AbstractState; import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.statement.Statement; import it.unive.lisa.util.datastructures.graph.GraphVisitor; @@ -43,7 +40,9 @@ protected Edge() { * @param source the source statement * @param destination the destination statement */ - protected Edge(Statement source, Statement destination) { + protected Edge( + Statement source, + Statement destination) { Objects.requireNonNull(source, "The source of an edge cannot be null"); Objects.requireNonNull(destination, "The destination of an edge cannot be null"); this.source = source; @@ -71,7 +70,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -96,34 +96,49 @@ public boolean equals(Object obj) { public abstract String toString(); /** - * Traverses this edge, optionally modifying the given {@code sourceState} - * by applying semantic assumptions. + * Traverses this edge in the forward direction, proceeding from source to + * destination, optionally modifying the given {@code sourceState} by + * applying semantic assumptions. * - * @param the concrete {@link AbstractState} instance - * @param the concrete {@link HeapDomain} instance - * @param the concrete {@link ValueDomain} instance - * @param the concrete {@link TypeDomain} instance - * @param sourceState the {@link AnalysisState} computed at the source of - * this edge + * @param the concrete {@link AbstractState} instance + * @param state the {@link AnalysisState} computed at the source of this + * edge * * @return the {@link AnalysisState} after traversing this edge * * @throws SemanticException if something goes wrong during the computation */ - public abstract , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState traverse( - AnalysisState sourceState) - throws SemanticException; + public abstract > AnalysisState traverseForward( + AnalysisState state) + throws SemanticException; + + /** + * Traverses this edge in the backward direction, from destination to + * source, optionally modifying the given {@code sourceState} by applying + * semantic assumptions. + * + * @param the concrete {@link AbstractState} instance + * @param state the {@link AnalysisState} computed at the destination of + * this edge + * + * @return the {@link AnalysisState} after traversing this edge + * + * @throws SemanticException if something goes wrong during the computation + */ + public abstract > AnalysisState traverseBackwards( + AnalysisState state) + throws SemanticException; @Override - public boolean accept(GraphVisitor visitor, V tool) { + public boolean accept( + GraphVisitor visitor, + V tool) { return visitor.visit(tool, source.getCFG(), this); } @Override - public int compareTo(Edge o) { + public int compareTo( + Edge o) { int cmp; if ((cmp = source.compareTo(o.source)) != 0) return cmp; diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/edge/FalseEdge.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/edge/FalseEdge.java index 3a4cc5157..1a28655aa 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/edge/FalseEdge.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/edge/FalseEdge.java @@ -3,10 +3,7 @@ import it.unive.lisa.analysis.AbstractState; import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; -import it.unive.lisa.analysis.heap.HeapDomain; import it.unive.lisa.analysis.lattices.ExpressionSet; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.program.cfg.statement.Statement; import it.unive.lisa.symbolic.SymbolicExpression; import it.unive.lisa.symbolic.value.UnaryExpression; @@ -28,7 +25,9 @@ public class FalseEdge extends Edge { * @param source the source statement * @param destination the destination statement */ - public FalseEdge(Statement source, Statement destination) { + public FalseEdge( + Statement source, + Statement destination) { super(source, destination); } @@ -38,32 +37,38 @@ public String toString() { } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState traverse( - AnalysisState sourceState) - throws SemanticException { - ExpressionSet exprs = sourceState.getComputedExpressions(); - AnalysisState result = sourceState.bottom(); + public > AnalysisState traverseForward( + AnalysisState state) + throws SemanticException { + ExpressionSet exprs = state.getComputedExpressions(); + AnalysisState result = state.bottom(); for (SymbolicExpression expr : exprs) { UnaryExpression negated = new UnaryExpression( expr.getStaticType(), expr, LogicalNegation.INSTANCE, expr.getCodeLocation()); - result = result.lub(sourceState.assume(negated, getSource(), getDestination())); + result = result.lub(state.assume(negated, getSource(), getDestination())); } return result; } + @Override + public > AnalysisState traverseBackwards( + AnalysisState state) + throws SemanticException { + return traverseForward(state); + } + @Override public boolean isUnconditional() { return false; } @Override - public FalseEdge newInstance(Statement source, Statement destination) { + public FalseEdge newInstance( + Statement source, + Statement destination) { return new FalseEdge(source, destination); } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/edge/SequentialEdge.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/edge/SequentialEdge.java index ce5eed785..50874123a 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/edge/SequentialEdge.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/edge/SequentialEdge.java @@ -2,9 +2,7 @@ import it.unive.lisa.analysis.AbstractState; import it.unive.lisa.analysis.AnalysisState; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; +import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.program.cfg.statement.Statement; /** @@ -28,7 +26,9 @@ public SequentialEdge() { * @param source the source statement * @param destination the destination statement */ - public SequentialEdge(Statement source, Statement destination) { + public SequentialEdge( + Statement source, + Statement destination) { super(source, destination); } @@ -38,12 +38,16 @@ public String toString() { } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState traverse( - AnalysisState sourceState) { - return sourceState; + public > AnalysisState traverseForward( + AnalysisState state) { + return state; + } + + @Override + public > AnalysisState traverseBackwards( + AnalysisState state) + throws SemanticException { + return traverseForward(state); } @Override @@ -52,7 +56,9 @@ public boolean isUnconditional() { } @Override - public SequentialEdge newInstance(Statement source, Statement destination) { + public SequentialEdge newInstance( + Statement source, + Statement destination) { return new SequentialEdge(source, destination); } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/edge/TrueEdge.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/edge/TrueEdge.java index 147032ac5..29628b2c9 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/edge/TrueEdge.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/edge/TrueEdge.java @@ -3,10 +3,7 @@ import it.unive.lisa.analysis.AbstractState; import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; -import it.unive.lisa.analysis.heap.HeapDomain; import it.unive.lisa.analysis.lattices.ExpressionSet; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.program.cfg.statement.Statement; import it.unive.lisa.symbolic.SymbolicExpression; @@ -25,7 +22,9 @@ public class TrueEdge extends Edge { * @param source the source statement * @param destination the destination statement */ - public TrueEdge(Statement source, Statement destination) { + public TrueEdge( + Statement source, + Statement destination) { super(source, destination); } @@ -35,26 +34,32 @@ public String toString() { } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState traverse( - AnalysisState sourceState) - throws SemanticException { - ExpressionSet exprs = sourceState.getComputedExpressions(); - AnalysisState result = sourceState.bottom(); + public > AnalysisState traverseForward( + AnalysisState state) + throws SemanticException { + ExpressionSet exprs = state.getComputedExpressions(); + AnalysisState result = state.bottom(); for (SymbolicExpression expr : exprs) - result = result.lub(sourceState.assume(expr, getSource(), getDestination())); + result = result.lub(state.assume(expr, getSource(), getDestination())); return result; } + @Override + public > AnalysisState traverseBackwards( + AnalysisState state) + throws SemanticException { + return traverseForward(state); + } + @Override public boolean isUnconditional() { return false; } @Override - public TrueEdge newInstance(Statement source, Statement destination) { + public TrueEdge newInstance( + Statement source, + Statement destination) { return new TrueEdge(source, destination); } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/fixpoints/AscendingFixpoint.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/fixpoints/AscendingFixpoint.java index 060211d04..76f7f2485 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/fixpoints/AscendingFixpoint.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/fixpoints/AscendingFixpoint.java @@ -1,10 +1,10 @@ package it.unive.lisa.program.cfg.fixpoints; import it.unive.lisa.analysis.AbstractState; +import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; +import it.unive.lisa.analysis.StatementStore; +import it.unive.lisa.conf.FixpointConfiguration; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.statement.Statement; @@ -20,20 +20,12 @@ * * @param the type of {@link AbstractState} contained into the analysis * state - * @param the type of {@link HeapDomain} contained into the computed - * abstract state - * @param the type of {@link ValueDomain} contained into the computed - * abstract state - * @param the type of {@link TypeDomain} contained into the computed - * abstract state */ -public class AscendingFixpoint, - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> - extends CFGFixpoint { +public class AscendingFixpoint> + extends + CFGFixpoint { - private final int widenAfter; + private final FixpointConfiguration config; private final Map lubs; private final Collection wideningPoints; @@ -41,43 +33,59 @@ public class AscendingFixpoint, * Builds the fixpoint implementation. * * @param target the target of the implementation - * @param widenAfter the widening threshold * @param interprocedural the {@link InterproceduralAnalysis} to use for * semantics computations + * @param config the {@link FixpointConfiguration} to use */ - public AscendingFixpoint(CFG target, int widenAfter, - InterproceduralAnalysis interprocedural) { + public AscendingFixpoint( + CFG target, + InterproceduralAnalysis interprocedural, + FixpointConfiguration config) { super(target, interprocedural); - this.widenAfter = widenAfter; - this.lubs = new HashMap<>(target.getNodesCount()); - this.wideningPoints = target.getCycleEntries(); + this.config = config; + this.wideningPoints = config.useWideningPoints ? target.getCycleEntries() : null; + this.lubs = new HashMap<>(config.useWideningPoints ? wideningPoints.size() : target.getNodesCount()); } @Override - public CompoundState operation(Statement node, - CompoundState approx, - CompoundState old) throws SemanticException { - // optimization: never apply widening on normal instructions, - // save time and precision and only apply to widening points - if (widenAfter < 0 || !wideningPoints.contains(node)) + public CompoundState operation( + Statement node, + CompoundState approx, + CompoundState old) + throws SemanticException { + if (config.wideningThreshold < 0) + // invalid threshold means always lub return old.lub(approx); - int lub = lubs.computeIfAbsent(node, st -> widenAfter); - if (lub == 0) - return CompoundState.of( - old.postState.widening(approx.postState), - // no need to widen the intermediate expressions as - // well: we force convergence on the final post state - // only, to recover as much precision as possible - old.intermediateStates.lub(approx.intermediateStates)); + if (config.useWideningPoints && !wideningPoints.contains(node)) + // optimization: never apply widening on normal instructions, + // save time and precision and only apply to widening points + return old.lub(approx); + + int lub = lubs.computeIfAbsent(node, st -> config.wideningThreshold); + if (lub == 0) { + AnalysisState post = old.postState.widening(approx.postState); + StatementStore intermediate; + if (config.useWideningPoints) + // no need to widen the intermediate expressions as + // well: we force convergence on the final post state + // only, to recover as much precision as possible + intermediate = old.intermediateStates.lub(approx.intermediateStates); + else + intermediate = old.intermediateStates.widening(approx.intermediateStates); + return CompoundState.of(post, intermediate); + } lubs.put(node, --lub); return old.lub(approx); } @Override - public boolean equality(Statement node, CompoundState approx, - CompoundState old) throws SemanticException { + public boolean equality( + Statement node, + CompoundState approx, + CompoundState old) + throws SemanticException { return approx.lessOrEqual(old); } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/fixpoints/BackwardAscendingFixpoint.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/fixpoints/BackwardAscendingFixpoint.java new file mode 100644 index 000000000..d084723d1 --- /dev/null +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/fixpoints/BackwardAscendingFixpoint.java @@ -0,0 +1,92 @@ +package it.unive.lisa.program.cfg.fixpoints; + +import it.unive.lisa.analysis.AbstractState; +import it.unive.lisa.analysis.AnalysisState; +import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.StatementStore; +import it.unive.lisa.conf.FixpointConfiguration; +import it.unive.lisa.interprocedural.InterproceduralAnalysis; +import it.unive.lisa.program.cfg.CFG; +import it.unive.lisa.program.cfg.fixpoints.CFGFixpoint.CompoundState; +import it.unive.lisa.program.cfg.statement.Statement; +import java.util.Collection; +import java.util.HashMap; +import java.util.Map; + +/** + * A {@link CFGFixpoint} that traverses ascending chains using lubs and + * widenings. + * + * @author Luca Negrini + * + * @param the type of {@link AbstractState} contained into the analysis + * state + */ +public class BackwardAscendingFixpoint> + extends + BackwardCFGFixpoint { + + private final FixpointConfiguration config; + private final Map lubs; + private final Collection wideningPoints; + + /** + * Builds the fixpoint implementation. + * + * @param target the target of the implementation + * @param interprocedural the {@link InterproceduralAnalysis} to use for + * semantics computations + * @param config the {@link FixpointConfiguration} to use + */ + public BackwardAscendingFixpoint( + CFG target, + InterproceduralAnalysis interprocedural, + FixpointConfiguration config) { + super(target, interprocedural); + this.config = config; + this.wideningPoints = config.useWideningPoints ? target.getCycleEntries() : null; + this.lubs = new HashMap<>(config.useWideningPoints ? wideningPoints.size() : target.getNodesCount()); + } + + @Override + public CompoundState operation( + Statement node, + CompoundState approx, + CompoundState old) + throws SemanticException { + if (config.wideningThreshold < 0) + // invalid threshold means always lub + return old.lub(approx); + + if (config.useWideningPoints && !wideningPoints.contains(node)) + // optimization: never apply widening on normal instructions, + // save time and precision and only apply to widening points + return old.lub(approx); + + int lub = lubs.computeIfAbsent(node, st -> config.wideningThreshold); + if (lub == 0) { + AnalysisState post = old.postState.widening(approx.postState); + StatementStore intermediate; + if (config.useWideningPoints) + // no need to widen the intermediate expressions as + // well: we force convergence on the final post state + // only, to recover as much precision as possible + intermediate = old.intermediateStates.lub(approx.intermediateStates); + else + intermediate = old.intermediateStates.widening(approx.intermediateStates); + return CompoundState.of(post, intermediate); + } + + lubs.put(node, --lub); + return old.lub(approx); + } + + @Override + public boolean equality( + Statement node, + CompoundState approx, + CompoundState old) + throws SemanticException { + return approx.lessOrEqual(old); + } +} diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/fixpoints/BackwardCFGFixpoint.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/fixpoints/BackwardCFGFixpoint.java new file mode 100644 index 000000000..06df1c35a --- /dev/null +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/fixpoints/BackwardCFGFixpoint.java @@ -0,0 +1,105 @@ +package it.unive.lisa.program.cfg.fixpoints; + +import it.unive.lisa.analysis.AbstractState; +import it.unive.lisa.analysis.AnalysisState; +import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.StatementStore; +import it.unive.lisa.interprocedural.InterproceduralAnalysis; +import it.unive.lisa.program.cfg.CFG; +import it.unive.lisa.program.cfg.VariableTableEntry; +import it.unive.lisa.program.cfg.edge.Edge; +import it.unive.lisa.program.cfg.fixpoints.CFGFixpoint.CompoundState; +import it.unive.lisa.program.cfg.statement.Expression; +import it.unive.lisa.program.cfg.statement.Statement; +import it.unive.lisa.symbolic.SymbolicExpression; +import it.unive.lisa.symbolic.value.Identifier; +import it.unive.lisa.util.datastructures.graph.algorithms.Fixpoint.FixpointImplementation; +import java.util.Collection; +import java.util.LinkedList; +import java.util.List; + +/** + * A {@link FixpointImplementation} for {@link CFG}s. + * + * @author Luca Negrini + * + * @param the type of {@link AbstractState} contained into the analysis + * state computed by the fixpoint + */ +public abstract class BackwardCFGFixpoint> + implements + FixpointImplementation> { + + /** + * The graph targeted by this implementation. + */ + protected final CFG graph; + + /** + * The {@link InterproceduralAnalysis} to use for semantics invocations. + */ + protected final InterproceduralAnalysis interprocedural; + + /** + * Builds the fixpoint implementation. + * + * @param graph the graph targeted by this implementation + * @param interprocedural the {@link InterproceduralAnalysis} to use for + * semantics invocation + */ + public BackwardCFGFixpoint( + CFG graph, + InterproceduralAnalysis interprocedural) { + this.graph = graph; + this.interprocedural = interprocedural; + } + + @Override + public CompoundState semantics( + Statement node, + CompoundState entrystate) + throws SemanticException { + StatementStore expressions = new StatementStore<>(entrystate.postState.bottom()); + AnalysisState approx = node.backwardSemantics(entrystate.postState, interprocedural, expressions); + if (node instanceof Expression) + // we forget the meta variables now as the values are popped from + // the stack here + approx = approx.forgetIdentifiers(((Expression) node).getMetaVariables()); + return CompoundState.of(approx, expressions); + } + + @Override + public CompoundState traverse( + Edge edge, + CompoundState entrystate) + throws SemanticException { + AnalysisState approx = edge.traverseBackwards(entrystate.postState); + + // we remove out of scope variables here + List toRemove = new LinkedList<>(); + for (VariableTableEntry entry : graph.getDescriptor().getVariables()) + if (entry.getScopeStart() == edge.getDestination()) + toRemove.add(entry); + + Collection ids = new LinkedList<>(); + for (VariableTableEntry entry : toRemove) { + SymbolicExpression v = entry.createReference(graph).getVariable(); + for (SymbolicExpression expr : approx.smallStepSemantics(v, edge.getSource()).getComputedExpressions()) + ids.add((Identifier) expr); + } + + if (!ids.isEmpty()) + approx = approx.forgetIdentifiers(ids); + + return CompoundState.of(approx, new StatementStore<>(approx.bottom())); + } + + @Override + public CompoundState union( + Statement node, + CompoundState left, + CompoundState right) + throws SemanticException { + return left.lub(right); + } +} diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/fixpoints/BackwardDescendingGLBFixpoint.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/fixpoints/BackwardDescendingGLBFixpoint.java new file mode 100644 index 000000000..dbf1e8b5d --- /dev/null +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/fixpoints/BackwardDescendingGLBFixpoint.java @@ -0,0 +1,69 @@ +package it.unive.lisa.program.cfg.fixpoints; + +import it.unive.lisa.analysis.AbstractState; +import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.conf.FixpointConfiguration; +import it.unive.lisa.interprocedural.InterproceduralAnalysis; +import it.unive.lisa.program.cfg.CFG; +import it.unive.lisa.program.cfg.fixpoints.CFGFixpoint.CompoundState; +import it.unive.lisa.program.cfg.statement.Statement; +import java.util.HashMap; +import java.util.Map; + +/** + * A {@link CFGFixpoint} that traverses descending chains using glbs up to + * threshold. + * + * @author Luca Negrini + * + * @param the type of {@link AbstractState} contained into the analysis + * state + */ +public class BackwardDescendingGLBFixpoint> extends BackwardCFGFixpoint { + + private final int maxGLBs; + private final Map glbs; + + /** + * Builds the fixpoint implementation. + * + * @param target the target of the implementation + * @param interprocedural the {@link InterproceduralAnalysis} to use for + * semantics computations + * @param config the {@link FixpointConfiguration} to use + */ + public BackwardDescendingGLBFixpoint( + CFG target, + InterproceduralAnalysis interprocedural, + FixpointConfiguration config) { + super(target, interprocedural); + this.maxGLBs = config.glbThreshold; + this.glbs = new HashMap<>(target.getNodesCount()); + } + + @Override + public CompoundState operation( + Statement node, + CompoundState approx, + CompoundState old) + throws SemanticException { + if (maxGLBs < 0) + return old; + + int glb = glbs.computeIfAbsent(node, st -> maxGLBs); + if (glb == 0) + return old; + + glbs.put(node, --glb); + return old.glb(approx); + } + + @Override + public boolean equality( + Statement node, + CompoundState approx, + CompoundState old) + throws SemanticException { + return old.lessOrEqual(approx); + } +} diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/fixpoints/BackwardDescendingNarrowingFixpoint.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/fixpoints/BackwardDescendingNarrowingFixpoint.java new file mode 100644 index 000000000..ace7e949a --- /dev/null +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/fixpoints/BackwardDescendingNarrowingFixpoint.java @@ -0,0 +1,75 @@ +package it.unive.lisa.program.cfg.fixpoints; + +import it.unive.lisa.analysis.AbstractState; +import it.unive.lisa.analysis.AnalysisState; +import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.StatementStore; +import it.unive.lisa.conf.FixpointConfiguration; +import it.unive.lisa.interprocedural.InterproceduralAnalysis; +import it.unive.lisa.program.cfg.CFG; +import it.unive.lisa.program.cfg.fixpoints.CFGFixpoint.CompoundState; +import it.unive.lisa.program.cfg.statement.Statement; +import java.util.Collection; + +/** + * A {@link CFGFixpoint} that traverses descending chains using narrowings. + * + * @author Luca Negrini + * + * @param the type of {@link AbstractState} contained into the analysis + * state + */ +public class BackwardDescendingNarrowingFixpoint> extends BackwardCFGFixpoint { + + private final FixpointConfiguration config; + private final Collection wideningPoints; + + /** + * Builds the fixpoint implementation. + * + * @param target the target of the implementation + * @param interprocedural the {@link InterproceduralAnalysis} to use for + * semantics computations + * @param config the {@link FixpointConfiguration} to use + */ + public BackwardDescendingNarrowingFixpoint( + CFG target, + InterproceduralAnalysis interprocedural, + FixpointConfiguration config) { + super(target, interprocedural); + this.config = config; + this.wideningPoints = config.useWideningPoints ? target.getCycleEntries() : null; + } + + @Override + public CompoundState operation( + Statement node, + CompoundState approx, + CompoundState old) + throws SemanticException { + if (wideningPoints == null || !wideningPoints.contains(node)) + // optimization: never apply narrowing on normal instructions, + // save time and precision and only apply to widening points + return old.glb(approx); + + AnalysisState post = old.postState.narrowing(approx.postState); + StatementStore intermediate; + if (config.useWideningPoints) + // no need to narrow the intermediate expressions as + // well: we force convergence on the final post state + // only, to recover as much precision as possible + intermediate = old.intermediateStates.glb(approx.intermediateStates); + else + intermediate = old.intermediateStates.narrowing(approx.intermediateStates); + return CompoundState.of(post, intermediate); + } + + @Override + public boolean equality( + Statement node, + CompoundState approx, + CompoundState old) + throws SemanticException { + return old.lessOrEqual(approx); + } +} diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/fixpoints/CFGFixpoint.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/fixpoints/CFGFixpoint.java index 5e32e4e85..09160be12 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/fixpoints/CFGFixpoint.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/fixpoints/CFGFixpoint.java @@ -5,9 +5,6 @@ import it.unive.lisa.analysis.Lattice; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.VariableTableEntry; @@ -17,6 +14,8 @@ import it.unive.lisa.symbolic.SymbolicExpression; import it.unive.lisa.symbolic.value.Identifier; import it.unive.lisa.util.datastructures.graph.algorithms.Fixpoint.FixpointImplementation; +import it.unive.lisa.util.representation.ListRepresentation; +import it.unive.lisa.util.representation.StructuredRepresentation; import java.util.Collection; import java.util.LinkedList; import java.util.List; @@ -29,18 +28,10 @@ * * @param the type of {@link AbstractState} contained into the analysis * state computed by the fixpoint - * @param the type of {@link HeapDomain} contained into the computed - * abstract state - * @param the type of {@link ValueDomain} contained into the computed - * abstract state - * @param the type of {@link TypeDomain} contained into the computed - * abstract state */ -public abstract class CFGFixpoint, - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> - implements FixpointImplementation> { +public abstract class CFGFixpoint> + implements + FixpointImplementation> { /** * The graph targeted by this implementation. @@ -50,7 +41,7 @@ public abstract class CFGFixpoint, /** * The {@link InterproceduralAnalysis} to use for semantics invocations. */ - protected final InterproceduralAnalysis interprocedural; + protected final InterproceduralAnalysis interprocedural; /** * Builds the fixpoint implementation. @@ -59,16 +50,20 @@ public abstract class CFGFixpoint, * @param interprocedural the {@link InterproceduralAnalysis} to use for * semantics invocation */ - public CFGFixpoint(CFG graph, InterproceduralAnalysis interprocedural) { + public CFGFixpoint( + CFG graph, + InterproceduralAnalysis interprocedural) { this.graph = graph; this.interprocedural = interprocedural; } @Override - public CompoundState semantics(Statement node, - CompoundState entrystate) throws SemanticException { - StatementStore expressions = new StatementStore<>(entrystate.postState.bottom()); - AnalysisState approx = node.semantics(entrystate.postState, interprocedural, expressions); + public CompoundState semantics( + Statement node, + CompoundState entrystate) + throws SemanticException { + StatementStore expressions = new StatementStore<>(entrystate.postState.bottom()); + AnalysisState approx = node.forwardSemantics(entrystate.postState, interprocedural, expressions); if (node instanceof Expression) // we forget the meta variables now as the values are popped from // the stack here @@ -77,9 +72,11 @@ public CompoundState semantics(Statement node, } @Override - public CompoundState traverse(Edge edge, - CompoundState entrystate) throws SemanticException { - AnalysisState approx = edge.traverse(entrystate.postState); + public CompoundState traverse( + Edge edge, + CompoundState entrystate) + throws SemanticException { + AnalysisState approx = edge.traverseForward(entrystate.postState); // we remove out of scope variables here List toRemove = new LinkedList<>(); @@ -101,9 +98,11 @@ public CompoundState traverse(Edge edge, } @Override - public CompoundState union(Statement node, - CompoundState left, - CompoundState right) throws SemanticException { + public CompoundState union( + Statement node, + CompoundState left, + CompoundState right) + throws SemanticException { return left.lub(right); } @@ -115,54 +114,38 @@ public CompoundState union(Statement node, * * @param the type of {@link AbstractState} contained into the analysis * state - * @param the type of {@link HeapDomain} contained into the computed - * abstract state - * @param the type of {@link ValueDomain} contained into the computed - * abstract state - * @param the type of {@link TypeDomain} contained into the computed - * abstract state */ - public static final class CompoundState, - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> implements Lattice> { + public static final class CompoundState> implements Lattice> { /** * Builds a compound state from the given post-states. * * @param the type of {@link AbstractState} contained * into the analysis state - * @param the type of {@link HeapDomain} contained - * into the computed abstract state - * @param the type of {@link ValueDomain} contained - * into the computed abstract state - * @param the type of {@link TypeDomain} contained - * into the computed abstract state * @param postState the overall post-state of a statement * @param intermediateStates the post-state of intermediate expressions * * @return the generated compound state */ - public static , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> CompoundState of( - AnalysisState postState, - StatementStore intermediateStates) { + public static > CompoundState of( + AnalysisState postState, + StatementStore intermediateStates) { return new CompoundState<>(postState, intermediateStates); } /** * The overall post-state of a statement. */ - public final AnalysisState postState; + public final AnalysisState postState; /** * The post-state of intermediate expressions. */ - public final StatementStore intermediateStates; + public final StatementStore intermediateStates; - private CompoundState(AnalysisState postState, StatementStore intermediateStates) { + private CompoundState( + AnalysisState postState, + StatementStore intermediateStates) { this.postState = postState; this.intermediateStates = intermediateStates; } @@ -177,14 +160,15 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; - CompoundState other = (CompoundState) obj; + CompoundState other = (CompoundState) obj; if (intermediateStates == null) { if (other.intermediateStates != null) return false; @@ -200,21 +184,25 @@ public boolean equals(Object obj) { @Override public String toString() { - return postState + " [" + StringUtils.join(intermediateStates, "\n") + "]"; + return postState + "\n[" + StringUtils.join(intermediateStates, "\n") + "]"; } @Override - public boolean lessOrEqual(CompoundState other) throws SemanticException { + public boolean lessOrEqual( + CompoundState other) + throws SemanticException { return postState.lessOrEqual(other.postState) && intermediateStates.lessOrEqual(other.intermediateStates); } @Override - public CompoundState lub(CompoundState other) throws SemanticException { + public CompoundState lub( + CompoundState other) + throws SemanticException { return CompoundState.of(postState.lub(other.postState), intermediateStates.lub(other.intermediateStates)); } @Override - public CompoundState top() { + public CompoundState top() { return CompoundState.of(postState.top(), intermediateStates.top()); } @@ -224,7 +212,7 @@ public boolean isTop() { } @Override - public CompoundState bottom() { + public CompoundState bottom() { return CompoundState.of(postState.bottom(), intermediateStates.bottom()); } @@ -234,20 +222,31 @@ public boolean isBottom() { } @Override - public CompoundState glb(CompoundState other) throws SemanticException { + public CompoundState glb( + CompoundState other) + throws SemanticException { return CompoundState.of(postState.glb(other.postState), intermediateStates.glb(other.intermediateStates)); } @Override - public CompoundState narrowing(CompoundState other) throws SemanticException { + public CompoundState narrowing( + CompoundState other) + throws SemanticException { return CompoundState.of(postState.narrowing(other.postState), intermediateStates.narrowing(other.intermediateStates)); } @Override - public CompoundState widening(CompoundState other) throws SemanticException { + public CompoundState widening( + CompoundState other) + throws SemanticException { return CompoundState.of(postState.widening(other.postState), intermediateStates.widening(other.intermediateStates)); } + + @Override + public StructuredRepresentation representation() { + return new ListRepresentation(postState.representation(), intermediateStates.representation()); + } } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/fixpoints/DescendingGLBFixpoint.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/fixpoints/DescendingGLBFixpoint.java index f83bf1f77..c7f41c2d5 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/fixpoints/DescendingGLBFixpoint.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/fixpoints/DescendingGLBFixpoint.java @@ -2,9 +2,7 @@ import it.unive.lisa.analysis.AbstractState; import it.unive.lisa.analysis.SemanticException; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; +import it.unive.lisa.conf.FixpointConfiguration; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.statement.Statement; @@ -19,18 +17,8 @@ * * @param the type of {@link AbstractState} contained into the analysis * state - * @param the type of {@link HeapDomain} contained into the computed - * abstract state - * @param the type of {@link ValueDomain} contained into the computed - * abstract state - * @param the type of {@link TypeDomain} contained into the computed - * abstract state */ -public class DescendingGLBFixpoint, - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> - extends CFGFixpoint { +public class DescendingGLBFixpoint> extends CFGFixpoint { private final int maxGLBs; private final Map glbs; @@ -39,21 +27,25 @@ public class DescendingGLBFixpoint, * Builds the fixpoint implementation. * * @param target the target of the implementation - * @param maxGLBs the maximum number of glbs * @param interprocedural the {@link InterproceduralAnalysis} to use for * semantics computations + * @param config the {@link FixpointConfiguration} to use */ - public DescendingGLBFixpoint(CFG target, int maxGLBs, - InterproceduralAnalysis interprocedural) { + public DescendingGLBFixpoint( + CFG target, + InterproceduralAnalysis interprocedural, + FixpointConfiguration config) { super(target, interprocedural); - this.maxGLBs = maxGLBs; + this.maxGLBs = config.glbThreshold; this.glbs = new HashMap<>(target.getNodesCount()); } @Override - public CompoundState operation(Statement node, - CompoundState approx, - CompoundState old) throws SemanticException { + public CompoundState operation( + Statement node, + CompoundState approx, + CompoundState old) + throws SemanticException { if (maxGLBs < 0) return old; @@ -66,8 +58,11 @@ public CompoundState operation(Statement node, } @Override - public boolean equality(Statement node, CompoundState approx, - CompoundState old) throws SemanticException { + public boolean equality( + Statement node, + CompoundState approx, + CompoundState old) + throws SemanticException { return old.lessOrEqual(approx); } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/fixpoints/DescendingNarrowingFixpoint.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/fixpoints/DescendingNarrowingFixpoint.java index f5cc0acfd..3e8b91368 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/fixpoints/DescendingNarrowingFixpoint.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/fixpoints/DescendingNarrowingFixpoint.java @@ -1,10 +1,10 @@ package it.unive.lisa.program.cfg.fixpoints; import it.unive.lisa.analysis.AbstractState; +import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; +import it.unive.lisa.analysis.StatementStore; +import it.unive.lisa.conf.FixpointConfiguration; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.statement.Statement; @@ -17,19 +17,10 @@ * * @param the type of {@link AbstractState} contained into the analysis * state - * @param the type of {@link HeapDomain} contained into the computed - * abstract state - * @param the type of {@link ValueDomain} contained into the computed - * abstract state - * @param the type of {@link TypeDomain} contained into the computed - * abstract state */ -public class DescendingNarrowingFixpoint, - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> - extends CFGFixpoint { +public class DescendingNarrowingFixpoint> extends CFGFixpoint { + private final FixpointConfiguration config; private final Collection wideningPoints; /** @@ -38,33 +29,46 @@ public class DescendingNarrowingFixpoint, * @param target the target of the implementation * @param interprocedural the {@link InterproceduralAnalysis} to use for * semantics computations + * @param config the {@link FixpointConfiguration} to use */ - public DescendingNarrowingFixpoint(CFG target, - InterproceduralAnalysis interprocedural) { + public DescendingNarrowingFixpoint( + CFG target, + InterproceduralAnalysis interprocedural, + FixpointConfiguration config) { super(target, interprocedural); - this.wideningPoints = target.getCycleEntries(); + this.config = config; + this.wideningPoints = config.useWideningPoints ? target.getCycleEntries() : null; } @Override - public CompoundState operation(Statement node, - CompoundState approx, - CompoundState old) throws SemanticException { - // optimization: never apply narrowing on normal instructions, - // save time and precision and only apply to widening points - if (!wideningPoints.contains(node)) + public CompoundState operation( + Statement node, + CompoundState approx, + CompoundState old) + throws SemanticException { + if (wideningPoints == null || !wideningPoints.contains(node)) + // optimization: never apply narrowing on normal instructions, + // save time and precision and only apply to widening points return old.glb(approx); - return CompoundState.of( - old.postState.narrowing(approx.postState), - // no need to narrow the intermediate expressions as - // well: we force convergence on the final post state - // only, to recover as much precision as possible - old.intermediateStates.glb(approx.intermediateStates)); + AnalysisState post = old.postState.narrowing(approx.postState); + StatementStore intermediate; + if (config.useWideningPoints) + // no need to narrow the intermediate expressions as + // well: we force convergence on the final post state + // only, to recover as much precision as possible + intermediate = old.intermediateStates.glb(approx.intermediateStates); + else + intermediate = old.intermediateStates.narrowing(approx.intermediateStates); + return CompoundState.of(post, intermediate); } @Override - public boolean equality(Statement node, CompoundState approx, - CompoundState old) throws SemanticException { + public boolean equality( + Statement node, + CompoundState approx, + CompoundState old) + throws SemanticException { return old.lessOrEqual(approx); } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/fixpoints/OptimizedBackwardFixpoint.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/fixpoints/OptimizedBackwardFixpoint.java new file mode 100644 index 000000000..97b259afc --- /dev/null +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/fixpoints/OptimizedBackwardFixpoint.java @@ -0,0 +1,185 @@ +package it.unive.lisa.program.cfg.fixpoints; + +import static java.lang.String.format; + +import it.unive.lisa.analysis.AbstractState; +import it.unive.lisa.analysis.AnalysisState; +import it.unive.lisa.analysis.StatementStore; +import it.unive.lisa.program.cfg.CFG; +import it.unive.lisa.program.cfg.edge.Edge; +import it.unive.lisa.program.cfg.fixpoints.CFGFixpoint.CompoundState; +import it.unive.lisa.program.cfg.statement.Statement; +import it.unive.lisa.util.collections.workset.WorkingSet; +import it.unive.lisa.util.datastructures.graph.Graph; +import it.unive.lisa.util.datastructures.graph.algorithms.BackwardFixpoint; +import it.unive.lisa.util.datastructures.graph.algorithms.Fixpoint; +import it.unive.lisa.util.datastructures.graph.algorithms.FixpointException; +import java.util.Collection; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; +import java.util.function.Predicate; + +/** + * A fixpoint algorithm for a {@link Graph}, parametric to the + * {@link it.unive.lisa.util.datastructures.graph.algorithms.Fixpoint.FixpointImplementation} + * that one wants to use to compute the results. This fixpoint algorithms is + * optimized: it works exploiting the basic blocks of the target graph, and only + * yields approximations of widening points, stopping statements and + * user-defined hotspots. + * + * @author Luca Negrini + * + * @param the type of {@link AbstractState} contained into the analysis + * state + */ +public class OptimizedBackwardFixpoint> + extends + BackwardFixpoint> { + + private final Predicate hotspots; + + /** + * Builds an optimized fixpoint for the given {@link Graph}. + * + * @param graph the source graph + * @param forceFullEvaluation whether or not the fixpoint should evaluate + * all nodes independently of the fixpoint + * implementation + * @param hotspots the predicate to identify additional + * statements whose approximation must be + * preserved in the results + */ + public OptimizedBackwardFixpoint( + CFG graph, + boolean forceFullEvaluation, + Predicate hotspots) { + super(graph, forceFullEvaluation); + this.hotspots = hotspots; + } + + @Override + public Map> fixpoint( + Map> startingPoints, + WorkingSet ws, + Fixpoint.FixpointImplementation> implementation, + Map> initialResult) + throws FixpointException { + Map> result = initialResult == null + ? new HashMap<>(graph.getNodesCount()) + : new HashMap<>(initialResult); + + Map bbs = new HashMap<>(); + for (Entry bb : graph.getBasicBlocks().entrySet()) { + // we store the basic blocks as + Statement[] block = bb.getValue(); + bbs.put(block[block.length - 1], block); + } + startingPoints.keySet().forEach(ws::push); + + Set toProcess = null; + if (forceFullEvaluation) + toProcess = new HashSet<>(bbs.keySet()); + + CompoundState newApprox; + while (!ws.isEmpty()) { + Statement current = ws.pop(); + + if (current == null) + throw new FixpointException("null node encountered during fixpoint in '" + graph + "'"); + if (!graph.containsNode(current)) + throw new FixpointException("'" + current + "' is not part of '" + graph + "'"); + + Statement[] bb = bbs.get(current); + if (bb == null) + throw new FixpointException("'" + current + "' is not the leader of a basic block of '" + graph + "'"); + + CompoundState exitstate = getExitState( + current, + startingPoints.get(current), + implementation, + result); + if (exitstate == null) + throw new FixpointException("'" + current + "' does not have an entry state"); + + newApprox = analyze(result, implementation, exitstate, bb); + + Statement leader = bb[0]; + CompoundState oldApprox = result.get(leader); + if (oldApprox != null) + try { + newApprox = implementation.operation(leader, newApprox, oldApprox); + } catch (Exception e) { + throw new FixpointException(format(ERROR, "joining states", leader, graph), e); + } + + try { + // we go on if we were asked to analyze all nodes at least once + if ((forceFullEvaluation && toProcess.remove(current)) + // or if this is the first time we analyze this node + || oldApprox == null + // or if we got a result that should not be considered + // equal + || !implementation.equality(leader, newApprox, oldApprox)) { + result.put(leader, newApprox); + for (Statement instr : graph.predecessorsOf(leader)) + ws.push(instr); + } + } catch (Exception e) { + throw new FixpointException(format(ERROR, "updating result", leader, graph), e); + } + } + + // cleanup: theoretically, we can reconstruct the full results by + // storing only the pre-states of the entrypoints and the post-states of + // the widening-points. we additionally store the post-states of + // stopping statements as those will be frequently queried by + // interprocedural analyses during the fixpoint, so that we + // can delay unwinding. we also store hotspots + Collection cleanup = new HashSet<>(); + Collection wideningPoints = graph.getCycleEntries(); + for (Statement st : result.keySet()) + if (!wideningPoints.contains(st) && !st.stopsExecution() && (hotspots == null || !hotspots.test(st))) + cleanup.add(st); + cleanup.forEach(result::remove); + + return result; + } + + private CompoundState analyze( + Map> result, + Fixpoint.FixpointImplementation> implementation, + CompoundState exitstate, + Statement[] bb) + throws FixpointException { + StatementStore emptyIntermediate = exitstate.intermediateStates.bottom(); + CompoundState newApprox = CompoundState.of( + exitstate.postState.bottom(), + emptyIntermediate); + CompoundState exit = exitstate; + for (int i = bb.length - 1; i >= 0; i--) + try { + Statement cursor = bb[i]; + newApprox = implementation.semantics(cursor, exit); + + // storing approximations into result is a trick: it won't ever + // be used in fixpoint comparisons, but it will still make + // it out as part of the final result + for (Entry> intermediate : newApprox.intermediateStates) + if (intermediate.getKey().stopsExecution() + || (hotspots != null && hotspots.test(intermediate.getKey()))) + result.put(intermediate.getKey(), CompoundState.of(intermediate.getValue(), emptyIntermediate)); + if (cursor != bb[0] && (cursor.stopsExecution() + || (hotspots != null && hotspots.test(cursor)))) + result.put(cursor, CompoundState.of(newApprox.postState, emptyIntermediate)); + + exit = newApprox; + } catch (Exception e) { + throw new FixpointException(format(ERROR, "computing semantics", bb[i], graph), e); + } + + return CompoundState.of(newApprox.postState, emptyIntermediate); + } +} \ No newline at end of file diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/fixpoints/OptimizedFixpoint.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/fixpoints/OptimizedFixpoint.java index 0bdc37a82..533a9a0c2 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/fixpoints/OptimizedFixpoint.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/fixpoints/OptimizedFixpoint.java @@ -5,9 +5,6 @@ import it.unive.lisa.analysis.AbstractState; import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.edge.Edge; import it.unive.lisa.program.cfg.fixpoints.CFGFixpoint.CompoundState; @@ -15,7 +12,6 @@ import it.unive.lisa.util.collections.workset.WorkingSet; import it.unive.lisa.util.datastructures.graph.Graph; import it.unive.lisa.util.datastructures.graph.algorithms.Fixpoint; -import it.unive.lisa.util.datastructures.graph.algorithms.Fixpoint.FixpointImplementation; import it.unive.lisa.util.datastructures.graph.algorithms.FixpointException; import java.util.Collection; import java.util.HashMap; @@ -27,27 +23,20 @@ /** * A fixpoint algorithm for a {@link Graph}, parametric to the - * {@link FixpointImplementation} that one wants to use to compute the results. - * This fixpoint algorithms is optimized: it works exploiting the basic blocks - * of the target graph, and only yields approximations of widening points, - * stopping statements and user-defined hotspots. + * {@link it.unive.lisa.util.datastructures.graph.algorithms.Fixpoint.FixpointImplementation} + * that one wants to use to compute the results. This fixpoint algorithms is + * optimized: it works exploiting the basic blocks of the target graph, and only + * yields approximations of widening points, stopping statements and + * user-defined hotspots. * * @author Luca Negrini * * @param the type of {@link AbstractState} contained into the analysis * state - * @param the type of {@link HeapDomain} contained into the computed - * abstract state - * @param the type of {@link ValueDomain} contained into the computed - * abstract state - * @param the type of {@link TypeDomain} contained into the computed - * abstract state */ -public class OptimizedFixpoint, - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> - extends Fixpoint> { +public class OptimizedFixpoint> + extends + Fixpoint> { private final Predicate hotspots; @@ -62,19 +51,22 @@ public class OptimizedFixpoint, * statements whose approximation must be * preserved in the results */ - public OptimizedFixpoint(CFG graph, boolean forceFullEvaluation, Predicate hotspots) { + public OptimizedFixpoint( + CFG graph, + boolean forceFullEvaluation, + Predicate hotspots) { super(graph, forceFullEvaluation); this.hotspots = hotspots; } @Override - public Map> fixpoint( - Map> startingPoints, + public Map> fixpoint( + Map> startingPoints, WorkingSet ws, - FixpointImplementation> implementation, - Map> initialResult) + FixpointImplementation> implementation, + Map> initialResult) throws FixpointException { - Map> result = initialResult == null + Map> result = initialResult == null ? new HashMap<>(graph.getNodesCount()) : new HashMap<>(initialResult); @@ -85,7 +77,7 @@ public Map> fixpoint( if (forceFullEvaluation) toProcess = new HashSet<>(bbs.keySet()); - CompoundState newApprox; + CompoundState newApprox; while (!ws.isEmpty()) { Statement current = ws.pop(); @@ -98,7 +90,7 @@ public Map> fixpoint( if (bb == null) throw new FixpointException("'" + current + "' is not the leader of a basic block of '" + graph + "'"); - CompoundState entrystate = getEntryState( + CompoundState entrystate = getEntryState( current, startingPoints.get(current), implementation, @@ -109,7 +101,7 @@ public Map> fixpoint( newApprox = analyze(result, implementation, entrystate, bb); Statement closing = bb[bb.length - 1]; - CompoundState oldApprox = result.get(closing); + CompoundState oldApprox = result.get(closing); if (oldApprox != null) try { newApprox = implementation.operation(closing, newApprox, oldApprox); @@ -150,17 +142,17 @@ public Map> fixpoint( return result; } - private CompoundState analyze( - Map> result, - FixpointImplementation> implementation, - CompoundState entrystate, + private CompoundState analyze( + Map> result, + FixpointImplementation> implementation, + CompoundState entrystate, Statement[] bb) throws FixpointException { - StatementStore emptyIntermediate = entrystate.intermediateStates.bottom(); - CompoundState newApprox = CompoundState.of( + StatementStore emptyIntermediate = entrystate.intermediateStates.bottom(); + CompoundState newApprox = CompoundState.of( entrystate.postState.bottom(), emptyIntermediate); - CompoundState entry = entrystate; + CompoundState entry = entrystate; for (Statement cursor : bb) try { newApprox = implementation.semantics(cursor, entry); @@ -168,7 +160,7 @@ private CompoundState analyze( // storing approximations into result is a trick: it won't ever // be used in fixpoint comparisons, but it will still make // it out as part of the final result - for (Entry> intermediate : newApprox.intermediateStates) + for (Entry> intermediate : newApprox.intermediateStates) if (intermediate.getKey().stopsExecution() || (hotspots != null && hotspots.test(intermediate.getKey()))) result.put(intermediate.getKey(), CompoundState.of(intermediate.getValue(), emptyIntermediate)); diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/Assignment.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/Assignment.java index 9bf2dee71..bfc09fa62 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/Assignment.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/Assignment.java @@ -4,9 +4,6 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.CodeLocation; @@ -36,7 +33,11 @@ public class Assignment extends BinaryExpression { * @param target the target of the assignment * @param expression the expression to assign to {@code target} */ - public Assignment(CFG cfg, CodeLocation location, Expression target, Expression expression) { + public Assignment( + CFG cfg, + CodeLocation location, + Expression target, + Expression expression) { super(cfg, location, "=", RightToLeftEvaluation.INSTANCE, target, expression); } @@ -52,7 +53,12 @@ public Assignment(CFG cfg, CodeLocation location, Expression target, Expression * @param target the target of the assignment * @param expression the expression to assign to {@code target} */ - public Assignment(CFG cfg, CodeLocation location, EvaluationOrder order, Expression target, Expression expression) { + public Assignment( + CFG cfg, + CodeLocation location, + EvaluationOrder order, + Expression target, + Expression expression) { super(cfg, location, "=", order, target, expression); } @@ -68,7 +74,12 @@ public Assignment(CFG cfg, CodeLocation location, EvaluationOrder order, Express * @param target the target of the assignment * @param expression the expression to assign to {@code target} */ - public Assignment(CFG cfg, CodeLocation location, Type staticType, Expression target, Expression expression) { + public Assignment( + CFG cfg, + CodeLocation location, + Type staticType, + Expression target, + Expression expression) { super(cfg, location, "=", RightToLeftEvaluation.INSTANCE, staticType, target, expression); } @@ -84,7 +95,12 @@ public Assignment(CFG cfg, CodeLocation location, Type staticType, Expression ta * @param target the target of the assignment * @param expression the expression to assign to {@code target} */ - public Assignment(CFG cfg, CodeLocation location, EvaluationOrder order, Type staticType, Expression target, + public Assignment( + CFG cfg, + CodeLocation location, + EvaluationOrder order, + Type staticType, + Expression target, Expression expression) { super(cfg, location, "=", order, staticType, target, expression); } @@ -95,16 +111,13 @@ public final String toString() { } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState binarySemantics( - InterproceduralAnalysis interprocedural, - AnalysisState state, - SymbolicExpression left, - SymbolicExpression right, - StatementStore expressions) - throws SemanticException { + public > AnalysisState fwdBinarySemantics( + InterproceduralAnalysis interprocedural, + AnalysisState state, + SymbolicExpression left, + SymbolicExpression right, + StatementStore expressions) + throws SemanticException { return state.assign(left, right, this); } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/BinaryExpression.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/BinaryExpression.java index 40619207d..561300ab1 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/BinaryExpression.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/BinaryExpression.java @@ -4,10 +4,7 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; import it.unive.lisa.analysis.lattices.ExpressionSet; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.CodeLocation; @@ -37,8 +34,12 @@ public abstract class BinaryExpression extends NaryExpression { * @param left the first sub-expression of this expression * @param right the second sub-expression of this expression */ - protected BinaryExpression(CFG cfg, CodeLocation location, String constructName, - Expression left, Expression right) { + protected BinaryExpression( + CFG cfg, + CodeLocation location, + String constructName, + Expression left, + Expression right) { super(cfg, location, constructName, left, right); } @@ -54,8 +55,13 @@ protected BinaryExpression(CFG cfg, CodeLocation location, String constructName, * @param left the first sub-expression of this expression * @param right the second sub-expression of this expression */ - protected BinaryExpression(CFG cfg, CodeLocation location, String constructName, Type staticType, - Expression left, Expression right) { + protected BinaryExpression( + CFG cfg, + CodeLocation location, + String constructName, + Type staticType, + Expression left, + Expression right) { super(cfg, location, constructName, staticType, left, right); } @@ -72,8 +78,13 @@ protected BinaryExpression(CFG cfg, CodeLocation location, String constructName, * @param left the first sub-expression of this expression * @param right the second sub-expression of this expression */ - protected BinaryExpression(CFG cfg, CodeLocation location, String constructName, - EvaluationOrder order, Expression left, Expression right) { + protected BinaryExpression( + CFG cfg, + CodeLocation location, + String constructName, + EvaluationOrder order, + Expression left, + Expression right) { super(cfg, location, constructName, order, left, right); } @@ -89,8 +100,14 @@ protected BinaryExpression(CFG cfg, CodeLocation location, String constructName, * @param left the first sub-expression of this expression * @param right the second sub-expression of this expression */ - protected BinaryExpression(CFG cfg, CodeLocation location, String constructName, EvaluationOrder order, - Type staticType, Expression left, Expression right) { + protected BinaryExpression( + CFG cfg, + CodeLocation location, + String constructName, + EvaluationOrder order, + Type staticType, + Expression left, + Expression right) { super(cfg, location, constructName, order, staticType, left, right); } @@ -113,32 +130,26 @@ public Expression getRight() { } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState expressionSemantics( - InterproceduralAnalysis interprocedural, - AnalysisState state, - ExpressionSet[] params, - StatementStore expressions) - throws SemanticException { - AnalysisState result = state.bottom(); + public > AnalysisState forwardSemanticsAux( + InterproceduralAnalysis interprocedural, + AnalysisState state, + ExpressionSet[] params, + StatementStore expressions) + throws SemanticException { + AnalysisState result = state.bottom(); for (SymbolicExpression left : params[0]) for (SymbolicExpression right : params[1]) - result = result.lub(binarySemantics(interprocedural, state, left, right, expressions)); + result = result.lub(fwdBinarySemantics(interprocedural, state, left, right, expressions)); return result; } /** - * Computes the semantics of the expression, after the semantics of the - * sub-expressions have been computed. Meta variables from the + * Computes the forward semantics of the expression, after the semantics of + * the sub-expressions have been computed. Meta variables from the * sub-expressions will be forgotten after this expression returns. * * @param the type of {@link AbstractState} - * @param the type of the {@link HeapDomain} - * @param the type of the {@link ValueDomain} - * @param the type of {@link TypeDomain} * @param interprocedural the interprocedural analysis of the program to * analyze * @param state the state where the expression is to be evaluated @@ -158,14 +169,65 @@ T extends TypeDomain> AnalysisState expressionSemantics( * * @throws SemanticException if something goes wrong during the computation */ - public abstract , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState binarySemantics( - InterproceduralAnalysis interprocedural, - AnalysisState state, - SymbolicExpression left, - SymbolicExpression right, - StatementStore expressions) - throws SemanticException; + public abstract > AnalysisState fwdBinarySemantics( + InterproceduralAnalysis interprocedural, + AnalysisState state, + SymbolicExpression left, + SymbolicExpression right, + StatementStore expressions) + throws SemanticException; + + @Override + public > AnalysisState backwardSemanticsAux( + InterproceduralAnalysis interprocedural, + AnalysisState state, + ExpressionSet[] params, + StatementStore expressions) + throws SemanticException { + AnalysisState result = state.bottom(); + for (SymbolicExpression left : params[0]) + for (SymbolicExpression right : params[1]) + result = result.lub(bwdBinarySemantics(interprocedural, state, left, right, expressions)); + + return result; + } + + /** + * Computes the backward semantics of the expression, after the semantics of + * the sub-expressions have been computed. Meta variables from the + * sub-expressions will be forgotten after this expression returns. By + * default, this method delegates to + * {@link #fwdBinarySemantics(InterproceduralAnalysis, AnalysisState, SymbolicExpression, SymbolicExpression, StatementStore)}, + * as it is fine for most atomic statements. One should redefine this method + * if a statement's semantics is composed of a series of smaller operations. + * + * @param the type of {@link AbstractState} + * @param interprocedural the interprocedural analysis of the program to + * analyze + * @param state the state where the expression is to be evaluated + * @param left the symbolic expression representing the computed + * value of the first sub-expression of this + * expression + * @param right the symbolic expression representing the computed + * value of the second sub-expression of this + * expression + * @param expressions the cache where analysis states of intermediate + * expressions are stored and that can be + * accessed to query for post-states of + * parameters expressions + * + * @return the {@link AnalysisState} representing the abstract result of the + * execution of this expression + * + * @throws SemanticException if something goes wrong during the computation + */ + public > AnalysisState bwdBinarySemantics( + InterproceduralAnalysis interprocedural, + AnalysisState state, + SymbolicExpression left, + SymbolicExpression right, + StatementStore expressions) + throws SemanticException { + return fwdBinarySemantics(interprocedural, state, left, right, expressions); + } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/BinaryStatement.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/BinaryStatement.java index 05534682a..58c54a377 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/BinaryStatement.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/BinaryStatement.java @@ -4,10 +4,7 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; import it.unive.lisa.analysis.lattices.ExpressionSet; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.CodeLocation; @@ -34,8 +31,12 @@ public abstract class BinaryStatement extends NaryStatement { * @param left the first sub-expression of this statement * @param right the second sub-expression of this statement */ - protected BinaryStatement(CFG cfg, CodeLocation location, String constructName, - Expression left, Expression right) { + protected BinaryStatement( + CFG cfg, + CodeLocation location, + String constructName, + Expression left, + Expression right) { super(cfg, location, constructName, left, right); } @@ -51,8 +52,13 @@ protected BinaryStatement(CFG cfg, CodeLocation location, String constructName, * @param left the first sub-expression of this statement * @param right the second sub-expression of this statement */ - protected BinaryStatement(CFG cfg, CodeLocation location, String constructName, - EvaluationOrder order, Expression left, Expression right) { + protected BinaryStatement( + CFG cfg, + CodeLocation location, + String constructName, + EvaluationOrder order, + Expression left, + Expression right) { super(cfg, location, constructName, order, left, right); } @@ -75,32 +81,26 @@ public Expression getRight() { } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState statementSemantics( - InterproceduralAnalysis interprocedural, - AnalysisState state, - ExpressionSet[] params, - StatementStore expressions) - throws SemanticException { - AnalysisState result = state.bottom(); + public > AnalysisState forwardSemanticsAux( + InterproceduralAnalysis interprocedural, + AnalysisState state, + ExpressionSet[] params, + StatementStore expressions) + throws SemanticException { + AnalysisState result = state.bottom(); for (SymbolicExpression left : params[0]) for (SymbolicExpression right : params[1]) - result = result.lub(binarySemantics(interprocedural, state, left, right, expressions)); + result = result.lub(fwdBinarySemantics(interprocedural, state, left, right, expressions)); return result; } /** - * Computes the semantics of the statement, after the semantics of the - * sub-expressions have been computed. Meta variables from the + * Computes the forward semantics of the statement, after the semantics of + * the sub-expressions have been computed. Meta variables from the * sub-expressions will be forgotten after this statement returns. * * @param the type of {@link AbstractState} - * @param the type of the {@link HeapDomain} - * @param the type of the {@link ValueDomain} - * @param the type of {@link TypeDomain} * @param interprocedural the interprocedural analysis of the program to * analyze * @param state the state where the statement is to be evaluated @@ -120,14 +120,65 @@ T extends TypeDomain> AnalysisState statementSemantics( * * @throws SemanticException if something goes wrong during the computation */ - public abstract , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState binarySemantics( - InterproceduralAnalysis interprocedural, - AnalysisState state, - SymbolicExpression left, - SymbolicExpression right, - StatementStore expressions) - throws SemanticException; + public abstract > AnalysisState fwdBinarySemantics( + InterproceduralAnalysis interprocedural, + AnalysisState state, + SymbolicExpression left, + SymbolicExpression right, + StatementStore expressions) + throws SemanticException; + + @Override + public > AnalysisState backwardSemanticsAux( + InterproceduralAnalysis interprocedural, + AnalysisState state, + ExpressionSet[] params, + StatementStore expressions) + throws SemanticException { + AnalysisState result = state.bottom(); + for (SymbolicExpression left : params[0]) + for (SymbolicExpression right : params[1]) + result = result.lub(bwdBinarySemantics(interprocedural, state, left, right, expressions)); + + return result; + } + + /** + * Computes the backward semantics of the statement, after the semantics of + * the sub-expressions have been computed. Meta variables from the + * sub-expressions will be forgotten after this statement returns. By + * default, this method delegates to + * {@link #fwdBinarySemantics(InterproceduralAnalysis, AnalysisState, SymbolicExpression, SymbolicExpression, StatementStore)}, + * as it is fine for most atomic statements. One should redefine this method + * if a statement's semantics is composed of a series of smaller operations. + * + * @param the type of {@link AbstractState} + * @param interprocedural the interprocedural analysis of the program to + * analyze + * @param state the state where the statement is to be evaluated + * @param left the symbolic expression representing the computed + * value of the first sub-expression of this + * statement + * @param right the symbolic expression representing the computed + * value of the second sub-expression of this + * statement + * @param expressions the cache where analysis states of intermediate + * expressions are stored and that can be + * accessed to query for post-states of + * parameters expressions + * + * @return the {@link AnalysisState} representing the abstract result of the + * execution of this statement + * + * @throws SemanticException if something goes wrong during the computation + */ + public > AnalysisState bwdBinarySemantics( + InterproceduralAnalysis interprocedural, + AnalysisState state, + SymbolicExpression left, + SymbolicExpression right, + StatementStore expressions) + throws SemanticException { + return fwdBinarySemantics(interprocedural, state, left, right, expressions); + } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/DefaultParamInitialization.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/DefaultParamInitialization.java new file mode 100644 index 000000000..f283c196d --- /dev/null +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/DefaultParamInitialization.java @@ -0,0 +1,70 @@ +package it.unive.lisa.program.cfg.statement; + +import it.unive.lisa.analysis.AbstractState; +import it.unive.lisa.analysis.AnalysisState; +import it.unive.lisa.analysis.Lattice; +import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.StatementStore; +import it.unive.lisa.interprocedural.InterproceduralAnalysis; +import it.unive.lisa.program.cfg.CFG; +import it.unive.lisa.program.cfg.CodeLocation; +import it.unive.lisa.program.cfg.edge.Edge; +import it.unive.lisa.symbolic.value.PushAny; +import it.unive.lisa.type.Type; +import it.unive.lisa.util.datastructures.graph.GraphVisitor; + +/** + * An {@link Expression} that can be used on the right-hand side of an + * assignment to initialize a variable or parameter of a given type to a + * statically unknown value. To do this, this class' semantics simply leaves a + * {@link PushAny} on the stack. Instances of this class can be returned by + * {@link Type#unknownValue(CFG, CodeLocation)}, but should not be directly + * placed inside {@link CFG}s at parse time. + * + * @author Luca Negrini + */ +public class DefaultParamInitialization extends Expression { + + /** + * Builds the initializing expression. + * + * @param cfg the {@link CFG} where the initialization will happen + * @param location the {@link CodeLocation} where the initialization will + * happen + * @param type the static type of the variable or parameter to + * initialize + */ + public DefaultParamInitialization( + CFG cfg, + CodeLocation location, + Type type) { + super(cfg, location, type); + } + + @Override + public int setOffset( + int offset) { + throw new UnsupportedOperationException(); + } + + @Override + public boolean accept( + GraphVisitor visitor, + V tool) { + return visitor.visit(tool, getCFG(), this); + } + + @Override + public String toString() { + return Lattice.TOP_STRING; + } + + @Override + public > AnalysisState forwardSemantics( + AnalysisState entryState, + InterproceduralAnalysis interprocedural, + StatementStore expressions) + throws SemanticException { + return entryState.smallStepSemantics(new PushAny(getStaticType(), getLocation()), this); + } +} diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/Expression.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/Expression.java index 5a6c88201..191707957 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/Expression.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/Expression.java @@ -10,6 +10,8 @@ import java.util.Collection; import java.util.HashSet; import java.util.Objects; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; /** * An expression that is part of a statement of the program. @@ -18,6 +20,8 @@ */ public abstract class Expression extends Statement { + private static final Logger LOG = LogManager.getLogger(Expression.class); + /** * The static type of this expression. */ @@ -43,7 +47,9 @@ public abstract class Expression extends Statement { * @param location the location where the expression is defined within the * program */ - protected Expression(CFG cfg, CodeLocation location) { + protected Expression( + CFG cfg, + CodeLocation location) { this(cfg, location, Untyped.INSTANCE); } @@ -55,7 +61,10 @@ protected Expression(CFG cfg, CodeLocation location) { * the program * @param staticType the static type of this expression */ - protected Expression(CFG cfg, CodeLocation location, Type staticType) { + protected Expression( + CFG cfg, + CodeLocation location, + Type staticType) { super(cfg, location); Objects.requireNonNull(staticType, "The expression type of a CFG cannot be null"); this.staticType = staticType; @@ -98,7 +107,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (!super.equals(obj)) @@ -122,8 +132,16 @@ public boolean equals(Object obj) { * * @param st the containing statement */ - public final void setParentStatement(Statement st) { - this.parent = st; + public final void setParentStatement( + Statement st) { + if (this.parent == null) + this.parent = st; + else + // this usually happens either with a bad code parsing process + // or when constructing resolved calls or similar constructs + // inside semantic functions. Either way, the syntactic structure + // of the code should not change once set + LOG.trace("Attempt to change the parent of " + this + " ignored"); } /** @@ -175,7 +193,8 @@ public final Statement getRootStatement() { } @Override - public Statement getStatementEvaluatedBefore(Statement other) { + public Statement getStatementEvaluatedBefore( + Statement other) { if (this instanceof Call) { Call original = (Call) this; while (original.getSource() != null) @@ -189,4 +208,21 @@ public Statement getStatementEvaluatedBefore(Statement other) { return parent.getStatementEvaluatedBefore(this); } + + @Override + public Statement getStatementEvaluatedAfter( + Statement other) { + if (this instanceof Call) { + Call original = (Call) this; + while (original.getSource() != null) + original = original.getSource(); + if (original != this) + return original.getStatementEvaluatedAfter(other); + } + + if (other != this || parent == null) + return null; + + return parent.getStatementEvaluatedAfter(this); + } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/NaryExpression.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/NaryExpression.java index e6bd5509f..201eb9443 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/NaryExpression.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/NaryExpression.java @@ -4,17 +4,13 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; import it.unive.lisa.analysis.lattices.ExpressionSet; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.CodeLocation; import it.unive.lisa.program.cfg.edge.Edge; import it.unive.lisa.program.cfg.statement.evaluation.EvaluationOrder; import it.unive.lisa.program.cfg.statement.evaluation.LeftToRightEvaluation; -import it.unive.lisa.symbolic.SymbolicExpression; import it.unive.lisa.symbolic.value.Identifier; import it.unive.lisa.type.Type; import it.unive.lisa.type.Untyped; @@ -58,7 +54,11 @@ public abstract class NaryExpression extends Expression { * expression * @param subExpressions the sub-expressions to be evaluated left-to-right */ - protected NaryExpression(CFG cfg, CodeLocation location, String constructName, Expression... subExpressions) { + protected NaryExpression( + CFG cfg, + CodeLocation location, + String constructName, + Expression... subExpressions) { this(cfg, location, constructName, LeftToRightEvaluation.INSTANCE, Untyped.INSTANCE, subExpressions); } @@ -74,7 +74,11 @@ protected NaryExpression(CFG cfg, CodeLocation location, String constructName, E * @param order the evaluation order of the sub-expressions * @param subExpressions the sub-expressions */ - protected NaryExpression(CFG cfg, CodeLocation location, String constructName, EvaluationOrder order, + protected NaryExpression( + CFG cfg, + CodeLocation location, + String constructName, + EvaluationOrder order, Expression... subExpressions) { this(cfg, location, constructName, order, Untyped.INSTANCE, subExpressions); } @@ -91,7 +95,11 @@ protected NaryExpression(CFG cfg, CodeLocation location, String constructName, E * @param staticType the static type of this expression * @param subExpressions the sub-expressions to be evaluated left-to-right */ - protected NaryExpression(CFG cfg, CodeLocation location, String constructName, Type staticType, + protected NaryExpression( + CFG cfg, + CodeLocation location, + String constructName, + Type staticType, Expression... subExpressions) { this(cfg, location, constructName, LeftToRightEvaluation.INSTANCE, staticType, subExpressions); } @@ -108,8 +116,13 @@ protected NaryExpression(CFG cfg, CodeLocation location, String constructName, T * @param staticType the static type of this expression * @param subExpressions the sub-expressions */ - protected NaryExpression(CFG cfg, CodeLocation location, String constructName, EvaluationOrder order, - Type staticType, Expression... subExpressions) { + protected NaryExpression( + CFG cfg, + CodeLocation location, + String constructName, + EvaluationOrder order, + Type staticType, + Expression... subExpressions) { super(cfg, location, staticType); Objects.requireNonNull(subExpressions, "The array of sub-expressions of an expression cannot be null"); for (int i = 0; i < subExpressions.length; i++) @@ -152,7 +165,8 @@ public EvaluationOrder getOrder() { } @Override - public int setOffset(int offset) { + public int setOffset( + int offset) { this.offset = offset; int off = offset; for (Expression sub : subExpressions) @@ -161,7 +175,8 @@ public int setOffset(int offset) { } @Override - public Statement getStatementEvaluatedBefore(Statement other) { + public Statement getStatementEvaluatedBefore( + Statement other) { int len = subExpressions.length; if (other == this) return len == 0 ? null : subExpressions[order.last(len)]; @@ -176,7 +191,25 @@ public Statement getStatementEvaluatedBefore(Statement other) { } @Override - public final boolean accept(GraphVisitor visitor, V tool) { + public Statement getStatementEvaluatedAfter( + Statement other) { + if (other == this) + return null; + + int len = subExpressions.length; + for (int i = 0; i < len; i++) + if (subExpressions[i] == other) + if (i == order.last(len)) + return this; + else + return subExpressions[order.next(i, len)]; + return null; + } + + @Override + public final boolean accept( + GraphVisitor visitor, + V tool) { for (Expression sub : subExpressions) if (!sub.accept(visitor, tool)) return false; @@ -198,7 +231,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (!super.equals(obj)) @@ -225,20 +259,15 @@ public boolean equals(Object obj) { * {@inheritDoc} */ @Override - @SuppressWarnings("unchecked") - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState semantics( - AnalysisState entryState, - InterproceduralAnalysis interprocedural, - StatementStore expressions) - throws SemanticException { - ExpressionSet[] computed = new ExpressionSet[subExpressions.length]; + public > AnalysisState forwardSemantics( + AnalysisState entryState, + InterproceduralAnalysis interprocedural, + StatementStore expressions) + throws SemanticException { + ExpressionSet[] computed = new ExpressionSet[subExpressions.length]; - AnalysisState eval = order.evaluate(subExpressions, entryState, interprocedural, expressions, computed); - AnalysisState result = expressionSemantics(interprocedural, eval, computed, expressions); + AnalysisState eval = order.evaluate(subExpressions, entryState, interprocedural, expressions, computed); + AnalysisState result = forwardSemanticsAux(interprocedural, eval, computed, expressions); Collection vars = getMetaVariables(); for (Expression sub : subExpressions) { @@ -251,14 +280,11 @@ T extends TypeDomain> AnalysisState semantics( } /** - * Computes the semantics of the expression, after the semantics of all - * sub-expressions have been computed. Meta variables from the + * Computes the forward semantics of the expression, after the semantics of + * all sub-expressions have been computed. Meta variables from the * sub-expressions will be forgotten after this call returns. * * @param the type of {@link AbstractState} - * @param the type of the {@link HeapDomain} - * @param the type of the {@link ValueDomain} - * @param the type of {@link TypeDomain} * @param interprocedural the interprocedural analysis of the program to * analyze * @param state the state where the expression is to be evaluated @@ -275,12 +301,69 @@ T extends TypeDomain> AnalysisState semantics( * * @throws SemanticException if something goes wrong during the computation */ - public abstract , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState expressionSemantics( - InterproceduralAnalysis interprocedural, - AnalysisState state, - ExpressionSet[] params, StatementStore expressions) - throws SemanticException; + public abstract > AnalysisState forwardSemanticsAux( + InterproceduralAnalysis interprocedural, + AnalysisState state, + ExpressionSet[] params, + StatementStore expressions) + throws SemanticException; + + @Override + public > AnalysisState backwardSemantics( + AnalysisState exitState, + InterproceduralAnalysis interprocedural, + StatementStore expressions) + throws SemanticException { + ExpressionSet[] computed = new ExpressionSet[subExpressions.length]; + + // TODO this evaluation should also happen backward, but the current + // structure won't allow it as we need the symbolic expressions from the + // child before evaluating the semantics of the parent + AnalysisState sem = order.bwdEvaluate(subExpressions, exitState, interprocedural, expressions, computed); + AnalysisState result = backwardSemanticsAux(interprocedural, sem, computed, expressions); + + Collection vars = getMetaVariables(); + for (Expression sub : subExpressions) { + // we propagate the meta variables backward + Collection subvars = sub.getMetaVariables(); + vars.addAll(subvars); + subvars.clear(); + } + return result; + } + + /** + * Computes the backward semantics of the expression, after the semantics of + * all sub-expressions have been computed. Meta variables from the + * sub-expressions will be forgotten after this call returns. By default, + * this method delegates to + * {@link #forwardSemanticsAux(InterproceduralAnalysis, AnalysisState, ExpressionSet[], StatementStore)}, + * as it is fine for most atomic statements. One should redefine this method + * if a statement's semantics is composed of a series of smaller operations. + * + * @param the type of {@link AbstractState} + * @param interprocedural the interprocedural analysis of the program to + * analyze + * @param state the state where the expression is to be evaluated + * @param params the symbolic expressions representing the computed + * values of the sub-expressions of this + * expression + * @param expressions the cache where analysis states of intermediate + * expressions are stored and that can be + * accessed to query for post-states of + * parameters expressions + * + * @return the {@link AnalysisState} representing the abstract result of the + * execution of this expression + * + * @throws SemanticException if something goes wrong during the computation + */ + public > AnalysisState backwardSemanticsAux( + InterproceduralAnalysis interprocedural, + AnalysisState state, + ExpressionSet[] params, + StatementStore expressions) + throws SemanticException { + return forwardSemanticsAux(interprocedural, state, params, expressions); + } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/NaryStatement.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/NaryStatement.java index 951d033b7..f9319fe32 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/NaryStatement.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/NaryStatement.java @@ -4,17 +4,13 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; import it.unive.lisa.analysis.lattices.ExpressionSet; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.CodeLocation; import it.unive.lisa.program.cfg.edge.Edge; import it.unive.lisa.program.cfg.statement.evaluation.EvaluationOrder; import it.unive.lisa.program.cfg.statement.evaluation.LeftToRightEvaluation; -import it.unive.lisa.symbolic.SymbolicExpression; import it.unive.lisa.util.datastructures.graph.GraphVisitor; import java.util.Arrays; import java.util.Objects; @@ -53,7 +49,11 @@ public abstract class NaryStatement extends Statement { * expression * @param subExpressions the sub-expressions to be evaluated left-to-right */ - protected NaryStatement(CFG cfg, CodeLocation location, String constructName, Expression... subExpressions) { + protected NaryStatement( + CFG cfg, + CodeLocation location, + String constructName, + Expression... subExpressions) { this(cfg, location, constructName, LeftToRightEvaluation.INSTANCE, subExpressions); } @@ -68,7 +68,11 @@ protected NaryStatement(CFG cfg, CodeLocation location, String constructName, Ex * @param order the evaluation order of the sub-expressions * @param subExpressions the sub-expressions */ - protected NaryStatement(CFG cfg, CodeLocation location, String constructName, EvaluationOrder order, + protected NaryStatement( + CFG cfg, + CodeLocation location, + String constructName, + EvaluationOrder order, Expression... subExpressions) { super(cfg, location); Objects.requireNonNull(subExpressions, "The array of sub-expressions of a statement cannot be null"); @@ -112,7 +116,8 @@ public EvaluationOrder getOrder() { } @Override - public int setOffset(int offset) { + public int setOffset( + int offset) { this.offset = offset; int off = offset; for (Expression sub : subExpressions) @@ -121,7 +126,9 @@ public int setOffset(int offset) { } @Override - public final boolean accept(GraphVisitor visitor, V tool) { + public final boolean accept( + GraphVisitor visitor, + V tool) { for (Expression sub : subExpressions) if (!sub.accept(visitor, tool)) return false; @@ -134,7 +141,8 @@ public String toString() { } @Override - public Statement getStatementEvaluatedBefore(Statement other) { + public Statement getStatementEvaluatedBefore( + Statement other) { int len = subExpressions.length; if (other == this) return len == 0 ? null : subExpressions[order.last(len)]; @@ -148,6 +156,22 @@ public Statement getStatementEvaluatedBefore(Statement other) { return null; } + @Override + public Statement getStatementEvaluatedAfter( + Statement other) { + if (other == this) + return null; + + int len = subExpressions.length; + for (int i = 0; i < len; i++) + if (subExpressions[i] == other) + if (i == order.last(len)) + return this; + else + return subExpressions[order.next(i, len)]; + return null; + } + @Override public int hashCode() { final int prime = 31; @@ -158,7 +182,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (!super.equals(obj)) @@ -185,20 +210,15 @@ public boolean equals(Object obj) { * {@inheritDoc} */ @Override - @SuppressWarnings("unchecked") - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState semantics( - AnalysisState entryState, - InterproceduralAnalysis interprocedural, - StatementStore expressions) - throws SemanticException { - ExpressionSet[] computed = new ExpressionSet[subExpressions.length]; - - AnalysisState eval = order.evaluate(subExpressions, entryState, interprocedural, expressions, computed); - AnalysisState result = statementSemantics(interprocedural, eval, computed, expressions); + public > AnalysisState forwardSemantics( + AnalysisState entryState, + InterproceduralAnalysis interprocedural, + StatementStore expressions) + throws SemanticException { + ExpressionSet[] computed = new ExpressionSet[subExpressions.length]; + + AnalysisState eval = order.evaluate(subExpressions, entryState, interprocedural, expressions, computed); + AnalysisState result = forwardSemanticsAux(interprocedural, eval, computed, expressions); for (Expression sub : subExpressions) // we forget the meta variables now as the values are popped from @@ -208,14 +228,11 @@ T extends TypeDomain> AnalysisState semantics( } /** - * Computes the semantics of the statement, after the semantics of all - * sub-expressions have been computed. Meta variables from the + * Computes the forward semantics of the statement, after the semantics of + * all sub-expressions have been computed. Meta variables from the * sub-expressions will be forgotten after this call returns. * * @param the type of {@link AbstractState} - * @param the type of the {@link HeapDomain} - * @param the type of the {@link ValueDomain} - * @param the type of {@link TypeDomain} * @param interprocedural the interprocedural analysis of the program to * analyze * @param state the state where the statement is to be evaluated @@ -232,12 +249,74 @@ T extends TypeDomain> AnalysisState semantics( * * @throws SemanticException if something goes wrong during the computation */ - public abstract , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState statementSemantics( - InterproceduralAnalysis interprocedural, - AnalysisState state, - ExpressionSet[] params, StatementStore expressions) - throws SemanticException; + public abstract > AnalysisState forwardSemanticsAux( + InterproceduralAnalysis interprocedural, + AnalysisState state, + ExpressionSet[] params, + StatementStore expressions) + throws SemanticException; + + /** + * Semantics of an n-ary statements is evaluated by computing the semantics + * of its sub-expressions, in the specified order, using the analysis state + * from each sub-expression's computation as entry state for the next one. + * Then, the semantics of the statement itself is evaluated.
+ *
+ * {@inheritDoc} + */ + @Override + public
> AnalysisState backwardSemantics( + AnalysisState exitState, + InterproceduralAnalysis interprocedural, + StatementStore expressions) + throws SemanticException { + ExpressionSet[] computed = new ExpressionSet[subExpressions.length]; + + // TODO this evaluation should also happen backward, but the current + // structure won't allow it as we need the symbolic expressions from the + // child before evaluating the semantics of the parent + AnalysisState sem = order.bwdEvaluate(subExpressions, exitState, interprocedural, expressions, computed); + AnalysisState result = backwardSemanticsAux(interprocedural, sem, computed, expressions); + + for (Expression sub : subExpressions) + // we forget the meta variables now as the values are popped from + // the stack here + result = result.forgetIdentifiers(sub.getMetaVariables()); + return result; + } + + /** + * Computes the backward semantics of the statement, after the semantics of + * all sub-expressions have been computed. Meta variables from the + * sub-expressions will be forgotten after this call returns. By default, + * this method delegates to + * {@link #forwardSemanticsAux(InterproceduralAnalysis, AnalysisState, ExpressionSet[], StatementStore)}, + * as it is fine for most atomic statements. One should redefine this method + * if a statement's semantics is composed of a series of smaller operations. + * + * @param the type of {@link AbstractState} + * @param interprocedural the interprocedural analysis of the program to + * analyze + * @param state the state where the statement is to be evaluated + * @param params the symbolic expressions representing the computed + * values of the sub-expressions of this + * statement + * @param expressions the cache where analysis states of intermediate + * expressions are stored and that can be + * accessed to query for post-states of + * parameters expressions + * + * @return the {@link AnalysisState} representing the abstract result of the + * execution of this statement + * + * @throws SemanticException if something goes wrong during the computation + */ + public > AnalysisState backwardSemanticsAux( + InterproceduralAnalysis interprocedural, + AnalysisState state, + ExpressionSet[] params, + StatementStore expressions) + throws SemanticException { + return forwardSemanticsAux(interprocedural, state, params, expressions); + } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/NoOp.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/NoOp.java index d61e72989..f69ab20e5 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/NoOp.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/NoOp.java @@ -4,9 +4,6 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.CodeLocation; @@ -29,12 +26,15 @@ public class NoOp extends Statement { * @param location the location where this statement is defined within the * program */ - public NoOp(CFG cfg, CodeLocation location) { + public NoOp( + CFG cfg, + CodeLocation location) { super(cfg, location); } @Override - public int setOffset(int offset) { + public int setOffset( + int offset) { return this.offset = offset; } @@ -44,7 +44,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (!super.equals(obj)) @@ -60,19 +61,18 @@ public final String toString() { } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState semantics( - AnalysisState entryState, - InterproceduralAnalysis interprocedural, - StatementStore expressions) - throws SemanticException { + public > AnalysisState forwardSemantics( + AnalysisState entryState, + InterproceduralAnalysis interprocedural, + StatementStore expressions) + throws SemanticException { return entryState.smallStepSemantics(new Skip(getLocation()), this); } @Override - public boolean accept(GraphVisitor visitor, V tool) { + public boolean accept( + GraphVisitor visitor, + V tool) { return visitor.visit(tool, getCFG(), this); } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/PluggableStatement.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/PluggableStatement.java index bb21cb87e..238e4dec0 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/PluggableStatement.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/PluggableStatement.java @@ -27,5 +27,6 @@ public interface PluggableStatement { * * @param st the original statement */ - void setOriginatingStatement(Statement st); + void setOriginatingStatement( + Statement st); } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/Ret.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/Ret.java index 4b47a518a..97d47840d 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/Ret.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/Ret.java @@ -4,9 +4,6 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.CodeLocation; @@ -30,12 +27,15 @@ public class Ret extends Statement { * @param location the location where the statement is defined within the * program */ - public Ret(CFG cfg, CodeLocation location) { + public Ret( + CFG cfg, + CodeLocation location) { super(cfg, location); } @Override - public int setOffset(int offset) { + public int setOffset( + int offset) { return this.offset = offset; } @@ -50,7 +50,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (!super.equals(obj)) @@ -66,19 +67,18 @@ public final String toString() { } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState semantics( - AnalysisState entryState, - InterproceduralAnalysis interprocedural, - StatementStore expressions) - throws SemanticException { + public > AnalysisState forwardSemantics( + AnalysisState entryState, + InterproceduralAnalysis interprocedural, + StatementStore expressions) + throws SemanticException { return entryState.smallStepSemantics(new Skip(getLocation()), this); } @Override - public boolean accept(GraphVisitor visitor, V tool) { + public boolean accept( + GraphVisitor visitor, + V tool) { return visitor.visit(tool, getCFG(), this); } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/Return.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/Return.java index 8d24c1396..8b9968880 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/Return.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/Return.java @@ -4,9 +4,6 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.CodeLocation; @@ -32,7 +29,10 @@ public class Return extends UnaryStatement implements MetaVariableCreator { * program * @param expression the expression to return */ - public Return(CFG cfg, CodeLocation location, Expression expression) { + public Return( + CFG cfg, + CodeLocation location, + Expression expression) { super(cfg, location, "return", expression); } @@ -50,15 +50,12 @@ public final Identifier getMetaVariable() { } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState unarySemantics( - InterproceduralAnalysis interprocedural, - AnalysisState state, - SymbolicExpression expr, - StatementStore expressions) - throws SemanticException { + public > AnalysisState fwdUnarySemantics( + InterproceduralAnalysis interprocedural, + AnalysisState state, + SymbolicExpression expr, + StatementStore expressions) + throws SemanticException { Identifier meta = getMetaVariable(); return state.assign(meta, expr, this); } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/Statement.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/Statement.java index c81b651a7..f70c42342 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/Statement.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/Statement.java @@ -4,9 +4,6 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.CodeLocation; @@ -45,7 +42,9 @@ public abstract class Statement implements CodeNode, Progr * @param location the location where this statement is defined within the * program */ - protected Statement(CFG cfg, CodeLocation location) { + protected Statement( + CFG cfg, + CodeLocation location) { Objects.requireNonNull(cfg, "Containing CFG cannot be null"); Objects.requireNonNull(location, "The location of a statement cannot be null"); this.cfg = cfg; @@ -94,7 +93,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -114,17 +114,14 @@ public boolean equals(Object obj) { public abstract String toString(); /** - * Computes the semantics of the statement, expressing how semantic + * Computes the forward semantics of the statement, expressing how semantic * information is transformed by the execution of this statement. This * method is also responsible for recursively invoking the - * {@link #semantics(AnalysisState, InterproceduralAnalysis, StatementStore)} + * {@link #forwardSemantics(AnalysisState, InterproceduralAnalysis, StatementStore)} * of each nested {@link Expression}, saving the result of each call in * {@code expressions}. * * @param the type of {@link AbstractState} - * @param the type of the {@link HeapDomain} - * @param the type of the {@link ValueDomain} - * @param the type of {@link TypeDomain} * @param entryState the entry state that represents the abstract * values of each program variable and memory * location when the execution reaches this @@ -139,14 +136,44 @@ public boolean equals(Object obj) { * * @throws SemanticException if something goes wrong during the computation */ - public abstract , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState semantics( - AnalysisState entryState, - InterproceduralAnalysis interprocedural, - StatementStore expressions) - throws SemanticException; + public abstract > AnalysisState forwardSemantics( + AnalysisState entryState, + InterproceduralAnalysis interprocedural, + StatementStore expressions) + throws SemanticException; + + /** + * Computes the backward semantics of the statement, expressing how semantic + * information is transformed by the execution of this statement. This + * method is also responsible for recursively invoking the + * {@link #forwardSemantics(AnalysisState, InterproceduralAnalysis, StatementStore)} + * of each nested {@link Expression}, saving the result of each call in + * {@code expressions}. By default, this method delegates to + * {@link #forwardSemantics(AnalysisState, InterproceduralAnalysis, StatementStore)}, + * as it is fine for most atomic statements. One should redefine this method + * if a statement's semantics is composed of a series of smaller operations. + * + * @param the type of {@link AbstractState} + * @param exitState the exit state that represents the abstract values + * of each program variable and memory location + * when the execution reaches this statement + * @param interprocedural the interprocedural analysis of the program to + * analyze + * @param expressions the cache where analysis states of intermediate + * expressions must be stored + * + * @return the {@link AnalysisState} representing the abstract result of the + * execution of this statement + * + * @throws SemanticException if something goes wrong during the computation + */ + public > AnalysisState backwardSemantics( + AnalysisState exitState, + InterproceduralAnalysis interprocedural, + StatementStore expressions) + throws SemanticException { + return forwardSemantics(exitState, interprocedural, expressions); + } @Override public CodeLocation getLocation() { @@ -154,7 +181,8 @@ public CodeLocation getLocation() { } @Override - public int compareTo(Statement o) { + public int compareTo( + Statement o) { int cmp; if ((cmp = location.compareTo(o.location)) != 0) return cmp; @@ -163,7 +191,7 @@ public int compareTo(Statement o) { /** * Yields the {@link Statement} that is evaluated right before this one, - * such that querying for the entry state of {@code this} expression is + * such that querying for the entry state of {@code this} statement is * equivalent to querying the exit state of the returned one. If this method * returns {@code null}, then this is the first expression evaluated when an * entire statement is evaluated. @@ -184,7 +212,7 @@ public final Statement getEvaluationPredecessor() { /** * Yields the {@link Statement} that precedes the given one, assuming that - * {@code other} is contained into this expression. If this method returns + * {@code other} is contained into this statement. If this method returns * {@code null}, then {@code other} is the first expression evaluated when * this statement is evaluated. * @@ -192,7 +220,44 @@ public final Statement getEvaluationPredecessor() { * * @return the previous statement, or {@code null} */ - public Statement getStatementEvaluatedBefore(Statement other) { + public Statement getStatementEvaluatedBefore( + Statement other) { + return null; + } + + /** + * Yields the {@link Statement} that is evaluated right after this one, such + * that querying for the exit state of {@code this} statement is equivalent + * to querying the entry state of the returned one. If this method returns + * {@code null}, then this is either a statement or the last expression + * evaluated when an entire statement is evaluated. + * + * @return the next statement, or {@code null} + */ + public final Statement getEvaluationSuccessor() { + if (this instanceof Call) { + Call original = (Call) this; + while (original.getSource() != null) + original = original.getSource(); + if (original != this) + return getStatementEvaluatedAfter(original); + } + + return getStatementEvaluatedAfter(this); + } + + /** + * Yields the {@link Statement} that follows the given one, assuming that + * {@code other} is contained into this statement. If this method returns + * {@code null}, then {@code other} is the last expression evaluated when + * this statement is evaluated. + * + * @param other the other statement + * + * @return the next statement, or {@code null} + */ + public Statement getStatementEvaluatedAfter( + Statement other) { return null; } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/TernaryExpression.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/TernaryExpression.java index 42a71f02e..32b1b6448 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/TernaryExpression.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/TernaryExpression.java @@ -4,10 +4,7 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; import it.unive.lisa.analysis.lattices.ExpressionSet; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.CodeLocation; @@ -38,8 +35,13 @@ public abstract class TernaryExpression extends NaryExpression { * @param middle the second sub-expression of this expression * @param right the third sub-expression of this expression */ - protected TernaryExpression(CFG cfg, CodeLocation location, String constructName, - Expression left, Expression middle, Expression right) { + protected TernaryExpression( + CFG cfg, + CodeLocation location, + String constructName, + Expression left, + Expression middle, + Expression right) { super(cfg, location, constructName, left, middle, right); } @@ -57,8 +59,14 @@ protected TernaryExpression(CFG cfg, CodeLocation location, String constructName * @param middle the second sub-expression of this expression * @param right the third sub-expression of this expression */ - protected TernaryExpression(CFG cfg, CodeLocation location, String constructName, Type staticType, - Expression left, Expression middle, Expression right) { + protected TernaryExpression( + CFG cfg, + CodeLocation location, + String constructName, + Type staticType, + Expression left, + Expression middle, + Expression right) { super(cfg, location, constructName, staticType, left, middle, right); } @@ -76,8 +84,14 @@ protected TernaryExpression(CFG cfg, CodeLocation location, String constructName * @param middle the second sub-expression of this expression * @param right the third sub-expression of this expression */ - protected TernaryExpression(CFG cfg, CodeLocation location, String constructName, EvaluationOrder order, - Expression left, Expression middle, Expression right) { + protected TernaryExpression( + CFG cfg, + CodeLocation location, + String constructName, + EvaluationOrder order, + Expression left, + Expression middle, + Expression right) { super(cfg, location, constructName, order, left, middle, right); } @@ -95,8 +109,15 @@ protected TernaryExpression(CFG cfg, CodeLocation location, String constructName * @param middle the second sub-expression of this expression * @param right the third sub-expression of this expression */ - protected TernaryExpression(CFG cfg, CodeLocation location, String constructName, EvaluationOrder order, - Type staticType, Expression left, Expression middle, Expression right) { + protected TernaryExpression( + CFG cfg, + CodeLocation location, + String constructName, + EvaluationOrder order, + Type staticType, + Expression left, + Expression middle, + Expression right) { super(cfg, location, constructName, order, staticType, left, middle, right); } @@ -128,33 +149,27 @@ public Expression getRight() { } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState expressionSemantics( - InterproceduralAnalysis interprocedural, - AnalysisState state, - ExpressionSet[] params, - StatementStore expressions) - throws SemanticException { - AnalysisState result = state.bottom(); + public > AnalysisState forwardSemanticsAux( + InterproceduralAnalysis interprocedural, + AnalysisState state, + ExpressionSet[] params, + StatementStore expressions) + throws SemanticException { + AnalysisState result = state.bottom(); for (SymbolicExpression left : params[0]) for (SymbolicExpression middle : params[1]) for (SymbolicExpression right : params[2]) - result = result.lub(ternarySemantics(interprocedural, state, left, middle, right, expressions)); + result = result.lub(fwdTernarySemantics(interprocedural, state, left, middle, right, expressions)); return result; } /** - * Computes the semantics of the expression, after the semantics of the - * sub-expressions have been computed. Meta variables from the + * Computes the forward semantics of the expression, after the semantics of + * the sub-expressions have been computed. Meta variables from the * sub-expressions will be forgotten after this expression returns. * * @param the type of {@link AbstractState} - * @param the type of the {@link HeapDomain} - * @param the type of the {@link ValueDomain} - * @param the type of {@link TypeDomain} * @param interprocedural the interprocedural analysis of the program to * analyze * @param state the state where the expression is to be evaluated @@ -177,15 +192,71 @@ T extends TypeDomain> AnalysisState expressionSemantics( * * @throws SemanticException if something goes wrong during the computation */ - public abstract , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState ternarySemantics( - InterproceduralAnalysis interprocedural, - AnalysisState state, - SymbolicExpression left, - SymbolicExpression middle, - SymbolicExpression right, - StatementStore expressions) - throws SemanticException; + public abstract > AnalysisState fwdTernarySemantics( + InterproceduralAnalysis interprocedural, + AnalysisState state, + SymbolicExpression left, + SymbolicExpression middle, + SymbolicExpression right, + StatementStore expressions) + throws SemanticException; + + @Override + public > AnalysisState backwardSemanticsAux( + InterproceduralAnalysis interprocedural, + AnalysisState state, + ExpressionSet[] params, + StatementStore expressions) + throws SemanticException { + AnalysisState result = state.bottom(); + for (SymbolicExpression left : params[0]) + for (SymbolicExpression middle : params[1]) + for (SymbolicExpression right : params[2]) + result = result.lub(bwdTernarySemantics(interprocedural, state, left, middle, right, expressions)); + + return result; + } + + /** + * Computes the backward semantics of the expression, after the semantics of + * the sub-expressions have been computed. Meta variables from the + * sub-expressions will be forgotten after this expression returns. By + * default, this method delegates to + * {@link #fwdTernarySemantics(InterproceduralAnalysis, AnalysisState, SymbolicExpression, SymbolicExpression, SymbolicExpression, StatementStore)}, + * as it is fine for most atomic statements. One should redefine this method + * if a statement's semantics is composed of a series of smaller operations. + * + * @param the type of {@link AbstractState} + * @param interprocedural the interprocedural analysis of the program to + * analyze + * @param state the state where the expression is to be evaluated + * @param left the symbolic expression representing the computed + * value of the first sub-expression of this + * expression + * @param middle the symbolic expression representing the computed + * value of the second sub-expression of this + * expression + * @param right the symbolic expression representing the computed + * value of the third sub-expression of this + * expression + * @param expressions the cache where analysis states of intermediate + * expressions are stored and that can be + * accessed to query for post-states of + * parameters expressions + * + * @return the {@link AnalysisState} representing the abstract result of the + * execution of this expression + * + * @throws SemanticException if something goes wrong during the computation + */ + public > AnalysisState bwdTernarySemantics( + InterproceduralAnalysis interprocedural, + AnalysisState state, + SymbolicExpression left, + SymbolicExpression middle, + SymbolicExpression right, + StatementStore expressions) + throws SemanticException { + return fwdTernarySemantics(interprocedural, state, left, middle, right, expressions); + } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/TernaryStatement.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/TernaryStatement.java index a155029a2..bdb26f1c0 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/TernaryStatement.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/TernaryStatement.java @@ -4,10 +4,7 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; import it.unive.lisa.analysis.lattices.ExpressionSet; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.CodeLocation; @@ -35,8 +32,13 @@ public abstract class TernaryStatement extends NaryStatement { * @param middle the second sub-expression of this statement * @param right the third sub-expression of this statement */ - protected TernaryStatement(CFG cfg, CodeLocation location, String constructName, - Expression left, Expression middle, Expression right) { + protected TernaryStatement( + CFG cfg, + CodeLocation location, + String constructName, + Expression left, + Expression middle, + Expression right) { super(cfg, location, constructName, left, middle, right); } @@ -53,8 +55,14 @@ protected TernaryStatement(CFG cfg, CodeLocation location, String constructName, * @param middle the second sub-expression of this statement * @param right the third sub-expression of this statement */ - protected TernaryStatement(CFG cfg, CodeLocation location, String constructName, EvaluationOrder order, - Expression left, Expression middle, Expression right) { + protected TernaryStatement( + CFG cfg, + CodeLocation location, + String constructName, + EvaluationOrder order, + Expression left, + Expression middle, + Expression right) { super(cfg, location, constructName, order, left, middle, right); } @@ -86,33 +94,27 @@ public Expression getRight() { } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState statementSemantics( - InterproceduralAnalysis interprocedural, - AnalysisState state, - ExpressionSet[] params, - StatementStore expressions) - throws SemanticException { - AnalysisState result = state.bottom(); + public > AnalysisState forwardSemanticsAux( + InterproceduralAnalysis interprocedural, + AnalysisState state, + ExpressionSet[] params, + StatementStore expressions) + throws SemanticException { + AnalysisState result = state.bottom(); for (SymbolicExpression left : params[0]) for (SymbolicExpression middle : params[1]) for (SymbolicExpression right : params[2]) - result = result.lub(ternarySemantics(interprocedural, state, left, middle, right, expressions)); + result = result.lub(fwdTernarySemantics(interprocedural, state, left, middle, right, expressions)); return result; } /** - * Computes the semantics of the statement, after the semantics of the - * sub-expressions have been computed. Meta variables from the + * Computes the forward semantics of the statement, after the semantics of + * the sub-expressions have been computed. Meta variables from the * sub-expressions will be forgotten after this statement returns. * * @param the type of {@link AbstractState} - * @param the type of the {@link HeapDomain} - * @param the type of the {@link ValueDomain} - * @param the type of {@link TypeDomain} * @param interprocedural the interprocedural analysis of the program to * analyze * @param state the state where the statement is to be evaluated @@ -135,15 +137,71 @@ T extends TypeDomain> AnalysisState statementSemantics( * * @throws SemanticException if something goes wrong during the computation */ - public abstract , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState ternarySemantics( - InterproceduralAnalysis interprocedural, - AnalysisState state, - SymbolicExpression left, - SymbolicExpression middle, - SymbolicExpression right, - StatementStore expressions) - throws SemanticException; + public abstract > AnalysisState fwdTernarySemantics( + InterproceduralAnalysis interprocedural, + AnalysisState state, + SymbolicExpression left, + SymbolicExpression middle, + SymbolicExpression right, + StatementStore expressions) + throws SemanticException; + + @Override + public > AnalysisState backwardSemanticsAux( + InterproceduralAnalysis interprocedural, + AnalysisState state, + ExpressionSet[] params, + StatementStore expressions) + throws SemanticException { + AnalysisState result = state.bottom(); + for (SymbolicExpression left : params[0]) + for (SymbolicExpression middle : params[1]) + for (SymbolicExpression right : params[2]) + result = result.lub(bwdTernarySemantics(interprocedural, state, left, middle, right, expressions)); + + return result; + } + + /** + * Computes the backwards semantics of the statement, after the semantics of + * the sub-expressions have been computed. Meta variables from the + * sub-expressions will be forgotten after this statement returns. By + * default, this method delegates to + * {@link #fwdTernarySemantics(InterproceduralAnalysis, AnalysisState, SymbolicExpression, SymbolicExpression, SymbolicExpression, StatementStore)}, + * as it is fine for most atomic statements. One should redefine this method + * if a statement's semantics is composed of a series of smaller operations. + * + * @param the type of {@link AbstractState} + * @param interprocedural the interprocedural analysis of the program to + * analyze + * @param state the state where the statement is to be evaluated + * @param left the symbolic expression representing the computed + * value of the first sub-expression of this + * statement + * @param middle the symbolic expression representing the computed + * value of the second sub-expression of this + * statement + * @param right the symbolic expression representing the computed + * value of the third sub-expression of this + * statement + * @param expressions the cache where analysis states of intermediate + * expressions are stored and that can be + * accessed to query for post-states of + * parameters expressions + * + * @return the {@link AnalysisState} representing the abstract result of the + * execution of this statement + * + * @throws SemanticException if something goes wrong during the computation + */ + public > AnalysisState bwdTernarySemantics( + InterproceduralAnalysis interprocedural, + AnalysisState state, + SymbolicExpression left, + SymbolicExpression middle, + SymbolicExpression right, + StatementStore expressions) + throws SemanticException { + return fwdTernarySemantics(interprocedural, state, left, middle, right, expressions); + } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/Throw.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/Throw.java index 6deccc552..86922ad5f 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/Throw.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/Throw.java @@ -4,9 +4,6 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.CodeLocation; @@ -30,7 +27,10 @@ public class Throw extends UnaryStatement { * program * @param expression the expression to raise as error */ - public Throw(CFG cfg, CodeLocation location, Expression expression) { + public Throw( + CFG cfg, + CodeLocation location, + Expression expression) { super(cfg, location, "throw", expression); } @@ -45,15 +45,12 @@ public boolean throwsError() { } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState unarySemantics( - InterproceduralAnalysis interprocedural, - AnalysisState state, - SymbolicExpression expr, - StatementStore expressions) - throws SemanticException { + public > AnalysisState fwdUnarySemantics( + InterproceduralAnalysis interprocedural, + AnalysisState state, + SymbolicExpression expr, + StatementStore expressions) + throws SemanticException { // only temporary return state.smallStepSemantics(new Skip(getLocation()), this); } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/UnaryExpression.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/UnaryExpression.java index 331d2c1aa..b6c5fc0fc 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/UnaryExpression.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/UnaryExpression.java @@ -4,10 +4,7 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; import it.unive.lisa.analysis.lattices.ExpressionSet; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.CodeLocation; @@ -36,7 +33,10 @@ public abstract class UnaryExpression extends NaryExpression { * expression * @param subExpression the sub-expression of this expression */ - protected UnaryExpression(CFG cfg, CodeLocation location, String constructName, + protected UnaryExpression( + CFG cfg, + CodeLocation location, + String constructName, Expression subExpression) { super(cfg, location, constructName, subExpression); } @@ -53,7 +53,11 @@ protected UnaryExpression(CFG cfg, CodeLocation location, String constructName, * @param staticType the static type of this expression * @param subExpression the sub-expression of this expression */ - protected UnaryExpression(CFG cfg, CodeLocation location, String constructName, Type staticType, + protected UnaryExpression( + CFG cfg, + CodeLocation location, + String constructName, + Type staticType, Expression subExpression) { super(cfg, location, constructName, staticType, subExpression); } @@ -70,7 +74,11 @@ protected UnaryExpression(CFG cfg, CodeLocation location, String constructName, * @param order the evaluation order of the sub-expressions * @param subExpression the sub-expression of this expression */ - protected UnaryExpression(CFG cfg, CodeLocation location, String constructName, EvaluationOrder order, + protected UnaryExpression( + CFG cfg, + CodeLocation location, + String constructName, + EvaluationOrder order, Expression subExpression) { super(cfg, location, constructName, order, subExpression); } @@ -87,8 +95,13 @@ protected UnaryExpression(CFG cfg, CodeLocation location, String constructName, * @param staticType the static type of this expression * @param subExpression the sub-expression of this expression */ - protected UnaryExpression(CFG cfg, CodeLocation location, String constructName, EvaluationOrder order, - Type staticType, Expression subExpression) { + protected UnaryExpression( + CFG cfg, + CodeLocation location, + String constructName, + EvaluationOrder order, + Type staticType, + Expression subExpression) { super(cfg, location, constructName, order, staticType, subExpression); } @@ -102,30 +115,69 @@ public Expression getSubExpression() { } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState expressionSemantics( - InterproceduralAnalysis interprocedural, - AnalysisState state, - ExpressionSet[] params, - StatementStore expressions) - throws SemanticException { - AnalysisState result = state.bottom(); + public > AnalysisState forwardSemanticsAux( + InterproceduralAnalysis interprocedural, + AnalysisState state, + ExpressionSet[] params, + StatementStore expressions) + throws SemanticException { + AnalysisState result = state.bottom(); + for (SymbolicExpression expr : params[0]) + result = result.lub(fwdUnarySemantics(interprocedural, state, expr, expressions)); + return result; + } + + /** + * Computes the forward semantics of the expression, after the semantics of + * the sub-expression has been computed. Meta variables from the + * sub-expression will be forgotten after this expression returns. + * + * @param the type of {@link AbstractState} + * @param interprocedural the interprocedural analysis of the program to + * analyze + * @param state the state where the expression is to be evaluated + * @param expr the symbolic expressions representing the computed + * value of the sub-expression of this expression + * @param expressions the cache where analysis states of intermediate + * expressions are stored and that can be + * accessed to query for post-states of + * parameters expressions + * + * @return the {@link AnalysisState} representing the abstract result of the + * execution of this expression + * + * @throws SemanticException if something goes wrong during the computation + */ + public abstract > AnalysisState fwdUnarySemantics( + InterproceduralAnalysis interprocedural, + AnalysisState state, + SymbolicExpression expr, + StatementStore expressions) + throws SemanticException; + + @Override + public > AnalysisState backwardSemanticsAux( + InterproceduralAnalysis interprocedural, + AnalysisState state, + ExpressionSet[] params, + StatementStore expressions) + throws SemanticException { + AnalysisState result = state.bottom(); for (SymbolicExpression expr : params[0]) - result = result.lub(unarySemantics(interprocedural, state, expr, expressions)); + result = result.lub(bwdUnarySemantics(interprocedural, state, expr, expressions)); return result; } /** - * Computes the semantics of the expression, after the semantics of the - * sub-expression has been computed. Meta variables from the sub-expression - * will be forgotten after this expression returns. + * Computes the backward semantics of the expression, after the semantics of + * the sub-expression has been computed. Meta variables from the + * sub-expression will be forgotten after this expression returns. By + * default, this method delegates to + * {@link #fwdUnarySemantics(InterproceduralAnalysis, AnalysisState, SymbolicExpression, StatementStore)}, + * as it is fine for most atomic statements. One should redefine this method + * if a statement's semantics is composed of a series of smaller operations. * * @param the type of {@link AbstractState} - * @param the type of the {@link HeapDomain} - * @param the type of the {@link ValueDomain} - * @param the type of {@link TypeDomain} * @param interprocedural the interprocedural analysis of the program to * analyze * @param state the state where the expression is to be evaluated @@ -141,13 +193,12 @@ T extends TypeDomain> AnalysisState expressionSemantics( * * @throws SemanticException if something goes wrong during the computation */ - public abstract , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState unarySemantics( - InterproceduralAnalysis interprocedural, - AnalysisState state, - SymbolicExpression expr, - StatementStore expressions) - throws SemanticException; + public > AnalysisState bwdUnarySemantics( + InterproceduralAnalysis interprocedural, + AnalysisState state, + SymbolicExpression expr, + StatementStore expressions) + throws SemanticException { + return fwdUnarySemantics(interprocedural, state, expr, expressions); + } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/UnaryStatement.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/UnaryStatement.java index 5dcccf1c3..526a4810c 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/UnaryStatement.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/UnaryStatement.java @@ -4,10 +4,7 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; import it.unive.lisa.analysis.lattices.ExpressionSet; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.CodeLocation; @@ -33,7 +30,11 @@ public abstract class UnaryStatement extends NaryStatement { * statement * @param subExpression the sub-expression of this statement */ - protected UnaryStatement(CFG cfg, CodeLocation location, String constructName, Expression subExpression) { + protected UnaryStatement( + CFG cfg, + CodeLocation location, + String constructName, + Expression subExpression) { super(cfg, location, constructName, subExpression); } @@ -48,7 +49,11 @@ protected UnaryStatement(CFG cfg, CodeLocation location, String constructName, E * @param order the evaluation order of the sub-expressions * @param subExpression the sub-expression of this statement */ - protected UnaryStatement(CFG cfg, CodeLocation location, String constructName, EvaluationOrder order, + protected UnaryStatement( + CFG cfg, + CodeLocation location, + String constructName, + EvaluationOrder order, Expression subExpression) { super(cfg, location, constructName, order, subExpression); } @@ -63,30 +68,69 @@ public Expression getSubExpression() { } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState statementSemantics( - InterproceduralAnalysis interprocedural, - AnalysisState state, - ExpressionSet[] params, - StatementStore expressions) - throws SemanticException { - AnalysisState result = state.bottom(); + public > AnalysisState forwardSemanticsAux( + InterproceduralAnalysis interprocedural, + AnalysisState state, + ExpressionSet[] params, + StatementStore expressions) + throws SemanticException { + AnalysisState result = state.bottom(); + for (SymbolicExpression expr : params[0]) + result = result.lub(fwdUnarySemantics(interprocedural, state, expr, expressions)); + return result; + } + + /** + * Computes the forward semantics of the statement, after the semantics of + * the sub-expression has been computed. Meta variables from the + * sub-expression will be forgotten after this statement returns. + * + * @param the type of {@link AbstractState} + * @param interprocedural the interprocedural analysis of the program to + * analyze + * @param state the state where the statement is to be evaluated + * @param expr the symbolic expressions representing the computed + * value of the sub-expression of this expression + * @param expressions the cache where analysis states of intermediate + * expressions are stored and that can be + * accessed to query for post-states of + * parameters expressions + * + * @return the {@link AnalysisState} representing the abstract result of the + * execution of this statement + * + * @throws SemanticException if something goes wrong during the computation + */ + public abstract > AnalysisState fwdUnarySemantics( + InterproceduralAnalysis interprocedural, + AnalysisState state, + SymbolicExpression expr, + StatementStore expressions) + throws SemanticException; + + @Override + public > AnalysisState backwardSemanticsAux( + InterproceduralAnalysis interprocedural, + AnalysisState state, + ExpressionSet[] params, + StatementStore expressions) + throws SemanticException { + AnalysisState result = state.bottom(); for (SymbolicExpression expr : params[0]) - result = result.lub(unarySemantics(interprocedural, state, expr, expressions)); + result = result.lub(bwdUnarySemantics(interprocedural, state, expr, expressions)); return result; } /** - * Computes the semantics of the statement, after the semantics of the - * sub-expression has been computed. Meta variables from the sub-expression - * will be forgotten after this statement returns. + * Computes the backward semantics of the statement, after the semantics of + * the sub-expression has been computed. Meta variables from the + * sub-expression will be forgotten after this statement returns. By + * default, this method delegates to + * {@link #fwdUnarySemantics(InterproceduralAnalysis, AnalysisState, SymbolicExpression, StatementStore)}, + * as it is fine for most atomic statements. One should redefine this method + * if a statement's semantics is composed of a series of smaller operations. * * @param the type of {@link AbstractState} - * @param the type of the {@link HeapDomain} - * @param the type of the {@link ValueDomain} - * @param the type of {@link TypeDomain} * @param interprocedural the interprocedural analysis of the program to * analyze * @param state the state where the statement is to be evaluated @@ -102,13 +146,12 @@ T extends TypeDomain> AnalysisState statementSemantics( * * @throws SemanticException if something goes wrong during the computation */ - public abstract , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState unarySemantics( - InterproceduralAnalysis interprocedural, - AnalysisState state, - SymbolicExpression expr, - StatementStore expressions) - throws SemanticException; + public > AnalysisState bwdUnarySemantics( + InterproceduralAnalysis interprocedural, + AnalysisState state, + SymbolicExpression expr, + StatementStore expressions) + throws SemanticException { + return fwdUnarySemantics(interprocedural, state, expr, expressions); + } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/VariableRef.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/VariableRef.java index 1b59438cf..bffba0b46 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/VariableRef.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/VariableRef.java @@ -4,9 +4,6 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.annotations.Annotation; import it.unive.lisa.program.annotations.Annotations; @@ -41,7 +38,10 @@ public class VariableRef extends Expression { * @param location the location of this variable reference * @param name the name of this variable reference */ - public VariableRef(CFG cfg, CodeLocation location, String name) { + public VariableRef( + CFG cfg, + CodeLocation location, + String name) { this(cfg, location, name, Untyped.INSTANCE); } @@ -55,14 +55,19 @@ public VariableRef(CFG cfg, CodeLocation location, String name) { * @param name the name of this variable * @param type the type of this variable */ - public VariableRef(CFG cfg, CodeLocation location, String name, Type type) { + public VariableRef( + CFG cfg, + CodeLocation location, + String name, + Type type) { super(cfg, location, type); Objects.requireNonNull(name, "The name of a variable cannot be null"); this.name = name; } @Override - public int setOffset(int offset) { + public int setOffset( + int offset) { return this.offset = offset; } @@ -84,7 +89,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (!super.equals(obj)) @@ -118,19 +124,19 @@ public Variable getVariable() { } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState semantics( - AnalysisState entryState, InterproceduralAnalysis interprocedural, - StatementStore expressions) - throws SemanticException { + public > AnalysisState forwardSemantics( + AnalysisState entryState, + InterproceduralAnalysis interprocedural, + StatementStore expressions) + throws SemanticException { SymbolicExpression expr = getVariable(); return entryState.smallStepSemantics(expr, this); } @Override - public boolean accept(GraphVisitor visitor, V tool) { + public boolean accept( + GraphVisitor visitor, + V tool) { return visitor.visit(tool, getCFG(), this); } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/call/CFGCall.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/call/CFGCall.java index 5192723a6..6c6e223de 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/call/CFGCall.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/call/CFGCall.java @@ -4,10 +4,7 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; import it.unive.lisa.analysis.lattices.ExpressionSet; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.annotations.Annotation; import it.unive.lisa.program.cfg.CFG; @@ -16,7 +13,6 @@ import it.unive.lisa.program.cfg.statement.Expression; import it.unive.lisa.program.cfg.statement.evaluation.EvaluationOrder; import it.unive.lisa.program.cfg.statement.evaluation.LeftToRightEvaluation; -import it.unive.lisa.symbolic.SymbolicExpression; import it.unive.lisa.symbolic.value.Identifier; import it.unive.lisa.symbolic.value.Variable; import it.unive.lisa.type.Type; @@ -55,8 +51,14 @@ public class CFGCall extends CallWithResult implements CanRemoveReceiver { * @param targets the CFGs that are targeted by this CFG call * @param parameters the parameters of this call */ - public CFGCall(CFG cfg, CodeLocation location, CallType callType, String qualifier, String targetName, - Collection targets, Expression... parameters) { + public CFGCall( + CFG cfg, + CodeLocation location, + CallType callType, + String qualifier, + String targetName, + Collection targets, + Expression... parameters) { this(cfg, location, callType, qualifier, targetName, LeftToRightEvaluation.INSTANCE, targets, parameters); } @@ -77,8 +79,15 @@ public CFGCall(CFG cfg, CodeLocation location, CallType callType, String qualifi * @param targets the CFGs that are targeted by this CFG call * @param parameters the parameters of this call */ - public CFGCall(CFG cfg, CodeLocation location, CallType callType, String qualifier, String targetName, - EvaluationOrder order, Collection targets, Expression... parameters) { + public CFGCall( + CFG cfg, + CodeLocation location, + CallType callType, + String qualifier, + String targetName, + EvaluationOrder order, + Collection targets, + Expression... parameters) { super(cfg, location, callType, qualifier, targetName, order, getCommonReturnType(targets), parameters); Objects.requireNonNull(targets, "The targets of a CFG call cannot be null"); for (CFG target : targets) @@ -93,7 +102,9 @@ public CFGCall(CFG cfg, CodeLocation location, CallType callType, String qualifi * @param source the unresolved call to copy * @param targets the {@link CFG}s that the call has been resolved against */ - public CFGCall(UnresolvedCall source, Collection targets) { + public CFGCall( + UnresolvedCall source, + Collection targets) { this(source.getCFG(), source.getLocation(), source.getCallType(), source.getQualifier(), source.getTargetName(), targets, source.getParameters()); for (Expression param : source.getParameters()) @@ -101,7 +112,8 @@ public CFGCall(UnresolvedCall source, Collection targets) { param.setParentStatement(source); } - private static Type getCommonReturnType(Collection targets) { + private static Type getCommonReturnType( + Collection targets) { Iterator it = targets.iterator(); Type result = null; while (it.hasNext()) { @@ -145,7 +157,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (!super.equals(obj)) @@ -178,15 +191,12 @@ public final Identifier getMetaVariable() { } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState compute( - AnalysisState entryState, - InterproceduralAnalysis interprocedural, - StatementStore expressions, - ExpressionSet[] parameters) - throws SemanticException { + public > AnalysisState compute( + AnalysisState entryState, + InterproceduralAnalysis interprocedural, + StatementStore expressions, + ExpressionSet[] parameters) + throws SemanticException { return interprocedural.getAbstractResultOf(this, entryState, parameters, expressions); } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/call/Call.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/call/Call.java index 75912fa5b..9d5d75ed7 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/call/Call.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/call/Call.java @@ -4,9 +4,6 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.callgraph.CallGraph; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.CodeLocation; @@ -14,7 +11,6 @@ import it.unive.lisa.program.cfg.statement.NaryExpression; import it.unive.lisa.program.cfg.statement.evaluation.EvaluationOrder; import it.unive.lisa.symbolic.SymbolicExpression; -import it.unive.lisa.symbolic.value.ValueExpression; import it.unive.lisa.type.Type; import java.util.HashSet; import java.util.Objects; @@ -93,8 +89,15 @@ public enum CallType { * @param staticType the static type of this call * @param parameters the parameters of this call */ - protected Call(CFG cfg, CodeLocation location, CallType type, - String qualifier, String targetName, EvaluationOrder order, Type staticType, Expression... parameters) { + protected Call( + CFG cfg, + CodeLocation location, + CallType type, + String qualifier, + String targetName, + EvaluationOrder order, + Type staticType, + Expression... parameters) { super(cfg, location, completeName(qualifier, targetName), order, staticType, parameters); Objects.requireNonNull(targetName, "The name of the target of a call cannot be null"); this.targetName = targetName; @@ -102,7 +105,9 @@ protected Call(CFG cfg, CodeLocation location, CallType type, this.callType = type; } - private static String completeName(String qualifier, String name) { + private static String completeName( + String qualifier, + String name) { return StringUtils.isNotBlank(qualifier) ? qualifier + "::" + name : name; } @@ -192,7 +197,8 @@ public CallType getCallType() { * * @param source the call that this one originated from */ - public void setSource(UnresolvedCall source) { + public void setSource( + UnresolvedCall source) { this.source = source; } @@ -212,7 +218,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (!super.equals(obj)) @@ -240,9 +247,6 @@ public boolean equals(Object obj) { * call, retrieved by accessing the given {@link StatementStore}. * * @param the type of {@link AbstractState} - * @param the type of the {@link HeapDomain} - * @param the type of the {@link ValueDomain} - * @param the type of {@link TypeDomain} * @param expressions the store containing the computed states for the * parameters * @@ -252,19 +256,16 @@ public boolean equals(Object obj) { * types */ @SuppressWarnings("unchecked") - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> Set[] parameterTypes(StatementStore expressions) - throws SemanticException { + public > Set[] parameterTypes( + StatementStore expressions) + throws SemanticException { Expression[] actuals = getParameters(); Set[] types = new Set[actuals.length]; for (int i = 0; i < actuals.length; i++) { - AnalysisState state = expressions.getState(actuals[i]); - T typedom = (T) state.getDomainInstance(TypeDomain.class); + AnalysisState state = expressions.getState(actuals[i]); Set t = new HashSet<>(); - for (SymbolicExpression e : state.rewrite(state.getComputedExpressions(), this)) - t.addAll(typedom.getRuntimeTypesOf((ValueExpression) e, this)); + for (SymbolicExpression e : state.getComputedExpressions()) + t.addAll(state.getState().getRuntimeTypesOf(e, this, state.getState())); types[i] = t; } return types; diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/call/CallWithResult.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/call/CallWithResult.java index e679dd813..773bbedb7 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/call/CallWithResult.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/call/CallWithResult.java @@ -4,10 +4,7 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; import it.unive.lisa.analysis.lattices.ExpressionSet; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.CodeLocation; @@ -41,8 +38,15 @@ public abstract class CallWithResult extends Call implements MetaVariableCreator * @param staticType the static type of this call * @param parameters the parameters of this call */ - public CallWithResult(CFG cfg, CodeLocation location, CallType callType, String qualifier, String targetName, - EvaluationOrder order, Type staticType, Expression... parameters) { + public CallWithResult( + CFG cfg, + CodeLocation location, + CallType callType, + String qualifier, + String targetName, + EvaluationOrder order, + Type staticType, + Expression... parameters) { super(cfg, location, callType, qualifier, targetName, order, staticType, parameters); } @@ -60,9 +64,6 @@ public CallWithResult(CFG cfg, CodeLocation location, CallType callType, String * @param parameters the expressions representing the actual parameters * of the call * @param the type of {@link AbstractState} - * @param the type of the {@link HeapDomain} - * @param the type of the {@link ValueDomain} - * @param the type of {@link TypeDomain} * * @return an abstract analysis state representing the abstract result of * the cfg call. The @@ -72,32 +73,26 @@ public CallWithResult(CFG cfg, CodeLocation location, CallType callType, String * * @throws SemanticException if something goes wrong during the computation */ - public abstract , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState compute( - AnalysisState entryState, - InterproceduralAnalysis interprocedural, - StatementStore expressions, - ExpressionSet[] parameters) - throws SemanticException; + public abstract > AnalysisState compute( + AnalysisState entryState, + InterproceduralAnalysis interprocedural, + StatementStore expressions, + ExpressionSet[] parameters) + throws SemanticException; @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState expressionSemantics( - InterproceduralAnalysis interprocedural, - AnalysisState state, - ExpressionSet[] params, - StatementStore expressions) - throws SemanticException { + public > AnalysisState forwardSemanticsAux( + InterproceduralAnalysis interprocedural, + AnalysisState state, + ExpressionSet[] params, + StatementStore expressions) + throws SemanticException { // the stack has to be empty - state = new AnalysisState<>(state.getState(), new ExpressionSet<>(), state.getAliasing()); + state = new AnalysisState<>(state.getState(), new ExpressionSet(), state.getFixpointInformation()); // this will contain only the information about the returned // metavariable - AnalysisState returned = compute(state, interprocedural, expressions, params); + AnalysisState returned = compute(state, interprocedural, expressions, params); if (interprocedural.returnsVoid(this, returned)) // no need to add the meta variable since nothing has been pushed on @@ -110,4 +105,16 @@ T extends TypeDomain> AnalysisState expressionSemantics( getMetaVariables().add(meta); return returned; } + + @Override + public > AnalysisState backwardSemanticsAux( + InterproceduralAnalysis interprocedural, + AnalysisState state, + ExpressionSet[] params, + StatementStore expressions) + throws SemanticException { + // TODO implement this when backward analysis will be out of + // beta + throw new UnsupportedOperationException(); + } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/call/CanRemoveReceiver.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/call/CanRemoveReceiver.java index d9d6fa35b..c28e7090c 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/call/CanRemoveReceiver.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/call/CanRemoveReceiver.java @@ -32,7 +32,8 @@ public interface CanRemoveReceiver { * * @return the truncated array */ - public static Expression[] truncate(Expression[] parameters) { + public static Expression[] truncate( + Expression[] parameters) { if (parameters.length == 0) return parameters; Expression[] truncatedParams = new Expression[parameters.length - 1]; diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/call/MultiCall.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/call/MultiCall.java index 5305677a8..f10857cc0 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/call/MultiCall.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/call/MultiCall.java @@ -4,10 +4,7 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; import it.unive.lisa.analysis.lattices.ExpressionSet; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.CodeLocation; @@ -15,7 +12,6 @@ import it.unive.lisa.program.cfg.statement.Expression; import it.unive.lisa.program.cfg.statement.evaluation.EvaluationOrder; import it.unive.lisa.program.cfg.statement.evaluation.LeftToRightEvaluation; -import it.unive.lisa.symbolic.SymbolicExpression; import it.unive.lisa.type.Type; import it.unive.lisa.type.Untyped; import java.util.Collection; @@ -54,8 +50,14 @@ public class MultiCall extends Call implements ResolvedCall { * @param calls the Calls underlying this one * @param parameters the parameters of this call */ - public MultiCall(CFG cfg, CodeLocation location, CallType callType, String qualifier, String targetName, - Collection calls, Expression... parameters) { + public MultiCall( + CFG cfg, + CodeLocation location, + CallType callType, + String qualifier, + String targetName, + Collection calls, + Expression... parameters) { this(cfg, location, callType, qualifier, targetName, LeftToRightEvaluation.INSTANCE, calls, parameters); } @@ -76,8 +78,15 @@ public MultiCall(CFG cfg, CodeLocation location, CallType callType, String quali * @param calls the Calls underlying this one * @param parameters the parameters of this call */ - public MultiCall(CFG cfg, CodeLocation location, CallType callType, String qualifier, String targetName, - EvaluationOrder order, Collection calls, Expression... parameters) { + public MultiCall( + CFG cfg, + CodeLocation location, + CallType callType, + String qualifier, + String targetName, + EvaluationOrder order, + Collection calls, + Expression... parameters) { super(cfg, location, callType, qualifier, targetName, order, getCommonReturnType(calls), parameters); Objects.requireNonNull(calls, "The calls underlying a multi call cannot be null"); for (Call target : calls) { @@ -88,7 +97,8 @@ public MultiCall(CFG cfg, CodeLocation location, CallType callType, String quali this.calls = calls; } - private static Type getCommonReturnType(Collection targets) { + private static Type getCommonReturnType( + Collection targets) { Iterator it = targets.iterator(); Type result = null; while (it.hasNext()) { @@ -116,7 +126,9 @@ else if (result.canBeAssignedTo(current)) * @param source the unresolved call to copy * @param calls the calls underlying this one */ - public MultiCall(UnresolvedCall source, Call... calls) { + public MultiCall( + UnresolvedCall source, + Call... calls) { this(source.getCFG(), source.getLocation(), source.getCallType(), source.getQualifier(), source.getTargetName(), List.of(calls), source.getParameters()); for (Expression param : source.getParameters()) @@ -142,7 +154,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (!super.equals(obj)) @@ -164,25 +177,23 @@ public String toString() { } @Override - public void setSource(UnresolvedCall source) { + public void setSource( + UnresolvedCall source) { super.setSource(source); calls.forEach(c -> c.setSource(source)); } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState expressionSemantics( - InterproceduralAnalysis interprocedural, - AnalysisState state, - ExpressionSet[] params, - StatementStore expressions) - throws SemanticException { - AnalysisState result = state.bottom(); + public > AnalysisState forwardSemanticsAux( + InterproceduralAnalysis interprocedural, + AnalysisState state, + ExpressionSet[] params, + StatementStore expressions) + throws SemanticException { + AnalysisState result = state.bottom(); for (Call call : calls) { - result = result.lub(call.expressionSemantics(interprocedural, state, params, expressions)); + result = result.lub(call.forwardSemanticsAux(interprocedural, state, params, expressions)); getMetaVariables().addAll(call.getMetaVariables()); } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/call/NamedParameterExpression.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/call/NamedParameterExpression.java index fafef719e..878fb0269 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/call/NamedParameterExpression.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/call/NamedParameterExpression.java @@ -4,9 +4,6 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.CodeLocation; @@ -40,7 +37,11 @@ public class NamedParameterExpression extends UnaryExpression { * @param subExpression the expression being assigned to the target * parameter */ - public NamedParameterExpression(CFG cfg, CodeLocation location, String parameterName, Expression subExpression) { + public NamedParameterExpression( + CFG cfg, + CodeLocation location, + String parameterName, + Expression subExpression) { super(cfg, location, parameterName + "=", subExpression.getStaticType(), subExpression); this.parameterName = parameterName; } @@ -63,7 +64,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (!super.equals(obj)) @@ -80,15 +82,12 @@ public boolean equals(Object obj) { } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState unarySemantics( - InterproceduralAnalysis interprocedural, - AnalysisState state, - SymbolicExpression expr, - StatementStore expressions) - throws SemanticException { + public > AnalysisState fwdUnarySemantics( + InterproceduralAnalysis interprocedural, + AnalysisState state, + SymbolicExpression expr, + StatementStore expressions) + throws SemanticException { return state.smallStepSemantics(expr, this); } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/call/NativeCall.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/call/NativeCall.java index cf1f89b87..4fd4924d7 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/call/NativeCall.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/call/NativeCall.java @@ -4,10 +4,7 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; import it.unive.lisa.analysis.lattices.ExpressionSet; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.interprocedural.callgraph.CallResolutionException; import it.unive.lisa.program.cfg.CFG; @@ -19,7 +16,6 @@ import it.unive.lisa.program.cfg.statement.evaluation.EvaluationOrder; import it.unive.lisa.program.cfg.statement.evaluation.LeftToRightEvaluation; import it.unive.lisa.program.language.parameterassignment.ParameterAssigningStrategy; -import it.unive.lisa.symbolic.SymbolicExpression; import it.unive.lisa.type.Type; import it.unive.lisa.type.Untyped; import java.util.Collection; @@ -57,8 +53,14 @@ public class NativeCall extends Call implements CanRemoveReceiver, ResolvedCall * @param targets the NativeCFGs that are targeted by this CFG call * @param parameters the parameters of this call */ - public NativeCall(CFG cfg, CodeLocation location, CallType callType, String qualifier, String targetName, - Collection targets, Expression... parameters) { + public NativeCall( + CFG cfg, + CodeLocation location, + CallType callType, + String qualifier, + String targetName, + Collection targets, + Expression... parameters) { this(cfg, location, callType, qualifier, targetName, LeftToRightEvaluation.INSTANCE, targets, parameters); } @@ -79,8 +81,15 @@ public NativeCall(CFG cfg, CodeLocation location, CallType callType, String qual * @param targets the NativeCFGs that are targeted by this CFG call * @param parameters the parameters of this call */ - public NativeCall(CFG cfg, CodeLocation location, CallType callType, String qualifier, String targetName, - EvaluationOrder order, Collection targets, Expression... parameters) { + public NativeCall( + CFG cfg, + CodeLocation location, + CallType callType, + String qualifier, + String targetName, + EvaluationOrder order, + Collection targets, + Expression... parameters) { super(cfg, location, callType, qualifier, targetName, order, getCommonReturnType(targets), parameters); Objects.requireNonNull(targets, "The targets of a native call cannot be null"); Objects.requireNonNull(targets, "The native targets of a native call cannot be null"); @@ -97,7 +106,9 @@ public NativeCall(CFG cfg, CodeLocation location, CallType callType, String qual * @param targets the {@link NativeCFG}s that the call has been resolved * against */ - public NativeCall(UnresolvedCall source, Collection targets) { + public NativeCall( + UnresolvedCall source, + Collection targets) { this(source.getCFG(), source.getLocation(), source.getCallType(), source.getQualifier(), source.getTargetName(), targets, source.getParameters()); for (Expression param : source.getParameters()) @@ -105,7 +116,8 @@ public NativeCall(UnresolvedCall source, Collection targets) { param.setParentStatement(source); } - private static Type getCommonReturnType(Collection targets) { + private static Type getCommonReturnType( + Collection targets) { Iterator it = targets.iterator(); Type result = null; while (it.hasNext()) { @@ -149,7 +161,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (!super.equals(obj)) @@ -171,27 +184,24 @@ public String toString() { } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState expressionSemantics( - InterproceduralAnalysis interprocedural, - AnalysisState state, - ExpressionSet[] params, - StatementStore expressions) - throws SemanticException { - AnalysisState result = state.bottom(); + public > AnalysisState forwardSemanticsAux( + InterproceduralAnalysis interprocedural, + AnalysisState state, + ExpressionSet[] params, + StatementStore expressions) + throws SemanticException { + AnalysisState result = state.bottom(); Expression[] parameters = getSubExpressions(); ParameterAssigningStrategy strategy = getProgram().getFeatures().getAssigningStrategy(); for (NativeCFG nat : targets) try { - Pair, ExpressionSet[]> prepared = strategy.prepare(this, + Pair, ExpressionSet[]> prepared = strategy.prepare(this, state, interprocedural, expressions, nat.getDescriptor().getFormals(), params); NaryExpression rewritten = nat.rewrite(this, parameters); result = result - .lub(rewritten.expressionSemantics(interprocedural, state, prepared.getRight(), expressions)); + .lub(rewritten.forwardSemanticsAux(interprocedural, state, prepared.getRight(), expressions)); getMetaVariables().addAll(rewritten.getMetaVariables()); } catch (CallResolutionException e) { throw new SemanticException("Unable to resolve call " + this, e); diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/call/OpenCall.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/call/OpenCall.java index 2df377ce9..7877432a2 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/call/OpenCall.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/call/OpenCall.java @@ -4,10 +4,7 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; import it.unive.lisa.analysis.lattices.ExpressionSet; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.CodeLocation; @@ -15,7 +12,6 @@ import it.unive.lisa.program.cfg.statement.Expression; import it.unive.lisa.program.cfg.statement.evaluation.EvaluationOrder; import it.unive.lisa.program.cfg.statement.evaluation.LeftToRightEvaluation; -import it.unive.lisa.symbolic.SymbolicExpression; import it.unive.lisa.symbolic.value.Identifier; import it.unive.lisa.symbolic.value.Variable; import it.unive.lisa.type.Type; @@ -43,7 +39,12 @@ public class OpenCall extends CallWithResult { * @param targetName the name of the target of this open call * @param parameters the parameters of this call */ - public OpenCall(CFG cfg, CodeLocation location, CallType callType, String qualifier, String targetName, + public OpenCall( + CFG cfg, + CodeLocation location, + CallType callType, + String qualifier, + String targetName, Expression... parameters) { super(cfg, location, callType, qualifier, targetName, LeftToRightEvaluation.INSTANCE, Untyped.INSTANCE, parameters); @@ -63,8 +64,14 @@ public OpenCall(CFG cfg, CodeLocation location, CallType callType, String qualif * @param order the evaluation order of the sub-expressions * @param parameters the parameters of this call */ - public OpenCall(CFG cfg, CodeLocation location, CallType callType, String qualifier, String targetName, - EvaluationOrder order, Expression... parameters) { + public OpenCall( + CFG cfg, + CodeLocation location, + CallType callType, + String qualifier, + String targetName, + EvaluationOrder order, + Expression... parameters) { super(cfg, location, callType, qualifier, targetName, order, Untyped.INSTANCE, parameters); } @@ -84,8 +91,14 @@ public OpenCall(CFG cfg, CodeLocation location, CallType callType, String qualif * @param parameters the parameters of this call * @param staticType the static type of this call */ - public OpenCall(CFG cfg, CodeLocation location, CallType callType, String qualifier, String targetName, - Type staticType, Expression... parameters) { + public OpenCall( + CFG cfg, + CodeLocation location, + CallType callType, + String qualifier, + String targetName, + Type staticType, + Expression... parameters) { // if a call is open we don't really care if it's instance or not and we // will never perform parameter assignment this(cfg, location, callType, qualifier, targetName, LeftToRightEvaluation.INSTANCE, staticType, @@ -107,8 +120,15 @@ public OpenCall(CFG cfg, CodeLocation location, CallType callType, String qualif * @param parameters the parameters of this call * @param staticType the static type of this call */ - public OpenCall(CFG cfg, CodeLocation location, CallType callType, String qualifier, String targetName, - EvaluationOrder order, Type staticType, Expression... parameters) { + public OpenCall( + CFG cfg, + CodeLocation location, + CallType callType, + String qualifier, + String targetName, + EvaluationOrder order, + Type staticType, + Expression... parameters) { super(cfg, location, callType, qualifier, targetName, order, staticType, parameters); } @@ -118,7 +138,8 @@ public OpenCall(CFG cfg, CodeLocation location, CallType callType, String qualif * * @param source the unresolved call to copy */ - public OpenCall(UnresolvedCall source) { + public OpenCall( + UnresolvedCall source) { this(source.getCFG(), source.getLocation(), source.getCallType(), source.getQualifier(), source.getTargetName(), source.getOrder(), source.getStaticType(), source.getParameters()); for (Expression param : source.getParameters()) @@ -137,15 +158,12 @@ public final Identifier getMetaVariable() { } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState compute( - AnalysisState entryState, - InterproceduralAnalysis interprocedural, - StatementStore expressions, - ExpressionSet[] parameters) - throws SemanticException { + public > AnalysisState compute( + AnalysisState entryState, + InterproceduralAnalysis interprocedural, + StatementStore expressions, + ExpressionSet[] parameters) + throws SemanticException { return interprocedural.getAbstractResultOf(this, entryState, parameters, expressions); } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/call/TruncatedParamsCall.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/call/TruncatedParamsCall.java index d22715f65..f0dc374f5 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/call/TruncatedParamsCall.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/call/TruncatedParamsCall.java @@ -4,14 +4,10 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; import it.unive.lisa.analysis.lattices.ExpressionSet; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.cfg.CodeMember; import it.unive.lisa.program.cfg.statement.Expression; -import it.unive.lisa.symbolic.SymbolicExpression; import java.util.Collection; /** @@ -31,7 +27,8 @@ public class TruncatedParamsCall extends Call implements ResolvedCall { * * @param call the call to be wrapped */ - public TruncatedParamsCall(Call call) { + public TruncatedParamsCall( + Call call) { super(call.getCFG(), call.getLocation(), call.getCallType(), call.getQualifier(), call.getTargetName(), call.getOrder(), call.getStaticType(), call.getParameters()); if (!(call instanceof ResolvedCall)) @@ -40,14 +37,16 @@ public TruncatedParamsCall(Call call) { } @Override - public int setOffset(int offset) { + public int setOffset( + int offset) { // we do not reset the offsets here Expression[] params = getParameters(); return params[params.length - 1].getOffset(); } @Override - public void setSource(UnresolvedCall source) { + public void setSource( + UnresolvedCall source) { super.setSource(source); call.setSource(source); } @@ -61,7 +60,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (!super.equals(obj)) @@ -78,25 +78,21 @@ public boolean equals(Object obj) { } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState expressionSemantics( - InterproceduralAnalysis interprocedural, - AnalysisState state, - ExpressionSet[] params, - StatementStore expressions) - throws SemanticException { + public > AnalysisState forwardSemanticsAux( + InterproceduralAnalysis interprocedural, + AnalysisState state, + ExpressionSet[] params, + StatementStore expressions) + throws SemanticException { Expression[] actuals = getParameters(); - AnalysisState post; + AnalysisState post; if (params.length == actuals.length) { - post = call.expressionSemantics(interprocedural, state, params, expressions); + post = call.forwardSemanticsAux(interprocedural, state, params, expressions); } else { - @SuppressWarnings("unchecked") - ExpressionSet[] truncatedParams = new ExpressionSet[actuals.length]; + ExpressionSet[] truncatedParams = new ExpressionSet[actuals.length]; if (actuals.length > 0) System.arraycopy(params, 1, truncatedParams, 0, params.length - 1); - post = call.expressionSemantics(interprocedural, state, truncatedParams, expressions); + post = call.forwardSemanticsAux(interprocedural, state, truncatedParams, expressions); } getMetaVariables().addAll(call.getMetaVariables()); diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/call/UnresolvedCall.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/call/UnresolvedCall.java index 6c3c9f1bb..7fdccdd11 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/call/UnresolvedCall.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/call/UnresolvedCall.java @@ -4,10 +4,8 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; import it.unive.lisa.analysis.lattices.ExpressionSet; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; +import it.unive.lisa.analysis.symbols.SymbolAliasing; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.interprocedural.callgraph.CallGraph; import it.unive.lisa.interprocedural.callgraph.CallResolutionException; @@ -16,7 +14,6 @@ import it.unive.lisa.program.cfg.statement.Expression; import it.unive.lisa.program.cfg.statement.evaluation.EvaluationOrder; import it.unive.lisa.program.cfg.statement.evaluation.LeftToRightEvaluation; -import it.unive.lisa.symbolic.SymbolicExpression; import it.unive.lisa.type.Type; import it.unive.lisa.type.Untyped; @@ -46,7 +43,12 @@ public class UnresolvedCall extends Call { * @param targetName the name of the target of this call * @param parameters the parameters of this call */ - public UnresolvedCall(CFG cfg, CodeLocation location, CallType callType, String qualifier, String targetName, + public UnresolvedCall( + CFG cfg, + CodeLocation location, + CallType callType, + String qualifier, + String targetName, Expression... parameters) { this(cfg, location, callType, qualifier, targetName, Untyped.INSTANCE, parameters); } @@ -67,8 +69,14 @@ public UnresolvedCall(CFG cfg, CodeLocation location, CallType callType, String * @param staticType the static type of this call * @param parameters the parameters of this call */ - public UnresolvedCall(CFG cfg, CodeLocation location, CallType callType, String qualifier, String targetName, - Type staticType, Expression... parameters) { + public UnresolvedCall( + CFG cfg, + CodeLocation location, + CallType callType, + String qualifier, + String targetName, + Type staticType, + Expression... parameters) { this(cfg, location, callType, qualifier, targetName, LeftToRightEvaluation.INSTANCE, staticType, parameters); } @@ -87,8 +95,14 @@ public UnresolvedCall(CFG cfg, CodeLocation location, CallType callType, String * @param order the evaluation order of the sub-expressions * @param parameters the parameters of this call */ - public UnresolvedCall(CFG cfg, CodeLocation location, CallType callType, String qualifier, String targetName, - EvaluationOrder order, Expression... parameters) { + public UnresolvedCall( + CFG cfg, + CodeLocation location, + CallType callType, + String qualifier, + String targetName, + EvaluationOrder order, + Expression... parameters) { this(cfg, location, callType, qualifier, targetName, order, Untyped.INSTANCE, parameters); } @@ -108,28 +122,35 @@ public UnresolvedCall(CFG cfg, CodeLocation location, CallType callType, String * @param staticType the static type of this call * @param parameters the parameters of this call */ - public UnresolvedCall(CFG cfg, CodeLocation location, CallType callType, String qualifier, String targetName, - EvaluationOrder order, Type staticType, Expression... parameters) { + public UnresolvedCall( + CFG cfg, + CodeLocation location, + CallType callType, + String qualifier, + String targetName, + EvaluationOrder order, + Type staticType, + Expression... parameters) { super(cfg, location, callType, qualifier, targetName, order, staticType, parameters); } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState expressionSemantics( - InterproceduralAnalysis interprocedural, - AnalysisState state, - ExpressionSet[] params, - StatementStore expressions) - throws SemanticException { + public > AnalysisState forwardSemanticsAux( + InterproceduralAnalysis interprocedural, + AnalysisState state, + ExpressionSet[] params, + StatementStore expressions) + throws SemanticException { Call resolved; try { - resolved = interprocedural.resolve(this, parameterTypes(expressions), state.getAliasing()); + resolved = interprocedural.resolve( + this, + parameterTypes(expressions), + state.getInfo(SymbolAliasing.INFO_KEY, SymbolAliasing.class)); } catch (CallResolutionException e) { throw new SemanticException("Unable to resolve call " + this, e); } - AnalysisState result = resolved.expressionSemantics(interprocedural, state, params, expressions); + AnalysisState result = resolved.forwardSemanticsAux(interprocedural, state, params, expressions); getMetaVariables().addAll(resolved.getMetaVariables()); return result; } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/evaluation/EvaluationOrder.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/evaluation/EvaluationOrder.java index 9dd9e66b9..a8d4a7591 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/evaluation/EvaluationOrder.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/evaluation/EvaluationOrder.java @@ -4,14 +4,10 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; import it.unive.lisa.analysis.lattices.ExpressionSet; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.cfg.statement.Expression; import it.unive.lisa.program.cfg.statement.NaryExpression; -import it.unive.lisa.symbolic.SymbolicExpression; /** * The order of evaluation of the sub-expressions of an {@link NaryExpression}. @@ -32,7 +28,9 @@ public interface EvaluationOrder { * previous sub-expression, that is, {@code pos} is the first * that needs to be evaluated) */ - int previous(int pos, int len); + int previous( + int pos, + int len); /** * Assuming that {@code pos} is the index of a sub-expression, yields the @@ -45,7 +43,9 @@ public interface EvaluationOrder { * sub-expression, that is, {@code pos} is the last that needs * to be evaluated) */ - int next(int pos, int len); + int next( + int pos, + int len); /** * Yields the index of the first sub-expression that has to be evaluated. @@ -54,7 +54,8 @@ public interface EvaluationOrder { * * @return the index of the first expression to evaluate */ - int first(int len); + int first( + int len); /** * Yields the index of the last sub-expression that has to be evaluated. @@ -63,7 +64,8 @@ public interface EvaluationOrder { * * @return the index of the last expression to evaluate */ - int last(int len); + int last( + int len); /** * Evaluates the given sub-expressions according to this order. This method @@ -73,9 +75,6 @@ public interface EvaluationOrder { * stack. * * @param the type of {@link AbstractState} - * @param the type of the {@link HeapDomain} - * @param the type of the {@link ValueDomain} - * @param the type of {@link TypeDomain} * @param subExpressions the sub-expressions to evaluate * @param entryState the state to use as starting point for the * evaluation @@ -94,14 +93,42 @@ public interface EvaluationOrder { * * @throws SemanticException if something goes wrong during the evaluation */ - , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState evaluate( - Expression[] subExpressions, - AnalysisState entryState, - InterproceduralAnalysis interprocedural, - StatementStore expressions, - ExpressionSet[] computed) - throws SemanticException; + > AnalysisState evaluate( + Expression[] subExpressions, + AnalysisState entryState, + InterproceduralAnalysis interprocedural, + StatementStore expressions, + ExpressionSet[] computed) + throws SemanticException; + + /** + * Evaluates the given sub-expressions according to this order, but in + * reverse order and using the backward semantics. + * + * @param the type of {@link AbstractState} + * @param subExpressions the sub-expressions to evaluate + * @param entryState the state to use as starting point for the + * evaluation + * @param interprocedural the interprocedural analysis of the program to + * analyze + * @param expressions the cache where analysis states of intermediate + * expressions must be stored (this method is + * responsible for storing the results of the + * sub-expressions) + * @param computed an array containing, for each sub-expression, the + * symbolic expressions produced by its + * evaluation + * + * @return the last computed state, where the source expression can be + * evaluated + * + * @throws SemanticException if something goes wrong during the evaluation + */ + > AnalysisState bwdEvaluate( + Expression[] subExpressions, + AnalysisState entryState, + InterproceduralAnalysis interprocedural, + StatementStore expressions, + ExpressionSet[] computed) + throws SemanticException; } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/evaluation/LeftToRightEvaluation.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/evaluation/LeftToRightEvaluation.java index 0409505f8..3b09403a6 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/evaluation/LeftToRightEvaluation.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/evaluation/LeftToRightEvaluation.java @@ -4,17 +4,9 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; import it.unive.lisa.analysis.lattices.ExpressionSet; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.cfg.statement.Expression; -import it.unive.lisa.symbolic.SymbolicExpression; -import it.unive.lisa.symbolic.value.ValueExpression; -import it.unive.lisa.type.Type; -import java.util.HashSet; -import java.util.Set; /** * A left-to-right {@link EvaluationOrder}, evaluating expressions in the given @@ -33,30 +25,21 @@ private LeftToRightEvaluation() { } @Override - @SuppressWarnings("unchecked") - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState evaluate( - Expression[] subExpressions, - AnalysisState entryState, - InterproceduralAnalysis interprocedural, - StatementStore expressions, - ExpressionSet[] computed) - throws SemanticException { + public > AnalysisState evaluate( + Expression[] subExpressions, + AnalysisState entryState, + InterproceduralAnalysis interprocedural, + StatementStore expressions, + ExpressionSet[] computed) + throws SemanticException { if (subExpressions.length == 0) return entryState; - AnalysisState postState = entryState; + AnalysisState postState = entryState; for (int i = 0; i < computed.length; i++) { - AnalysisState tmp = subExpressions[i].semantics(postState, interprocedural, expressions); + AnalysisState tmp = subExpressions[i].forwardSemantics(postState, interprocedural, expressions); expressions.put(subExpressions[i], tmp); computed[i] = tmp.getComputedExpressions(); - T typedom = (T) tmp.getDomainInstance(TypeDomain.class); - Set types = new HashSet<>(); - for (SymbolicExpression e : tmp.rewrite(computed[i], subExpressions[i])) - types.addAll(typedom.getRuntimeTypesOf((ValueExpression) e, subExpressions[i])); - computed[i].forEach(e -> e.setRuntimeTypes(types)); postState = tmp; } @@ -64,22 +47,50 @@ T extends TypeDomain> AnalysisState evaluate( } @Override - public int previous(int pos, int len) { + public > AnalysisState bwdEvaluate( + Expression[] subExpressions, + AnalysisState entryState, + InterproceduralAnalysis interprocedural, + StatementStore expressions, + ExpressionSet[] computed) + throws SemanticException { + if (subExpressions.length == 0) + return entryState; + + AnalysisState postState = entryState; + for (int i = computed.length - 1; i >= 0; i--) { + AnalysisState tmp = subExpressions[i].backwardSemantics(postState, interprocedural, expressions); + expressions.put(subExpressions[i], tmp); + computed[i] = tmp.getComputedExpressions(); + postState = tmp; + } + + return postState; + } + + @Override + public int previous( + int pos, + int len) { return pos - 1; } @Override - public int next(int pos, int len) { + public int next( + int pos, + int len) { return pos == len - 1 ? -1 : pos + 1; } @Override - public int first(int len) { + public int first( + int len) { return 0; } @Override - public int last(int len) { + public int last( + int len) { return len - 1; } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/evaluation/RightToLeftEvaluation.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/evaluation/RightToLeftEvaluation.java index 120816fb6..f446818d0 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/evaluation/RightToLeftEvaluation.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/evaluation/RightToLeftEvaluation.java @@ -4,17 +4,9 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; import it.unive.lisa.analysis.lattices.ExpressionSet; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.cfg.statement.Expression; -import it.unive.lisa.symbolic.SymbolicExpression; -import it.unive.lisa.symbolic.value.ValueExpression; -import it.unive.lisa.type.Type; -import java.util.HashSet; -import java.util.Set; /** * A right-to-left {@link EvaluationOrder}, evaluating expressions in reversed @@ -33,30 +25,21 @@ private RightToLeftEvaluation() { } @Override - @SuppressWarnings("unchecked") - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState evaluate( - Expression[] subExpressions, - AnalysisState entryState, - InterproceduralAnalysis interprocedural, - StatementStore expressions, - ExpressionSet[] computed) - throws SemanticException { + public > AnalysisState evaluate( + Expression[] subExpressions, + AnalysisState entryState, + InterproceduralAnalysis interprocedural, + StatementStore expressions, + ExpressionSet[] computed) + throws SemanticException { if (subExpressions.length == 0) return entryState; - AnalysisState postState = entryState; + AnalysisState postState = entryState; for (int i = computed.length - 1; i >= 0; i--) { - AnalysisState tmp = subExpressions[i].semantics(postState, interprocedural, expressions); + AnalysisState tmp = subExpressions[i].forwardSemantics(postState, interprocedural, expressions); expressions.put(subExpressions[i], tmp); computed[i] = tmp.getComputedExpressions(); - T typedom = (T) tmp.getDomainInstance(TypeDomain.class); - Set types = new HashSet<>(); - for (SymbolicExpression e : tmp.rewrite(computed[i], subExpressions[i])) - types.addAll(typedom.getRuntimeTypesOf((ValueExpression) e, subExpressions[i])); - computed[i].forEach(e -> e.setRuntimeTypes(types)); postState = tmp; } @@ -64,22 +47,50 @@ T extends TypeDomain> AnalysisState evaluate( } @Override - public int previous(int pos, int len) { + public > AnalysisState bwdEvaluate( + Expression[] subExpressions, + AnalysisState entryState, + InterproceduralAnalysis interprocedural, + StatementStore expressions, + ExpressionSet[] computed) + throws SemanticException { + if (subExpressions.length == 0) + return entryState; + + AnalysisState postState = entryState; + for (int i = 0; i < computed.length; i++) { + AnalysisState tmp = subExpressions[i].backwardSemantics(postState, interprocedural, expressions); + expressions.put(subExpressions[i], tmp); + computed[i] = tmp.getComputedExpressions(); + postState = tmp; + } + + return postState; + } + + @Override + public int previous( + int pos, + int len) { return pos == len - 1 ? -1 : pos + 1; } @Override - public int next(int pos, int len) { + public int next( + int pos, + int len) { return pos - 1; } @Override - public int first(int len) { + public int first( + int len) { return len - 1; } @Override - public int last(int len) { + public int last( + int len) { return 0; } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/literal/Literal.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/literal/Literal.java index 84e2ae230..de34a7a03 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/literal/Literal.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/cfg/statement/literal/Literal.java @@ -4,9 +4,6 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.CodeLocation; @@ -41,7 +38,11 @@ public abstract class Literal extends Expression { * @param value the value of this literal * @param staticType the type of this literal */ - public Literal(CFG cfg, CodeLocation location, E value, Type staticType) { + public Literal( + CFG cfg, + CodeLocation location, + E value, + Type staticType) { super(cfg, location, staticType); this.value = value; } @@ -56,7 +57,8 @@ public E getValue() { } @Override - public int setOffset(int offset) { + public int setOffset( + int offset) { return this.offset = offset; } @@ -69,7 +71,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (!super.equals(obj)) @@ -91,19 +94,18 @@ public String toString() { } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> AnalysisState semantics( - AnalysisState entryState, - InterproceduralAnalysis interprocedural, - StatementStore expressions) - throws SemanticException { + public > AnalysisState forwardSemantics( + AnalysisState entryState, + InterproceduralAnalysis interprocedural, + StatementStore expressions) + throws SemanticException { return entryState.smallStepSemantics(new Constant(getStaticType(), getValue(), getLocation()), this); } @Override - public boolean accept(GraphVisitor visitor, V tool) { + public boolean accept( + GraphVisitor visitor, + V tool) { return visitor.visit(tool, getCFG(), this); } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/language/hierarchytraversal/HierarcyTraversalStrategy.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/language/hierarchytraversal/HierarcyTraversalStrategy.java index 63c2b3d33..d17b7f80c 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/language/hierarchytraversal/HierarcyTraversalStrategy.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/language/hierarchytraversal/HierarcyTraversalStrategy.java @@ -28,5 +28,7 @@ public interface HierarcyTraversalStrategy { * @return an iterable that contains the units in order in which they must * be visited */ - Iterable traverse(Statement st, CompilationUnit start); + Iterable traverse( + Statement st, + CompilationUnit start); } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/language/hierarchytraversal/SingleInheritanceTraversalStrategy.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/language/hierarchytraversal/SingleInheritanceTraversalStrategy.java index 1ccfdaf11..e9f8c5a5d 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/language/hierarchytraversal/SingleInheritanceTraversalStrategy.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/language/hierarchytraversal/SingleInheritanceTraversalStrategy.java @@ -26,7 +26,9 @@ private SingleInheritanceTraversalStrategy() { } @Override - public Iterable traverse(Statement st, CompilationUnit start) { + public Iterable traverse( + Statement st, + CompilationUnit start) { return new Iterable() { @Override @@ -44,7 +46,8 @@ private class SingleInheritanceIterator implements Iterator { private final Set seen; - private SingleInheritanceIterator(CompilationUnit start) { + private SingleInheritanceIterator( + CompilationUnit start) { current = start; remaining = new LinkedList<>(start.getImmediateAncestors()); remaining.addFirst(start); diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/language/parameterassignment/OrderPreservingAssigningStrategy.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/language/parameterassignment/OrderPreservingAssigningStrategy.java index 59257d22d..55c61ee60 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/language/parameterassignment/OrderPreservingAssigningStrategy.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/language/parameterassignment/OrderPreservingAssigningStrategy.java @@ -4,10 +4,7 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; import it.unive.lisa.analysis.lattices.ExpressionSet; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.cfg.Parameter; import it.unive.lisa.program.cfg.statement.call.Call; @@ -31,28 +28,25 @@ private OrderPreservingAssigningStrategy() { } @Override - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> Pair, ExpressionSet[]> prepare( - Call call, - AnalysisState callState, - InterproceduralAnalysis interprocedural, - StatementStore expressions, - Parameter[] formals, - ExpressionSet[] parameters) - throws SemanticException { + public > Pair, ExpressionSet[]> prepare( + Call call, + AnalysisState callState, + InterproceduralAnalysis interprocedural, + StatementStore expressions, + Parameter[] formals, + ExpressionSet[] parameters) + throws SemanticException { // prepare the state for the call: assign the value to each parameter - AnalysisState prepared = callState; + AnalysisState prepared = callState; for (int i = 0; i < formals.length; i++) { - AnalysisState temp = prepared.bottom(); + AnalysisState temp = prepared.bottom(); for (SymbolicExpression exp : parameters[i]) temp = temp.lub(prepared.assign(formals[i].toSymbolicVariable(), exp, call)); prepared = temp; } // we remove expressions from the stack - prepared = new AnalysisState<>(prepared.getState(), new ExpressionSet<>(), prepared.getAliasing()); + prepared = new AnalysisState<>(prepared.getState(), new ExpressionSet(), prepared.getFixpointInformation()); return Pair.of(prepared, parameters); } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/language/parameterassignment/ParameterAssigningStrategy.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/language/parameterassignment/ParameterAssigningStrategy.java index 65629d9e4..c8f3e71bb 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/language/parameterassignment/ParameterAssigningStrategy.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/language/parameterassignment/ParameterAssigningStrategy.java @@ -4,14 +4,10 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; import it.unive.lisa.analysis.lattices.ExpressionSet; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.cfg.Parameter; import it.unive.lisa.program.cfg.statement.call.Call; -import it.unive.lisa.symbolic.SymbolicExpression; import org.apache.commons.lang3.tuple.Pair; /** @@ -38,9 +34,6 @@ public interface ParameterAssigningStrategy { * by-name (Python-like). * * @param the type of {@link AbstractState} - * @param the type of the {@link HeapDomain} - * @param the type of the {@link ValueDomain} - * @param the type of {@link TypeDomain} * @param call the call to be prepared * @param callState the analysis state where the call is to be * executed @@ -59,15 +52,12 @@ public interface ParameterAssigningStrategy { * @throws SemanticException if something goes wrong while preparing the * entry-state */ - , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> Pair, ExpressionSet[]> prepare( - Call call, - AnalysisState callState, - InterproceduralAnalysis interprocedural, - StatementStore expressions, - Parameter[] formals, - ExpressionSet[] actuals) - throws SemanticException; + > Pair, ExpressionSet[]> prepare( + Call call, + AnalysisState callState, + InterproceduralAnalysis interprocedural, + StatementStore expressions, + Parameter[] formals, + ExpressionSet[] actuals) + throws SemanticException; } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/language/parameterassignment/PythonLikeAssigningStrategy.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/language/parameterassignment/PythonLikeAssigningStrategy.java index 09fb2b972..9ab178f33 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/language/parameterassignment/PythonLikeAssigningStrategy.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/language/parameterassignment/PythonLikeAssigningStrategy.java @@ -4,10 +4,7 @@ import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.analysis.StatementStore; -import it.unive.lisa.analysis.heap.HeapDomain; import it.unive.lisa.analysis.lattices.ExpressionSet; -import it.unive.lisa.analysis.value.TypeDomain; -import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.interprocedural.InterproceduralAnalysis; import it.unive.lisa.program.cfg.Parameter; import it.unive.lisa.program.cfg.statement.Expression; @@ -15,7 +12,6 @@ import it.unive.lisa.program.cfg.statement.call.NamedParameterExpression; import it.unive.lisa.program.language.resolution.PythonLikeMatchingStrategy; import it.unive.lisa.symbolic.SymbolicExpression; -import it.unive.lisa.symbolic.value.ValueExpression; import it.unive.lisa.type.Type; import java.util.HashSet; import java.util.Set; @@ -65,38 +61,35 @@ private PythonLikeAssigningStrategy() { @Override @SuppressWarnings("unchecked") - public , - H extends HeapDomain, - V extends ValueDomain, - T extends TypeDomain> Pair, ExpressionSet[]> prepare( - Call call, - AnalysisState callState, - InterproceduralAnalysis interprocedural, - StatementStore expressions, - Parameter[] formals, - ExpressionSet[] parameters) - throws SemanticException { + public > Pair, ExpressionSet[]> prepare( + Call call, + AnalysisState callState, + InterproceduralAnalysis interprocedural, + StatementStore expressions, + Parameter[] formals, + ExpressionSet[] parameters) + throws SemanticException { - ExpressionSet[] slots = new ExpressionSet[formals.length]; + ExpressionSet[] slots = new ExpressionSet[formals.length]; Set[] slotsTypes = new Set[formals.length]; Expression[] actuals = call.getParameters(); - ExpressionSet[] defaults = new ExpressionSet[formals.length]; + ExpressionSet[] defaults = new ExpressionSet[formals.length]; Set[] defaultTypes = new Set[formals.length]; for (int pos = 0; pos < slots.length; pos++) { Expression def = formals[pos].getDefaultValue(); if (def != null) { - callState = def.semantics(callState, interprocedural, expressions); + callState = def.forwardSemantics(callState, interprocedural, expressions); expressions.put(def, callState); defaults[pos] = callState.getComputedExpressions(); - T typedom = (T) callState.getDomainInstance(TypeDomain.class); - defaultTypes[pos] = new HashSet<>(); - for (SymbolicExpression e : callState.rewrite(defaults[pos], call)) - defaultTypes[pos].addAll(typedom.getRuntimeTypesOf((ValueExpression) e, call)); + Set types = new HashSet<>(); + for (SymbolicExpression e : defaults[pos]) + defaultTypes[pos].addAll(callState.getState().getRuntimeTypesOf(e, call, callState.getState())); + defaultTypes[pos] = types; } } - AnalysisState logic = PythonLikeMatchingStrategy.pythonLogic( + AnalysisState logic = PythonLikeMatchingStrategy.pythonLogic( formals, actuals, parameters, @@ -110,16 +103,16 @@ T extends TypeDomain> Pair, ExpressionSet prepared = callState; + AnalysisState prepared = callState; for (int i = 0; i < formals.length; i++) { - AnalysisState temp = prepared.bottom(); + AnalysisState temp = prepared.bottom(); for (SymbolicExpression exp : slots[i]) temp = temp.lub(prepared.assign(formals[i].toSymbolicVariable(), exp, call)); prepared = temp; } // we remove expressions from the stack - prepared = new AnalysisState<>(prepared.getState(), new ExpressionSet<>(), prepared.getAliasing()); + prepared = new AnalysisState<>(prepared.getState(), new ExpressionSet(), prepared.getFixpointInformation()); return Pair.of(prepared, slots); } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/language/resolution/FixedOrderMatchingStrategy.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/language/resolution/FixedOrderMatchingStrategy.java index ef9c1f45f..fa923fcbf 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/language/resolution/FixedOrderMatchingStrategy.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/language/resolution/FixedOrderMatchingStrategy.java @@ -15,7 +15,11 @@ public abstract class FixedOrderMatchingStrategy implements ParameterMatchingStrategy { @Override - public final boolean matches(Call call, Parameter[] formals, Expression[] actuals, Set[] types) { + public final boolean matches( + Call call, + Parameter[] formals, + Expression[] actuals, + Set[] types) { if (formals.length != actuals.length) return false; @@ -39,5 +43,10 @@ public final boolean matches(Call call, Parameter[] formals, Expression[] actual * * @return {@code true} if and only if that condition holds */ - public abstract boolean matches(Call call, int pos, Parameter formal, Expression actual, Set types); + public abstract boolean matches( + Call call, + int pos, + Parameter formal, + Expression actual, + Set types); } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/language/resolution/JavaLikeMatchingStrategy.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/language/resolution/JavaLikeMatchingStrategy.java index 469d89aeb..ae0ab95fb 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/language/resolution/JavaLikeMatchingStrategy.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/language/resolution/JavaLikeMatchingStrategy.java @@ -27,7 +27,12 @@ private JavaLikeMatchingStrategy() { } @Override - public boolean matches(Call call, int pos, Parameter formal, Expression actual, Set types) { + public boolean matches( + Call call, + int pos, + Parameter formal, + Expression actual, + Set types) { if (call.getCallType() == CallType.INSTANCE && pos == 0) return RuntimeTypesMatchingStrategy.INSTANCE.matches(call, pos, formal, actual, types); return StaticTypesMatchingStrategy.INSTANCE.matches(call, pos, formal, actual, types); diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/language/resolution/ParameterMatchingStrategy.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/language/resolution/ParameterMatchingStrategy.java index 861e907bd..4195f39c1 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/language/resolution/ParameterMatchingStrategy.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/language/resolution/ParameterMatchingStrategy.java @@ -31,5 +31,9 @@ public interface ParameterMatchingStrategy { * * @return {@code true} if and only if that condition holds */ - boolean matches(Call call, Parameter[] formals, Expression[] actuals, Set[] types); + boolean matches( + Call call, + Parameter[] formals, + Expression[] actuals, + Set[] types); } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/language/resolution/PythonLikeMatchingStrategy.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/language/resolution/PythonLikeMatchingStrategy.java index 705318069..2658e0ceb 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/language/resolution/PythonLikeMatchingStrategy.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/language/resolution/PythonLikeMatchingStrategy.java @@ -53,13 +53,18 @@ public class PythonLikeMatchingStrategy implements ParameterMatchingStrategy { * @param delegate the strategy to delegate the match after the actual * parameters have been shuffled */ - public PythonLikeMatchingStrategy(FixedOrderMatchingStrategy delegate) { + public PythonLikeMatchingStrategy( + FixedOrderMatchingStrategy delegate) { this.delegate = delegate; } @Override @SuppressWarnings("unchecked") - public boolean matches(Call call, Parameter[] formals, Expression[] actuals, Set[] types) { + public boolean matches( + Call call, + Parameter[] formals, + Expression[] actuals, + Set[] types) { Expression[] slots = new Expression[formals.length]; Set[] slotTypes = new Set[formals.length]; diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/language/resolution/RuntimeTypesMatchingStrategy.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/language/resolution/RuntimeTypesMatchingStrategy.java index 40a717fee..f256dc2fd 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/language/resolution/RuntimeTypesMatchingStrategy.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/language/resolution/RuntimeTypesMatchingStrategy.java @@ -27,7 +27,12 @@ private RuntimeTypesMatchingStrategy() { } @Override - public boolean matches(Call call, int pos, Parameter formal, Expression actual, Set types) { + public boolean matches( + Call call, + int pos, + Parameter formal, + Expression actual, + Set types) { return types.stream().anyMatch(rt -> rt.canBeAssignedTo(formal.getStaticType())); } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/language/resolution/StaticTypesMatchingStrategy.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/language/resolution/StaticTypesMatchingStrategy.java index 5764d2555..9b7c02c3c 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/language/resolution/StaticTypesMatchingStrategy.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/language/resolution/StaticTypesMatchingStrategy.java @@ -25,7 +25,12 @@ private StaticTypesMatchingStrategy() { } @Override - public boolean matches(Call call, int pos, Parameter formal, Expression actual, Set types) { + public boolean matches( + Call call, + int pos, + Parameter formal, + Expression actual, + Set types) { return actual.getStaticType().canBeAssignedTo(formal.getStaticType()); } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/language/validation/BaseValidationLogic.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/language/validation/BaseValidationLogic.java index b8914b676..15a42bc3b 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/language/validation/BaseValidationLogic.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/language/validation/BaseValidationLogic.java @@ -147,7 +147,9 @@ public class BaseValidationLogic implements ProgramValidationLogic { * all entrypoints ({@link Program#getEntryPoints()}) are defined. */ @Override - public void validateAndFinalize(Program program) throws ProgramValidationException { + public void validateAndFinalize( + Program program) + throws ProgramValidationException { validateAndFinalize((Unit) program); // all entrypoints should be within the set of cfgs @@ -174,7 +176,9 @@ public void validateAndFinalize(Program program) throws ProgramValidationExcepti * * @throws ProgramValidationException if the unit has an invalid structure */ - public void validateAndFinalize(Unit unit) throws ProgramValidationException { + public void validateAndFinalize( + Unit unit) + throws ProgramValidationException { for (CodeMember member : unit.getCodeMembers()) validate(member, false); @@ -203,7 +207,10 @@ else if (unit instanceof InterfaceUnit) * * @throws ProgramValidationException if the global has an invalid structure */ - public void validate(Global global, boolean isInstance) throws ProgramValidationException { + public void validate( + Global global, + boolean isInstance) + throws ProgramValidationException { if (isInstance != global.isInstance()) throw new ProgramValidationException(format(GLOBAL_INSTANCE_MISMATCH, global, global.isInstance(), isInstance ? "instance" : "non-instance")); @@ -221,7 +228,9 @@ public void validate(Global global, boolean isInstance) throws ProgramValidation * * @throws ProgramValidationException if the unit has an invalid structure */ - public void validateAndFinalize(CodeUnit unit) throws ProgramValidationException { + public void validateAndFinalize( + CodeUnit unit) + throws ProgramValidationException { // nothing to do } @@ -234,7 +243,9 @@ public void validateAndFinalize(CodeUnit unit) throws ProgramValidationException * * @throws ProgramValidationException if the unit has an invalid structure */ - public void validateAndFinalize(ClassUnit unit) throws ProgramValidationException { + public void validateAndFinalize( + ClassUnit unit) + throws ProgramValidationException { if (processedUnits.contains(unit.getName())) return; @@ -254,7 +265,9 @@ public void validateAndFinalize(ClassUnit unit) throws ProgramValidationExceptio * * @throws ProgramValidationException if the unit has an invalid structure */ - public void validateAndFinalize(AbstractClassUnit unit) throws ProgramValidationException { + public void validateAndFinalize( + AbstractClassUnit unit) + throws ProgramValidationException { if (processedUnits.contains(unit.getName())) return; @@ -273,7 +286,9 @@ public void validateAndFinalize(AbstractClassUnit unit) throws ProgramValidation * * @throws ProgramValidationException if the unit has an invalid structure */ - public void validateAndFinalize(InterfaceUnit unit) throws ProgramValidationException { + public void validateAndFinalize( + InterfaceUnit unit) + throws ProgramValidationException { if (processedUnits.contains(unit.getName())) return; @@ -300,7 +315,9 @@ public void validateAndFinalize(InterfaceUnit unit) throws ProgramValidationExce * * @throws ProgramValidationException if the unit has an invalid structure */ - public void validateAndFinalize(CompilationUnit unit) throws ProgramValidationException { + public void validateAndFinalize( + CompilationUnit unit) + throws ProgramValidationException { if (processedUnits.contains(unit.getName())) return; @@ -389,7 +406,10 @@ public void validateAndFinalize(CompilationUnit unit) throws ProgramValidationEx * * @throws ProgramValidationException if the member has an invalid structure */ - public void validate(CodeMember member, boolean instance) throws ProgramValidationException { + public void validate( + CodeMember member, + boolean instance) + throws ProgramValidationException { if (!instance && member instanceof AbstractCodeMember) throw new ProgramValidationException(format(ABSTRACT_NON_INSTANCE, member)); Unit container = member.getDescriptor().getUnit(); diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/language/validation/ProgramValidationLogic.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/language/validation/ProgramValidationLogic.java index 35dc4b581..bf407de1c 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/language/validation/ProgramValidationLogic.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/program/language/validation/ProgramValidationLogic.java @@ -28,5 +28,7 @@ public interface ProgramValidationLogic { * @throws ProgramValidationException if the program has an invalid * structure */ - void validateAndFinalize(Program program) throws ProgramValidationException; + void validateAndFinalize( + Program program) + throws ProgramValidationException; } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/ExpressionVisitor.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/ExpressionVisitor.java index a3fc8b0b2..375294350 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/ExpressionVisitor.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/ExpressionVisitor.java @@ -9,6 +9,7 @@ import it.unive.lisa.symbolic.value.Constant; import it.unive.lisa.symbolic.value.Identifier; import it.unive.lisa.symbolic.value.PushAny; +import it.unive.lisa.symbolic.value.PushInv; import it.unive.lisa.symbolic.value.Skip; import it.unive.lisa.symbolic.value.TernaryExpression; import it.unive.lisa.symbolic.value.UnaryExpression; @@ -43,7 +44,12 @@ public interface ExpressionVisitor { * * @throws SemanticException if an error occurs during the visit operation */ - T visit(AccessChild expression, T receiver, T child, Object... params) throws SemanticException; + T visit( + AccessChild expression, + T receiver, + T child, + Object... params) + throws SemanticException; /** * Visits a {@link MemoryAllocation}. @@ -57,7 +63,10 @@ public interface ExpressionVisitor { * * @throws SemanticException if an error occurs during the visit operation */ - T visit(MemoryAllocation expression, Object... params) throws SemanticException; + T visit( + MemoryAllocation expression, + Object... params) + throws SemanticException; /** * Visits a {@link HeapReference}. @@ -73,7 +82,11 @@ public interface ExpressionVisitor { * * @throws SemanticException if an error occurs during the visit operation */ - T visit(HeapReference expression, T arg, Object... params) throws SemanticException; + T visit( + HeapReference expression, + T arg, + Object... params) + throws SemanticException; /** * Visits a {@link HeapDereference}. @@ -89,7 +102,11 @@ public interface ExpressionVisitor { * * @throws SemanticException if an error occurs during the visit operation */ - T visit(HeapDereference expression, T arg, Object... params) throws SemanticException; + T visit( + HeapDereference expression, + T arg, + Object... params) + throws SemanticException; /** * Visits a {@link UnaryExpression}. This callback is invoked after the @@ -107,7 +124,11 @@ public interface ExpressionVisitor { * * @throws SemanticException if an error occurs during the visit operation */ - T visit(UnaryExpression expression, T arg, Object... params) throws SemanticException; + T visit( + UnaryExpression expression, + T arg, + Object... params) + throws SemanticException; /** * Visits a {@link BinaryExpression}. This callback is invoked after the @@ -127,7 +148,12 @@ public interface ExpressionVisitor { * * @throws SemanticException if an error occurs during the visit operation */ - T visit(BinaryExpression expression, T left, T right, Object... params) throws SemanticException; + T visit( + BinaryExpression expression, + T left, + T right, + Object... params) + throws SemanticException; /** * Visits a {@link TernaryExpression}. This callback is invoked after the @@ -149,7 +175,13 @@ public interface ExpressionVisitor { * * @throws SemanticException if an error occurs during the visit operation */ - T visit(TernaryExpression expression, T left, T middle, T right, Object... params) throws SemanticException; + T visit( + TernaryExpression expression, + T left, + T middle, + T right, + Object... params) + throws SemanticException; /** * Visits a {@link Skip}. @@ -163,7 +195,10 @@ public interface ExpressionVisitor { * * @throws SemanticException if an error occurs during the visit operation */ - T visit(Skip expression, Object... params) throws SemanticException; + T visit( + Skip expression, + Object... params) + throws SemanticException; /** * Visits a {@link PushAny}. @@ -177,7 +212,27 @@ public interface ExpressionVisitor { * * @throws SemanticException if an error occurs during the visit operation */ - T visit(PushAny expression, Object... params) throws SemanticException; + T visit( + PushAny expression, + Object... params) + throws SemanticException; + + /** + * Visits a {@link PushInv}. + * + * @param expression the pushinv + * @param params the additional parameters provided to + * {@link SymbolicExpression#accept(ExpressionVisitor, Object...)}, + * if any + * + * @return the value produced by visiting the pushinv + * + * @throws SemanticException if an error occurs during the visit operation + */ + T visit( + PushInv expression, + Object... params) + throws SemanticException; /** * Visits a {@link Constant}. @@ -191,7 +246,10 @@ public interface ExpressionVisitor { * * @throws SemanticException if an error occurs during the visit operation */ - T visit(Constant expression, Object... params) throws SemanticException; + T visit( + Constant expression, + Object... params) + throws SemanticException; /** * Visits an {@link Identifier}. @@ -205,5 +263,8 @@ public interface ExpressionVisitor { * * @throws SemanticException if an error occurs during the visit operation */ - T visit(Identifier expression, Object... params) throws SemanticException; + T visit( + Identifier expression, + Object... params) + throws SemanticException; } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/SymbolicExpression.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/SymbolicExpression.java index 940a113b8..fe4f1724d 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/SymbolicExpression.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/SymbolicExpression.java @@ -1,23 +1,24 @@ package it.unive.lisa.symbolic; import it.unive.lisa.analysis.ScopeToken; +import it.unive.lisa.analysis.ScopedObject; import it.unive.lisa.analysis.SemanticDomain; import it.unive.lisa.analysis.SemanticException; import it.unive.lisa.program.cfg.CodeLocation; +import it.unive.lisa.symbolic.value.HeapLocation; import it.unive.lisa.symbolic.value.Identifier; import it.unive.lisa.symbolic.value.OutOfScopeIdentifier; +import it.unive.lisa.symbolic.value.ValueExpression; import it.unive.lisa.symbolic.value.Variable; import it.unive.lisa.type.Type; -import it.unive.lisa.type.TypeSystem; import java.util.Objects; -import java.util.Set; /** * A symbolic expression that can be evaluated by {@link SemanticDomain}s. * * @author Luca Negrini */ -public abstract class SymbolicExpression { +public abstract class SymbolicExpression implements ScopedObject { /** * The code location of the statement that has generated this symbolic @@ -31,19 +32,17 @@ public abstract class SymbolicExpression { */ private final Type staticType; - /** - * The runtime types of this expression - */ - private Set types; - /** * Builds the symbolic expression. * - * @param staticType the static type of this expression + * @param staticType the static type of this expression, determined at its + * construction * @param location the code location of the statement that has generated * this expression */ - protected SymbolicExpression(Type staticType, CodeLocation location) { + protected SymbolicExpression( + Type staticType, + CodeLocation location) { Objects.requireNonNull(staticType, "The static type of a symbolic expression cannot be null"); Objects.requireNonNull(location, "The location of a symbolic expression cannot be null"); this.staticType = staticType; @@ -51,7 +50,10 @@ protected SymbolicExpression(Type staticType, CodeLocation location) { } /** - * Yields the static type of this expression. + * Yields the static type of this expression, as provided during + * construction. The returned type should (but might not) be a supertype of + * all the runtime types determined during the analysis, with the exception + * of {@link HeapLocation}s representing more memory locations. * * @return the static type */ @@ -59,60 +61,6 @@ public Type getStaticType() { return staticType; } - /** - * Yields the runtime types of this expression. If - * {@link #setRuntimeTypes(Set)} has never been called before, this method - * will return all instances of the static type. - * - * @param types the type system that knows about the types of the program - * point where this method is called. If - * {@link #hasRuntimeTypes()} returns {@code true}, this - * parameter can be {@code null} - * - * @return the runtime types - */ - public final Set getRuntimeTypes(TypeSystem types) { - if (this.types != null) - return this.types; - if (types == null) - throw new IllegalArgumentException("Cannot use a null type system if no runtime types are available"); - return staticType.allInstances(types); - } - - /** - * Sets the runtime types to the given set of types. - * - * @param types the runtime types - */ - public void setRuntimeTypes(Set types) { - this.types = types; - } - - /** - * Yields {@code true} if this expression's runtime types have been set - * (even to the empty set). If this method returns {@code false}, then - * {@link #getDynamicType()} will yield the same as - * {@link #getStaticType()}, and {@link #getRuntimeTypes(TypeSystem)} - * returns all possible instances of the static type. - * - * @return whether or not runtime types are set for this expression - */ - public boolean hasRuntimeTypes() { - return types != null; - } - - /** - * Yields the dynamic type of this expression, that is, the most specific - * common supertype of all its runtime types (available through - * {@link #getRuntimeTypes(TypeSystem)}. If {@link #setRuntimeTypes(Set)} - * has never been called before, this method will return the static type. - * - * @return the dynamic type of this expression - */ - public final Type getDynamicType() { - return Type.commonSupertype(types, staticType); - } - /** * Pushes a new scope, identified by the give token, in the expression. This * causes all {@link Identifier}s where {@link Identifier#canBeScoped()} @@ -126,7 +74,10 @@ public final Type getDynamicType() { * * @throws SemanticException if an error occurs during the computation */ - public abstract SymbolicExpression pushScope(ScopeToken token) throws SemanticException; + @Override + public abstract SymbolicExpression pushScope( + ScopeToken token) + throws SemanticException; /** * Pops the scope identified by the given token from the expression. This @@ -144,7 +95,10 @@ public final Type getDynamicType() { * * @throws SemanticException if an error occurs during the computation */ - public abstract SymbolicExpression popScope(ScopeToken token) throws SemanticException; + @Override + public abstract SymbolicExpression popScope( + ScopeToken token) + throws SemanticException; /** * Accepts an {@link ExpressionVisitor}, visiting this expression @@ -159,7 +113,10 @@ public final Type getDynamicType() { * * @throws SemanticException if an error occurs during the visiting */ - public abstract T accept(ExpressionVisitor visitor, Object... params) throws SemanticException; + public abstract T accept( + ExpressionVisitor visitor, + Object... params) + throws SemanticException; @Override public int hashCode() { @@ -170,7 +127,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -200,4 +158,15 @@ public CodeLocation getCodeLocation() { @Override public abstract String toString(); + + /** + * Yields whether or not this expression can be considered safe to be + * processed by domains that only focus on {@link ValueExpression}s, or if + * it might need rewriting. This is a definite answer: if this method + * returns {@code true}, than this expression is sure to not contain + * anything that deals with, or points to, the memory. + * + * @return whether or not this expression might need rewriting + */ + public abstract boolean mightNeedRewriting(); } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/heap/AccessChild.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/heap/AccessChild.java index 465adb0ca..d48604ed3 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/heap/AccessChild.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/heap/AccessChild.java @@ -33,7 +33,10 @@ public class AccessChild extends HeapExpression { * @param location the code location of the statement that has generated * this expression */ - public AccessChild(Type staticType, SymbolicExpression container, SymbolicExpression child, + public AccessChild( + Type staticType, + SymbolicExpression container, + SymbolicExpression child, CodeLocation location) { super(staticType, location); this.container = container; @@ -68,7 +71,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (!super.equals(obj)) @@ -95,7 +99,10 @@ public String toString() { } @Override - public T accept(ExpressionVisitor visitor, Object... params) throws SemanticException { + public T accept( + ExpressionVisitor visitor, + Object... params) + throws SemanticException { T cont = container.accept(visitor, params); T ch = child.accept(visitor, params); return visitor.visit(this, cont, ch, params); diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/heap/HeapDereference.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/heap/HeapDereference.java index ba13739ed..609efca58 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/heap/HeapDereference.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/heap/HeapDereference.java @@ -26,7 +26,10 @@ public class HeapDereference extends HeapExpression { * @param location the code location of the statement that has generated * this expression */ - public HeapDereference(Type staticType, SymbolicExpression toDeref, CodeLocation location) { + public HeapDereference( + Type staticType, + SymbolicExpression toDeref, + CodeLocation location) { super(staticType, location); this.toDeref = toDeref; } @@ -40,7 +43,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (!super.equals(obj)) @@ -57,7 +61,10 @@ public boolean equals(Object obj) { } @Override - public T accept(ExpressionVisitor visitor, Object... params) throws SemanticException { + public T accept( + ExpressionVisitor visitor, + Object... params) + throws SemanticException { T deref = toDeref.accept(visitor, params); return visitor.visit(this, deref, params); } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/heap/HeapExpression.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/heap/HeapExpression.java index e6ed00d95..377b99c97 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/heap/HeapExpression.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/heap/HeapExpression.java @@ -25,19 +25,29 @@ public abstract class HeapExpression extends SymbolicExpression { * @param location the code location of the statement that has generated * this heap expression */ - protected HeapExpression(Type type, CodeLocation location) { + protected HeapExpression( + Type type, + CodeLocation location) { super(type, location); } - // By default a heap expression does not change the scope. @Override - public SymbolicExpression pushScope(ScopeToken token) { + public SymbolicExpression pushScope( + ScopeToken token) { + // By default a heap expression does not change the scope. return this; } - // By default a heap expression does not change the scope. @Override - public SymbolicExpression popScope(ScopeToken token) throws SemanticException { + public SymbolicExpression popScope( + ScopeToken token) + throws SemanticException { + // By default a heap expression does not change the scope. return this; } + + @Override + public final boolean mightNeedRewriting() { + return true; + } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/heap/HeapReference.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/heap/HeapReference.java index ad9deb1ea..1a11a3469 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/heap/HeapReference.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/heap/HeapReference.java @@ -26,7 +26,10 @@ public class HeapReference extends HeapExpression { * @param location the code location of the statement that has generated * this expression */ - public HeapReference(Type staticType, SymbolicExpression expression, CodeLocation location) { + public HeapReference( + Type staticType, + SymbolicExpression expression, + CodeLocation location) { super(staticType, location); this.expression = expression; } @@ -54,7 +57,8 @@ public SymbolicExpression getExpression() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (!super.equals(obj)) @@ -71,7 +75,10 @@ public boolean equals(Object obj) { } @Override - public T accept(ExpressionVisitor visitor, Object... params) throws SemanticException { + public T accept( + ExpressionVisitor visitor, + Object... params) + throws SemanticException { T l = expression.accept(visitor, params); return visitor.visit(this, l, params); } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/heap/MemoryAllocation.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/heap/MemoryAllocation.java index e44760c0e..a0b7a10ea 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/heap/MemoryAllocation.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/heap/MemoryAllocation.java @@ -1,6 +1,7 @@ package it.unive.lisa.symbolic.heap; import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.program.annotations.Annotations; import it.unive.lisa.program.cfg.CodeLocation; import it.unive.lisa.symbolic.ExpressionVisitor; import it.unive.lisa.type.Type; @@ -18,6 +19,11 @@ public class MemoryAllocation extends HeapExpression { */ private final boolean isStackAllocation; + /** + * Annotations of this memory allocation. + */ + private final Annotations anns; + /** * Builds the heap allocation. * @@ -25,10 +31,27 @@ public class MemoryAllocation extends HeapExpression { * @param location the code location of the statement that has generated * this expression */ - public MemoryAllocation(Type staticType, CodeLocation location) { + public MemoryAllocation( + Type staticType, + CodeLocation location) { this(staticType, location, false); } + /** + * Builds the heap allocation. + * + * @param staticType the static type of this expression + * @param location the code location of the statement that has generated + * this expression + * @param anns the annotations of this memory allocation + */ + public MemoryAllocation( + Type staticType, + CodeLocation location, + Annotations anns) { + this(staticType, location, anns, false); + } + /** * Builds the heap allocation. * @@ -37,16 +60,37 @@ public MemoryAllocation(Type staticType, CodeLocation location) { * generated this expression * @param isStackAllocation if this allocation is allocated in the stack */ - public MemoryAllocation(Type staticType, CodeLocation location, boolean isStackAllocation) { + public MemoryAllocation( + Type staticType, + CodeLocation location, + boolean isStackAllocation) { + this(staticType, location, new Annotations(), isStackAllocation); + } + + /** + * Builds the heap allocation. + * + * @param staticType the static type of this expression + * @param location the code location of the statement that has + * generated this expression + * @param anns the annotations of this memory allocation + * @param isStackAllocation if this allocation is allocated in the stack + */ + public MemoryAllocation( + Type staticType, + CodeLocation location, + Annotations anns, + boolean isStackAllocation) { super(staticType, location); this.isStackAllocation = isStackAllocation; + this.anns = anns; } @Override public int hashCode() { final int prime = 31; int result = super.hashCode(); - result = prime * result + Objects.hash(isStackAllocation); + result = prime * result + Objects.hash(anns, isStackAllocation); return result; } @@ -59,8 +103,18 @@ public boolean isStackAllocation() { return isStackAllocation; } + /** + * Yields the annotations of this expression. + * + * @return the annotations of this expression + */ + public Annotations getAnnotations() { + return anns; + } + @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (!super.equals(obj)) @@ -68,7 +122,7 @@ public boolean equals(Object obj) { if (getClass() != obj.getClass()) return false; MemoryAllocation other = (MemoryAllocation) obj; - return isStackAllocation == other.isStackAllocation; + return Objects.equals(anns, other.anns) && isStackAllocation == other.isStackAllocation; } @Override @@ -77,7 +131,10 @@ public String toString() { } @Override - public T accept(ExpressionVisitor visitor, Object... params) throws SemanticException { + public T accept( + ExpressionVisitor visitor, + Object... params) + throws SemanticException { return visitor.visit(this, params); } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/BinaryExpression.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/BinaryExpression.java index dfbc22531..5b6c7adff 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/BinaryExpression.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/BinaryExpression.java @@ -41,8 +41,12 @@ public class BinaryExpression extends ValueExpression { * @param location the code location of the statement that has generated * this expression */ - public BinaryExpression(Type staticType, SymbolicExpression left, SymbolicExpression right, - BinaryOperator operator, CodeLocation location) { + public BinaryExpression( + Type staticType, + SymbolicExpression left, + SymbolicExpression right, + BinaryOperator operator, + CodeLocation location) { super(staticType, location); this.left = left; this.right = right; @@ -78,20 +82,20 @@ public BinaryOperator getOperator() { } @Override - public SymbolicExpression pushScope(ScopeToken token) throws SemanticException { + public SymbolicExpression pushScope( + ScopeToken token) + throws SemanticException { BinaryExpression expr = new BinaryExpression(getStaticType(), left.pushScope(token), right.pushScope(token), operator, getCodeLocation()); - if (hasRuntimeTypes()) - expr.setRuntimeTypes(getRuntimeTypes(null)); return expr; } @Override - public SymbolicExpression popScope(ScopeToken token) throws SemanticException { + public SymbolicExpression popScope( + ScopeToken token) + throws SemanticException { BinaryExpression expr = new BinaryExpression(getStaticType(), left.popScope(token), right.popScope(token), operator, getCodeLocation()); - if (hasRuntimeTypes()) - expr.setRuntimeTypes(getRuntimeTypes(null)); return expr; } @@ -106,7 +110,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (!super.equals(obj)) @@ -135,9 +140,17 @@ public String toString() { } @Override - public T accept(ExpressionVisitor visitor, Object... params) throws SemanticException { + public T accept( + ExpressionVisitor visitor, + Object... params) + throws SemanticException { T left = this.left.accept(visitor, params); T right = this.right.accept(visitor, params); return visitor.visit(this, left, right, params); } + + @Override + public boolean mightNeedRewriting() { + return left.mightNeedRewriting() || right.mightNeedRewriting(); + } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/Constant.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/Constant.java index 25bd8bc3a..0e8f19745 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/Constant.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/Constant.java @@ -27,7 +27,10 @@ public class Constant extends ValueExpression { * @param location the code location of the statement that has generated * this constant */ - public Constant(Type type, Object value, CodeLocation location) { + public Constant( + Type type, + Object value, + CodeLocation location) { super(type, location); this.value = value; } @@ -50,7 +53,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (!super.equals(obj)) @@ -67,12 +71,15 @@ public boolean equals(Object obj) { } @Override - public SymbolicExpression pushScope(ScopeToken token) { + public SymbolicExpression pushScope( + ScopeToken token) { return this; } @Override - public SymbolicExpression popScope(ScopeToken token) throws SemanticException { + public SymbolicExpression popScope( + ScopeToken token) + throws SemanticException { return this; } @@ -82,7 +89,16 @@ public String toString() { } @Override - public T accept(ExpressionVisitor visitor, Object... params) throws SemanticException { + public T accept( + ExpressionVisitor visitor, + Object... params) + throws SemanticException { return visitor.visit(this, params); } + + @Override + public boolean mightNeedRewriting() { + Type t = getStaticType(); + return !t.isValueType() || t.isUntyped(); + } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/HeapLocation.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/HeapLocation.java index 13163bcbf..11a710e92 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/HeapLocation.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/HeapLocation.java @@ -26,7 +26,11 @@ public class HeapLocation extends Identifier { * @param location the code location of the statement that has generated * this expression */ - public HeapLocation(Type staticType, String name, boolean weak, CodeLocation location) { + public HeapLocation( + Type staticType, + String name, + boolean weak, + CodeLocation location) { super(staticType, name, weak, new Annotations(), location); } @@ -44,7 +48,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (!super.equals(obj)) @@ -58,7 +63,9 @@ public boolean equals(Object obj) { } @Override - public Identifier lub(Identifier other) throws SemanticException { + public Identifier lub( + Identifier other) + throws SemanticException { if (!getName().equals(other.getName())) throw new SemanticException("Cannot perform the least upper bound between different identifiers: '" + this + "' and '" + other + "'"); @@ -71,17 +78,23 @@ public boolean canBeScoped() { } @Override - public SymbolicExpression pushScope(ScopeToken token) { + public SymbolicExpression pushScope( + ScopeToken token) { return this; } @Override - public SymbolicExpression popScope(ScopeToken token) throws SemanticException { + public SymbolicExpression popScope( + ScopeToken token) + throws SemanticException { return this; } @Override - public T accept(ExpressionVisitor visitor, Object... params) throws SemanticException { + public T accept( + ExpressionVisitor visitor, + Object... params) + throws SemanticException { return visitor.visit(this, params); } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/Identifier.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/Identifier.java index 44866c1a0..b7ea8ecd3 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/Identifier.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/Identifier.java @@ -40,7 +40,11 @@ public abstract class Identifier extends ValueExpression { * @param location the code location of the statement that has generated * this identifier */ - protected Identifier(Type staticType, String name, boolean weak, Annotations annotations, + protected Identifier( + Type staticType, + String name, + boolean weak, + Annotations annotations, CodeLocation location) { super(staticType, location); this.name = name; @@ -105,7 +109,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -137,7 +142,8 @@ public Annotations getAnnotations() { * * @param ann the annotation to be added */ - public void addAnnotation(Annotation ann) { + public void addAnnotation( + Annotation ann) { annotations.addAnnotation(ann); } @@ -150,10 +156,18 @@ public void addAnnotation(Annotation ann) { * * @throws SemanticException if this and other are not equal. */ - public Identifier lub(Identifier other) throws SemanticException { + public Identifier lub( + Identifier other) + throws SemanticException { if (!equals(other)) throw new SemanticException("Cannot perform the least upper bound between different identifiers: '" + this + "' and '" + other + "'"); return this; } + + @Override + public boolean mightNeedRewriting() { + Type t = getStaticType(); + return !t.isValueType() || t.isUntyped(); + } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/MemoryPointer.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/MemoryPointer.java index 2bd86e257..b10aaf3bc 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/MemoryPointer.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/MemoryPointer.java @@ -28,7 +28,10 @@ public class MemoryPointer extends Identifier { * @param location the code location of the statement that has generated * this expression */ - public MemoryPointer(Type staticType, HeapLocation loc, CodeLocation location) { + public MemoryPointer( + Type staticType, + HeapLocation loc, + CodeLocation location) { this(staticType, loc, new Annotations(), location); } @@ -41,7 +44,11 @@ public MemoryPointer(Type staticType, HeapLocation loc, CodeLocation location) { * @param location the code location of the statement that has generated * this expression */ - public MemoryPointer(Type staticType, HeapLocation loc, Annotations annotations, CodeLocation location) { + public MemoryPointer( + Type staticType, + HeapLocation loc, + Annotations annotations, + CodeLocation location) { // A pointer identifier is always a strong identifier super(staticType, loc.getName(), false, annotations, location); this.loc = loc; @@ -53,12 +60,15 @@ public boolean canBeScoped() { } @Override - public SymbolicExpression pushScope(ScopeToken token) { + public SymbolicExpression pushScope( + ScopeToken token) { return new OutOfScopeIdentifier(this, token, getCodeLocation()); } @Override - public SymbolicExpression popScope(ScopeToken token) throws SemanticException { + public SymbolicExpression popScope( + ScopeToken token) + throws SemanticException { return null; } @@ -72,7 +82,10 @@ public HeapLocation getReferencedLocation() { } @Override - public T accept(ExpressionVisitor visitor, Object... params) throws SemanticException { + public T accept( + ExpressionVisitor visitor, + Object... params) + throws SemanticException { return visitor.visit(this, params); } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/NullConstant.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/NullConstant.java index abca7f230..3771bb97f 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/NullConstant.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/NullConstant.java @@ -18,7 +18,8 @@ public class NullConstant extends Constant { * @param location the location where the expression is defined within the * program */ - public NullConstant(CodeLocation location) { + public NullConstant( + CodeLocation location) { super(NullType.INSTANCE, NULL_CONST, location); } @@ -28,7 +29,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (!super.equals(obj)) diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/OutOfScopeIdentifier.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/OutOfScopeIdentifier.java index a9f6a8c86..0a9a459e3 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/OutOfScopeIdentifier.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/OutOfScopeIdentifier.java @@ -28,12 +28,13 @@ public class OutOfScopeIdentifier extends Identifier { * @param location the code location of the statement that has generated * this expression */ - public OutOfScopeIdentifier(Identifier id, ScopeToken scope, CodeLocation location) { + public OutOfScopeIdentifier( + Identifier id, + ScopeToken scope, + CodeLocation location) { super(id.getStaticType(), scope.toString() + ":" + id.getName(), id.isWeak(), id.getAnnotations(), location); this.id = id; this.scope = scope; - if (id.hasRuntimeTypes()) - setRuntimeTypes(id.getRuntimeTypes(null)); } @Override @@ -42,12 +43,15 @@ public boolean canBeScoped() { } @Override - public SymbolicExpression pushScope(ScopeToken token) { + public SymbolicExpression pushScope( + ScopeToken token) { return new OutOfScopeIdentifier(this, token, getCodeLocation()); } @Override - public Identifier popScope(ScopeToken token) throws SemanticException { + public Identifier popScope( + ScopeToken token) + throws SemanticException { if (getScope().equals(token)) return this.id; return null; @@ -73,7 +77,10 @@ public String toString() { } @Override - public T accept(ExpressionVisitor visitor, Object... params) throws SemanticException { + public T accept( + ExpressionVisitor visitor, + Object... params) + throws SemanticException { return visitor.visit(this, params); } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/PushAny.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/PushAny.java index 21e272c6c..47a2d7169 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/PushAny.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/PushAny.java @@ -8,8 +8,8 @@ import it.unive.lisa.type.Type; /** - * An expression converting that push any possible value on the stack. This is - * useful to represent top values. + * An expression that pushes any possible value on the stack. This is useful to + * represent top values. * * @author Luca Negrini */ @@ -22,7 +22,9 @@ public class PushAny extends ValueExpression { * @param location the code location of the statement that has generated * this expression */ - public PushAny(Type staticType, CodeLocation location) { + public PushAny( + Type staticType, + CodeLocation location) { super(staticType, location); } @@ -32,7 +34,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (!super.equals(obj)) @@ -48,17 +51,29 @@ public String toString() { } @Override - public SymbolicExpression pushScope(ScopeToken token) { + public SymbolicExpression pushScope( + ScopeToken token) { return this; } @Override - public SymbolicExpression popScope(ScopeToken token) throws SemanticException { + public SymbolicExpression popScope( + ScopeToken token) + throws SemanticException { return this; } @Override - public T accept(ExpressionVisitor visitor, Object... params) throws SemanticException { + public T accept( + ExpressionVisitor visitor, + Object... params) + throws SemanticException { return visitor.visit(this, params); } + + @Override + public boolean mightNeedRewriting() { + Type t = getStaticType(); + return !t.isValueType() || t.isUntyped(); + } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/PushInv.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/PushInv.java new file mode 100644 index 000000000..a2d4fae0f --- /dev/null +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/PushInv.java @@ -0,0 +1,78 @@ +package it.unive.lisa.symbolic.value; + +import it.unive.lisa.analysis.ScopeToken; +import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.program.cfg.CodeLocation; +import it.unive.lisa.symbolic.ExpressionVisitor; +import it.unive.lisa.symbolic.SymbolicExpression; +import it.unive.lisa.type.Type; + +/** + * An expression that pushes an invalid value on the stack. This is useful to + * represent bottom values. + * + * @author Luca Negrini + */ +public class PushInv extends ValueExpression { + + /** + * Builds the push invalid. + * + * @param staticType the static type of this expression + * @param location the code location of the statement that has generated + * this expression + */ + public PushInv( + Type staticType, + CodeLocation location) { + super(staticType, location); + } + + @Override + public int hashCode() { + return super.hashCode(); + } + + @Override + public boolean equals( + Object obj) { + if (this == obj) + return true; + if (!super.equals(obj)) + return false; + if (getClass() != obj.getClass()) + return false; + return true; + } + + @Override + public String toString() { + return "PUSHINV"; + } + + @Override + public SymbolicExpression pushScope( + ScopeToken token) { + return this; + } + + @Override + public SymbolicExpression popScope( + ScopeToken token) + throws SemanticException { + return this; + } + + @Override + public T accept( + ExpressionVisitor visitor, + Object... params) + throws SemanticException { + return visitor.visit(this, params); + } + + @Override + public boolean mightNeedRewriting() { + return false; + } +} diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/Skip.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/Skip.java index d84b8a03e..fa7b1697d 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/Skip.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/Skip.java @@ -20,7 +20,8 @@ public class Skip extends ValueExpression { * @param location the code location of the statement that has generated * this expression */ - public Skip(CodeLocation location) { + public Skip( + CodeLocation location) { super(VoidType.INSTANCE, location); } @@ -30,7 +31,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (!super.equals(obj)) @@ -46,17 +48,28 @@ public String toString() { } @Override - public SymbolicExpression pushScope(ScopeToken token) { + public SymbolicExpression pushScope( + ScopeToken token) { return this; } @Override - public SymbolicExpression popScope(ScopeToken token) throws SemanticException { + public SymbolicExpression popScope( + ScopeToken token) + throws SemanticException { return this; } @Override - public T accept(ExpressionVisitor visitor, Object... params) throws SemanticException { + public T accept( + ExpressionVisitor visitor, + Object... params) + throws SemanticException { return visitor.visit(this, params); } + + @Override + public boolean mightNeedRewriting() { + return false; + } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/TernaryExpression.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/TernaryExpression.java index bd656157c..926924c29 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/TernaryExpression.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/TernaryExpression.java @@ -47,9 +47,13 @@ public class TernaryExpression extends ValueExpression { * @param location the code location of the statement that has generated * this expression */ - public TernaryExpression(Type staticType, SymbolicExpression left, SymbolicExpression middle, + public TernaryExpression( + Type staticType, + SymbolicExpression left, + SymbolicExpression middle, SymbolicExpression right, - TernaryOperator operator, CodeLocation location) { + TernaryOperator operator, + CodeLocation location) { super(staticType, location); this.left = left; this.middle = middle; @@ -95,20 +99,20 @@ public TernaryOperator getOperator() { } @Override - public SymbolicExpression pushScope(ScopeToken token) throws SemanticException { + public SymbolicExpression pushScope( + ScopeToken token) + throws SemanticException { TernaryExpression expr = new TernaryExpression(getStaticType(), left.pushScope(token), middle.pushScope(token), right.pushScope(token), operator, getCodeLocation()); - if (hasRuntimeTypes()) - expr.setRuntimeTypes(getRuntimeTypes(null)); return expr; } @Override - public SymbolicExpression popScope(ScopeToken token) throws SemanticException { + public SymbolicExpression popScope( + ScopeToken token) + throws SemanticException { TernaryExpression expr = new TernaryExpression(getStaticType(), left.popScope(token), middle.popScope(token), right.popScope(token), operator, getCodeLocation()); - if (hasRuntimeTypes()) - expr.setRuntimeTypes(getRuntimeTypes(null)); return expr; } @@ -124,7 +128,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (!super.equals(obj)) @@ -158,10 +163,18 @@ public String toString() { } @Override - public T accept(ExpressionVisitor visitor, Object... params) throws SemanticException { + public T accept( + ExpressionVisitor visitor, + Object... params) + throws SemanticException { T left = this.left.accept(visitor, params); T middle = this.middle.accept(visitor, params); T right = this.right.accept(visitor, params); return visitor.visit(this, left, middle, right, params); } + + @Override + public boolean mightNeedRewriting() { + return left.mightNeedRewriting() || middle.mightNeedRewriting() || right.mightNeedRewriting(); + } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/UnaryExpression.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/UnaryExpression.java index 55b880dad..1cef48604 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/UnaryExpression.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/UnaryExpression.java @@ -38,7 +38,10 @@ public class UnaryExpression extends ValueExpression { * @param location the code location of the statement that has generated * this expression */ - public UnaryExpression(Type staticType, SymbolicExpression expression, UnaryOperator operator, + public UnaryExpression( + Type staticType, + SymbolicExpression expression, + UnaryOperator operator, CodeLocation location) { super(staticType, location); this.expression = expression; @@ -77,8 +80,6 @@ public ValueExpression removeNegations() { BinaryExpression expr = new BinaryExpression(binary.getStaticType(), left.removeNegations(), right.removeNegations(), oppositeOp, getCodeLocation()); - if (hasRuntimeTypes()) - expr.setRuntimeTypes(getRuntimeTypes(null)); return expr; } @@ -86,18 +87,20 @@ public ValueExpression removeNegations() { } @Override - public SymbolicExpression pushScope(ScopeToken token) throws SemanticException { + public SymbolicExpression pushScope( + ScopeToken token) + throws SemanticException { UnaryExpression expr = new UnaryExpression(getStaticType(), expression.pushScope(token), operator, getCodeLocation()); return expr; } @Override - public SymbolicExpression popScope(ScopeToken token) throws SemanticException { + public SymbolicExpression popScope( + ScopeToken token) + throws SemanticException { UnaryExpression expr = new UnaryExpression(getStaticType(), expression.popScope(token), operator, getCodeLocation()); - if (hasRuntimeTypes()) - expr.setRuntimeTypes(getRuntimeTypes(null)); return expr; } @@ -111,7 +114,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (!super.equals(obj)) @@ -135,8 +139,16 @@ public String toString() { } @Override - public T accept(ExpressionVisitor visitor, Object... params) throws SemanticException { + public T accept( + ExpressionVisitor visitor, + Object... params) + throws SemanticException { T arg = expression.accept(visitor, params); return visitor.visit(this, arg, params); } + + @Override + public boolean mightNeedRewriting() { + return expression.mightNeedRewriting(); + } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/ValueExpression.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/ValueExpression.java index 4b97812ce..5247707b4 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/ValueExpression.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/ValueExpression.java @@ -24,7 +24,9 @@ public abstract class ValueExpression extends SymbolicExpression { * @param location the code location of the statement that has generated * this value expression */ - protected ValueExpression(Type staticType, CodeLocation location) { + protected ValueExpression( + Type staticType, + CodeLocation location) { super(staticType, location); } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/Variable.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/Variable.java index 8483ad4a9..f823105a1 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/Variable.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/Variable.java @@ -23,7 +23,10 @@ public class Variable extends Identifier { * @param location the code location of the statement that has generated * this variable */ - public Variable(Type staticType, String name, CodeLocation location) { + public Variable( + Type staticType, + String name, + CodeLocation location) { this(staticType, name, new Annotations(), location); } @@ -36,7 +39,11 @@ public Variable(Type staticType, String name, CodeLocation location) { * @param location the code location of the statement that has generated * this variable */ - public Variable(Type staticType, String name, Annotations annotations, CodeLocation location) { + public Variable( + Type staticType, + String name, + Annotations annotations, + CodeLocation location) { super(staticType, name, false, annotations, location); } @@ -46,12 +53,15 @@ public boolean canBeScoped() { } @Override - public SymbolicExpression pushScope(ScopeToken token) { + public SymbolicExpression pushScope( + ScopeToken token) { return new OutOfScopeIdentifier(this, token, getCodeLocation()); } @Override - public SymbolicExpression popScope(ScopeToken token) throws SemanticException { + public SymbolicExpression popScope( + ScopeToken token) + throws SemanticException { return null; } @@ -61,7 +71,10 @@ public String toString() { } @Override - public T accept(ExpressionVisitor visitor, Object... params) throws SemanticException { + public T accept( + ExpressionVisitor visitor, + Object... params) + throws SemanticException { return visitor.visit(this, params); } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/BinaryOperator.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/BinaryOperator.java index 161f7deb1..61fa187b2 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/BinaryOperator.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/BinaryOperator.java @@ -28,5 +28,8 @@ public interface BinaryOperator extends Operator { * * @return the runtime types of this expression */ - Set typeInference(TypeSystem types, Set left, Set right); + Set typeInference( + TypeSystem types, + Set left, + Set right); } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/ComparisonEq.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/ComparisonEq.java index 2a71d9f4a..c207097bf 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/ComparisonEq.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/ComparisonEq.java @@ -45,7 +45,10 @@ public ComparisonOperator opposite() { } @Override - public Set typeInference(TypeSystem types, Set left, Set right) { + public Set typeInference( + TypeSystem types, + Set left, + Set right) { return Collections.singleton(types.getBooleanType()); } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/ComparisonNe.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/ComparisonNe.java index 04e3a5b0b..2855c7435 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/ComparisonNe.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/ComparisonNe.java @@ -45,7 +45,10 @@ public ComparisonOperator opposite() { } @Override - public Set typeInference(TypeSystem types, Set left, Set right) { + public Set typeInference( + TypeSystem types, + Set left, + Set right) { return Collections.singleton(types.getBooleanType()); } } \ No newline at end of file diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/LogicalOperation.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/LogicalOperation.java index 7490e1409..03894904c 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/LogicalOperation.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/LogicalOperation.java @@ -19,7 +19,10 @@ public abstract class LogicalOperation implements LogicalOperator, BinaryOperator { @Override - public Set typeInference(TypeSystem types, Set left, Set right) { + public Set typeInference( + TypeSystem types, + Set left, + Set right) { if (left.stream().noneMatch(Type::isBooleanType) || right.stream().noneMatch(Type::isBooleanType)) return Collections.emptySet(); return Collections.singleton(types.getBooleanType()); diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/Numeric16BitMul.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/Numeric16BitMul.java index 86f87fbf9..9a1477b6f 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/Numeric16BitMul.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/Numeric16BitMul.java @@ -18,7 +18,9 @@ * @author Luca Negrini */ public class Numeric16BitMul extends NumericOperation - implements MultiplicationOperator, OverflowingOperator { + implements + MultiplicationOperator, + OverflowingOperator { /** * The singleton instance of this class. diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/Numeric16BitSub.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/Numeric16BitSub.java index 4ab6f0212..4c039f960 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/Numeric16BitSub.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/Numeric16BitSub.java @@ -18,7 +18,9 @@ * @author Luca Negrini */ public class Numeric16BitSub extends NumericOperation - implements SubtractionOperator, OverflowingOperator { + implements + SubtractionOperator, + OverflowingOperator { /** * The singleton instance of this class. diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/Numeric32BitMul.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/Numeric32BitMul.java index 488a5abb7..f5aab9e40 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/Numeric32BitMul.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/Numeric32BitMul.java @@ -18,7 +18,9 @@ * @author Luca Negrini */ public class Numeric32BitMul extends NumericOperation - implements MultiplicationOperator, OverflowingOperator { + implements + MultiplicationOperator, + OverflowingOperator { /** * The singleton instance of this class. diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/Numeric32BitSub.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/Numeric32BitSub.java index 2c87c8b08..d9f74eb63 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/Numeric32BitSub.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/Numeric32BitSub.java @@ -18,7 +18,9 @@ * @author Luca Negrini */ public class Numeric32BitSub extends NumericOperation - implements SubtractionOperator, OverflowingOperator { + implements + SubtractionOperator, + OverflowingOperator { /** * The singleton instance of this class. diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/Numeric64BitMul.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/Numeric64BitMul.java index 677ff5f5f..119b3bbd5 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/Numeric64BitMul.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/Numeric64BitMul.java @@ -18,7 +18,9 @@ * @author Luca Negrini */ public class Numeric64BitMul extends NumericOperation - implements MultiplicationOperator, OverflowingOperator { + implements + MultiplicationOperator, + OverflowingOperator { /** * The singleton instance of this class. diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/Numeric64BitSub.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/Numeric64BitSub.java index cf392aca1..ef97370f3 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/Numeric64BitSub.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/Numeric64BitSub.java @@ -18,7 +18,9 @@ * @author Luca Negrini */ public class Numeric64BitSub extends NumericOperation - implements SubtractionOperator, OverflowingOperator { + implements + SubtractionOperator, + OverflowingOperator { /** * The singleton instance of this class. diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/Numeric8BitMul.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/Numeric8BitMul.java index 0c69f107d..732cb809e 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/Numeric8BitMul.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/Numeric8BitMul.java @@ -18,7 +18,9 @@ * @author Luca Negrini */ public class Numeric8BitMul extends NumericOperation - implements MultiplicationOperator, OverflowingOperator { + implements + MultiplicationOperator, + OverflowingOperator { /** * The singleton instance of this class. diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/Numeric8BitSub.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/Numeric8BitSub.java index 5f59c8e08..d59f5c1dd 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/Numeric8BitSub.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/Numeric8BitSub.java @@ -18,7 +18,10 @@ * @author Luca Negrini */ public class Numeric8BitSub extends NumericOperation - implements SubtractionOperator, OverflowingOperator, BinaryOperator { + implements + SubtractionOperator, + OverflowingOperator, + BinaryOperator { /** * The singleton instance of this class. diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/NumericComparison.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/NumericComparison.java index 788e8b5b1..464306fe9 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/NumericComparison.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/NumericComparison.java @@ -20,7 +20,10 @@ public abstract class NumericComparison implements ComparisonOperator, BinaryOperator { @Override - public Set typeInference(TypeSystem types, Set left, Set right) { + public Set typeInference( + TypeSystem types, + Set left, + Set right) { if (left.stream().noneMatch(Type::isNumericType) || right.stream().noneMatch(Type::isNumericType)) return Collections.emptySet(); Set set = NumericType.commonNumericalType(left, right); diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/NumericOperation.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/NumericOperation.java index c72b14af4..11a33e7f2 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/NumericOperation.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/NumericOperation.java @@ -17,7 +17,10 @@ public abstract class NumericOperation implements BinaryOperator { @Override - public Set typeInference(TypeSystem types, Set left, Set right) { + public Set typeInference( + TypeSystem types, + Set left, + Set right) { if (left.stream().noneMatch(Type::isNumericType) || right.stream().noneMatch(Type::isNumericType)) return Collections.emptySet(); Set set = NumericType.commonNumericalType(left, right); diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/StringConcat.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/StringConcat.java index 2dbfc0299..f53f6a01b 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/StringConcat.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/StringConcat.java @@ -37,7 +37,8 @@ public String toString() { } @Override - protected Type resultType(TypeSystem types) { + protected Type resultType( + TypeSystem types) { return types.getStringType(); } } \ No newline at end of file diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/StringContains.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/StringContains.java index f5d237aac..948db75ca 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/StringContains.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/StringContains.java @@ -38,7 +38,8 @@ public String toString() { } @Override - protected Type resultType(TypeSystem types) { + protected Type resultType( + TypeSystem types) { return types.getBooleanType(); } } \ No newline at end of file diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/StringEndsWith.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/StringEndsWith.java index d70ebf54f..50ca3b078 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/StringEndsWith.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/StringEndsWith.java @@ -38,7 +38,8 @@ public String toString() { } @Override - protected Type resultType(TypeSystem types) { + protected Type resultType( + TypeSystem types) { return types.getBooleanType(); } } \ No newline at end of file diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/StringEquals.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/StringEquals.java index 529fdb2eb..26ecb73b5 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/StringEquals.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/StringEquals.java @@ -39,7 +39,8 @@ public String toString() { } @Override - protected Type resultType(TypeSystem types) { + protected Type resultType( + TypeSystem types) { return types.getBooleanType(); } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/StringIndexOf.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/StringIndexOf.java index 45df910cf..8495844a3 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/StringIndexOf.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/StringIndexOf.java @@ -40,7 +40,8 @@ public String toString() { } @Override - protected Type resultType(TypeSystem types) { + protected Type resultType( + TypeSystem types) { return types.getIntegerType(); } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/StringOperation.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/StringOperation.java index aa61cd485..bb5a7ab5e 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/StringOperation.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/StringOperation.java @@ -12,14 +12,17 @@ * {@link StringOperator}, providing a * {@link #typeInference(TypeSystem, Set, Set)} implementation that returns an * empty set if no {@link StringType} can be found in one of the arguments, and - * a singleton set containing {@link #resultType(TypeSystem)} otherwise. + * a singleton set containing their result type otherwise. * * @author Luca Negrini */ public abstract class StringOperation implements StringOperator, BinaryOperator { @Override - public Set typeInference(TypeSystem types, Set left, Set right) { + public Set typeInference( + TypeSystem types, + Set left, + Set right) { if (left.stream().noneMatch(Type::isStringType) || right.stream().noneMatch(Type::isStringType)) return Collections.emptySet(); return Collections.singleton(resultType(types)); @@ -33,5 +36,6 @@ public Set typeInference(TypeSystem types, Set left, Set right * * @return the type */ - protected abstract Type resultType(TypeSystem types); + protected abstract Type resultType( + TypeSystem types); } \ No newline at end of file diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/StringStartsWith.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/StringStartsWith.java index 971a0db2c..b536d8fbb 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/StringStartsWith.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/StringStartsWith.java @@ -38,7 +38,8 @@ public String toString() { } @Override - protected Type resultType(TypeSystem types) { + protected Type resultType( + TypeSystem types) { return types.getBooleanType(); } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/TypeCast.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/TypeCast.java index 95240dbe2..b147eff72 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/TypeCast.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/TypeCast.java @@ -48,7 +48,10 @@ public String toString() { } @Override - public Set typeInference(TypeSystem types, Set left, Set right) { + public Set typeInference( + TypeSystem types, + Set left, + Set right) { if (right.stream().noneMatch(Type::isTypeTokenType)) return Collections.emptySet(); Set set = types.cast(left, right); diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/TypeCheck.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/TypeCheck.java index 3de5a073b..8cbf0db77 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/TypeCheck.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/TypeCheck.java @@ -42,7 +42,10 @@ public String toString() { } @Override - public Set typeInference(TypeSystem types, Set left, Set right) { + public Set typeInference( + TypeSystem types, + Set left, + Set right) { if (right.stream().noneMatch(Type::isTypeTokenType)) return Collections.emptySet(); return Collections.singleton(types.getBooleanType()); diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/TypeConv.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/TypeConv.java index 3ed861bea..864000210 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/TypeConv.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/binary/TypeConv.java @@ -46,7 +46,10 @@ public String toString() { } @Override - public Set typeInference(TypeSystem types, Set left, Set right) { + public Set typeInference( + TypeSystem types, + Set left, + Set right) { if (right.stream().noneMatch(Type::isTypeTokenType)) return Collections.emptySet(); Set set = types.convert(left, right); diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/ternary/StringReplace.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/ternary/StringReplace.java index 832a35d56..8a391a85e 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/ternary/StringReplace.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/ternary/StringReplace.java @@ -52,7 +52,11 @@ public String toString() { } @Override - public Set typeInference(TypeSystem types, Set left, Set middle, Set right) { + public Set typeInference( + TypeSystem types, + Set left, + Set middle, + Set right) { if (left.stream().noneMatch(Type::isStringType) || middle.stream().noneMatch(Type::isStringType) || right.stream().noneMatch(Type::isStringType)) diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/ternary/StringSubstring.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/ternary/StringSubstring.java index e051224ec..01db218af 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/ternary/StringSubstring.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/ternary/StringSubstring.java @@ -53,7 +53,11 @@ public String toString() { } @Override - public Set typeInference(TypeSystem types, Set left, Set middle, Set right) { + public Set typeInference( + TypeSystem types, + Set left, + Set middle, + Set right) { if (left.stream().noneMatch(Type::isStringType)) return Collections.emptySet(); if (middle.stream().filter(Type::isNumericType).map(Type::asNumericType).noneMatch(NumericType::isIntegral)) diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/ternary/TernaryOperator.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/ternary/TernaryOperator.java index 5f35f285b..ead765b8b 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/ternary/TernaryOperator.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/ternary/TernaryOperator.java @@ -29,5 +29,9 @@ public interface TernaryOperator extends Operator { * * @return the runtime types of this expression */ - Set typeInference(TypeSystem types, Set left, Set middle, Set right); + Set typeInference( + TypeSystem types, + Set left, + Set middle, + Set right); } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/unary/BitwiseNegation.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/unary/BitwiseNegation.java index 86b274604..dc74338ee 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/unary/BitwiseNegation.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/unary/BitwiseNegation.java @@ -40,7 +40,9 @@ public String toString() { } @Override - public Set typeInference(TypeSystem types, Set argument) { + public Set typeInference( + TypeSystem types, + Set argument) { if (argument.stream().noneMatch(Type::isNumericType)) return Collections.emptySet(); return argument.stream().filter(Type::isNumericType).collect(Collectors.toSet()); diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/unary/LogicalNegation.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/unary/LogicalNegation.java index e1f0fde28..5a025d182 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/unary/LogicalNegation.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/unary/LogicalNegation.java @@ -45,7 +45,9 @@ public String toString() { } @Override - public Set typeInference(TypeSystem types, Set argument) { + public Set typeInference( + TypeSystem types, + Set argument) { if (argument.stream().noneMatch(Type::isBooleanType)) return Collections.emptySet(); return Collections.singleton(types.getBooleanType()); diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/unary/NumericNegation.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/unary/NumericNegation.java index 6b71635f1..4040b989e 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/unary/NumericNegation.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/unary/NumericNegation.java @@ -41,7 +41,9 @@ public String toString() { } @Override - public Set typeInference(TypeSystem types, Set argument) { + public Set typeInference( + TypeSystem types, + Set argument) { if (argument.stream().noneMatch(Type::isNumericType)) return Collections.emptySet(); return argument.stream().filter(Type::isNumericType).collect(Collectors.toSet()); diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/unary/StringLength.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/unary/StringLength.java index 1ca8ad61f..ef6d60d55 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/unary/StringLength.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/unary/StringLength.java @@ -40,7 +40,9 @@ public String toString() { } @Override - public Set typeInference(TypeSystem types, Set argument) { + public Set typeInference( + TypeSystem types, + Set argument) { if (argument.stream().noneMatch(Type::isStringType)) return Collections.emptySet(); return Collections.singleton(types.getIntegerType()); diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/unary/TypeOf.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/unary/TypeOf.java index c16c2216d..c04ef3c99 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/unary/TypeOf.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/unary/TypeOf.java @@ -40,7 +40,9 @@ public String toString() { } @Override - public Set typeInference(TypeSystem types, Set argument) { + public Set typeInference( + TypeSystem types, + Set argument) { return Collections.singleton(new TypeTokenType(new HashSet<>(argument))); } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/unary/UnaryOperator.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/unary/UnaryOperator.java index 3b0c907f9..a53ac1c63 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/unary/UnaryOperator.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/symbolic/value/operator/unary/UnaryOperator.java @@ -25,5 +25,7 @@ public interface UnaryOperator extends Operator { * * @return the runtime types of this expression */ - Set typeInference(TypeSystem types, Set argument); + Set typeInference( + TypeSystem types, + Set argument); } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/type/ArrayType.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/type/ArrayType.java index 8c1593326..76da66a0e 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/type/ArrayType.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/type/ArrayType.java @@ -25,4 +25,13 @@ public interface ArrayType extends InMemoryType { * @return the base type of this array type */ Type getBaseType(); + + /** + * Yields the dimensions of this array type. For instance, if this type + * represents {@code int[]}, this method will return {@code 1}. Instead, if + * this type represents {@code int[][]}, this method will return {@code 2}. + * + * @return the dimensions of this array type + */ + int getDimensions(); } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/type/NullType.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/type/NullType.java index bddf31be0..3ef061366 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/type/NullType.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/type/NullType.java @@ -34,7 +34,8 @@ public String toString() { } @Override - public boolean equals(Object other) { + public boolean equals( + Object other) { return other instanceof NullType; } @@ -44,17 +45,20 @@ public int hashCode() { } @Override - public boolean canBeAssignedTo(Type other) { - return other.isPointerType(); + public boolean canBeAssignedTo( + Type other) { + return other.isPointerType() || other.isUntyped(); } @Override - public Type commonSupertype(Type other) { + public Type commonSupertype( + Type other) { return other != null && other.isPointerType() ? other : Untyped.INSTANCE; } @Override - public Set allInstances(TypeSystem types) { + public Set allInstances( + TypeSystem types) { return Collections.singleton(this); } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/type/NumericType.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/type/NumericType.java index 87fbfeedd..dc1dbcc7d 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/type/NumericType.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/type/NumericType.java @@ -87,7 +87,8 @@ default boolean isSigned() { * * @return whether or not the two instances represent the same type */ - default boolean sameNumericTypes(NumericType other) { + default boolean sameNumericTypes( + NumericType other) { if (is8Bits() != other.is8Bits()) return false; if (is16Bits() != other.is16Bits()) @@ -113,7 +114,8 @@ default boolean sameNumericTypes(NumericType other) { * * @return the supertype between the two */ - default NumericType supertype(NumericType other) { + default NumericType supertype( + NumericType other) { if (is8Bits() && (other.is16Bits() || other.is32Bits() || other.is64Bits())) return other; if (other.is8Bits() && (is16Bits() || is32Bits() || is64Bits())) @@ -176,7 +178,9 @@ default NumericType supertype(NumericType other) { * * @return the set of possible runtime types */ - public static Set commonNumericalType(Set left, Set right) { + public static Set commonNumericalType( + Set left, + Set right) { Set lfiltered = left.stream().filter(type -> type.isNumericType() || type.isUntyped()) .collect(Collectors.toSet()); Set rfiltered = right.stream().filter(type -> type.isNumericType() || type.isUntyped()) diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/type/ReferenceType.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/type/ReferenceType.java index 35fa303bb..82df53388 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/type/ReferenceType.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/type/ReferenceType.java @@ -22,22 +22,26 @@ public class ReferenceType implements PointerType { * * @param t the type of the referenced location */ - public ReferenceType(Type t) { + public ReferenceType( + Type t) { this.innerType = t; } @Override - public boolean canBeAssignedTo(Type other) { - return other instanceof PointerType; + public boolean canBeAssignedTo( + Type other) { + return other instanceof PointerType || other.isUntyped(); } @Override - public Type commonSupertype(Type other) { + public Type commonSupertype( + Type other) { return equals(other) ? this : Untyped.INSTANCE; } @Override - public Set allInstances(TypeSystem types) { + public Set allInstances( + TypeSystem types) { return Collections.singleton(this); } @@ -55,7 +59,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/type/Type.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/type/Type.java index 540d469ed..3e18d713e 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/type/Type.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/type/Type.java @@ -1,5 +1,11 @@ package it.unive.lisa.type; +import it.unive.lisa.analysis.SemanticDomain; +import it.unive.lisa.program.cfg.CFG; +import it.unive.lisa.program.cfg.CodeLocation; +import it.unive.lisa.program.cfg.statement.DefaultParamInitialization; +import it.unive.lisa.program.cfg.statement.Expression; +import it.unive.lisa.symbolic.SymbolicExpression; import java.util.Collection; import java.util.Set; @@ -264,6 +270,16 @@ default ReferenceType asReferenceType() { return isReferenceType() ? (ReferenceType) this : null; } + /** + * Yields {@code true} if and only if both {@link #isInMemoryType()} and + * {@link #isPointerType()} both return {@code false} on this type. + * + * @return {@code true} if that condition holds + */ + default boolean isValueType() { + return !isInMemoryType() && !isPointerType(); + } + /** * Determines if the type represented by this {@link Type} object is either * the same as, or is a subtype of, the type represented by {@code other}. @@ -273,7 +289,8 @@ default ReferenceType asReferenceType() { * * @return {@code true} if that condition holds */ - boolean canBeAssignedTo(Type other); + boolean canBeAssignedTo( + Type other); /** * Yields the most specific common supertype between this {@link Type} and @@ -285,7 +302,8 @@ default ReferenceType asReferenceType() { * @return the most specific common supertype between {@code this} and * {@code other} */ - Type commonSupertype(Type other); + Type commonSupertype( + Type other); /** * Yields all possible instances of this type, including itself. @@ -295,7 +313,64 @@ default ReferenceType asReferenceType() { * * @return the possible instances */ - Set allInstances(TypeSystem types); + Set allInstances( + TypeSystem types); + + /** + * Yields an expression that can be used as the right-hand side of an + * assignment to initialize a variable or parameter having this type to its + * default value. The returned expression's semantics function should leave + * a {@link SymbolicExpression} on the stack that can be used as second + * parameter in a + * {@link SemanticDomain#assign(it.unive.lisa.symbolic.value.Identifier, SymbolicExpression, it.unive.lisa.program.cfg.ProgramPoint, it.unive.lisa.analysis.SemanticOracle)} + * call. Before doing so, the entry state can be arbitrarily manipulated to, + * for instance, define fields or second-level memory regions initialized + * together with the main target of the returned expression (e.g., if the + * returned expression initializes an array, it should also initialize its + * length).
+ *
+ * The default implementation of this method yields a {@code null}. + * + * @param cfg the {@link CFG} where the initialization will happen + * @param location the {@link CodeLocation} where the initialization will + * happen + * + * @return an initializing expression, or {@code null} if no default value + * exists + */ + default Expression defaultValue( + CFG cfg, + CodeLocation location) { + return null; + } + + /** + * Yields an expression that can be used as the right-hand side of an + * assignment to initialize a variable or parameter having this type to a + * statically unknown value. The returned expression's semantics function + * should leave a {@link SymbolicExpression} on the stack that can be used + * as second parameter in a + * {@link SemanticDomain#assign(it.unive.lisa.symbolic.value.Identifier, SymbolicExpression, it.unive.lisa.program.cfg.ProgramPoint, it.unive.lisa.analysis.SemanticOracle)} + * call. Before doing so, the entry state can be arbitrarily manipulated to, + * for instance, define fields or second-level memory regions initialized + * together with the main target of the returned expression (e.g., if the + * returned expression initializes an array, it should also initialize its + * length).
+ *
+ * The default implementation of this method yields a + * {@link DefaultParamInitialization}. + * + * @param cfg the {@link CFG} where the initialization will happen + * @param location the {@link CodeLocation} where the initialization will + * happen + * + * @return an initializing expression + */ + default Expression unknownValue( + CFG cfg, + CodeLocation location) { + return new DefaultParamInitialization(cfg, location, this); + } /** * Yields the most specific common supertype of the given collection of @@ -307,7 +382,9 @@ default ReferenceType asReferenceType() { * * @return the most specific common supertype, or {@code fallback} */ - public static Type commonSupertype(Collection types, Type fallback) { + public static Type commonSupertype( + Collection types, + Type fallback) { if (types == null || types.isEmpty()) return fallback; Type result = null; diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/type/TypeSystem.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/type/TypeSystem.java index b37fce721..08ec43857 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/type/TypeSystem.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/type/TypeSystem.java @@ -48,7 +48,8 @@ public Set getTypes() { * * @return the type, or {@code null} */ - public Type getType(String name) { + public Type getType( + String name) { return types.get(name); } @@ -61,7 +62,8 @@ public Type getType(String name) { * {@code false} otherwise. If this method returns * {@code false}, the given type is discarded. */ - public final boolean registerType(Type type) { + public final boolean registerType( + Type type) { return types.putIfAbsent(type.toString(), type) == null; } @@ -83,7 +85,9 @@ public final boolean registerType(Type type) { * * @return the set of possible types after the cast */ - public Set cast(Set types, Set tokens) { + public Set cast( + Set types, + Set tokens) { return cast(types, tokens, null); } @@ -105,7 +109,10 @@ public Set cast(Set types, Set tokens) { * * @return the set of possible types after the cast */ - public Set cast(Set types, Set tokens, AtomicBoolean mightFail) { + public Set cast( + Set types, + Set tokens, + AtomicBoolean mightFail) { if (mightFail != null) mightFail.set(false); @@ -137,7 +144,9 @@ else if (mightFail != null) * * @return the set of possible types after the type conversion */ - public Set convert(Set types, Set tokens) { + public Set convert( + Set types, + Set tokens) { Set result = new HashSet<>(); Set filtered = tokens.stream().filter(Type::isTypeTokenType) .flatMap(t -> t.asTypeTokenType().getTypes().stream()) @@ -184,5 +193,6 @@ public Set convert(Set types, Set tokens) { * * @return {@code true} if and only if the given type can be referenced */ - public abstract boolean canBeReferenced(Type type); + public abstract boolean canBeReferenced( + Type type); } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/type/TypeTokenType.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/type/TypeTokenType.java index 02555c4e8..b74d4e075 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/type/TypeTokenType.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/type/TypeTokenType.java @@ -18,7 +18,8 @@ public class TypeTokenType implements Type { * * @param types the types */ - public TypeTokenType(Set types) { + public TypeTokenType( + Set types) { this.types = types; } @@ -48,7 +49,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -65,17 +67,20 @@ public boolean equals(Object obj) { } @Override - public boolean canBeAssignedTo(Type other) { - return other instanceof TypeTokenType; + public boolean canBeAssignedTo( + Type other) { + return other instanceof TypeTokenType || other.isUntyped(); } @Override - public Type commonSupertype(Type other) { + public Type commonSupertype( + Type other) { return other == this ? this : Untyped.INSTANCE; } @Override - public Set allInstances(TypeSystem types) { + public Set allInstances( + TypeSystem types) { return Collections.singleton(this); } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/type/Untyped.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/type/Untyped.java index 755ac894d..cb40be962 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/type/Untyped.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/type/Untyped.java @@ -32,7 +32,8 @@ public String toString() { } @Override - public boolean equals(Object other) { + public boolean equals( + Object other) { return other instanceof Untyped; } @@ -42,17 +43,20 @@ public int hashCode() { } @Override - public boolean canBeAssignedTo(Type other) { + public boolean canBeAssignedTo( + Type other) { return other == this; } @Override - public Type commonSupertype(Type other) { + public Type commonSupertype( + Type other) { return this; } @Override - public Set allInstances(TypeSystem types) { + public Set allInstances( + TypeSystem types) { return types.getTypes(); } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/type/VoidType.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/type/VoidType.java index 2087b0eb7..d82c4c53d 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/type/VoidType.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/type/VoidType.java @@ -31,7 +31,8 @@ public String toString() { } @Override - public boolean equals(Object other) { + public boolean equals( + Object other) { return other instanceof VoidType; } @@ -41,17 +42,20 @@ public int hashCode() { } @Override - public boolean canBeAssignedTo(Type other) { + public boolean canBeAssignedTo( + Type other) { return false; } @Override - public Type commonSupertype(Type other) { + public Type commonSupertype( + Type other) { return other == this ? this : Untyped.INSTANCE; } @Override - public Set allInstances(TypeSystem types) { + public Set allInstances( + TypeSystem types) { return Collections.singleton(this); } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/StringUtilities.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/StringUtilities.java index 405fdf810..0651f711e 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/StringUtilities.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/StringUtilities.java @@ -18,7 +18,8 @@ private StringUtilities() { * * @return the ordinal string */ - public static String ordinal(int i) { + public static String ordinal( + int i) { int n = i % 100; if (n == 11 || n == 12 || n == 13 || n % 10 == 0 || n % 10 > 3) return i + "th"; @@ -31,4 +32,22 @@ public static String ordinal(int i) { return i + "rd"; } + + /** + * Indents all lines of {@code target} by using {@code indent} repeated + * {@code amount} times. + * + * @param target the string to indent + * @param indent the string to use as indentation + * @param amount the number of times {@code indent} should be repeated + * + * @return the indented string + */ + public static String indent( + String target, + String indent, + int amount) { + String offset = indent.repeat(amount); + return offset + target.replace("\n", "\n" + offset); + } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/CastIterable.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/CastIterable.java index ad71bbf43..10865290e 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/CastIterable.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/CastIterable.java @@ -23,7 +23,9 @@ public class CastIterable implements Iterable { * @param type the class to which elements of the wrapped iterable should * be casted to */ - public CastIterable(Iterable parent, Class type) { + public CastIterable( + Iterable parent, + Class type) { this.parent = parent; this.type = type; } @@ -37,7 +39,8 @@ private class CastIterator implements Iterator { private final Iterator wrapped; - public CastIterator(Iterator wrapped) { + public CastIterator( + Iterator wrapped) { this.wrapped = wrapped; } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/CollectionUtilities.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/CollectionUtilities.java index c408e64b2..d5cdbcc6f 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/CollectionUtilities.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/CollectionUtilities.java @@ -45,7 +45,11 @@ private CollectionUtilities() { * @return an integer value determined by the ordering relation between * objects, as in {@link Comparator#compare(Object, Object)} */ - public static int nullSafeCompare(boolean nullFirst, T left, T right, Comparator comparator) { + public static int nullSafeCompare( + boolean nullFirst, + T left, + T right, + Comparator comparator) { if (left == null && right != null) return nullFirst ? -1 : 1; @@ -73,7 +77,10 @@ public static int nullSafeCompare(boolean nullFirst, T left, T right, Compar * @return {@code true} only if the collections contain exactly the same set * of elements (order-insensitive) */ - public static > boolean equals(C first, C second, BiPredicate equalityTest) { + public static > boolean equals( + C first, + C second, + BiPredicate equalityTest) { // the following keeps track of the unmatched nodes in second Collection copy = new HashSet<>(second); boolean found; @@ -116,7 +123,11 @@ public static > boolean equals(C first, C second, BiP * @param joiner the function that computes the join of two equal * elements */ - public static > void join(C first, C second, C result, BiPredicate equalityTest, + public static > void join( + C first, + C second, + C result, + BiPredicate equalityTest, BinaryOperator joiner) { // the following keeps track of the unmatched nodes in second Collection copy = new HashSet<>(second); @@ -140,6 +151,41 @@ public static > void join(C first, C second, C result copy.forEach(result::add); } + /** + * Meets (intersection) two collections, using a custom equality test to + * determine if two elements are to be considered equals and thus met + * together through the given {@code meet}. All elements that, according to + * the given {@code equalityTest} are contained only in one of the input + * collections, will not be part of the result. + * + * @param the type of elements in the collections + * @param the type of the collections to meet + * @param first the first collection + * @param second the second collection + * @param result the collection to be used as result, where met + * elements will be added + * @param equalityTest the tester for equality of the objects within the + * collections + * @param meet the function that computes the meet of two equal + * elements + */ + public static > void meet( + C first, + C second, + C result, + BiPredicate equalityTest, + BinaryOperator meet) { + // the following keeps track of the unmatched nodes in second + Collection copy = new HashSet<>(second); + for (T t1 : first) + for (T t2 : second) + if (copy.contains(t2) && equalityTest.test(t1, t2)) { + copy.remove(t2); + result.add(meet.apply(t1, t2)); + break; + } + } + /** * Stores the given objects into a collection and returns it. * @@ -149,7 +195,8 @@ public static > void join(C first, C second, C result * @return a (modifiable) collection containing the given objects */ @SafeVarargs - public static Collection collect(T... objs) { + public static Collection collect( + T... objs) { ArrayList res = new ArrayList<>(objs.length); for (T o : objs) res.add(o); @@ -172,12 +219,16 @@ public Supplier> supplier() { @Override public BiConsumer, E> accumulator() { - return (set, e) -> set.add(e); + return ( + set, + e) -> set.add(e); } @Override public BinaryOperator> combiner() { - return (result, partial) -> { + return ( + result, + partial) -> { result.addAll(partial); return result; }; @@ -212,7 +263,8 @@ public static class StringCollector implements Collector supplier() { @Override public BiConsumer accumulator() { - return (builder, e) -> { + return ( + builder, + e) -> { if (builder.length() == 0) builder.append(e); else @@ -233,7 +287,9 @@ public BiConsumer accumulator() { @Override public BinaryOperator combiner() { - return (result, partial) -> result.append(partial); + return ( + result, + partial) -> result.append(partial); } @Override diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/CollectionsDiffBuilder.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/CollectionsDiffBuilder.java index ebeba8b39..0644c66a5 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/CollectionsDiffBuilder.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/CollectionsDiffBuilder.java @@ -39,7 +39,10 @@ public class CollectionsDiffBuilder { * @param first the first collection * @param second the second colelction */ - public CollectionsDiffBuilder(Class elementType, Collection first, Collection second) { + public CollectionsDiffBuilder( + Class elementType, + Collection first, + Collection second) { this.elementType = elementType; this.first = first; this.second = second; @@ -77,7 +80,8 @@ public CollectionsDiffBuilder(Class elementType, Collection first, Collect * elements in the two collections */ @SuppressWarnings("unchecked") - public void compute(Comparator comparer) { + public void compute( + Comparator comparer) { commons.clear(); onlyFirst.clear(); onlySecond.clear(); @@ -95,7 +99,10 @@ public void compute(Comparator comparer) { queueDiff(f, s, comparer); } - private void queueDiff(Deque f, Deque s, Comparator comparer) { + private void queueDiff( + Deque f, + Deque s, + Comparator comparer) { T currentF = null; T currentS = null; diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/IterableArray.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/IterableArray.java index 262054536..e3dadb83b 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/IterableArray.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/IterableArray.java @@ -23,7 +23,8 @@ public class IterableArray implements Iterable { * * @param array the underlying array */ - public IterableArray(E[] array) { + public IterableArray( + E[] array) { this.array = array; } @@ -46,7 +47,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/externalSet/BitExternalSet.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/externalSet/BitExternalSet.java index a55a984a4..ffa912cfc 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/externalSet/BitExternalSet.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/externalSet/BitExternalSet.java @@ -35,7 +35,8 @@ public final class BitExternalSet implements ExternalSet { * * @param cache the cache */ - BitExternalSet(ExternalSetCache cache) { + BitExternalSet( + ExternalSetCache cache) { this.bits = new long[1]; this.cache = cache; } @@ -46,7 +47,9 @@ public final class BitExternalSet implements ExternalSet { * @param bits the bits * @param cache the cache */ - BitExternalSet(long[] bits, ExternalSetCache cache) { + BitExternalSet( + long[] bits, + ExternalSetCache cache) { this.bits = bits; this.cache = cache; } @@ -56,7 +59,8 @@ public final class BitExternalSet implements ExternalSet { * * @param other the other set */ - BitExternalSet(BitExternalSet other) { + BitExternalSet( + BitExternalSet other) { this.bits = other.bits.clone(); this.cache = other.cache; } @@ -68,7 +72,9 @@ public final class BitExternalSet implements ExternalSet { * @param cache the cache * @param element the element */ - BitExternalSet(ExternalSetCache cache, T element) { + BitExternalSet( + ExternalSetCache cache, + T element) { this.cache = cache; int pos = cache.indexOfOrAdd(element); bits = new long[1 + (pos >> 6)]; @@ -82,7 +88,9 @@ public final class BitExternalSet implements ExternalSet { * @param cache the cache that must be used for this set * @param elements the elements put inside the set */ - BitExternalSet(ExternalSetCache cache, Iterable elements) { + BitExternalSet( + ExternalSetCache cache, + Iterable elements) { this(cache); for (T e : elements) add(e); @@ -93,20 +101,23 @@ public ExternalSetCache getCache() { return cache; } - private void expand(int targetLength) { + private void expand( + int targetLength) { long[] localbits = bits; bits = new long[targetLength]; System.arraycopy(localbits, 0, bits, 0, localbits.length); } - private void shrink(int targetLength) { + private void shrink( + int targetLength) { long[] localbits = bits; bits = new long[targetLength]; System.arraycopy(localbits, 0, bits, 0, targetLength); } @Override - public boolean add(T e) { + public boolean add( + T e) { long[] localbits = bits; int pos = cache.indexOfOrAdd(e); int bitvector = pos >> 6; @@ -125,7 +136,8 @@ public boolean add(T e) { } @Override - public void addAll(ExternalSet other) { + public void addAll( + ExternalSet other) { if (this == other) return; if (other == null) @@ -150,7 +162,8 @@ public void addAll(ExternalSet other) { @Override @SuppressWarnings("unchecked") - public boolean remove(Object e) { + public boolean remove( + Object e) { int pos; try { pos = cache.indexOf((T) e); @@ -227,7 +240,8 @@ public int hashCode() { @Override @SuppressWarnings({ "unchecked", "rawtypes" }) - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (obj == null) return false; if (this == obj) @@ -265,7 +279,8 @@ public BitExternalSet copy() { } @Override - public boolean contains(ExternalSet other) { + public boolean contains( + ExternalSet other) { if (this == other) return true; if (other == null) @@ -292,7 +307,8 @@ public boolean contains(ExternalSet other) { } @Override - public boolean intersects(ExternalSet other) { + public boolean intersects( + ExternalSet other) { if (this == other) return true; if (other == null) @@ -315,7 +331,8 @@ public boolean intersects(ExternalSet other) { } @Override - public ExternalSet intersection(ExternalSet other) { + public ExternalSet intersection( + ExternalSet other) { if (this == other) return this; if (other == null) @@ -353,7 +370,8 @@ public ExternalSet intersection(ExternalSet other) { } @Override - public ExternalSet difference(ExternalSet other) { + public ExternalSet difference( + ExternalSet other) { if (this == other) return this; if (other == null) @@ -382,7 +400,8 @@ public ExternalSet difference(ExternalSet other) { } @Override - public ExternalSet union(ExternalSet other) { + public ExternalSet union( + ExternalSet other) { if (this == other) return this; if (other == null) @@ -507,7 +526,8 @@ public void remove() { @Override @SuppressWarnings("unchecked") - public boolean contains(Object o) { + public boolean contains( + Object o) { int pos; try { pos = cache.indexOf((T) o); @@ -534,12 +554,14 @@ public Object[] toArray() { } @Override - public E[] toArray(E[] a) { + public E[] toArray( + E[] a) { return new ArrayList<>(this).toArray(a); } @Override - public boolean containsAll(Collection c) { + public boolean containsAll( + Collection c) { for (Object o : c) if (!contains(o)) return false; @@ -547,7 +569,8 @@ public boolean containsAll(Collection c) { } @Override - public boolean addAll(Collection c) { + public boolean addAll( + Collection c) { boolean result = false; for (T o : c) result |= add(o); @@ -555,7 +578,8 @@ public boolean addAll(Collection c) { } @Override - public boolean retainAll(Collection c) { + public boolean retainAll( + Collection c) { Collection toRemove = new ArrayList<>(); for (T o : this) if (!c.contains(o)) @@ -567,7 +591,8 @@ public boolean retainAll(Collection c) { } @Override - public boolean removeAll(Collection c) { + public boolean removeAll( + Collection c) { Collection toRemove = new ArrayList<>(); for (T o : this) if (c.contains(o)) diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/externalSet/ExternalSet.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/externalSet/ExternalSet.java index 478b36a09..05515b78c 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/externalSet/ExternalSet.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/externalSet/ExternalSet.java @@ -37,7 +37,8 @@ public interface ExternalSet extends Set { * * @param other the other set */ - default void addAll(ExternalSet other) { + default void addAll( + ExternalSet other) { if (this == other) return; if (other == null) @@ -80,7 +81,8 @@ default Collection collect() { * @return {@code true} if and only if {@code other} is included into this * set */ - default boolean contains(ExternalSet other) { + default boolean contains( + ExternalSet other) { if (this == other) return true; if (other == null) @@ -102,7 +104,8 @@ default boolean contains(ExternalSet other) { * * @return true if and only if this set intersects the other */ - default boolean intersects(ExternalSet other) { + default boolean intersects( + ExternalSet other) { if (this == other) return true; if (other == null) @@ -125,7 +128,8 @@ default boolean intersects(ExternalSet other) { * * @return the intersection of the two sets */ - default ExternalSet intersection(ExternalSet other) { + default ExternalSet intersection( + ExternalSet other) { if (this == other) return this; if (other == null) @@ -150,7 +154,8 @@ default ExternalSet intersection(ExternalSet other) { * @return a set obtained from this by removing the elements in * {@code other} */ - default ExternalSet difference(ExternalSet other) { + default ExternalSet difference( + ExternalSet other) { if (this == other) return this; if (other == null) @@ -174,7 +179,8 @@ default ExternalSet difference(ExternalSet other) { * * @return the union of this set and {@code other} */ - default ExternalSet union(ExternalSet other) { + default ExternalSet union( + ExternalSet other) { if (this == other) return this; if (other == null) @@ -197,7 +203,8 @@ default ExternalSet union(ExternalSet other) { * * @return {@code true} iff that condition holds, {@code false} otherwise */ - default boolean anyMatch(Predicate predicate) { + default boolean anyMatch( + Predicate predicate) { for (T t : this) if (predicate.test(t)) return true; @@ -213,7 +220,8 @@ default boolean anyMatch(Predicate predicate) { * * @return {@code true} iff that condition holds, {@code false} otherwise */ - default boolean noneMatch(Predicate predicate) { + default boolean noneMatch( + Predicate predicate) { for (T t : this) if (predicate.test(t)) return false; @@ -229,7 +237,8 @@ default boolean noneMatch(Predicate predicate) { * * @return {@code true} iff that condition holds, {@code false} otherwise */ - default boolean allMatch(Predicate predicate) { + default boolean allMatch( + Predicate predicate) { for (T t : this) if (!predicate.test(t)) return false; @@ -245,7 +254,8 @@ default boolean allMatch(Predicate predicate) { * * @return a new external set filtered by {@code predicate} */ - default ExternalSet filter(Predicate predicate) { + default ExternalSet filter( + Predicate predicate) { ExternalSet result = copy(); for (T t : this) if (!predicate.test(t)) @@ -263,7 +273,8 @@ default ExternalSet filter(Predicate predicate) { * * @return the transformed set */ - default ExternalSet transform(UnaryOperator transformer) { + default ExternalSet transform( + UnaryOperator transformer) { ExternalSet result = getCache().mkEmptySet(); for (T t : this) result.add(transformer.apply(t)); @@ -280,7 +291,8 @@ default ExternalSet transform(UnaryOperator transformer) { * * @return the transformed set */ - default ExternalSet multiTransform(Function> transformer) { + default ExternalSet multiTransform( + Function> transformer) { ExternalSet result = getCache().mkEmptySet(); for (T t : this) result.addAll(transformer.apply(t)); @@ -297,7 +309,9 @@ default ExternalSet multiTransform(Function> transformer) { * * @return the reduced element */ - default T reduce(T base, BinaryOperator reducer) { + default T reduce( + T base, + BinaryOperator reducer) { T result = base; for (T t : this) result = reducer.apply(result, t); diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/externalSet/ExternalSetCache.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/externalSet/ExternalSetCache.java index 9b33ee6d7..206b5584f 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/externalSet/ExternalSetCache.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/externalSet/ExternalSetCache.java @@ -54,7 +54,8 @@ public ExternalSet mkEmptySet() { * * @return the set */ - public ExternalSet mkSet(Iterable iterable) { + public ExternalSet mkSet( + Iterable iterable) { return new BitExternalSet<>(this, iterable); } @@ -66,7 +67,8 @@ public ExternalSet mkSet(Iterable iterable) { * * @return the set */ - public ExternalSet mkSingletonSet(T element) { + public ExternalSet mkSingletonSet( + T element) { return new BitExternalSet<>(this, element); } @@ -87,7 +89,8 @@ public ExternalSet mkUniversalSet() { * * @return the index of {@code e}, or {@code -1} */ - protected final synchronized int indexOf(T e) { + protected final synchronized int indexOf( + T e) { if (e == null) return indexOfNull; @@ -103,7 +106,8 @@ protected final synchronized int indexOf(T e) { * * @return the index of {@code e} */ - protected final synchronized int indexOfOrAdd(T e) { + protected final synchronized int indexOfOrAdd( + T e) { if (e == null) { if (indexOfNull == -1) { elements.add(null); @@ -129,7 +133,8 @@ protected final synchronized int indexOfOrAdd(T e) { * * @return the element */ - protected final synchronized T get(int pos) { + protected final synchronized T get( + int pos) { return elements.get(pos); } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/externalSet/UniversalExternalSet.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/externalSet/UniversalExternalSet.java index 4d0028d70..70358b287 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/externalSet/UniversalExternalSet.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/externalSet/UniversalExternalSet.java @@ -25,7 +25,8 @@ public final class UniversalExternalSet implements ExternalSet { * * @param cache the cache */ - UniversalExternalSet(ExternalSetCache cache) { + UniversalExternalSet( + ExternalSetCache cache) { this.cache = cache; } @@ -41,7 +42,8 @@ public boolean isEmpty() { @Override @SuppressWarnings("unchecked") - public boolean contains(Object o) { + public boolean contains( + Object o) { try { return cache.indexOf((T) o) != -1; } catch (ClassCastException e) { @@ -61,37 +63,44 @@ public Object[] toArray() { } @Override - public E[] toArray(E[] a) { + public E[] toArray( + E[] a) { return cache.getAllElements().toArray(a); } @Override - public boolean add(T e) { + public boolean add( + T e) { throw new UnsupportedOperationException(String.format(CANNOT_PERFORM_ERROR, "add")); } @Override - public boolean remove(Object o) { + public boolean remove( + Object o) { throw new UnsupportedOperationException(String.format(CANNOT_PERFORM_ERROR, "remove")); } @Override - public boolean containsAll(Collection c) { + public boolean containsAll( + Collection c) { return cache.getAllElements().containsAll(c); } @Override - public boolean addAll(Collection c) { + public boolean addAll( + Collection c) { throw new UnsupportedOperationException(String.format(CANNOT_PERFORM_ERROR, "add")); } @Override - public boolean retainAll(Collection c) { + public boolean retainAll( + Collection c) { throw new UnsupportedOperationException(String.format(CANNOT_PERFORM_ERROR, "remove")); } @Override - public boolean removeAll(Collection c) { + public boolean removeAll( + Collection c) { throw new UnsupportedOperationException(String.format(CANNOT_PERFORM_ERROR, "remove")); } @@ -126,7 +135,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/workset/ConcurrentFIFOWorkingSet.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/workset/ConcurrentFIFOWorkingSet.java index fed3b6443..3df6727ad 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/workset/ConcurrentFIFOWorkingSet.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/workset/ConcurrentFIFOWorkingSet.java @@ -7,7 +7,7 @@ /** * A first-in, first-out working set. This implementation is thread-safe. * - * @author Luca Negrini + * @author Luca Negrini * * @param the type of the elements that this working set contains */ @@ -32,7 +32,8 @@ public static ConcurrentFIFOWorkingSet mk() { } @Override - public void push(E e) { + public void push( + E e) { ws.addLast(e); } @@ -75,7 +76,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/workset/ConcurrentLIFOWorkingSet.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/workset/ConcurrentLIFOWorkingSet.java index 7e4b0e557..4bc913806 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/workset/ConcurrentLIFOWorkingSet.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/workset/ConcurrentLIFOWorkingSet.java @@ -7,7 +7,7 @@ /** * A last-in, first-out working set. This implementation is thread-safe. * - * @author Luca Negrini + * @author Luca Negrini * * @param the type of the elements that this working set contains */ @@ -32,7 +32,8 @@ public static ConcurrentLIFOWorkingSet mk() { } @Override - public void push(E e) { + public void push( + E e) { ws.addFirst(e); } @@ -75,7 +76,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/workset/DuplicateFreeFIFOWorkingSet.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/workset/DuplicateFreeFIFOWorkingSet.java index 784f3bfd6..1cda82af3 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/workset/DuplicateFreeFIFOWorkingSet.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/workset/DuplicateFreeFIFOWorkingSet.java @@ -10,7 +10,7 @@ * are not already part of the working set. This implementation is not * thread-safe. * - * @author Luca Negrini + * @author Luca Negrini * * @param the type of the elements that this working set contains */ @@ -35,7 +35,8 @@ public static DuplicateFreeFIFOWorkingSet mk() { } @Override - public void push(E e) { + public void push( + E e) { if (!ws.contains(e)) ws.addLast(e); } @@ -79,7 +80,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/workset/DuplicateFreeLIFOWorkingSet.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/workset/DuplicateFreeLIFOWorkingSet.java index 8e13cfec6..002f174a3 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/workset/DuplicateFreeLIFOWorkingSet.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/workset/DuplicateFreeLIFOWorkingSet.java @@ -10,7 +10,7 @@ * are not already part of the working set. This implementation is not * thread-safe. * - * @author Luca Negrini + * @author Luca Negrini * * @param the type of the elements that this working set contains */ @@ -35,7 +35,8 @@ public static DuplicateFreeLIFOWorkingSet mk() { } @Override - public void push(E e) { + public void push( + E e) { if (!ws.contains(e)) ws.push(e); } @@ -79,7 +80,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/workset/FIFOWorkingSet.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/workset/FIFOWorkingSet.java index 90b3992fa..dd8f3404b 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/workset/FIFOWorkingSet.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/workset/FIFOWorkingSet.java @@ -8,7 +8,7 @@ * A first-in, first-out working set. This implementation is not * thread-safe. * - * @author Luca Negrini + * @author Luca Negrini * * @param the type of the elements that this working set contains */ @@ -33,7 +33,8 @@ public static FIFOWorkingSet mk() { } @Override - public void push(E e) { + public void push( + E e) { ws.addLast(e); } @@ -76,7 +77,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/workset/LIFOWorkingSet.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/workset/LIFOWorkingSet.java index 4b606d825..92d0b3a89 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/workset/LIFOWorkingSet.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/workset/LIFOWorkingSet.java @@ -8,7 +8,7 @@ * A last-in, first-out working set. This implementation is not * thread-safe. * - * @author Luca Negrini + * @author Luca Negrini * * @param the type of the elements that this working set contains */ @@ -33,7 +33,8 @@ public static LIFOWorkingSet mk() { } @Override - public void push(E e) { + public void push( + E e) { ws.push(e); } @@ -76,7 +77,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/workset/VisitOnceFIFOWorkingSet.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/workset/VisitOnceFIFOWorkingSet.java index b82eb841c..6ba310df4 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/workset/VisitOnceFIFOWorkingSet.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/workset/VisitOnceFIFOWorkingSet.java @@ -11,7 +11,7 @@ * they were not already added before (even if they have already been popped * out). This implementation is not thread-safe. * - * @author Luca Negrini + * @author Luca Negrini * * @param the type of the elements that this working set contains */ @@ -39,7 +39,8 @@ private VisitOnceFIFOWorkingSet() { } @Override - public void push(E e) { + public void push( + E e) { if (seen.contains(e)) return; @@ -92,7 +93,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/workset/VisitOnceLIFOWorkingSet.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/workset/VisitOnceLIFOWorkingSet.java index d73e23ebd..6641f79c1 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/workset/VisitOnceLIFOWorkingSet.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/workset/VisitOnceLIFOWorkingSet.java @@ -11,7 +11,7 @@ * they were not already added before (even if they have already been popped * out). This implementation is not thread-safe. * - * @author Luca Negrini + * @author Luca Negrini * * @param the type of the elements that this working set contains */ @@ -39,7 +39,8 @@ private VisitOnceLIFOWorkingSet() { } @Override - public void push(E e) { + public void push( + E e) { if (seen.contains(e)) return; @@ -92,7 +93,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/workset/VisitOnceWorkingSet.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/workset/VisitOnceWorkingSet.java index 641c3b724..514f81786 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/workset/VisitOnceWorkingSet.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/workset/VisitOnceWorkingSet.java @@ -5,7 +5,7 @@ /** * A working set, containing items to be processed. * - * @author Luca Negrini + * @author Luca Negrini * * @param the type of the elements that this working set contains */ diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/workset/WorkingSet.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/workset/WorkingSet.java index e56cb58ef..75836c27a 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/workset/WorkingSet.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/collections/workset/WorkingSet.java @@ -7,7 +7,7 @@ /** * A working set, containing items to be processed. * - * @author Luca Negrini + * @author Luca Negrini * * @param the type of the elements that this working set contains */ @@ -25,7 +25,9 @@ public interface WorkingSet { * @throws AnalysisSetupException if the working set cannot be created */ @SuppressWarnings("unchecked") - public static WorkingSet of(Class> clazz) throws AnalysisSetupException { + public static WorkingSet of( + Class> clazz) + throws AnalysisSetupException { if (!WorkingSet.class.isAssignableFrom(clazz)) throw new AnalysisSetupException(clazz + " is not a working set"); @@ -42,7 +44,8 @@ public static WorkingSet of(Class> clazz) throws * * @param e the element */ - void push(E e); + void push( + E e); /** * Removes the next element to be processed from this working set and diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/automaton/AutomataFactory.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/automaton/AutomataFactory.java index d3f2a1405..17a80e4b3 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/automaton/AutomataFactory.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/automaton/AutomataFactory.java @@ -20,7 +20,8 @@ public interface AutomataFactory, T extends Transition * * @return the new automaton */ - A singleString(String string); + A singleString( + String string); /** * Yields a new automaton recognizing a statically-unknown string. @@ -51,5 +52,7 @@ public interface AutomataFactory, T extends Transition * * @return the new automaton */ - A from(SortedSet states, SortedSet> transitions); + A from( + SortedSet states, + SortedSet> transitions); } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/automaton/Automaton.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/automaton/Automaton.java index b10a67490..bc73922fc 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/automaton/Automaton.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/automaton/Automaton.java @@ -37,7 +37,8 @@ * this class have on their transitions */ public abstract class Automaton, T extends TransitionSymbol> - implements AutomataFactory { + implements + AutomataFactory { /** * The states of this automaton. @@ -82,7 +83,9 @@ protected Automaton() { * @throws IllegalArgumentException if the set of states contains multiple * states with the same ids */ - protected Automaton(SortedSet states, SortedSet> transitions) { + protected Automaton( + SortedSet states, + SortedSet> transitions) { if (states.size() != states.stream().map(State::getId).distinct().count()) throw new IllegalArgumentException("The automaton being created contains multiple states with the same id"); this.states = states; @@ -117,7 +120,8 @@ public SortedSet> getTransitions() { * @throws IllegalArgumentException a state with the given id is already * part of this automaton */ - public void addState(State s) { + public void addState( + State s) { if (states.stream().filter(ss -> ss.getId() == s.getId()).findAny().isPresent()) throw new IllegalArgumentException("A state with id " + s.getId() + " aready exists"); states.add(s); @@ -134,7 +138,10 @@ public void addState(State s) { * @param to the destination node * @param input the input to be recognized by the transition */ - public void addTransition(State from, State to, T input) { + public void addTransition( + State from, + State to, + T input) { addTransition(new Transition<>(from, to, input)); } @@ -143,7 +150,8 @@ public void addTransition(State from, State to, T input) { * * @param t the transition to add */ - public void addTransition(Transition t) { + public void addTransition( + Transition t) { transitions.add(t); this.deterministic = Optional.empty(); this.minimized = Optional.empty(); @@ -155,7 +163,8 @@ public void addTransition(Transition t) { * * @param ts the set of transitions to remove */ - public void removeTransitions(Set> ts) { + public void removeTransitions( + Set> ts) { transitions.removeAll(ts); this.deterministic = Optional.empty(); this.minimized = Optional.empty(); @@ -166,7 +175,8 @@ public void removeTransitions(Set> ts) { * * @param ts the set of states to remove */ - public void removeStates(Set ts) { + public void removeStates( + Set ts) { states.removeAll(ts); this.deterministic = Optional.empty(); this.minimized = Optional.empty(); @@ -205,7 +215,8 @@ public A minimize() { * * @return the set of outgoing transitions */ - public SortedSet> getOutgoingTransitionsFrom(State s) { + public SortedSet> getOutgoingTransitionsFrom( + State s) { return new TreeSet<>(transitions.stream().filter(t -> t.getSource().equals(s)).collect(Collectors.toSet())); } @@ -216,7 +227,8 @@ public SortedSet> getOutgoingTransitionsFrom(State s) { * * @return the set of ingoing transitions */ - public SortedSet> getIngoingTransitionsFrom(State s) { + public SortedSet> getIngoingTransitionsFrom( + State s) { return new TreeSet<>( transitions.stream().filter(t -> t.getDestination().equals(s)).collect(Collectors.toSet())); } @@ -340,7 +352,8 @@ public A reverse() { * @return the set of states that are reachable from {@code s} just with * epsilon transitions */ - public SortedSet epsilonClosure(State s) { + public SortedSet epsilonClosure( + State s) { SortedSet paths = new TreeSet<>(); SortedSet previous = new TreeSet<>(); SortedSet partial; @@ -371,7 +384,8 @@ public SortedSet epsilonClosure(State s) { * @return the set of states that are reachable from {@code set} just with * epsilon transitions */ - public SortedSet epsilonClosure(Set set) { + public SortedSet epsilonClosure( + Set set) { SortedSet solution = new TreeSet<>(); for (State s : set) @@ -389,7 +403,9 @@ public SortedSet epsilonClosure(Set set) { * * @return the set of states that can be reached */ - public SortedSet nextStatesNFA(Set set, T sym) { + public SortedSet nextStatesNFA( + Set set, + T sym) { SortedSet solution = new TreeSet<>(); for (State s : set) for (Transition t : getOutgoingTransitionsFrom(s)) @@ -399,7 +415,8 @@ public SortedSet nextStatesNFA(Set set, T sym) { return solution; } - private static boolean containsInitialState(Set states) { + private static boolean containsInitialState( + Set states) { for (State s : states) if (s.isInitial()) return true; @@ -407,7 +424,8 @@ private static boolean containsInitialState(Set states) { return false; } - private static boolean containsFinalState(Set states) { + private static boolean containsFinalState( + Set states) { for (State s : states) if (s.isFinal()) return true; @@ -423,7 +441,8 @@ private static boolean containsFinalState(Set states) { * * @return the set of symbols that can be read */ - public SortedSet getReadableSymbolsFromStates(Set states) { + public SortedSet getReadableSymbolsFromStates( + Set states) { SortedSet result = new TreeSet<>(); for (State s : states) @@ -442,7 +461,8 @@ public SortedSet getReadableSymbolsFromStates(Set states) { * * @return the set of symbols that can be read */ - public SortedSet getReadableSymbolsFromState(State state) { + public SortedSet getReadableSymbolsFromState( + State state) { SortedSet result = new TreeSet<>(); for (Transition t : getOutgoingTransitionsFrom(state)) @@ -555,7 +575,8 @@ public A determinize() { * of the languages recognized by {@code this} and {@code other} */ @SuppressWarnings("unchecked") - public A union(A other) { + public A union( + A other) { if (this == other) return (A) this; @@ -637,7 +658,8 @@ public boolean hasCycle() { * * @return the set of possible successors */ - public SortedSet getNextStates(State node) { + public SortedSet getNextStates( + State node) { SortedSet neighbors = new TreeSet<>(); for (Transition edge : getOutgoingTransitionsFrom(node)) neighbors.add(edge.getDestination()); @@ -697,7 +719,8 @@ public SortedSet getLanguage() throws CyclicAutomatonException { * * @return the totalized automaton */ - public A totalize(Set sigma) { + public A totalize( + Set sigma) { SortedSet newStates = new TreeSet<>(states); SortedSet> newTransitions = new TreeSet<>(transitions); @@ -728,7 +751,8 @@ public A totalize(Set sigma) { * * @return the complement Automaton of {@code this}. */ - public A complement(Set sigma) { + public A complement( + Set sigma) { SortedSet sts = new TreeSet<>(); SortedSet> delta = new TreeSet<>(); Map oldToNew = new HashMap<>(); @@ -757,7 +781,8 @@ public A complement(Set sigma) { * langauge. */ @SuppressWarnings("unchecked") - public A intersection(A other) { + public A intersection( + A other) { if (this == other) return (A) this; @@ -795,7 +820,9 @@ public A intersection(A other) { * * @return the state associated to the pair in the given state mapping */ - protected State getStateFromPair(Map> mapping, Pair pair) { + protected State getStateFromPair( + Map> mapping, + Pair pair) { for (Entry> entry : mapping.entrySet()) if (entry.getValue().getLeft().equals(pair.getLeft()) && entry.getValue().getRight().equals(pair.getRight())) @@ -824,7 +851,8 @@ public boolean acceptsEmptyLanguage() { * * @return {@code true} if that condition holds */ - public boolean isContained(A other) { + public boolean isContained( + A other) { SortedSet commonAlphabet = commonAlphabet(other); A complement = other.complement(commonAlphabet); A intersection = intersection(complement); @@ -842,7 +870,8 @@ public boolean isContained(A other) { * * @return a boolean value that points out if the automata are equivalent */ - public boolean isEqualTo(A other) { + public boolean isEqualTo( + A other) { A o = (A) other; if (!hasCycle() && !o.hasCycle()) try { @@ -906,7 +935,8 @@ public A copy() { * * @return a set of strings representing the common alphabet. */ - public SortedSet commonAlphabet(A other) { + public SortedSet commonAlphabet( + A other) { SortedSet fa = getAlphabet(); SortedSet sa = other.getAlphabet(); @@ -950,7 +980,9 @@ public SortedSet getAlphabet() { * * @return the computed set of symbols */ - public SortedSet getNextSymbols(State s, int n) { + public SortedSet getNextSymbols( + State s, + int n) { SortedSet result = new TreeSet<>(); if (n == 0) return result; @@ -989,7 +1021,8 @@ public SortedSet getNextSymbols(State s, int n) { * * @return a newly created automaton representing the widening automaton. */ - public A widening(int n) { + public A widening( + int n) { Map, SortedSet> powerStates = new HashMap<>(); Map> languages = new HashMap<>(); SortedSet newStates = new TreeSet<>(); @@ -1069,7 +1102,8 @@ public String prettyPrint() { * @return a newly created automaton representing the concatenation of the * given automata. */ - public A concat(A other) { + public A concat( + A other) { SortedSet newStates = new TreeSet<>(); SortedSet> newTransitions = new TreeSet<>(); @@ -1260,7 +1294,8 @@ public RegularExpression toRegex() { return B[0]; } - private static State nextNonInitialState(Iterator it) { + private static State nextNonInitialState( + Iterator it) { while (it.hasNext()) { State cursor = it.next(); if (!cursor.isInitial()) @@ -1278,7 +1313,9 @@ private static State nextNonInitialState(Iterator it) { * * @return the set of transitions connecting the two states */ - public SortedSet> getAllTransitionsConnecting(State s1, State s2) { + public SortedSet> getAllTransitionsConnecting( + State s1, + State s2) { SortedSet> result = new TreeSet<>(); for (Transition t : this.transitions) @@ -1334,7 +1371,9 @@ public A star() { * @return {@code true} if and only if {@code s1} and {@code s2} are * mutually reachable */ - public boolean areMutuallyReachable(State s1, State s2) { + public boolean areMutuallyReachable( + State s1, + State s2) { return !minimumPath(s1, s2).isEmpty() && !minimumPath(s2, s1).isEmpty(); } @@ -1369,7 +1408,8 @@ public Set> getAllPaths() { } @SuppressWarnings("unchecked") - private Set[]> depthFirst(State src) { + private Set[]> depthFirst( + State src) { Set[]> paths = new HashSet<>(); Stack[], int[]>> ws = new Stack<>(); ws.push(Triple.of(src, new Transition[0], new int[0])); @@ -1411,7 +1451,8 @@ private Set[]> depthFirst(State src) { return paths; } - private static void simplify(List path) { + private static void simplify( + List path) { ListIterator it = path.listIterator(); while (it.hasNext()) { if (!it.hasPrevious()) { @@ -1438,7 +1479,9 @@ private static void simplify(List path) { * * @return the minimum path */ - public List minimumPath(State src, State target) { + public List minimumPath( + State src, + State target) { Set unSettledNodes = new HashSet<>(); Map distance = new HashMap<>(); Map predecessors = new HashMap<>(); @@ -1455,7 +1498,10 @@ public List minimumPath(State src, State target) { return getPath(target, predecessors); } - private void findMinimalDistances(State node, Map distance, Map predecessors, + private void findMinimalDistances( + State node, + Map distance, + Map predecessors, Set unSettledNodes) { Set adjacentNodes = getNextStates(node); int shortest = getShortestDistance(node, distance); @@ -1469,14 +1515,18 @@ private void findMinimalDistances(State node, Map distance, Map< } } - private int getDistance(State node, State target) { + private int getDistance( + State node, + State target) { if (!getAllTransitionsConnecting(node, target).isEmpty()) return 1; // should never happen return -1; // TODO exception? } - private static State getMinimum(Set vertexes, Map distance) { + private static State getMinimum( + Set vertexes, + Map distance) { State minimum = null; for (State vertex : vertexes) if (minimum == null) @@ -1487,7 +1537,9 @@ else if (getShortestDistance(vertex, distance) < getShortestDistance(minimum, di return minimum; } - private static int getShortestDistance(State destination, Map distance) { + private static int getShortestDistance( + State destination, + Map distance) { Integer d = distance.get(destination); if (d == null) return Integer.MAX_VALUE; @@ -1495,7 +1547,9 @@ private static int getShortestDistance(State destination, Map di return d; } - private static List getPath(State target, Map predecessors) { + private static List getPath( + State target, + Map predecessors) { List path = new LinkedList<>(); State step = target; @@ -1525,7 +1579,9 @@ private static List getPath(State target, Map predecessors) * * @return the maximum path */ - public List maximumPath(State src, State target) { + public List maximumPath( + State src, + State target) { Set unSettledNodes = new HashSet<>(); Map distance = new HashMap<>(); Map predecessors = new HashMap<>(); @@ -1542,7 +1598,10 @@ public List maximumPath(State src, State target) { return getPath(target, predecessors); } - private void findMaximumDistances(State node, Map distance, Map predecessors, + private void findMaximumDistances( + State node, + Map distance, + Map predecessors, Set unSettledNodes) { Set adjacentNodes = getNextStates(node); int longest = getLongestDistance(node, distance); @@ -1556,7 +1615,9 @@ private void findMaximumDistances(State node, Map distance, Map< } } - private static State getMaximum(Set vertexes, Map distance) { + private static State getMaximum( + Set vertexes, + Map distance) { State maximum = null; for (State vertex : vertexes) if (maximum == null) @@ -1567,7 +1628,9 @@ else if (getLongestDistance(vertex, distance) > getLongestDistance(maximum, dist return maximum; } - private static int getLongestDistance(State destination, Map distance) { + private static int getLongestDistance( + State destination, + Map distance) { Integer d = distance.get(destination); if (d == null) return Integer.MIN_VALUE; @@ -1785,7 +1848,8 @@ else if (tmp > max) return max; } - private int maxStringLengthTraversing(List path) { + private int maxStringLengthTraversing( + List path) { if (path.size() == 0) return 0; @@ -1804,7 +1868,9 @@ private int maxStringLengthTraversing(List path) { return len; } - private int maxStringLength(State from, State to) { + private int maxStringLength( + State from, + State to) { Set> transitions = getAllTransitionsConnecting(from, to); if (transitions.isEmpty()) return 0; @@ -1848,7 +1914,8 @@ public boolean recognizesExactlyOneString() { * * @return the modified copy of this automaton */ - public A factorsChangingInitialState(State s) { + public A factorsChangingInitialState( + State s) { SortedSet newStates = new TreeSet<>(); Map nameToStates = new HashMap(); SortedSet> newDelta = new TreeSet<>(); @@ -1874,7 +1941,8 @@ public int hashCode() { @Override @SuppressWarnings("unchecked") - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -1901,7 +1969,9 @@ public boolean equals(Object obj) { * * @return the result of the concatenation */ - public abstract T concat(T first, T second); + public abstract T concat( + T first, + T second); /** * Yields a {@link RegularExpression} representing the given symbol. @@ -1910,5 +1980,6 @@ public boolean equals(Object obj) { * * @return the equivalent regular expression */ - public abstract RegularExpression symbolToRegex(T symbol); + public abstract RegularExpression symbolToRegex( + T symbol); } \ No newline at end of file diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/automaton/State.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/automaton/State.java index 91c35dd8d..aadfd7e81 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/automaton/State.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/automaton/State.java @@ -30,7 +30,10 @@ public final class State implements Comparable { * @param isInitial indicates if the state is initial. * @param isFinal indicates if the state is final. */ - public State(int id, boolean isInitial, boolean isFinal) { + public State( + int id, + boolean isInitial, + boolean isFinal) { this.isInitial = isInitial; this.isFinal = isFinal; this.id = id; @@ -47,7 +50,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -97,7 +101,8 @@ public int getId() { } @Override - public int compareTo(State state) { + public int compareTo( + State state) { int cmp; if ((cmp = Integer.compare(this.id, state.id)) != 0) return cmp; diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/automaton/Transition.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/automaton/Transition.java index 2627c66be..c54da8e62 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/automaton/Transition.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/automaton/Transition.java @@ -27,7 +27,10 @@ public final class Transition> implements Comparab * @param symbol the character that have to be read to execute the * transition. */ - public Transition(State source, State destination, T symbol) { + public Transition( + State source, + State destination, + T symbol) { Objects.requireNonNull(source); Objects.requireNonNull(destination); this.source = source; @@ -41,7 +44,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -97,7 +101,8 @@ public State getDestination() { } @Override - public int compareTo(Transition transition) { + public int compareTo( + Transition transition) { int cmp; if ((cmp = source.compareTo(transition.source)) != 0) return cmp; diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/graph/AdjacencyMatrix.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/graph/AdjacencyMatrix.java index bc2f63735..dd4ebf709 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/graph/AdjacencyMatrix.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/graph/AdjacencyMatrix.java @@ -28,7 +28,8 @@ * @param the type of the {@link Edge}s in this matrix */ public class AdjacencyMatrix, N extends Node, E extends Edge> - implements Iterable>> { + implements + Iterable>> { /** * The matrix. The left set in the mapped value is the set of ingoing edges, @@ -49,7 +50,8 @@ public AdjacencyMatrix() { * * @param other the matrix to copy */ - public AdjacencyMatrix(AdjacencyMatrix other) { + public AdjacencyMatrix( + AdjacencyMatrix other) { matrix = new HashMap<>(); for (Map.Entry> entry : other.matrix.entrySet()) matrix.put(entry.getKey(), new NodeEdges<>(entry.getValue())); @@ -61,7 +63,8 @@ public AdjacencyMatrix(AdjacencyMatrix other) { * * @param node the node to add */ - public void addNode(N node) { + public void addNode( + N node) { matrix.putIfAbsent(node, new NodeEdges<>()); } @@ -71,7 +74,8 @@ public void addNode(N node) { * * @param node the node to remove */ - public void removeNode(N node) { + public void removeNode( + N node) { if (!containsNode(node)) return; @@ -100,7 +104,8 @@ public Collection getNodes() { * the given edge are not part of * this matrix */ - public void addEdge(E e) { + public void addEdge( + E e) { if (!matrix.containsKey(e.getSource())) throw new UnsupportedOperationException("The source node is not in the graph"); @@ -116,7 +121,8 @@ public void addEdge(E e) { * * @param e the edge to remove */ - public void removeEdge(E e) { + public void removeEdge( + E e) { if (!matrix.containsKey(e.getSource()) || !matrix.containsKey(e.getDestination())) return; @@ -135,7 +141,9 @@ public void removeEdge(E e) { * @return the edge connecting {@code source} to {@code destination}, or * {@code null} */ - public E getEdgeConnecting(N source, N destination) { + public E getEdgeConnecting( + N source, + N destination) { if (!matrix.containsKey(source)) return null; @@ -156,7 +164,9 @@ public E getEdgeConnecting(N source, N destination) { * * @return the edges connecting {@code source} to {@code destination} */ - public Collection getEdgesConnecting(N source, N destination) { + public Collection getEdgesConnecting( + N source, + N destination) { if (!matrix.containsKey(source)) return Collections.emptyList(); @@ -175,7 +185,8 @@ public Collection getEdgesConnecting(N source, N destination) { * * @return the collection of ingoing edges */ - public Collection getIngoingEdges(N node) { + public Collection getIngoingEdges( + N node) { return matrix.get(node).ingoing; } @@ -186,7 +197,8 @@ public Collection getIngoingEdges(N node) { * * @return the collection of outgoing edges */ - public Collection getOutgoingEdges(N node) { + public Collection getOutgoingEdges( + N node) { return matrix.get(node).outgoing; } @@ -213,7 +225,8 @@ public Collection getEdges() { * * @throws IllegalArgumentException if the node is not in the graph */ - public Collection followersOf(N node) { + public Collection followersOf( + N node) { if (!matrix.containsKey(node)) throw new IllegalArgumentException("'" + node + "' is not in the graph"); @@ -231,7 +244,8 @@ public Collection followersOf(N node) { * * @throws IllegalArgumentException if the node is not in the graph */ - public Collection predecessorsOf(N node) { + public Collection predecessorsOf( + N node) { if (!matrix.containsKey(node)) throw new IllegalArgumentException("'" + node + "' is not in the graph"); @@ -245,7 +259,8 @@ public Collection predecessorsOf(N node) { * * @return {@code true} if the node is in this matrix */ - public boolean containsNode(N node) { + public boolean containsNode( + N node) { return matrix.containsKey(node); } @@ -256,7 +271,8 @@ public boolean containsNode(N node) { * * @return {@code true} if the edge is in this matrix */ - public boolean containsEdge(E edge) { + public boolean containsEdge( + E edge) { for (NodeEdges edges : matrix.values()) for (E e : edges.outgoing) if (e == edge || e.equals(edge)) @@ -279,7 +295,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -343,7 +360,9 @@ public Collection getExits() { * @return the minimum distance, in terms of number of edges to traverse, * between the given nodes */ - public int distance(N from, N to) { + public int distance( + N from, + N to) { if (!containsNode(from) || !containsNode(to)) return -1; @@ -375,7 +394,8 @@ public int distance(N from, N to) { * * @param other the matrix to merge into this one */ - public void mergeWith(AdjacencyMatrix other) { + public void mergeWith( + AdjacencyMatrix other) { for (N node : other.getNodes()) addNode(node); @@ -400,7 +420,9 @@ public void mergeWith(AdjacencyMatrix other) { * @throws ProgramValidationException if one of the aforementioned checks * fail */ - public void validate(Collection entrypoints) throws ProgramValidationException { + public void validate( + Collection entrypoints) + throws ProgramValidationException { Collection nodes = getNodes(); // all edges should be connected to statements inside the matrix @@ -418,7 +440,10 @@ public void validate(Collection entrypoints) throws ProgramValidationExceptio } } - private void validateEdge(Collection nodes, E edge) throws ProgramValidationException { + private void validateEdge( + Collection nodes, + E edge) + throws ProgramValidationException { if (!nodes.contains(edge.getSource())) throw new ProgramValidationException("Invalid edge: '" + edge + "' originates in a node that is not part of the graph"); @@ -447,7 +472,8 @@ private NodeEdges() { outgoing = new HashSet<>(); } - private NodeEdges(NodeEdges other) { + private NodeEdges( + NodeEdges other) { ingoing = new HashSet<>(other.ingoing); outgoing = new HashSet<>(other.outgoing); } @@ -480,7 +506,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/graph/BaseGraph.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/graph/BaseGraph.java index 1ad32529e..73dc2f0b4 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/graph/BaseGraph.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/graph/BaseGraph.java @@ -21,7 +21,8 @@ * @param the type of {@link Edge}s in this graph */ public abstract class BaseGraph, N extends Node, E extends Edge> - implements Graph { + implements + Graph { /** * The adjacency matrix of this graph, mapping nodes to the collection of @@ -51,7 +52,9 @@ protected BaseGraph() { * @param adjacencyMatrix the matrix containing all the nodes and the edges * that will be part of this graph */ - protected BaseGraph(Collection entrypoints, AdjacencyMatrix adjacencyMatrix) { + protected BaseGraph( + Collection entrypoints, + AdjacencyMatrix adjacencyMatrix) { this.adjacencyMatrix = adjacencyMatrix; this.entrypoints = entrypoints; } @@ -61,7 +64,8 @@ protected BaseGraph(Collection entrypoints, AdjacencyMatrix adjacenc * * @param other the original graph */ - protected BaseGraph(G other) { + protected BaseGraph( + G other) { this.adjacencyMatrix = new AdjacencyMatrix<>(other.adjacencyMatrix); this.entrypoints = new ArrayList<>(other.entrypoints); } @@ -91,19 +95,23 @@ public Collection getEdges() { } @Override - public void addNode(N node) { + public void addNode( + N node) { addNode(node, false); } @Override - public void addNode(N node, boolean entrypoint) { + public void addNode( + N node, + boolean entrypoint) { adjacencyMatrix.addNode(node); if (entrypoint) this.entrypoints.add(node); } @Override - public void addEdge(E edge) { + public void addEdge( + E edge) { adjacencyMatrix.addEdge(edge); } @@ -118,52 +126,64 @@ public int getEdgesCount() { } @Override - public boolean containsNode(N node) { + public boolean containsNode( + N node) { return adjacencyMatrix.containsNode(node); } @Override - public boolean containsEdge(E edge) { + public boolean containsEdge( + E edge) { return adjacencyMatrix.containsEdge(edge); } @Override - public E getEdgeConnecting(N source, N destination) { + public E getEdgeConnecting( + N source, + N destination) { return adjacencyMatrix.getEdgeConnecting(source, destination); } @Override - public Collection getEdgesConnecting(N source, N destination) { + public Collection getEdgesConnecting( + N source, + N destination) { return adjacencyMatrix.getEdgesConnecting(source, destination); } @Override - public Collection getIngoingEdges(N node) { + public Collection getIngoingEdges( + N node) { return adjacencyMatrix.getIngoingEdges(node); } @Override - public Collection getOutgoingEdges(N node) { + public Collection getOutgoingEdges( + N node) { return adjacencyMatrix.getOutgoingEdges(node); } @Override - public Collection followersOf(N node) { + public Collection followersOf( + N node) { return adjacencyMatrix.followersOf(node); } @Override - public Collection predecessorsOf(N node) { + public Collection predecessorsOf( + N node) { return adjacencyMatrix.predecessorsOf(node); } @Override - public SerializableGraph toSerializableGraph(BiFunction descriptionGenerator) { + public SerializableGraph toSerializableGraph( + BiFunction descriptionGenerator) { throw new UnsupportedOperationException(getClass().getName() + " does not provide a serialization logic"); } @Override - public boolean isEqualTo(G graph) { + public boolean isEqualTo( + G graph) { if (this == graph) return true; if (graph == null) diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/graph/Edge.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/graph/Edge.java index 81d029f88..bd18360fc 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/graph/Edge.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/graph/Edge.java @@ -39,5 +39,7 @@ public interface Edge, N extends Node, E exten * @return whether or not the visiting should stop when this call returns, * as decided by the visitor itself */ - boolean accept(GraphVisitor visitor, V tool); + boolean accept( + GraphVisitor visitor, + V tool); } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/graph/Graph.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/graph/Graph.java index 72160787b..a5145e9f2 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/graph/Graph.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/graph/Graph.java @@ -50,7 +50,8 @@ public interface Graph, N extends Node, E exte * * @param node the node to add */ - void addNode(N node); + void addNode( + N node); /** * Adds the given node to the set of nodes, optionally marking this as @@ -60,7 +61,9 @@ public interface Graph, N extends Node, E exte * @param entrypoint if {@code true} causes the given node to be considered * as an entrypoint. */ - void addNode(N node, boolean entrypoint); + void addNode( + N node, + boolean entrypoint); /** * Adds an edge to this graph. @@ -71,7 +74,8 @@ public interface Graph, N extends Node, E exte * the given edge are not part of * this graph */ - void addEdge(E edge); + void addEdge( + E edge); /** * Yields the total number of nodes of this graph. @@ -94,7 +98,8 @@ public interface Graph, N extends Node, E exte * * @return {@code true} if the node is in this graph */ - boolean containsNode(N node); + boolean containsNode( + N node); /** * Yields {@code true} if the given edge is contained in this graph. @@ -103,7 +108,8 @@ public interface Graph, N extends Node, E exte * * @return {@code true} if the edge is in this graph */ - boolean containsEdge(E edge); + boolean containsEdge( + E edge); /** * Yields the edge connecting the two given nodes, if any. Yields @@ -119,7 +125,9 @@ public interface Graph, N extends Node, E exte * @return the edge connecting {@code source} to {@code destination}, or * {@code null} */ - E getEdgeConnecting(N source, N destination); + E getEdgeConnecting( + N source, + N destination); /** * Yields all edges connecting the two given nodes, if any. Yields an empty @@ -131,7 +139,9 @@ public interface Graph, N extends Node, E exte * * @return the edges connecting {@code source} to {@code destination} */ - Collection getEdgesConnecting(N source, N destination); + Collection getEdgesConnecting( + N source, + N destination); /** * Yields the ingoing edges to the given node. @@ -140,7 +150,8 @@ public interface Graph, N extends Node, E exte * * @return the collection of ingoing edges */ - Collection getIngoingEdges(N node); + Collection getIngoingEdges( + N node); /** * Yields the outgoing edges from the given node. @@ -149,7 +160,8 @@ public interface Graph, N extends Node, E exte * * @return the collection of outgoing edges */ - Collection getOutgoingEdges(N node); + Collection getOutgoingEdges( + N node); /** * Yields the collection of the nodes that are followers of the given one, @@ -161,7 +173,8 @@ public interface Graph, N extends Node, E exte * * @return the collection of followers */ - Collection followersOf(N node); + Collection followersOf( + N node); /** * Yields the collection of the nodes that are predecessors of the given @@ -173,7 +186,8 @@ public interface Graph, N extends Node, E exte * * @return the collection of predecessors */ - Collection predecessorsOf(N node); + Collection predecessorsOf( + N node); /** * Yields an instance of {@link SerializableGraph} built from this one. The @@ -197,7 +211,8 @@ public default SerializableGraph toSerializableGraph() { * * @return a {@link SerializableGraph} instance */ - SerializableGraph toSerializableGraph(BiFunction descriptionGenerator); + SerializableGraph toSerializableGraph( + BiFunction descriptionGenerator); /** * Checks if this graph is effectively equal to the given one, that is, if @@ -208,7 +223,8 @@ public default SerializableGraph toSerializableGraph() { * @return {@code true} if this graph and the given one are effectively * equals */ - boolean isEqualTo(G graph); + boolean isEqualTo( + G graph); /** * Accepts the given {@link GraphVisitor}. This method first invokes @@ -226,7 +242,9 @@ public default SerializableGraph toSerializableGraph() { * @param tool the auxiliary tool that {@code visitor} can use */ @SuppressWarnings("unchecked") - public default void accept(GraphVisitor visitor, V tool) { + public default void accept( + GraphVisitor visitor, + V tool) { if (!visitor.visit(tool, (G) this)) return; diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/graph/GraphVisitor.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/graph/GraphVisitor.java index db370dfe1..a9c5ee762 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/graph/GraphVisitor.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/graph/GraphVisitor.java @@ -32,7 +32,9 @@ public interface GraphVisitor, N extends Node, * returns. If this method returns {@code false}, the visiting * will be interrupted */ - default boolean visit(V tool, G graph) { + default boolean visit( + V tool, + G graph) { return true; } @@ -48,7 +50,10 @@ default boolean visit(V tool, G graph) { * returns. If this method returns {@code false}, the visiting * will be interrupted */ - default boolean visit(V tool, G graph, N node) { + default boolean visit( + V tool, + G graph, + N node) { return true; } @@ -64,7 +69,10 @@ default boolean visit(V tool, G graph, N node) { * returns. If this method returns {@code false}, the visiting * will be interrupted */ - default boolean visit(V tool, G graph, E edge) { + default boolean visit( + V tool, + G graph, + E edge) { return true; } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/graph/Node.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/graph/Node.java index 439a6f60f..e73a88453 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/graph/Node.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/graph/Node.java @@ -26,5 +26,7 @@ public interface Node, N extends Node, E exten * @return whether or not the visiting should stop when this call returns, * as decided by the visitor itself */ - boolean accept(GraphVisitor visitor, V tool); + boolean accept( + GraphVisitor visitor, + V tool); } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/graph/algorithms/BackwardFixpoint.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/graph/algorithms/BackwardFixpoint.java new file mode 100644 index 000000000..03a2327b8 --- /dev/null +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/graph/algorithms/BackwardFixpoint.java @@ -0,0 +1,212 @@ +package it.unive.lisa.util.datastructures.graph.algorithms; + +import static java.lang.String.format; + +import it.unive.lisa.util.collections.workset.WorkingSet; +import it.unive.lisa.util.datastructures.graph.Edge; +import it.unive.lisa.util.datastructures.graph.Graph; +import it.unive.lisa.util.datastructures.graph.Node; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +/** + * A backward fixpoint algorithm for a {@link Graph}, parametric to the + * {@link Fixpoint.FixpointImplementation} that one wants to use to compute the + * results. + * + * @author Luca Negrini + * + * @param the type of the source {@link Graph} + * @param the type of the {@link Node}s in the source graph + * @param the type of the {@link Edge}s in the source graph + * @param the type of data computed by the fixpoint + */ +public class BackwardFixpoint, N extends Node, E extends Edge, T> { + + /** + * Common format for error messages. + */ + protected static final String ERROR = "Exception while %s of '%s' in '%s'"; + + /** + * The graph to target. + */ + protected final G graph; + + /** + * Whether or not all nodes should be processed at least once. + */ + protected final boolean forceFullEvaluation; + + /** + * Builds a fixpoint for the given {@link Graph}. + * + * @param graph the source graph + * @param forceFullEvaluation whether or not the fixpoint should evaluate + * all nodes independently of the fixpoint + * implementation + */ + public BackwardFixpoint( + G graph, + boolean forceFullEvaluation) { + this.graph = graph; + this.forceFullEvaluation = forceFullEvaluation; + } + + /** + * Runs the fixpoint. Invoking this method effectively recomputes the + * result: no caching on previous runs is executed. It starts with empty + * result. + * + * @param startingPoints a map containing all the nodes to start the + * fixpoint at, each mapped to its entry state. + * @param ws the instance of {@link WorkingSet} to use for the + * fixpoint + * @param implementation the {@link Fixpoint.FixpointImplementation} to use + * for running the fixpoint + * + * @return a mapping from each (reachable) node of the source graph to the + * fixpoint result computed at that node + * + * @throws FixpointException if something goes wrong during the fixpoint + * execution + */ + public Map fixpoint( + Map startingPoints, + WorkingSet ws, + Fixpoint.FixpointImplementation implementation) + throws FixpointException { + return fixpoint(startingPoints, ws, implementation, null); + } + + /** + * Runs the fixpoint. Invoking this method effectively recomputes the + * result: no caching on previous runs is executed. + * + * @param startingPoints a map containing all the nodes to start the + * fixpoint at, each mapped to its entry state. + * @param ws the instance of {@link WorkingSet} to use for the + * fixpoint + * @param implementation the {@link Fixpoint.FixpointImplementation} to use + * for running the fixpoint + * @param initialResult the map of initial result to use for running the + * fixpoint + * + * @return a mapping from each (reachable) node of the source graph to the + * fixpoint result computed at that node + * + * @throws FixpointException if something goes wrong during the fixpoint + * execution + */ + public Map fixpoint( + Map startingPoints, + WorkingSet ws, + Fixpoint.FixpointImplementation implementation, + Map initialResult) + throws FixpointException { + Map result = initialResult == null ? new HashMap<>(graph.getNodesCount()) : new HashMap<>(initialResult); + startingPoints.keySet().forEach(ws::push); + + Set toProcess = null; + if (forceFullEvaluation) + toProcess = new HashSet<>(graph.getNodes()); + + T newApprox; + while (!ws.isEmpty()) { + N current = ws.pop(); + + if (current == null) + throw new FixpointException("null node encountered during fixpoint in '" + graph + "'"); + if (!graph.containsNode(current)) + throw new FixpointException("'" + current + "' is not part of '" + graph + "'"); + + T exitstate = getExitState(current, startingPoints.get(current), implementation, result); + if (exitstate == null) + throw new FixpointException("'" + current + "' does not have an entry state"); + + try { + newApprox = implementation.semantics(current, exitstate); + } catch (Exception e) { + throw new FixpointException(format(ERROR, "computing semantics", current, graph), e); + } + + T oldApprox = result.get(current); + if (oldApprox != null) + try { + newApprox = implementation.operation(current, newApprox, oldApprox); + } catch (Exception e) { + throw new FixpointException(format(ERROR, "joining states", current, graph), e); + } + try { + // we go on if we were asked to analyze all nodes at least once + if ((forceFullEvaluation && toProcess.remove(current)) + // or if this is the first time we analyze this node + || oldApprox == null + // or if we got a result that should not be considered + // equal + || !implementation.equality(current, newApprox, oldApprox)) { + result.put(current, newApprox); + for (N instr : graph.predecessorsOf(current)) + ws.push(instr); + } + } catch (Exception e) { + throw new FixpointException(format(ERROR, "updating result", current, graph), e); + } + } + + return result; + } + + /** + * Yields the exit state for the given node. + * + * @param node the node under evaluation + * @param startstate a predefined ending state that must be taken into + * account for the computation + * @param implementation the fixpoint implementation that knows how to + * combine different states + * @param result the current approximations for each node + * + * @return the computed state + * + * @throws FixpointException if something goes wrong during the computation + */ + protected T getExitState( + N node, + T startstate, + Fixpoint.FixpointImplementation implementation, + Map result) + throws FixpointException { + Collection follows = graph.followersOf(node); + List states = new ArrayList<>(follows.size()); + + for (N follow : follows) + if (result.containsKey(follow)) { + // this might not have been computed yet + E edge = graph.getEdgeConnecting(node, follow); + try { + states.add(implementation.traverse(edge, result.get(follow))); + } catch (Exception e) { + throw new FixpointException(format(ERROR, "computing edge semantics", edge, graph), e); + } + } + + T exitstate = startstate; + try { + for (T s : states) + if (exitstate == null) + exitstate = s; + else + exitstate = implementation.union(node, exitstate, s); + } catch (Exception e) { + throw new FixpointException(format(ERROR, "creating entry state", node, graph), e); + } + + return exitstate; + } +} diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/graph/algorithms/Dominators.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/graph/algorithms/Dominators.java index d71d26c99..133577860 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/graph/algorithms/Dominators.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/graph/algorithms/Dominators.java @@ -62,7 +62,8 @@ public Map> getDominators() { * @return a map containing, for each node of the graph, the set of nodes * that dominates it */ - public Map> build(G graph) { + public Map> build( + G graph) { dominators.clear(); Collection entries = graph.getEntrypoints(); WorkingSet ws = FIFOWorkingSet.mk(); @@ -86,7 +87,8 @@ public Map> build(G graph) { return dominators; } - private Set intersect(Collection nodes) { + private Set intersect( + Collection nodes) { if (nodes == null || nodes.isEmpty()) return Collections.emptySet(); diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/graph/algorithms/Fixpoint.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/graph/algorithms/Fixpoint.java index e430bcef4..538ec438e 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/graph/algorithms/Fixpoint.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/graph/algorithms/Fixpoint.java @@ -50,7 +50,9 @@ public class Fixpoint, N extends Node, E exten * all nodes independently of the fixpoint * implementation */ - public Fixpoint(G graph, boolean forceFullEvaluation) { + public Fixpoint( + G graph, + boolean forceFullEvaluation) { this.graph = graph; this.forceFullEvaluation = forceFullEvaluation; } @@ -82,7 +84,10 @@ public interface FixpointImplementation { * * @throws Exception if something goes wrong during the computation */ - T semantics(N node, T entrystate) throws Exception; + T semantics( + N node, + T entrystate) + throws Exception; /** * Given an edge and a state, computes a new state by modifying the @@ -99,7 +104,10 @@ public interface FixpointImplementation { * * @throws Exception if something goes wrong during the computation */ - T traverse(E edge, T entrystate) throws Exception; + T traverse( + E edge, + T entrystate) + throws Exception; /** * Given a node and two states, computes their union (i.e. least upper @@ -118,7 +126,11 @@ public interface FixpointImplementation { * * @throws Exception if something goes wrong during the computation */ - T union(N node, T left, T right) throws Exception; + T union( + N node, + T left, + T right) + throws Exception; /** * Given a node and two states, joins the states (i.e. least upper bound @@ -136,7 +148,11 @@ public interface FixpointImplementation { * * @throws Exception if something goes wrong during the computation */ - T operation(N node, T approx, T old) throws Exception; + T operation( + N node, + T approx, + T old) + throws Exception; /** * Given a node and two states, yields whether or not the most recent @@ -159,7 +175,11 @@ public interface FixpointImplementation { * * @throws Exception if something goes wrong during the computation */ - boolean equality(N node, T approx, T old) throws Exception; + boolean equality( + N node, + T approx, + T old) + throws Exception; } /** @@ -180,7 +200,9 @@ public interface FixpointImplementation { * @throws FixpointException if something goes wrong during the fixpoint * execution */ - public Map fixpoint(Map startingPoints, WorkingSet ws, + public Map fixpoint( + Map startingPoints, + WorkingSet ws, FixpointImplementation implementation) throws FixpointException { return fixpoint(startingPoints, ws, implementation, null); @@ -205,7 +227,8 @@ public Map fixpoint(Map startingPoints, WorkingSet ws, * @throws FixpointException if something goes wrong during the fixpoint * execution */ - public Map fixpoint(Map startingPoints, + public Map fixpoint( + Map startingPoints, WorkingSet ws, FixpointImplementation implementation, Map initialResult) @@ -277,7 +300,11 @@ public Map fixpoint(Map startingPoints, * * @throws FixpointException if something goes wrong during the computation */ - protected T getEntryState(N node, T startstate, FixpointImplementation implementation, Map result) + protected T getEntryState( + N node, + T startstate, + FixpointImplementation implementation, + Map result) throws FixpointException { Collection preds = graph.predecessorsOf(node); List states = new ArrayList<>(preds.size()); diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/graph/algorithms/FixpointException.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/graph/algorithms/FixpointException.java index fad249b73..82cbdedf6 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/graph/algorithms/FixpointException.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/graph/algorithms/FixpointException.java @@ -3,7 +3,7 @@ /** * An exception raised during the fixpoint computation. * - * @author Luca Negrini + * @author Luca Negrini */ public class FixpointException extends Exception { @@ -22,7 +22,9 @@ public FixpointException() { * @param message the message associated with this exception * @param cause the underlying cause of this exception */ - public FixpointException(String message, Throwable cause) { + public FixpointException( + String message, + Throwable cause) { super(message, cause); } @@ -31,7 +33,8 @@ public FixpointException(String message, Throwable cause) { * * @param message the message associated with this exception */ - public FixpointException(String message) { + public FixpointException( + String message) { super(message); } @@ -40,7 +43,8 @@ public FixpointException(String message) { * * @param cause the underlying cause of this exception */ - public FixpointException(Throwable cause) { + public FixpointException( + Throwable cause) { super(cause); } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/graph/algorithms/SCCs.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/graph/algorithms/SCCs.java index 1d5d1de24..a11e9f866 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/graph/algorithms/SCCs.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/graph/algorithms/SCCs.java @@ -65,7 +65,8 @@ public Collection> getSCCs() { * * @return the set of non trivial sccs */ - public Collection> buildNonTrivial(G graph) { + public Collection> buildNonTrivial( + G graph) { build(graph); Collection> toRemove = new HashSet<>(); for (Collection scc : sccs) { @@ -89,7 +90,8 @@ public Collection> buildNonTrivial(G graph) { * * @return the set of all sccs */ - public Collection> build(G graph) { + public Collection> build( + G graph) { sccs.clear(); int index = 0; diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/graph/code/CodeEdge.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/graph/code/CodeEdge.java index 17b393f20..aae397c31 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/graph/code/CodeEdge.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/graph/code/CodeEdge.java @@ -12,7 +12,9 @@ * @param the type of the {@link CodeEdge}s in this list */ public interface CodeEdge, N extends CodeNode, E extends CodeEdge> - extends Edge, Comparable { + extends + Edge, + Comparable { /** * Yields {@code true} if and only if this edge represent unconditional @@ -33,5 +35,7 @@ public interface CodeEdge, N extends CodeNode the type of {@link CodeEdge}s in this graph */ public abstract class CodeGraph, N extends CodeNode, E extends CodeEdge> - implements Graph { + implements + Graph { /** * The node list of this graph. @@ -50,7 +51,8 @@ public abstract class CodeGraph, N extends CodeNode * {@link CodeEdge#newInstance(CodeNode, CodeNode)} * to obtain instances of sequential edges */ - protected CodeGraph(E sequentialSingleton) { + protected CodeGraph( + E sequentialSingleton) { this.list = new NodeList<>(sequentialSingleton); this.entrypoints = new HashSet<>(); } @@ -62,7 +64,9 @@ protected CodeGraph(E sequentialSingleton) { * other graphs * @param nodes the list of nodes contained in this graph */ - protected CodeGraph(Collection entrypoints, NodeList nodes) { + protected CodeGraph( + Collection entrypoints, + NodeList nodes) { this.list = nodes; this.entrypoints = entrypoints; } @@ -72,7 +76,8 @@ protected CodeGraph(Collection entrypoints, NodeList nodes) { * * @param other the original graph */ - protected CodeGraph(G other) { + protected CodeGraph( + G other) { this.list = new NodeList<>(other.list); this.entrypoints = new ArrayList<>(other.entrypoints); } @@ -102,19 +107,23 @@ public Collection getEdges() { } @Override - public void addNode(N node) { + public void addNode( + N node) { addNode(node, false); } @Override - public void addNode(N node, boolean entrypoint) { + public void addNode( + N node, + boolean entrypoint) { list.addNode(node); if (entrypoint) this.entrypoints.add(node); } @Override - public void addEdge(E edge) { + public void addEdge( + E edge) { list.addEdge(edge); } @@ -129,52 +138,64 @@ public int getEdgesCount() { } @Override - public boolean containsNode(N node) { + public boolean containsNode( + N node) { return list.containsNode(node); } @Override - public boolean containsEdge(E edge) { + public boolean containsEdge( + E edge) { return list.containsEdge(edge); } @Override - public E getEdgeConnecting(N source, N destination) { + public E getEdgeConnecting( + N source, + N destination) { return list.getEdgeConnecting(source, destination); } @Override - public Collection getEdgesConnecting(N source, N destination) { + public Collection getEdgesConnecting( + N source, + N destination) { return list.getEdgesConnecting(source, destination); } @Override - public Collection getIngoingEdges(N node) { + public Collection getIngoingEdges( + N node) { return list.getIngoingEdges(node); } @Override - public Collection getOutgoingEdges(N node) { + public Collection getOutgoingEdges( + N node) { return list.getOutgoingEdges(node); } @Override - public Collection followersOf(N node) { + public Collection followersOf( + N node) { return list.followersOf(node); } @Override - public Collection predecessorsOf(N node) { + public Collection predecessorsOf( + N node) { return list.predecessorsOf(node); } @Override - public SerializableGraph toSerializableGraph(BiFunction descriptionGenerator) { + public SerializableGraph toSerializableGraph( + BiFunction descriptionGenerator) { throw new UnsupportedOperationException(getClass().getName() + " does not provide a serialization logic"); } @Override - public boolean isEqualTo(G graph) { + public boolean isEqualTo( + G graph) { if (this == graph) return true; if (graph == null) @@ -224,7 +245,9 @@ public String toString() { * being simplified with an * outgoing non-simplifiable edge */ - public Set simplify(Class target, Collection removedEdges, + public Set simplify( + Class target, + Collection removedEdges, Map, E> replacedEdges) { Set targets = getNodes().stream().filter(k -> target.isAssignableFrom(k.getClass())) .collect(Collectors.toSet()); @@ -238,7 +261,8 @@ public Set simplify(Class target, Collection removedEdges, * * @param node the node about to be simplified */ - public void preSimplify(N node) { + public void preSimplify( + N node) { // nothing to do, but subclasses might redefine } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/graph/code/CodeNode.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/graph/code/CodeNode.java index 77785abe5..b1a1cbea1 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/graph/code/CodeNode.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/graph/code/CodeNode.java @@ -12,7 +12,9 @@ * @param the type of the {@link CodeEdge}s in this list */ public interface CodeNode, N extends CodeNode, E extends CodeEdge> - extends Node, Comparable { + extends + Node, + Comparable { /** * Sets the offset of this node to the given value, and then proceeds by @@ -23,7 +25,8 @@ public interface CodeNode, N extends CodeNode the type of the {@link CodeEdge}s in this list */ public class NodeList, N extends CodeNode, E extends CodeEdge> - implements Iterable { + implements + Iterable { private static final String EDGE_SIMPLIFY_ERROR = "Cannot simplify an edge with class "; @@ -84,7 +85,8 @@ public class NodeList, N extends CodeNode, * {@link CodeEdge#newInstance(CodeNode, CodeNode)} * to obtain instances of sequential edges */ - public NodeList(E sequentialSingleton) { + public NodeList( + E sequentialSingleton) { this(sequentialSingleton, true); } @@ -98,7 +100,9 @@ public NodeList(E sequentialSingleton) { * @param computeOffsets whether or not offsets should be set to nodes * when added to this list */ - public NodeList(E sequentialSingleton, boolean computeOffsets) { + public NodeList( + E sequentialSingleton, + boolean computeOffsets) { this.sequentialSingleton = sequentialSingleton; nodes = new LinkedList<>(); cutoff = new HashSet<>(); @@ -112,7 +116,8 @@ public NodeList(E sequentialSingleton, boolean computeOffsets) { * * @param other the list to copy */ - public NodeList(NodeList other) { + public NodeList( + NodeList other) { sequentialSingleton = other.sequentialSingleton; nodes = new LinkedList<>(other.nodes); cutoff = new HashSet<>(other.cutoff); @@ -134,7 +139,8 @@ public NodeList(NodeList other) { * * @param node the node to add */ - public void addNode(N node) { + public void addNode( + N node) { if (containsNode(node)) // already in the graph return; @@ -155,7 +161,8 @@ public void addNode(N node) { * * @param node the node to remove */ - public void removeNode(N node) { + public void removeNode( + N node) { if (!containsNode(node)) return; @@ -222,7 +229,8 @@ public final Collection getNodes() { * the given edge are not part of * this list */ - public void addEdge(E e) { + public void addEdge( + E e) { int src = nodes.indexOf(e.getSource()); if (src == -1) throw new UnsupportedOperationException("The source node is not in the graph"); @@ -245,7 +253,8 @@ public void addEdge(E e) { * * @param e the edge to remove */ - public void removeEdge(E e) { + public void removeEdge( + E e) { int src = nodes.indexOf(e.getSource()); int dest = nodes.indexOf(e.getDestination()); if (src == -1 || dest == -1) @@ -282,7 +291,9 @@ public void removeEdge(E e) { * @return the edge connecting {@code source} to {@code destination}, or * {@code null} */ - public final E getEdgeConnecting(N source, N destination) { + public final E getEdgeConnecting( + N source, + N destination) { int src = nodes.indexOf(source); int dest = nodes.indexOf(destination); if (src == -1 || dest == -1) @@ -311,7 +322,9 @@ public final E getEdgeConnecting(N source, N destination) { * * @return the edges connecting {@code source} to {@code destination} */ - public Collection getEdgesConnecting(N source, N destination) { + public Collection getEdgesConnecting( + N source, + N destination) { int src = nodes.indexOf(source); int dest = nodes.indexOf(destination); if (src == -1 || dest == -1) @@ -337,7 +350,8 @@ public Collection getEdgesConnecting(N source, N destination) { * * @return the collection of ingoing edges */ - public final Collection getIngoingEdges(N node) { + public final Collection getIngoingEdges( + N node) { int src = nodes.indexOf(node); if (src == -1) return Collections.emptySet(); @@ -360,7 +374,8 @@ public final Collection getIngoingEdges(N node) { * * @return the collection of outgoing edges */ - public final Collection getOutgoingEdges(N node) { + public final Collection getOutgoingEdges( + N node) { int src = nodes.indexOf(node); if (src == -1) return Collections.emptySet(); @@ -403,7 +418,8 @@ public final Collection getEdges() { * * @throws IllegalArgumentException if the node is not in the graph */ - public final Collection followersOf(N node) { + public final Collection followersOf( + N node) { int src = nodes.indexOf(node); if (src == -1) throw new IllegalArgumentException("'" + node + "' is not in the graph"); @@ -430,7 +446,8 @@ public final Collection followersOf(N node) { * * @throws IllegalArgumentException if the node is not in the graph */ - public final Collection predecessorsOf(N node) { + public final Collection predecessorsOf( + N node) { int src = nodes.indexOf(node); if (src == -1) throw new IllegalArgumentException("'" + node + "' is not in the graph"); @@ -472,7 +489,10 @@ public final Collection predecessorsOf(N node) { * being simplified with an * outgoing non-simplifiable edge */ - public void simplify(Iterable targets, Collection entrypoints, Collection removedEdges, + public void simplify( + Iterable targets, + Collection entrypoints, + Collection removedEdges, Map, E> replacedEdges) { removedEdges.clear(); replacedEdges.clear(); @@ -537,7 +557,8 @@ else if (!ingoing.isEmpty() && outgoing.isEmpty()) * * @return {@code true} if the node is in this list */ - public boolean containsNode(N node) { + public boolean containsNode( + N node) { return nodes.contains(node); } @@ -548,7 +569,8 @@ public boolean containsNode(N node) { * * @return {@code true} if the edge is in this list */ - public boolean containsEdge(E edge) { + public boolean containsEdge( + E edge) { int src = nodes.indexOf(edge.getSource()); int dest = nodes.indexOf(edge.getDestination()); if (src == -1 || dest == -1) @@ -582,7 +604,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -650,7 +673,8 @@ public String toString() { * * @param root the node to use as root for the removal */ - public void removeFrom(N root) { + public void removeFrom( + N root) { if (!containsNode(root)) return; @@ -716,7 +740,9 @@ public Collection getExits() { * @return the minimum distance, in terms of number of edges to traverse, * between the given nodes */ - public int distance(N from, N to) { + public int distance( + N from, + N to) { if (!containsNode(from) || !containsNode(to)) return -1; @@ -748,7 +774,8 @@ public int distance(N from, N to) { * * @param other the list to merge into this one */ - public void mergeWith(NodeList other) { + public void mergeWith( + NodeList other) { for (N node : other.getNodes()) addNode(node); @@ -773,7 +800,9 @@ public void mergeWith(NodeList other) { * @throws ProgramValidationException if one of the aforementioned checks * fail */ - public void validate(Collection entrypoints) throws ProgramValidationException { + public void validate( + Collection entrypoints) + throws ProgramValidationException { // all edges should be connected to statements inside the list for (N node : nodes) { NodeEdges edges = extraEdges.get(node); @@ -796,7 +825,10 @@ public void validate(Collection entrypoints) throws ProgramValidationExceptio } } - private void validateEdge(Collection nodes, E edge) throws ProgramValidationException { + private void validateEdge( + Collection nodes, + E edge) + throws ProgramValidationException { if (!nodes.contains(edge.getSource())) throw new ProgramValidationException("Invalid edge: '" + edge + "' originates in a node that is not part of the graph"); @@ -827,7 +859,8 @@ private NodeEdges() { outgoing = new TreeSet<>(); } - private NodeEdges(NodeEdges other) { + private NodeEdges( + NodeEdges other) { ingoing = new TreeSet<>(other.ingoing); outgoing = new TreeSet<>(other.outgoing); } @@ -860,7 +893,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/regex/Atom.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/regex/Atom.java index fd8f92ae7..9a339514f 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/regex/Atom.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/regex/Atom.java @@ -27,7 +27,8 @@ public class Atom extends RegularExpression { * * @param s the string to be represented by this atom */ - public Atom(String s) { + public Atom( + String s) { this.string = s; } @@ -56,7 +57,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -79,12 +81,15 @@ public RegularExpression simplify() { @Override public , - T extends TransitionSymbol> A toAutomaton(AutomataFactory factory) { + T extends TransitionSymbol> A toAutomaton( + AutomataFactory factory) { return isEmpty() ? factory.emptyString() : factory.singleString(string); } @Override - protected Set substringAux(int charsToSkip, int missingChars) { + protected Set substringAux( + int charsToSkip, + int missingChars) { Set result = new HashSet<>(); int len = string.length(); @@ -108,7 +113,8 @@ public boolean isEmpty() { } @Override - public boolean is(String str) { + public boolean is( + String str) { return string.equals(str); } @@ -123,37 +129,44 @@ public int minLength() { } @Override - public boolean mayContain(String s) { + public boolean mayContain( + String s) { return contains(s); } @Override - public boolean contains(String s) { + public boolean contains( + String s) { return string.contains(s); } @Override - public boolean mayStartWith(String s) { + public boolean mayStartWith( + String s) { return startsWith(s); } @Override - public boolean startsWith(String s) { + public boolean startsWith( + String s) { return string.startsWith(s); } @Override - public boolean mayEndWith(String s) { + public boolean mayEndWith( + String s) { return endsWith(s); } @Override - public boolean endsWith(String s) { + public boolean endsWith( + String s) { return string.endsWith(s); } @Override - protected RegularExpression unrollStarToFixedLength(int length) { + protected RegularExpression unrollStarToFixedLength( + int length) { return this; } @@ -179,12 +192,14 @@ public RegularExpression[] explode() { } @Override - protected int compareToAux(RegularExpression other) { + protected int compareToAux( + RegularExpression other) { return string.compareTo(other.asAtom().string); } @Override - public RegularExpression repeat(long n) { + public RegularExpression repeat( + long n) { if (n == 0) return Atom.EPSILON; diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/regex/Comp.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/regex/Comp.java index 7555a8308..19594a5c7 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/regex/Comp.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/regex/Comp.java @@ -31,7 +31,9 @@ public final class Comp extends RegularExpression { * @param first the first regular expression * @param second the second regular expression */ - public Comp(RegularExpression first, RegularExpression second) { + public Comp( + RegularExpression first, + RegularExpression second) { this.first = first; this.second = second; } @@ -69,7 +71,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -141,12 +144,15 @@ else if (first instanceof Star && second instanceof Star @Override public , - T extends TransitionSymbol> A toAutomaton(AutomataFactory factory) { + T extends TransitionSymbol> A toAutomaton( + AutomataFactory factory) { return first.toAutomaton(factory).concat(second.toAutomaton(factory)); } @Override - protected Set substringAux(int charsToSkip, int missingChars) { + protected Set substringAux( + int charsToSkip, + int missingChars) { Set result = new HashSet<>(); Set firstSS = first.substringAux(charsToSkip, missingChars); @@ -168,7 +174,8 @@ public boolean isEmpty() { } @Override - public boolean is(String str) { + public boolean is( + String str) { throw new UnsupportedOperationException(); } @@ -187,7 +194,8 @@ public int minLength() { } @Override - public boolean mayContain(String s) { + public boolean mayContain( + String s) { if (first.mayContain(s) || second.mayContain(s)) return true; @@ -201,7 +209,8 @@ public boolean mayContain(String s) { } @Override - public boolean contains(String s) { + public boolean contains( + String s) { if (first.contains(s) || second.contains(s)) return true; @@ -215,7 +224,8 @@ public boolean contains(String s) { } @Override - public boolean mayStartWith(String s) { + public boolean mayStartWith( + String s) { if (first.mayStartWith(s)) return true; @@ -228,7 +238,8 @@ public boolean mayStartWith(String s) { } @Override - public boolean startsWith(String s) { + public boolean startsWith( + String s) { if (first.startsWith(s)) return true; @@ -241,7 +252,8 @@ public boolean startsWith(String s) { } @Override - public boolean mayEndWith(String s) { + public boolean mayEndWith( + String s) { if (second.mayEndWith(s)) return true; @@ -249,7 +261,8 @@ public boolean mayEndWith(String s) { } @Override - public boolean endsWith(String s) { + public boolean endsWith( + String s) { if (second.endsWith(s)) return true; @@ -257,7 +270,8 @@ public boolean endsWith(String s) { } @Override - protected RegularExpression unrollStarToFixedLength(int length) { + protected RegularExpression unrollStarToFixedLength( + int length) { return first.unrollStarToFixedLength(length).comp(second.unrollStarToFixedLength(length)); } @@ -282,7 +296,8 @@ public RegularExpression[] explode() { } @Override - protected int compareToAux(RegularExpression other) { + protected int compareToAux( + RegularExpression other) { int cmp; if ((cmp = first.compareTo(other.asComp().first)) != 0) return cmp; @@ -290,7 +305,8 @@ protected int compareToAux(RegularExpression other) { } @Override - public RegularExpression repeat(long n) { + public RegularExpression repeat( + long n) { if (n == 0) return Atom.EPSILON; diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/regex/EmptySet.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/regex/EmptySet.java index b5b07d41f..03dd95222 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/regex/EmptySet.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/regex/EmptySet.java @@ -32,7 +32,8 @@ public int hashCode() { } @Override - public boolean equals(Object other) { + public boolean equals( + Object other) { return other instanceof EmptySet; } @@ -43,12 +44,15 @@ public String toString() { @Override public , - T extends TransitionSymbol> A toAutomaton(AutomataFactory factory) { + T extends TransitionSymbol> A toAutomaton( + AutomataFactory factory) { return factory.emptyLanguage(); } @Override - protected Set substringAux(int charsToSkip, int missingChars) { + protected Set substringAux( + int charsToSkip, + int missingChars) { return Collections.emptySet(); } @@ -58,7 +62,8 @@ public boolean isEmpty() { } @Override - public boolean is(String str) { + public boolean is( + String str) { throw new UnsupportedOperationException(); } @@ -73,37 +78,44 @@ public int minLength() { } @Override - public boolean mayContain(String s) { + public boolean mayContain( + String s) { return false; } @Override - public boolean contains(String s) { + public boolean contains( + String s) { return false; } @Override - public boolean mayStartWith(String s) { + public boolean mayStartWith( + String s) { return false; } @Override - public boolean startsWith(String s) { + public boolean startsWith( + String s) { return false; } @Override - public boolean mayEndWith(String s) { + public boolean mayEndWith( + String s) { return false; } @Override - public boolean endsWith(String s) { + public boolean endsWith( + String s) { return false; } @Override - protected RegularExpression unrollStarToFixedLength(int length) { + protected RegularExpression unrollStarToFixedLength( + int length) { return this; } @@ -128,12 +140,14 @@ public RegularExpression[] explode() { } @Override - protected int compareToAux(RegularExpression other) { + protected int compareToAux( + RegularExpression other) { return 0; } @Override - public RegularExpression repeat(long n) { + public RegularExpression repeat( + long n) { return this; } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/regex/Or.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/regex/Or.java index 734c3740f..1058ab929 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/regex/Or.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/regex/Or.java @@ -30,7 +30,9 @@ public final class Or extends RegularExpression { * @param first the first regular expression * @param second the second regular expression */ - public Or(RegularExpression first, RegularExpression second) { + public Or( + RegularExpression first, + RegularExpression second) { // make things deterministic: order the branches if (first.compareTo(second) <= 0) { this.first = first; @@ -84,7 +86,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -183,12 +186,15 @@ else if (first.isComp() && first.asComp().getSecond().isStar() @Override public , - T extends TransitionSymbol> A toAutomaton(AutomataFactory factory) { + T extends TransitionSymbol> A toAutomaton( + AutomataFactory factory) { return first.toAutomaton(factory).union(second.toAutomaton(factory)); } @Override - protected Set substringAux(int charsToSkip, int missingChars) { + protected Set substringAux( + int charsToSkip, + int missingChars) { Set result = new HashSet<>(); result.addAll(first.substringAux(charsToSkip, missingChars)); result.addAll(second.substringAux(charsToSkip, missingChars)); @@ -201,7 +207,8 @@ public boolean isEmpty() { } @Override - public boolean is(String str) { + public boolean is( + String str) { throw new UnsupportedOperationException(); } @@ -216,37 +223,44 @@ public int minLength() { } @Override - public boolean mayContain(String s) { + public boolean mayContain( + String s) { return first.mayContain(s) || second.mayContain(s); } @Override - public boolean contains(String s) { + public boolean contains( + String s) { return first.contains(s) && second.contains(s); } @Override - public boolean mayStartWith(String s) { + public boolean mayStartWith( + String s) { return first.mayStartWith(s) || second.mayEndWith(s); } @Override - public boolean startsWith(String s) { + public boolean startsWith( + String s) { return first.startsWith(s) && second.startsWith(s); } @Override - public boolean mayEndWith(String s) { + public boolean mayEndWith( + String s) { return first.mayEndWith(s) || second.mayEndWith(s); } @Override - public boolean endsWith(String s) { + public boolean endsWith( + String s) { return first.endsWith(s) && second.endsWith(s); } @Override - protected RegularExpression unrollStarToFixedLength(int length) { + protected RegularExpression unrollStarToFixedLength( + int length) { return first.unrollStarToFixedLength(length).or(second.unrollStarToFixedLength(length)); } @@ -271,7 +285,8 @@ public RegularExpression[] explode() { } @Override - protected int compareToAux(RegularExpression other) { + protected int compareToAux( + RegularExpression other) { int cmp; if ((cmp = first.compareTo(other.asOr().first)) != 0) return cmp; @@ -279,7 +294,8 @@ protected int compareToAux(RegularExpression other) { } @Override - public RegularExpression repeat(long n) { + public RegularExpression repeat( + long n) { return new Or(first.repeat(n), second.repeat(n)).simplify(); } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/regex/RegularExpression.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/regex/RegularExpression.java index d61a57486..9c9a0a0c2 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/regex/RegularExpression.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/regex/RegularExpression.java @@ -16,7 +16,8 @@ public abstract class RegularExpression implements TransitionSymbol { @Override - public final int compareTo(RegularExpression o) { + public final int compareTo( + RegularExpression o) { if (getClass() != o.getClass()) return getClass().getName().compareTo(o.getClass().getName()); return compareToAux(o); @@ -31,7 +32,8 @@ public final int compareTo(RegularExpression o) { * @return a negative integer, zero, or a positive integer as this object is * less than, equal to, or greater than the specified object */ - protected abstract int compareToAux(RegularExpression other); + protected abstract int compareToAux( + RegularExpression other); @Override public boolean isEpsilon() { @@ -58,7 +60,8 @@ public boolean isEpsilon() { * @return the automaton */ public abstract , - T extends TransitionSymbol> A toAutomaton(AutomataFactory factory); + T extends TransitionSymbol> A toAutomaton( + AutomataFactory factory); /** * Casts this regular expression to an {@link Atom} if this regular @@ -171,7 +174,9 @@ public final boolean isStar() { * * @return the set of all substrings */ - public final Set substring(int start, int end) { + public final Set substring( + int start, + int end) { return substringAux(start, end - start).stream().filter(ps -> ps.missingChars == 0).map(t -> t.getSubstring()) .collect(Collectors.toSet()); } @@ -208,7 +213,10 @@ public final static class PartialSubstring { * @param charsToStart the number of characters to skip before starting * to collect the substring */ - protected PartialSubstring(SymbolicString substring, int charsToStart, int missingChars) { + protected PartialSubstring( + SymbolicString substring, + int charsToStart, + int missingChars) { this.substring = substring; this.missingChars = missingChars; this.charsToStart = charsToStart; @@ -223,7 +231,8 @@ protected PartialSubstring(SymbolicString substring, int charsToStart, int missi * * @return the joined partial substring */ - protected PartialSubstring concat(PartialSubstring other) { + protected PartialSubstring concat( + PartialSubstring other) { return new PartialSubstring(substring.concat(other.substring), other.charsToStart, other.missingChars); } @@ -267,7 +276,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -308,7 +318,9 @@ public String toString() { * * @return the set of partial substrings */ - protected abstract Set substringAux(int charsToSkip, int missingChars); + protected abstract Set substringAux( + int charsToSkip, + int missingChars); /** * Yields a new regular expression corresponding to the {@code n}-repetition @@ -319,7 +331,8 @@ public String toString() { * @return a new regular expression corresponding to the * {@code n}-repetition of {@code this} */ - public abstract RegularExpression repeat(long n); + public abstract RegularExpression repeat( + long n); /** * Yields a new regular expression where leading whitespaces have been @@ -355,7 +368,8 @@ public String toString() { * * @return {@code true} if that condition holds */ - public abstract boolean is(String str); + public abstract boolean is( + String str); /** * Yields {@code true} if and only if this regular expression may @@ -365,7 +379,8 @@ public String toString() { * * @return {@code true} if that condition holds */ - public abstract boolean mayContain(String s); + public abstract boolean mayContain( + String s); /** * Yields {@code true} if and only if this regular expression always @@ -375,7 +390,8 @@ public String toString() { * * @return {@code true} if that condition holds */ - public abstract boolean contains(String s); + public abstract boolean contains( + String s); /** * Yields {@code true} if and only if this regular expression may @@ -385,7 +401,8 @@ public String toString() { * * @return {@code true} if that condition holds */ - public abstract boolean mayStartWith(String s); + public abstract boolean mayStartWith( + String s); /** * Yields {@code true} if and only if this regular expression always @@ -395,7 +412,8 @@ public String toString() { * * @return {@code true} if that condition holds */ - public abstract boolean startsWith(String s); + public abstract boolean startsWith( + String s); /** * Yields {@code true} if and only if this regular expression may end @@ -405,7 +423,8 @@ public String toString() { * * @return {@code true} if that condition holds */ - public abstract boolean mayEndWith(String s); + public abstract boolean mayEndWith( + String s); /** * Yields {@code true} if and only if this regular expression always @@ -415,7 +434,8 @@ public String toString() { * * @return {@code true} if that condition holds */ - public abstract boolean endsWith(String s); + public abstract boolean endsWith( + String s); /** * Yields a new regular expression where all {@link Star} have been unrolled @@ -425,7 +445,8 @@ public String toString() { * * @return the regular expression with unrolled stars */ - protected abstract RegularExpression unrollStarToFixedLength(int length); + protected abstract RegularExpression unrollStarToFixedLength( + int length); /** * Yields a new regular expression where all {@link TopAtom} are assumed to @@ -481,7 +502,8 @@ public final RegularExpression star() { * * @return the joined regular expression */ - public final RegularExpression comp(RegularExpression other) { + public final RegularExpression comp( + RegularExpression other) { if (this.isEpsilon()) return other; if (other.isEpsilon()) @@ -497,7 +519,8 @@ public final RegularExpression comp(RegularExpression other) { * * @return the disjunction */ - public final RegularExpression or(RegularExpression other) { + public final RegularExpression or( + RegularExpression other) { if (this.isEpsilon() && other.isEpsilon()) return this; return new Or(this, other); diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/regex/Star.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/regex/Star.java index 71a198f5d..b16a488e4 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/regex/Star.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/regex/Star.java @@ -22,7 +22,8 @@ public final class Star extends RegularExpression { * * @param op the inner regular expression */ - public Star(RegularExpression op) { + public Star( + RegularExpression op) { this.op = op; } @@ -35,7 +36,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -91,12 +93,15 @@ else if (op.isStar()) @Override public , - T extends TransitionSymbol> A toAutomaton(AutomataFactory factory) { + T extends TransitionSymbol> A toAutomaton( + AutomataFactory factory) { return op.toAutomaton(factory).star(); } @Override - public Set substringAux(int charsToSkip, int missingChars) { + public Set substringAux( + int charsToSkip, + int missingChars) { Set result = new HashSet<>(), partial = new HashSet<>(); result.add(new PartialSubstring(SymbolicString.mkEmptyString(), charsToSkip, missingChars)); @@ -123,7 +128,8 @@ public boolean isEmpty() { } @Override - public boolean is(String str) { + public boolean is( + String str) { throw new UnsupportedOperationException(); } @@ -138,7 +144,8 @@ public int minLength() { } @Override - public boolean mayContain(String s) { + public boolean mayContain( + String s) { if (s.isEmpty() || op.mayContain(s)) return true; @@ -152,12 +159,14 @@ public boolean mayContain(String s) { } @Override - public boolean contains(String s) { + public boolean contains( + String s) { return s.isEmpty(); // epsilon is contained everywhere } @Override - public boolean mayStartWith(String s) { + public boolean mayStartWith( + String s) { if (s.isEmpty() || op.mayStartWith(s)) return true; @@ -171,12 +180,14 @@ public boolean mayStartWith(String s) { } @Override - public boolean startsWith(String s) { + public boolean startsWith( + String s) { return s.isEmpty(); // epsilon is contained everywhere } @Override - public boolean mayEndWith(String s) { + public boolean mayEndWith( + String s) { if (s.isEmpty() || op.mayEndWith(s)) return true; @@ -190,12 +201,14 @@ public boolean mayEndWith(String s) { } @Override - public boolean endsWith(String s) { + public boolean endsWith( + String s) { return s.isEmpty(); // epsilon is contained everywhere } @Override - protected RegularExpression unrollStarToFixedLength(int length) { + protected RegularExpression unrollStarToFixedLength( + int length) { if (length == 0) return Atom.EPSILON; @@ -231,12 +244,14 @@ public RegularExpression[] explode() { } @Override - protected int compareToAux(RegularExpression other) { + protected int compareToAux( + RegularExpression other) { return op.compareTo(other.asStar().op); } @Override - public RegularExpression repeat(long n) { + public RegularExpression repeat( + long n) { return this; } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/regex/TopAtom.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/regex/TopAtom.java index 446c1a867..e2cf9a6ea 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/regex/TopAtom.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/regex/TopAtom.java @@ -31,12 +31,15 @@ private TopAtom() { @Override public , - T extends TransitionSymbol> A toAutomaton(AutomataFactory factory) { + T extends TransitionSymbol> A toAutomaton( + AutomataFactory factory) { return factory.unknownString(); } @Override - protected Set substringAux(int charsToSkip, int missingChars) { + protected Set substringAux( + int charsToSkip, + int missingChars) { Set result = new HashSet<>(); for (int i = 0; i <= charsToSkip; i++) @@ -53,7 +56,8 @@ public boolean isEmpty() { } @Override - public boolean is(String str) { + public boolean is( + String str) { return false; } @@ -68,32 +72,38 @@ public int minLength() { } @Override - public boolean mayContain(String s) { + public boolean mayContain( + String s) { return true; } @Override - public boolean contains(String s) { + public boolean contains( + String s) { return s.isEmpty(); // epsilon is contained everywhere } @Override - public boolean mayStartWith(String s) { + public boolean mayStartWith( + String s) { return true; } @Override - public boolean startsWith(String s) { + public boolean startsWith( + String s) { return s.isEmpty(); // epsilon is contained everywhere } @Override - public boolean mayEndWith(String s) { + public boolean mayEndWith( + String s) { return true; } @Override - public boolean endsWith(String s) { + public boolean endsWith( + String s) { return s.isEmpty(); // epsilon is contained everywhere } @@ -107,7 +117,8 @@ public boolean isEmpty() { } @Override - public boolean is(String str) { + public boolean is( + String str) { return false; } @@ -122,32 +133,38 @@ public int minLength() { } @Override - public boolean mayContain(String s) { + public boolean mayContain( + String s) { return s.length() >= 1; } @Override - public boolean contains(String s) { + public boolean contains( + String s) { return s.isEmpty(); // epsilon is contained everywhere } @Override - public boolean mayStartWith(String s) { + public boolean mayStartWith( + String s) { return s.length() >= 1; } @Override - public boolean startsWith(String s) { + public boolean startsWith( + String s) { return s.isEmpty(); // epsilon is contained everywhere } @Override - public boolean mayEndWith(String s) { + public boolean mayEndWith( + String s) { return s.length() >= 1; } @Override - public boolean endsWith(String s) { + public boolean endsWith( + String s) { return s.isEmpty(); // epsilon is contained everywhere } }; @@ -169,7 +186,8 @@ public RegularExpression[] explode() { } @Override - protected int compareToAux(RegularExpression other) { + protected int compareToAux( + RegularExpression other) { return 0; } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/regex/symbolic/SymbolicChar.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/regex/symbolic/SymbolicChar.java index 9f996f5c2..506b9ef2b 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/regex/symbolic/SymbolicChar.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/regex/symbolic/SymbolicChar.java @@ -15,7 +15,8 @@ public class SymbolicChar { * * @param ch the underlying character */ - public SymbolicChar(char ch) { + public SymbolicChar( + char ch) { this.ch = ch; } @@ -36,7 +37,8 @@ public char asChar() { * * @return {@code true} if that condition holds */ - public boolean is(char ch) { + public boolean is( + char ch) { return this.ch == ch; } @@ -49,7 +51,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/regex/symbolic/SymbolicString.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/regex/symbolic/SymbolicString.java index 2a3908505..087307dd2 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/regex/symbolic/SymbolicString.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/regex/symbolic/SymbolicString.java @@ -39,7 +39,8 @@ public static SymbolicString mkEmptyString() { * * @return the extended string */ - public static SymbolicString mkTopString(int length) { + public static SymbolicString mkTopString( + int length) { SymbolicChar[] value = new SymbolicChar[length]; for (int i = 0; i < value.length; i++) value[i] = UnknownSymbolicChar.INSTANCE; @@ -54,7 +55,8 @@ public static SymbolicString mkTopString(int length) { * * @return the strings set */ - public static Set toStrings(Iterable extStrings) { + public static Set toStrings( + Iterable extStrings) { Set result = new HashSet(); for (SymbolicString e : extStrings) @@ -70,7 +72,8 @@ public static Set toStrings(Iterable extStrings) { * * @return the extended string */ - public static SymbolicString mkString(String str) { + public static SymbolicString mkString( + String str) { SymbolicChar[] value = new SymbolicChar[str.length()]; for (int i = 0; i < value.length; i++) value[i] = new SymbolicChar(str.charAt(i)); @@ -85,7 +88,8 @@ public static SymbolicString mkString(String str) { * * @return the extended strings */ - public static SymbolicString[] mkStrings(String... strings) { + public static SymbolicString[] mkStrings( + String... strings) { SymbolicString[] result = new SymbolicString[strings.length]; for (int i = 0; i < result.length; i++) result[i] = mkString(strings[i]); @@ -100,11 +104,13 @@ public static SymbolicString[] mkStrings(String... strings) { * * @return the extended string */ - public static SymbolicString mkStringFromChar(char ch) { + public static SymbolicString mkStringFromChar( + char ch) { return new SymbolicString(new SymbolicChar[] { new SymbolicChar(ch) }); } - private SymbolicString(SymbolicChar[] value) { + private SymbolicString( + SymbolicChar[] value) { this.value = value; } @@ -114,7 +120,8 @@ public String toString() { } @Override - public int compareTo(SymbolicString other) { + public int compareTo( + SymbolicString other) { int lim = Math.min(length(), other.length()); for (int k = 0; k < lim; k++) { @@ -136,7 +143,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -156,7 +164,8 @@ public boolean equals(Object obj) { * * @return the concatenation */ - public SymbolicString concat(SymbolicString str) { + public SymbolicString concat( + SymbolicString str) { int olen = str.length(); if (olen == 0) return this; @@ -204,7 +213,9 @@ public int length() { return value.length; } - private boolean startsWith(String prefix, int toffset) { + private boolean startsWith( + String prefix, + int toffset) { if (toffset < 0 || toffset > length() - prefix.length()) return false; @@ -223,7 +234,8 @@ private boolean startsWith(String prefix, int toffset) { * * @return {@code true} if that condition holds */ - public boolean startsWith(String prefix) { + public boolean startsWith( + String prefix) { return startsWith(prefix, 0); } @@ -235,11 +247,13 @@ public boolean startsWith(String prefix) { * * @return {@code true} if that condition holds */ - public boolean endsWith(String suffix) { + public boolean endsWith( + String suffix) { return startsWith(suffix, length() - suffix.length()); } - private int indexOf(String str) { + private int indexOf( + String str) { char first = str.charAt(0); int max = (length() - str.length()); for (int i = 0; i <= max; i++) { @@ -273,7 +287,8 @@ private int indexOf(String str) { * * @return {@code true} if that condition holds */ - public boolean contains(CharSequence s) { + public boolean contains( + CharSequence s) { return indexOf(s.toString()) >= 0; } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/regex/symbolic/UnknownSymbolicChar.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/regex/symbolic/UnknownSymbolicChar.java index d5d2f39a6..da7a65c36 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/regex/symbolic/UnknownSymbolicChar.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/datastructures/regex/symbolic/UnknownSymbolicChar.java @@ -19,7 +19,8 @@ private UnknownSymbolicChar() { } @Override - public boolean is(char ch) { + public boolean is( + char ch) { return false; } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/file/FileManager.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/file/FileManager.java index d9d957d7e..73909ffd0 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/file/FileManager.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/file/FileManager.java @@ -36,7 +36,8 @@ public class FileManager { * @param workdir the path to the directory where files will be created by * this manager */ - public FileManager(String workdir) { + public FileManager( + String workdir) { this.workdir = Paths.get(workdir).toFile(); } @@ -62,7 +63,10 @@ public Collection createdFiles() { * * @throws IOException if something goes wrong while creating the file */ - public void mkOutputFile(String name, WriteAction filler) throws IOException { + public void mkOutputFile( + String name, + WriteAction filler) + throws IOException { mkOutputFile(name, false, filler); } @@ -80,7 +84,11 @@ public void mkOutputFile(String name, WriteAction filler) throws IOException { * * @throws IOException if something goes wrong while creating the file */ - public void mkOutputFile(String path, String name, WriteAction filler) throws IOException { + public void mkOutputFile( + String path, + String name, + WriteAction filler) + throws IOException { mkOutputFile(path, name, false, filler); } @@ -97,7 +105,10 @@ public void mkOutputFile(String path, String name, WriteAction filler) throws IO * * @throws IOException if something goes wrong while creating the file */ - public void mkDotFile(String name, WriteAction filler) throws IOException { + public void mkDotFile( + String name, + WriteAction filler) + throws IOException { mkOutputFile(cleanupCFGName(name) + ".dot", false, filler); } @@ -115,7 +126,10 @@ public void mkDotFile(String name, WriteAction filler) throws IOException { * @throws IOException if something goes wrong while creating the file */ - public void mkJsonFile(String name, WriteAction filler) throws IOException { + public void mkJsonFile( + String name, + WriteAction filler) + throws IOException { mkOutputFile(cleanupCFGName(name) + ".json", false, filler); } @@ -133,7 +147,10 @@ public void mkJsonFile(String name, WriteAction filler) throws IOException { * @throws IOException if something goes wrong while creating the file */ - public void mkGraphmlFile(String name, WriteAction filler) throws IOException { + public void mkGraphmlFile( + String name, + WriteAction filler) + throws IOException { mkOutputFile(cleanupCFGName(name) + ".graphml", false, filler); } @@ -150,7 +167,10 @@ public void mkGraphmlFile(String name, WriteAction filler) throws IOException { * * @throws IOException if something goes wrong while creating the file */ - public void mkHtmlFile(String name, WriteAction filler) throws IOException { + public void mkHtmlFile( + String name, + WriteAction filler) + throws IOException { mkOutputFile(cleanupCFGName(name) + ".html", false, filler); } @@ -169,7 +189,9 @@ public interface WriteAction { * * @throws IOException if an error happens while writing */ - void perform(Writer writer) throws IOException; + void perform( + Writer writer) + throws IOException; } /** @@ -187,7 +209,11 @@ public interface WriteAction { * @throws IOException if something goes wrong while creating or writing to * the file */ - public void mkOutputFile(String name, boolean bom, WriteAction filler) throws IOException { + public void mkOutputFile( + String name, + boolean bom, + WriteAction filler) + throws IOException { mkOutputFile(null, name, bom, filler); } @@ -208,7 +234,12 @@ public void mkOutputFile(String name, boolean bom, WriteAction filler) throws IO * @throws IOException if something goes wrong while creating or writing to * the file */ - public void mkOutputFile(String path, String name, boolean bom, WriteAction filler) throws IOException { + public void mkOutputFile( + String path, + String name, + boolean bom, + WriteAction filler) + throws IOException { File parent = workdir; if (path != null) parent = new File(workdir, cleanFileName(path, true)); @@ -228,7 +259,9 @@ public void mkOutputFile(String path, String name, boolean bom, WriteAction fill private final static int[] illegalChars = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 34, 42, 47, 58, 60, 62, 63, 92, 124 }; - private static String cleanFileName(String name, boolean keepDirSeparator) { + private static String cleanFileName( + String name, + boolean keepDirSeparator) { // https://stackoverflow.com/questions/1155107/is-there-a-cross-platform-java-method-to-remove-filename-special-chars StringBuilder cleanName = new StringBuilder(); int len = name.codePointCount(0, name.length()); @@ -245,7 +278,8 @@ private static String cleanFileName(String name, boolean keepDirSeparator) { return cleanName.toString(); } - private static String cleanupCFGName(String name) { + private static String cleanupCFGName( + String name) { String result = name.replace(' ', '_'); result = result.replace("::", "."); return result; @@ -258,7 +292,9 @@ private static String cleanupCFGName(String name) { * * @throws IOException if an error happens while deleting */ - public static void forceDeleteFolder(String path) throws IOException { + public static void forceDeleteFolder( + String path) + throws IOException { File workdir = new File(path); if (workdir.exists()) FileUtils.forceDelete(workdir); @@ -274,7 +310,9 @@ public static void forceDeleteFolder(String path) throws IOException { * * @throws IOException if an error happens during the generation */ - public void generateHtmlViewerSupportFiles(boolean compound) throws IOException { + public void generateHtmlViewerSupportFiles( + boolean compound) + throws IOException { List files = new ArrayList<>(); files.add("js/cytoscape-3.21.1.min.js"); files.add("js/cytoscape-graphml-1.0.6-hier.js"); diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/numeric/InfiniteIterationException.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/numeric/InfiniteIterationException.java index 4b91419d4..31d29770b 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/numeric/InfiniteIterationException.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/numeric/InfiniteIterationException.java @@ -15,7 +15,8 @@ public class InfiniteIterationException extends RuntimeException { * * @param i the non-finite interval on which some iterates */ - public InfiniteIterationException(IntInterval i) { + public InfiniteIterationException( + IntInterval i) { super("Cannot iterate over the interval " + i); } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/numeric/IntInterval.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/numeric/IntInterval.java index e2066e65a..acd3d9dcb 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/numeric/IntInterval.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/numeric/IntInterval.java @@ -45,7 +45,9 @@ private IntInterval() { * @param low the lower bound * @param high the upper bound */ - public IntInterval(int low, int high) { + public IntInterval( + int low, + int high) { this(new MathNumber(low), new MathNumber(high)); } @@ -57,7 +59,9 @@ public IntInterval(int low, int high) { * @param low the lower bound (if {@code null}, -inf will be used) * @param high the upper bound (if {@code null}, +inf will be used) */ - public IntInterval(Integer low, Integer high) { + public IntInterval( + Integer low, + Integer high) { this(low == null ? MathNumber.MINUS_INFINITY : new MathNumber(low), high == null ? MathNumber.PLUS_INFINITY : new MathNumber(high)); } @@ -70,7 +74,9 @@ public IntInterval(Integer low, Integer high) { * @param low the lower bound * @param high the upper bound */ - public IntInterval(MathNumber low, MathNumber high) { + public IntInterval( + MathNumber low, + MathNumber high) { if (low.isNaN() || high.isNaN()) { this.low = MathNumber.NaN; this.high = MathNumber.NaN; @@ -169,11 +175,13 @@ public boolean isSingleton() { * * @return {@code true} if that condition holds */ - public boolean is(int n) { + public boolean is( + int n) { return isSingleton() && low.is(n); } - private static IntInterval cacheAndRound(IntInterval i) { + private static IntInterval cacheAndRound( + IntInterval i) { if (i.is(0)) return ZERO; if (i.is(1)) @@ -190,7 +198,8 @@ private static IntInterval cacheAndRound(IntInterval i) { * * @return {@code this + other} */ - public IntInterval plus(IntInterval other) { + public IntInterval plus( + IntInterval other) { if (isInfinity() || other.isInfinity()) return INFINITY; @@ -204,14 +213,16 @@ public IntInterval plus(IntInterval other) { * * @return {@code this - other} */ - public IntInterval diff(IntInterval other) { + public IntInterval diff( + IntInterval other) { if (isInfinity() || other.isInfinity()) return INFINITY; return cacheAndRound(new IntInterval(low.subtract(other.high), high.subtract(other.low))); } - private static MathNumber min(MathNumber... nums) { + private static MathNumber min( + MathNumber... nums) { if (nums.length == 0) throw new IllegalArgumentException("No numbers provided"); @@ -222,7 +233,8 @@ private static MathNumber min(MathNumber... nums) { return min; } - private static MathNumber max(MathNumber... nums) { + private static MathNumber max( + MathNumber... nums) { if (nums.length == 0) throw new IllegalArgumentException("No numbers provided"); @@ -241,7 +253,8 @@ private static MathNumber max(MathNumber... nums) { * * @return {@code this * other} */ - public IntInterval mul(IntInterval other) { + public IntInterval mul( + IntInterval other) { if (is(0) || other.is(0)) return ZERO; if (isInfinity() || other.isInfinity()) @@ -274,7 +287,10 @@ public IntInterval mul(IntInterval other) { * {@code errorOnZero} is set to * {@code true} */ - public IntInterval div(IntInterval other, boolean ignoreZero, boolean errorOnZero) { + public IntInterval div( + IntInterval other, + boolean ignoreZero, + boolean errorOnZero) { if (errorOnZero && (other.is(0) || other.includes(ZERO))) throw new ArithmeticException("IntInterval divide by zero"); @@ -310,7 +326,8 @@ else if (higher.includes(lower)) * * @return {@code true} if it is included, {@code false} otherwise */ - public boolean includes(IntInterval other) { + public boolean includes( + IntInterval other) { return low.compareTo(other.low) <= 0 && high.compareTo(other.high) >= 0; } @@ -321,7 +338,8 @@ public boolean includes(IntInterval other) { * * @return {@code true} if those intersects, {@code false} otherwise */ - public boolean intersects(IntInterval other) { + public boolean intersects( + IntInterval other) { return includes(other) || other.includes(this) || (high.compareTo(other.low) >= 0 && high.compareTo(other.high) <= 0) || (other.high.compareTo(low) >= 0 && other.high.compareTo(high) <= 0); @@ -337,7 +355,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -375,7 +394,8 @@ public Iterator iterator() { } @Override - public int compareTo(IntInterval o) { + public int compareTo( + IntInterval o) { int cmp; if ((cmp = low.compareTo(o.low)) != 0) return cmp; diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/numeric/IntIntervalIterator.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/numeric/IntIntervalIterator.java index 6a863aed6..00136433e 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/numeric/IntIntervalIterator.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/numeric/IntIntervalIterator.java @@ -18,7 +18,9 @@ public class IntIntervalIterator implements Iterator { * @param init low bound * @param end high bound */ - public IntIntervalIterator(long init, long end) { + public IntIntervalIterator( + long init, + long end) { this.init = init; this.end = end; } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/numeric/MathNumber.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/numeric/MathNumber.java index 62fbc3498..4198b53b9 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/numeric/MathNumber.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/numeric/MathNumber.java @@ -55,7 +55,8 @@ public class MathNumber implements Comparable { * * @param number the value */ - public MathNumber(long number) { + public MathNumber( + long number) { this.number = BigDecimal.valueOf(number); this.sign = number > 0 ? (byte) 1 : number == 0 ? (byte) 0 : (byte) -1; } @@ -65,7 +66,8 @@ public MathNumber(long number) { * * @param number the value */ - public MathNumber(double number) { + public MathNumber( + double number) { this.number = BigDecimal.valueOf(number); this.sign = number > 0 ? (byte) 1 : number == 0 ? (byte) 0 : (byte) -1; } @@ -75,12 +77,14 @@ public MathNumber(double number) { * * @param number the value */ - public MathNumber(BigDecimal number) { + public MathNumber( + BigDecimal number) { this.number = number; this.sign = number.signum() > 0 ? (byte) 1 : number.signum() == 0 ? (byte) 0 : (byte) -1; } - private MathNumber(byte sign) { + private MathNumber( + byte sign) { this.number = null; this.sign = sign; } @@ -130,7 +134,8 @@ public boolean isFinite() { * * @return {@code true} if that condition holds */ - public boolean is(int n) { + public boolean is( + int n) { return number != null && number.equals(new BigDecimal(n)); } @@ -172,7 +177,8 @@ public boolean isNaN() { return number == null && sign == (byte) 3; } - private static MathNumber cached(MathNumber i) { + private static MathNumber cached( + MathNumber i) { if (i.isZero()) return ZERO; if (i.is(1)) @@ -190,7 +196,8 @@ private static MathNumber cached(MathNumber i) { * * @return {@code this + other} */ - public MathNumber add(MathNumber other) { + public MathNumber add( + MathNumber other) { if (isNaN() || other.isNaN()) return NaN; @@ -217,7 +224,8 @@ else if (other.isInfinite()) * * @return {@code this - other} */ - public MathNumber subtract(MathNumber other) { + public MathNumber subtract( + MathNumber other) { if (isNaN() || other.isNaN()) return NaN; @@ -244,7 +252,8 @@ else if (other.isInfinite()) * * @return {@code this * other} */ - public MathNumber multiply(MathNumber other) { + public MathNumber multiply( + MathNumber other) { if (isNaN() || other.isNaN()) return NaN; @@ -282,7 +291,8 @@ else if (sign == other.sign) * * @return {@code this / other} */ - public MathNumber divide(MathNumber other) { + public MathNumber divide( + MathNumber other) { if (isNaN() || other.isNaN() || other.isZero() || (isInfinite() && other.isInfinite())) return NaN; @@ -302,7 +312,8 @@ public MathNumber divide(MathNumber other) { } @Override - public int compareTo(MathNumber other) { + public int compareTo( + MathNumber other) { if (equals(other)) return 0; @@ -337,7 +348,8 @@ public int compareTo(MathNumber other) { * * @return the minimum between {@code this} and {@code other} */ - public MathNumber min(MathNumber other) { + public MathNumber min( + MathNumber other) { if (isNaN() || other.isNaN()) return NaN; @@ -359,7 +371,8 @@ public MathNumber min(MathNumber other) { * * @return the maximum between {@code this} and {@code other} */ - public MathNumber max(MathNumber other) { + public MathNumber max( + MathNumber other) { if (isNaN() || other.isNaN()) return NaN; @@ -379,7 +392,8 @@ public MathNumber max(MathNumber other) { * * @return true if @code{this} is less or equals than @code{other}. */ - public boolean leq(MathNumber other) { + public boolean leq( + MathNumber other) { return this.max(other).equals(other); } @@ -390,7 +404,8 @@ public boolean leq(MathNumber other) { * * @return true if */ - public boolean gt(MathNumber other) { + public boolean gt( + MathNumber other) { return geq(other) && !equals(other); } @@ -401,7 +416,8 @@ public boolean gt(MathNumber other) { * * @return true if */ - public boolean lt(MathNumber other) { + public boolean lt( + MathNumber other) { return leq(other) && !equals(other); } @@ -412,7 +428,8 @@ public boolean lt(MathNumber other) { * * @return true if */ - public boolean geq(MathNumber other) { + public boolean geq( + MathNumber other) { return this.max(other).equals(this); } @@ -557,7 +574,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/numeric/MathNumberConversionException.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/numeric/MathNumberConversionException.java index 4734eea6a..ba990b70f 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/numeric/MathNumberConversionException.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/numeric/MathNumberConversionException.java @@ -15,7 +15,8 @@ public class MathNumberConversionException extends Exception { * * @param m the math number that fails to be converted */ - public MathNumberConversionException(MathNumber m) { + public MathNumberConversionException( + MathNumber m) { super("Cannot convert " + m + " to numerical value"); } } diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/representation/ListRepresentation.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/representation/ListRepresentation.java similarity index 64% rename from lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/representation/ListRepresentation.java rename to lisa/lisa-sdk/src/main/java/it/unive/lisa/util/representation/ListRepresentation.java index e7dbd62f4..5a894701a 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/representation/ListRepresentation.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/representation/ListRepresentation.java @@ -1,7 +1,8 @@ -package it.unive.lisa.analysis.representation; +package it.unive.lisa.util.representation; import it.unive.lisa.outputs.serializableGraph.SerializableArray; import it.unive.lisa.outputs.serializableGraph.SerializableValue; +import it.unive.lisa.util.StringUtilities; import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -10,16 +11,16 @@ import org.apache.commons.lang3.StringUtils; /** - * A {@link DomainRepresentation} in the form of a list of values. + * A {@link StructuredRepresentation} in the form of a list of values. * * @author Luca Negrini */ -public class ListRepresentation extends DomainRepresentation { +public class ListRepresentation extends StructuredRepresentation { /** * The elements of contained in this list. */ - protected final List elements; + protected final List elements; /** * Builds a new representation starting from the given list. {@code mapper} @@ -31,7 +32,9 @@ public class ListRepresentation extends DomainRepresentation { * @param mapper the function that knows how to convert elements to their * representation */ - public ListRepresentation(List elements, Function mapper) { + public ListRepresentation( + List elements, + Function mapper) { this(elements.stream().map(mapper).collect(Collectors.toList())); } @@ -40,7 +43,8 @@ public ListRepresentation(List elements, Function elements) { + public ListRepresentation( + List elements) { this.elements = elements; } @@ -49,21 +53,37 @@ public ListRepresentation(List elements) { * * @param elements the list */ - public ListRepresentation(DomainRepresentation... elements) { + public ListRepresentation( + StructuredRepresentation... elements) { this.elements = Arrays.asList(elements); } @Override public SerializableValue toSerializableValue() { List values = new ArrayList<>(elements.size()); - for (DomainRepresentation e : elements) + for (StructuredRepresentation e : elements) values.add(e.toSerializableValue()); return new SerializableArray(getProperties(), values); } @Override public String toString() { - return "[" + StringUtils.join(elements, ", ") + "]"; + if (elements.isEmpty()) + return "[]"; + + List strs = elements.stream().map(Object::toString).collect(Collectors.toList()); + if (strs.stream().noneMatch(s -> s.contains("\n"))) + return "[" + StringUtils.join(strs, ", ") + "]"; + + StringBuilder sb = new StringBuilder("["); + boolean first = true; + for (String e : strs) { + sb.append(first ? "\n" : ",\n") + .append(StringUtilities.indent(e.toString(), " ", 1)); + first = false; + } + sb.append("\n]"); + return sb.toString(); } @Override @@ -75,7 +95,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (!super.equals(obj)) diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/representation/MapRepresentation.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/representation/MapRepresentation.java similarity index 59% rename from lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/representation/MapRepresentation.java rename to lisa/lisa-sdk/src/main/java/it/unive/lisa/util/representation/MapRepresentation.java index 831490f22..f089346c4 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/representation/MapRepresentation.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/representation/MapRepresentation.java @@ -1,7 +1,8 @@ -package it.unive.lisa.analysis.representation; +package it.unive.lisa.util.representation; import it.unive.lisa.outputs.serializableGraph.SerializableObject; import it.unive.lisa.outputs.serializableGraph.SerializableValue; +import it.unive.lisa.util.StringUtilities; import java.util.Map; import java.util.Map.Entry; import java.util.SortedMap; @@ -9,16 +10,16 @@ import java.util.function.Function; /** - * A {@link DomainRepresentation} in the form of a key-value mapping. + * A {@link StructuredRepresentation} in the form of a key-value mapping. * * @author Luca Negrini */ -public class MapRepresentation extends DomainRepresentation { +public class MapRepresentation extends StructuredRepresentation { /** * The mappings of contained in this map. */ - protected final SortedMap map; + protected final SortedMap map; /** * Builds a new representation starting from the given map. @@ -33,8 +34,10 @@ public class MapRepresentation extends DomainRepresentation { * @param valueMapper the function that knows how to convert values to their * representation */ - public MapRepresentation(Map map, Function keyMapper, - Function valueMapper) { + public MapRepresentation( + Map map, + Function keyMapper, + Function valueMapper) { this.map = new TreeMap<>(); for (Entry e : map.entrySet()) this.map.put(keyMapper.apply(e.getKey()), valueMapper.apply(e.getValue())); @@ -45,9 +48,10 @@ public MapRepresentation(Map map, Function * * @param map the map */ - public MapRepresentation(Map map) { + public MapRepresentation( + Map map) { if (map instanceof SortedMap) - this.map = (SortedMap) map; + this.map = (SortedMap) map; else this.map = new TreeMap<>(map); } @@ -55,19 +59,35 @@ public MapRepresentation(Map map) { @Override public SerializableValue toSerializableValue() { SortedMap fields = new TreeMap<>(); - for (Entry e : this.map.entrySet()) + for (Entry e : this.map.entrySet()) fields.put(e.getKey().toString(), e.getValue().toSerializableValue()); return new SerializableObject(getProperties(), fields); } @Override public String toString() { - StringBuilder builder = new StringBuilder(); + if (map.isEmpty()) + return "{}"; - for (Entry e : map.entrySet()) - builder.append(e.getKey()).append(": ").append(e.getValue()).append("\n"); - - return builder.toString().trim(); + StringBuilder sb = new StringBuilder("{"); + boolean first = true; + for (Entry e : map.entrySet()) { + String key = e.getKey().toString(); + String val = e.getValue().toString(); + if (!key.contains("\n") && !val.contains("\n")) + sb.append(first ? "\n " : ",\n ") + .append(key) + .append(": ") + .append(val); + else + sb.append(first ? "\n " : ",\n ") + .append(StringUtilities.indent(key, " ", 1)) + .append(":\n") + .append(StringUtilities.indent(val, " ", 2)); + first = false; + } + sb.append("\n}"); + return sb.toString(); } @Override @@ -79,7 +99,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (!super.equals(obj)) diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/representation/ObjectRepresentation.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/representation/ObjectRepresentation.java similarity index 60% rename from lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/representation/ObjectRepresentation.java rename to lisa/lisa-sdk/src/main/java/it/unive/lisa/util/representation/ObjectRepresentation.java index cb8264b2f..3e7b6cc93 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/representation/ObjectRepresentation.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/representation/ObjectRepresentation.java @@ -1,7 +1,8 @@ -package it.unive.lisa.analysis.representation; +package it.unive.lisa.util.representation; import it.unive.lisa.outputs.serializableGraph.SerializableObject; import it.unive.lisa.outputs.serializableGraph.SerializableValue; +import it.unive.lisa.util.StringUtilities; import java.util.Map; import java.util.Map.Entry; import java.util.SortedMap; @@ -9,16 +10,17 @@ import java.util.function.Function; /** - * A {@link DomainRepresentation} in the form of a complex object with fields. + * A {@link StructuredRepresentation} in the form of a complex object with + * fields. * * @author Luca Negrini */ -public class ObjectRepresentation extends DomainRepresentation { +public class ObjectRepresentation extends StructuredRepresentation { /** * The fields of this object, with their values. */ - protected final SortedMap fields; + protected final SortedMap fields; /** * Builds a new representation starting from the given map. {@code mapper} @@ -30,7 +32,9 @@ public class ObjectRepresentation extends DomainRepresentation { * @param mapper the function that knows how to convert values to their * representation */ - public ObjectRepresentation(Map fields, Function mapper) { + public ObjectRepresentation( + Map fields, + Function mapper) { this.fields = new TreeMap<>(); for (Entry e : fields.entrySet()) this.fields.put(e.getKey(), mapper.apply(e.getValue())); @@ -41,9 +45,10 @@ public ObjectRepresentation(Map fields, Function map) { + public ObjectRepresentation( + Map map) { if (map instanceof SortedMap) - this.fields = (SortedMap) map; + this.fields = (SortedMap) map; else this.fields = new TreeMap<>(map); } @@ -51,19 +56,34 @@ public ObjectRepresentation(Map map) { @Override public SerializableValue toSerializableValue() { SortedMap fields = new TreeMap<>(); - for (Entry e : this.fields.entrySet()) + for (Entry e : this.fields.entrySet()) fields.put(e.getKey(), e.getValue().toSerializableValue()); return new SerializableObject(getProperties(), fields); } @Override public String toString() { - StringBuilder builder = new StringBuilder(); + if (fields.isEmpty()) + return "{}"; - for (Entry e : fields.entrySet()) - builder.append(e.getKey()).append(": ").append(e.getValue()).append("\n"); - - return builder.toString().trim(); + StringBuilder sb = new StringBuilder("{"); + boolean first = true; + for (Entry e : fields.entrySet()) { + String val = e.getValue().toString(); + if (!val.contains("\n")) + sb.append(first ? "\n " : ",\n ") + .append(e.getKey()) + .append(": ") + .append(e.getValue()); + else + sb.append(first ? "\n " : ",\n ") + .append(e.getKey()) + .append(":\n") + .append(StringUtilities.indent(val, " ", 2)); + first = false; + } + sb.append("\n}"); + return sb.toString(); } @Override @@ -75,7 +95,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (!super.equals(obj)) diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/representation/SetRepresentation.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/representation/SetRepresentation.java similarity index 59% rename from lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/representation/SetRepresentation.java rename to lisa/lisa-sdk/src/main/java/it/unive/lisa/util/representation/SetRepresentation.java index e5eaa694e..14dc470b7 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/representation/SetRepresentation.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/representation/SetRepresentation.java @@ -1,26 +1,28 @@ -package it.unive.lisa.analysis.representation; +package it.unive.lisa.util.representation; import it.unive.lisa.outputs.serializableGraph.SerializableArray; import it.unive.lisa.outputs.serializableGraph.SerializableValue; +import it.unive.lisa.util.StringUtilities; import java.util.ArrayList; import java.util.List; import java.util.Set; import java.util.SortedSet; import java.util.TreeSet; import java.util.function.Function; +import java.util.stream.Collectors; import org.apache.commons.lang3.StringUtils; /** - * A {@link DomainRepresentation} in the form of a set of values. + * A {@link StructuredRepresentation} in the form of a set of values. * * @author Luca Negrini */ -public class SetRepresentation extends DomainRepresentation { +public class SetRepresentation extends StructuredRepresentation { /** * The elements of contained in this set. */ - protected final SortedSet elements; + protected final SortedSet elements; /** * Builds a new representation starting from the given set. {@code mapper} @@ -32,7 +34,9 @@ public class SetRepresentation extends DomainRepresentation { * @param mapper the function that knows how to convert elements to their * representation */ - public SetRepresentation(Set elements, Function mapper) { + public SetRepresentation( + Set elements, + Function mapper) { this(mapAndSort(elements, mapper)); } @@ -41,16 +45,18 @@ public SetRepresentation(Set elements, Function * * @param elements the set */ - public SetRepresentation(Set elements) { + public SetRepresentation( + Set elements) { if (elements instanceof SortedSet) - this.elements = (SortedSet) elements; + this.elements = (SortedSet) elements; else this.elements = new TreeSet<>(elements); } - private static SortedSet mapAndSort(Iterable elements, - Function mapper) { - SortedSet result = new TreeSet<>(); + private static SortedSet mapAndSort( + Iterable elements, + Function mapper) { + SortedSet result = new TreeSet<>(); for (E e : elements) result.add(mapper.apply(e)); return result; @@ -59,14 +65,29 @@ private static SortedSet mapAndSort(Iterable elemen @Override public SerializableValue toSerializableValue() { List values = new ArrayList<>(elements.size()); - for (DomainRepresentation e : elements) + for (StructuredRepresentation e : elements) values.add(e.toSerializableValue()); return new SerializableArray(getProperties(), values); } @Override public String toString() { - return "[" + StringUtils.join(elements, ", ") + "]"; + if (elements.isEmpty()) + return "()"; + + List strs = elements.stream().map(Object::toString).collect(Collectors.toList()); + if (strs.stream().noneMatch(s -> s.contains("\n"))) + return "(" + StringUtils.join(strs, ", ") + ")"; + + StringBuilder sb = new StringBuilder("("); + boolean first = true; + for (String e : strs) { + sb.append(first ? "\n" : ",\n") + .append(StringUtilities.indent(e.toString(), " ", 1)); + first = false; + } + sb.append("\n)"); + return sb.toString(); } @Override @@ -78,7 +99,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (!super.equals(obj)) diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/representation/StringRepresentation.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/representation/StringRepresentation.java similarity index 81% rename from lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/representation/StringRepresentation.java rename to lisa/lisa-sdk/src/main/java/it/unive/lisa/util/representation/StringRepresentation.java index 91da12873..f5964676d 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/representation/StringRepresentation.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/representation/StringRepresentation.java @@ -1,14 +1,14 @@ -package it.unive.lisa.analysis.representation; +package it.unive.lisa.util.representation; import it.unive.lisa.outputs.serializableGraph.SerializableString; import it.unive.lisa.outputs.serializableGraph.SerializableValue; /** - * A {@link DomainRepresentation} in the form of a single string element. + * A {@link StructuredRepresentation} in the form of a single string element. * * @author Luca Negrini */ -public class StringRepresentation extends DomainRepresentation { +public class StringRepresentation extends StructuredRepresentation { /** * The textual representation. @@ -20,7 +20,8 @@ public class StringRepresentation extends DomainRepresentation { * * @param representation the string */ - public StringRepresentation(String representation) { + public StringRepresentation( + String representation) { this.representation = representation; } @@ -31,7 +32,8 @@ public StringRepresentation(String representation) { * * @param obj the object */ - public StringRepresentation(Object obj) { + public StringRepresentation( + Object obj) { this(String.valueOf(obj)); } @@ -54,7 +56,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (!super.equals(obj)) diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/representation/StructuredObject.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/representation/StructuredObject.java new file mode 100644 index 000000000..6e509932e --- /dev/null +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/representation/StructuredObject.java @@ -0,0 +1,18 @@ +package it.unive.lisa.util.representation; + +/** + * An object that whose contents can be converted to a domain-independent + * {@link StructuredRepresentation} for later use. + * + * @author Luca Negrini + */ +public interface StructuredObject { + + /** + * Yields a {@link StructuredRepresentation} of the information contained in + * this object's instance. + * + * @return the representation + */ + StructuredRepresentation representation(); +} diff --git a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/representation/DomainRepresentation.java b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/representation/StructuredRepresentation.java similarity index 67% rename from lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/representation/DomainRepresentation.java rename to lisa/lisa-sdk/src/main/java/it/unive/lisa/util/representation/StructuredRepresentation.java index df033494b..4b0755a8e 100644 --- a/lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/representation/DomainRepresentation.java +++ b/lisa/lisa-sdk/src/main/java/it/unive/lisa/util/representation/StructuredRepresentation.java @@ -1,23 +1,18 @@ -package it.unive.lisa.analysis.representation; +package it.unive.lisa.util.representation; -import it.unive.lisa.analysis.SemanticDomain; -import it.unive.lisa.analysis.dataflow.DataflowElement; -import it.unive.lisa.analysis.nonrelational.NonRelationalDomain; import it.unive.lisa.outputs.serializableGraph.SerializableValue; import it.unive.lisa.util.collections.CollectionUtilities; import java.util.SortedMap; import java.util.TreeMap; /** - * A structured representation of the abstract information present in a single - * instance of {@link SemanticDomain}, {@link NonRelationalDomain}, - * {@link DataflowElement} or other types of domains. Instances of this class - * can be used to depict the content of an abstract element in a domain-agnostic - * way, such as dumping the information to a file. + * A structured representation of the information present in a single instance + * of an object. Instances of this class can be used to depict the content of an + * element in a domain-agnostic way, such as dumping the information to a file. * * @author Luca Negrini */ -public abstract class DomainRepresentation implements Comparable { +public abstract class StructuredRepresentation implements Comparable { private final SortedMap properties = new TreeMap<>(); @@ -38,7 +33,9 @@ public SortedMap getProperties() { * @param key the key of the property * @param value the value of the property */ - public void setProperty(String key, String value) { + public void setProperty( + String key, + String value) { this.properties.put(key, value); } @@ -51,7 +48,8 @@ public void setProperty(String key, String value) { public abstract SerializableValue toSerializableValue(); @Override - public final int compareTo(DomainRepresentation o) { + public final int compareTo( + StructuredRepresentation o) { if (o == null) return 1; @@ -70,14 +68,15 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; - DomainRepresentation other = (DomainRepresentation) obj; + StructuredRepresentation other = (StructuredRepresentation) obj; if (properties == null) { if (other.properties != null) return false; diff --git a/lisa/lisa-sdk/src/test/java/it/unive/lisa/TestAbstractState.java b/lisa/lisa-sdk/src/test/java/it/unive/lisa/TestAbstractState.java index 5c6f149c4..71fd97e15 100644 --- a/lisa/lisa-sdk/src/test/java/it/unive/lisa/TestAbstractState.java +++ b/lisa/lisa-sdk/src/test/java/it/unive/lisa/TestAbstractState.java @@ -1,45 +1,96 @@ package it.unive.lisa; import it.unive.lisa.analysis.AbstractState; -import it.unive.lisa.analysis.representation.DomainRepresentation; -import it.unive.lisa.analysis.representation.StringRepresentation; +import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.SemanticOracle; +import it.unive.lisa.analysis.lattices.ExpressionSet; +import it.unive.lisa.analysis.lattices.Satisfiability; +import it.unive.lisa.program.cfg.ProgramPoint; import it.unive.lisa.symbolic.SymbolicExpression; +import it.unive.lisa.type.Type; +import it.unive.lisa.type.Untyped; +import it.unive.lisa.util.representation.StringRepresentation; +import it.unive.lisa.util.representation.StructuredRepresentation; +import java.util.Collections; +import java.util.Set; public class TestAbstractState extends TestDomain - implements AbstractState { + implements + AbstractState { @Override - public DomainRepresentation representation() { + public StructuredRepresentation representation() { return new StringRepresentation("state"); } @Override - public TestHeapDomain getHeapState() { - return new TestHeapDomain(); + public ExpressionSet rewrite( + SymbolicExpression expression, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + return new ExpressionSet(expression); } @Override - public TestValueDomain getValueState() { - return new TestValueDomain(); + public ExpressionSet rewrite( + ExpressionSet expressions, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + return expressions; } @Override - public TestTypeDomain getTypeState() { - return new TestTypeDomain(); + public Set getRuntimeTypesOf( + SymbolicExpression e, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + return Collections.singleton(Untyped.INSTANCE); } @Override - public TestAbstractState withTopHeap() { - return new TestAbstractState(); + public Type getDynamicTypeOf( + SymbolicExpression e, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + return Untyped.INSTANCE; } @Override - public TestAbstractState withTopValue() { - return new TestAbstractState(); + public TestAbstractState withTopMemory() { + return this; } @Override - public TestAbstractState withTopType() { - return new TestAbstractState(); + public TestAbstractState withTopValues() { + return this; + } + + @Override + public TestAbstractState withTopTypes() { + return this; + } + + @Override + public Satisfiability alias( + SymbolicExpression x, + SymbolicExpression y, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + return Satisfiability.UNKNOWN; + } + + @Override + public Satisfiability isReachableFrom( + SymbolicExpression x, + SymbolicExpression y, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + return Satisfiability.UNKNOWN; } } diff --git a/lisa/lisa-sdk/src/test/java/it/unive/lisa/TestCallGraph.java b/lisa/lisa-sdk/src/test/java/it/unive/lisa/TestCallGraph.java index aa690f657..eb91f890f 100644 --- a/lisa/lisa-sdk/src/test/java/it/unive/lisa/TestCallGraph.java +++ b/lisa/lisa-sdk/src/test/java/it/unive/lisa/TestCallGraph.java @@ -9,7 +9,9 @@ public class TestCallGraph extends BaseCallGraph { @Override - public Collection getPossibleTypesOfReceiver(Expression receiver, Set types) + public Collection getPossibleTypesOfReceiver( + Expression receiver, + Set types) throws CallResolutionException { return receiver.getStaticType().allInstances(receiver.getProgram().getTypes()); } diff --git a/lisa/lisa-sdk/src/test/java/it/unive/lisa/TestDomain.java b/lisa/lisa-sdk/src/test/java/it/unive/lisa/TestDomain.java index b088dddc4..27ef6fd44 100644 --- a/lisa/lisa-sdk/src/test/java/it/unive/lisa/TestDomain.java +++ b/lisa/lisa-sdk/src/test/java/it/unive/lisa/TestDomain.java @@ -4,6 +4,8 @@ import it.unive.lisa.analysis.ScopeToken; import it.unive.lisa.analysis.SemanticDomain; import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.SemanticOracle; +import it.unive.lisa.analysis.lattices.Satisfiability; import it.unive.lisa.program.cfg.ProgramPoint; import it.unive.lisa.symbolic.SymbolicExpression; import it.unive.lisa.symbolic.value.Identifier; @@ -11,7 +13,9 @@ @SuppressWarnings("unchecked") public abstract class TestDomain, E extends SymbolicExpression> - implements BaseLattice, SemanticDomain { + implements + BaseLattice, + SemanticDomain { @Override public T top() { @@ -24,57 +28,88 @@ public T bottom() { } @Override - public T assign(Identifier id, E expression, ProgramPoint pp) throws SemanticException { + public T assign( + Identifier id, + E expression, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { return (T) this; } @Override - public T smallStepSemantics(E expression, ProgramPoint pp) throws SemanticException { + public T smallStepSemantics( + E expression, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { return (T) this; } @Override - public T assume(E expression, ProgramPoint src, ProgramPoint dest) throws SemanticException { + public T assume( + E expression, + ProgramPoint src, + ProgramPoint dest, + SemanticOracle oracle) + throws SemanticException { return (T) this; } @Override - public T forgetIdentifier(Identifier id) throws SemanticException { + public T forgetIdentifier( + Identifier id) + throws SemanticException { return (T) this; } @Override - public T forgetIdentifiersIf(Predicate test) throws SemanticException { + public T forgetIdentifiersIf( + Predicate test) + throws SemanticException { return (T) this; } @Override - public Satisfiability satisfies(E expression, ProgramPoint pp) throws SemanticException { + public Satisfiability satisfies( + E expression, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { return Satisfiability.UNKNOWN; } @Override - public T pushScope(ScopeToken token) throws SemanticException { + public T pushScope( + ScopeToken token) + throws SemanticException { return (T) this; } @Override - public T popScope(ScopeToken token) throws SemanticException { + public T popScope( + ScopeToken token) + throws SemanticException { return (T) this; } @Override - public T lubAux(T other) throws SemanticException { + public T lubAux( + T other) + throws SemanticException { return (T) this; } @Override - public boolean lessOrEqualAux(T other) throws SemanticException { + public boolean lessOrEqualAux( + T other) + throws SemanticException { return true; } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { return obj == this; } @@ -87,4 +122,10 @@ public int hashCode() { public String toString() { return representation().toString(); } + + @Override + public boolean knowsIdentifier( + Identifier id) { + return false; + } } diff --git a/lisa/lisa-sdk/src/test/java/it/unive/lisa/TestHeapDomain.java b/lisa/lisa-sdk/src/test/java/it/unive/lisa/TestHeapDomain.java index e96a340f3..dbd74d445 100644 --- a/lisa/lisa-sdk/src/test/java/it/unive/lisa/TestHeapDomain.java +++ b/lisa/lisa-sdk/src/test/java/it/unive/lisa/TestHeapDomain.java @@ -1,21 +1,23 @@ package it.unive.lisa; import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.SemanticOracle; import it.unive.lisa.analysis.heap.HeapDomain; import it.unive.lisa.analysis.lattices.ExpressionSet; -import it.unive.lisa.analysis.representation.DomainRepresentation; -import it.unive.lisa.analysis.representation.StringRepresentation; +import it.unive.lisa.analysis.lattices.Satisfiability; import it.unive.lisa.program.cfg.ProgramPoint; import it.unive.lisa.symbolic.SymbolicExpression; -import it.unive.lisa.symbolic.value.ValueExpression; +import it.unive.lisa.util.representation.StringRepresentation; +import it.unive.lisa.util.representation.StructuredRepresentation; import java.util.Collections; import java.util.List; public class TestHeapDomain extends TestDomain - implements HeapDomain { + implements + HeapDomain { @Override - public DomainRepresentation representation() { + public StructuredRepresentation representation() { return new StringRepresentation("heap"); } @@ -25,8 +27,31 @@ public List getSubstitution() { } @Override - public ExpressionSet rewrite(SymbolicExpression expression, ProgramPoint pp) + public ExpressionSet rewrite( + SymbolicExpression expression, + ProgramPoint pp, + SemanticOracle oracle) throws SemanticException { - return new ExpressionSet<>(); + return new ExpressionSet(); + } + + @Override + public Satisfiability alias( + SymbolicExpression x, + SymbolicExpression y, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + return Satisfiability.UNKNOWN; + } + + @Override + public Satisfiability isReachableFrom( + SymbolicExpression x, + SymbolicExpression y, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { + return Satisfiability.UNKNOWN; } } diff --git a/lisa/lisa-sdk/src/test/java/it/unive/lisa/TestInterproceduralAnalysis.java b/lisa/lisa-sdk/src/test/java/it/unive/lisa/TestInterproceduralAnalysis.java new file mode 100644 index 000000000..861cd1907 --- /dev/null +++ b/lisa/lisa-sdk/src/test/java/it/unive/lisa/TestInterproceduralAnalysis.java @@ -0,0 +1,92 @@ +package it.unive.lisa; + +import it.unive.lisa.analysis.AbstractState; +import it.unive.lisa.analysis.AnalysisState; +import it.unive.lisa.analysis.AnalyzedCFG; +import it.unive.lisa.analysis.SemanticException; +import it.unive.lisa.analysis.StatementStore; +import it.unive.lisa.analysis.lattices.ExpressionSet; +import it.unive.lisa.analysis.symbols.SymbolAliasing; +import it.unive.lisa.conf.FixpointConfiguration; +import it.unive.lisa.interprocedural.FixpointResults; +import it.unive.lisa.interprocedural.InterproceduralAnalysis; +import it.unive.lisa.interprocedural.InterproceduralAnalysisException; +import it.unive.lisa.interprocedural.OpenCallPolicy; +import it.unive.lisa.interprocedural.callgraph.CallGraph; +import it.unive.lisa.interprocedural.callgraph.CallResolutionException; +import it.unive.lisa.program.Application; +import it.unive.lisa.program.cfg.CFG; +import it.unive.lisa.program.cfg.statement.Statement; +import it.unive.lisa.program.cfg.statement.call.CFGCall; +import it.unive.lisa.program.cfg.statement.call.Call; +import it.unive.lisa.program.cfg.statement.call.OpenCall; +import it.unive.lisa.program.cfg.statement.call.UnresolvedCall; +import it.unive.lisa.type.Type; +import it.unive.lisa.util.collections.workset.WorkingSet; +import it.unive.lisa.util.datastructures.graph.algorithms.FixpointException; +import java.util.Collection; +import java.util.Set; + +public class TestInterproceduralAnalysis> implements InterproceduralAnalysis { + + @Override + public boolean needsCallGraph() { + return false; + } + + @Override + public void init( + Application app, + CallGraph callgraph, + OpenCallPolicy policy) + throws InterproceduralAnalysisException { + } + + @Override + public void fixpoint( + AnalysisState entryState, + Class> fixpointWorkingSet, + FixpointConfiguration conf) + throws FixpointException { + } + + @Override + public Collection> getAnalysisResultsOf( + CFG cfg) { + return null; + } + + @Override + public AnalysisState getAbstractResultOf( + CFGCall call, + AnalysisState entryState, + ExpressionSet[] parameters, + StatementStore expressions) + throws SemanticException { + return null; + } + + @Override + public AnalysisState getAbstractResultOf( + OpenCall call, + AnalysisState entryState, + ExpressionSet[] parameters, + StatementStore expressions) + throws SemanticException { + return null; + } + + @Override + public Call resolve( + UnresolvedCall call, + Set[] types, + SymbolAliasing aliasing) + throws CallResolutionException { + return null; + } + + @Override + public FixpointResults getFixpointResults() { + return null; + } +} diff --git a/lisa/lisa-sdk/src/test/java/it/unive/lisa/TestTypeDomain.java b/lisa/lisa-sdk/src/test/java/it/unive/lisa/TestTypeDomain.java index 2e1c49a4f..558d5697d 100644 --- a/lisa/lisa-sdk/src/test/java/it/unive/lisa/TestTypeDomain.java +++ b/lisa/lisa-sdk/src/test/java/it/unive/lisa/TestTypeDomain.java @@ -1,29 +1,37 @@ package it.unive.lisa; -import it.unive.lisa.analysis.representation.DomainRepresentation; -import it.unive.lisa.analysis.representation.StringRepresentation; -import it.unive.lisa.analysis.value.TypeDomain; +import it.unive.lisa.analysis.SemanticOracle; +import it.unive.lisa.analysis.type.TypeDomain; import it.unive.lisa.program.cfg.ProgramPoint; +import it.unive.lisa.symbolic.SymbolicExpression; import it.unive.lisa.symbolic.value.ValueExpression; import it.unive.lisa.type.Type; import it.unive.lisa.type.Untyped; +import it.unive.lisa.util.representation.StringRepresentation; +import it.unive.lisa.util.representation.StructuredRepresentation; import java.util.Collections; import java.util.Set; public class TestTypeDomain extends TestDomain implements TypeDomain { @Override - public DomainRepresentation representation() { + public StructuredRepresentation representation() { return new StringRepresentation("type"); } @Override - public Set getRuntimeTypesOf(ValueExpression e, ProgramPoint pp) { + public Set getRuntimeTypesOf( + SymbolicExpression e, + ProgramPoint pp, + SemanticOracle oracle) { return Collections.emptySet(); } @Override - public Type getDynamicTypeOf(ValueExpression e, ProgramPoint pp) { + public Type getDynamicTypeOf( + SymbolicExpression e, + ProgramPoint pp, + SemanticOracle oracle) { return Untyped.INSTANCE; } } diff --git a/lisa/lisa-sdk/src/test/java/it/unive/lisa/TestTypeSystem.java b/lisa/lisa-sdk/src/test/java/it/unive/lisa/TestTypeSystem.java index 1df16d3b6..3f2c6353a 100644 --- a/lisa/lisa-sdk/src/test/java/it/unive/lisa/TestTypeSystem.java +++ b/lisa/lisa-sdk/src/test/java/it/unive/lisa/TestTypeSystem.java @@ -14,17 +14,20 @@ public BooleanType getBooleanType() { return new BooleanType() { @Override - public Type commonSupertype(Type other) { + public Type commonSupertype( + Type other) { return null; } @Override - public boolean canBeAssignedTo(Type other) { + public boolean canBeAssignedTo( + Type other) { return false; } @Override - public Set allInstances(TypeSystem types) { + public Set allInstances( + TypeSystem types) { return null; } }; @@ -35,17 +38,20 @@ public StringType getStringType() { return new StringType() { @Override - public Type commonSupertype(Type other) { + public Type commonSupertype( + Type other) { return null; } @Override - public boolean canBeAssignedTo(Type other) { + public boolean canBeAssignedTo( + Type other) { return false; } @Override - public Set allInstances(TypeSystem types) { + public Set allInstances( + TypeSystem types) { return null; } }; @@ -56,17 +62,20 @@ public NumericType getIntegerType() { return new NumericType() { @Override - public Type commonSupertype(Type other) { + public Type commonSupertype( + Type other) { return null; } @Override - public boolean canBeAssignedTo(Type other) { + public boolean canBeAssignedTo( + Type other) { return false; } @Override - public Set allInstances(TypeSystem types) { + public Set allInstances( + TypeSystem types) { return null; } @@ -103,7 +112,8 @@ public boolean is16Bits() { } @Override - public boolean canBeReferenced(Type type) { + public boolean canBeReferenced( + Type type) { return false; } diff --git a/lisa/lisa-sdk/src/test/java/it/unive/lisa/TestValueDomain.java b/lisa/lisa-sdk/src/test/java/it/unive/lisa/TestValueDomain.java index d0adce982..c30f58564 100644 --- a/lisa/lisa-sdk/src/test/java/it/unive/lisa/TestValueDomain.java +++ b/lisa/lisa-sdk/src/test/java/it/unive/lisa/TestValueDomain.java @@ -1,15 +1,16 @@ package it.unive.lisa; -import it.unive.lisa.analysis.representation.DomainRepresentation; -import it.unive.lisa.analysis.representation.StringRepresentation; import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.symbolic.value.ValueExpression; +import it.unive.lisa.util.representation.StringRepresentation; +import it.unive.lisa.util.representation.StructuredRepresentation; public class TestValueDomain extends TestDomain - implements ValueDomain { + implements + ValueDomain { @Override - public DomainRepresentation representation() { + public StructuredRepresentation representation() { return new StringRepresentation("value"); } } diff --git a/lisa/lisa-sdk/src/test/java/it/unive/lisa/analysis/AnalyzedCFGTest.java b/lisa/lisa-sdk/src/test/java/it/unive/lisa/analysis/AnalyzedCFGTest.java index fb1cd3d26..b6ba709c9 100644 --- a/lisa/lisa-sdk/src/test/java/it/unive/lisa/analysis/AnalyzedCFGTest.java +++ b/lisa/lisa-sdk/src/test/java/it/unive/lisa/analysis/AnalyzedCFGTest.java @@ -3,23 +3,19 @@ import static org.junit.Assert.assertEquals; import it.unive.lisa.TestAbstractState; -import it.unive.lisa.TestHeapDomain; +import it.unive.lisa.TestInterproceduralAnalysis; import it.unive.lisa.TestLanguageFeatures; -import it.unive.lisa.TestTypeDomain; import it.unive.lisa.TestTypeSystem; -import it.unive.lisa.TestValueDomain; import it.unive.lisa.analysis.lattices.ExpressionSet; -import it.unive.lisa.analysis.symbols.SymbolAliasing; import it.unive.lisa.interprocedural.UniqueScope; import it.unive.lisa.program.ClassUnit; import it.unive.lisa.program.Program; import it.unive.lisa.program.SourceCodeLocation; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.CodeMemberDescriptor; +import it.unive.lisa.program.cfg.statement.Return; import it.unive.lisa.program.cfg.statement.Statement; import it.unive.lisa.program.cfg.statement.VariableRef; -import it.unive.lisa.program.cfg.statement.call.Call.CallType; -import it.unive.lisa.program.cfg.statement.call.OpenCall; import java.util.Map; import org.junit.Test; @@ -33,23 +29,108 @@ public void testIssue189() throws SemanticException { SourceCodeLocation unknown = new SourceCodeLocation("unknown", 0, 0); CFG cfg = new CFG(new CodeMemberDescriptor(unknown, unit, false, "emptyIf")); VariableRef x = new VariableRef(cfg, unknown, "x"); - OpenCall y = new OpenCall(cfg, unknown, CallType.STATIC, "bar", "foo", x); + Return y = new Return(cfg, unknown, x); cfg.addNode(y, true); - AnalysisState state = new AnalysisState<>( - new TestAbstractState(), - new ExpressionSet<>(), new SymbolAliasing()); + AnalysisState state = new AnalysisState<>( + new TestAbstractState(), + new ExpressionSet()); - Map> entries = Map.of(y, state); - Map> results = Map.of(y, state, x, state); + Map> entries = Map.of(y, state); + Map> results = Map.of(y, state, x, state); - AnalyzedCFG res = new AnalyzedCFG<>(cfg, new UniqueScope(), state, entries, results); + AnalyzedCFG res = new AnalyzedCFG<>( + cfg, + new UniqueScope(), + state, + entries, + results); + + assertEquals(state, res.getAnalysisStateAfter(y)); + assertEquals(state, res.getAnalysisStateBefore(y)); + assertEquals(state, res.getAnalysisStateAfter(x)); + assertEquals(state, res.getAnalysisStateBefore(x)); + } + + @Test + public void testIssue189Optimized() throws SemanticException { + SourceCodeLocation unknown = new SourceCodeLocation("unknown", 0, 0); + CFG cfg = new CFG(new CodeMemberDescriptor(unknown, unit, false, "emptyIf")); + VariableRef x = new VariableRef(cfg, unknown, "x"); + Return y = new Return(cfg, unknown, x); + cfg.addNode(y, true); + + AnalysisState state = new AnalysisState<>( + new TestAbstractState(), + new ExpressionSet()); + + Map> entries = Map.of(y, state); + Map> results = Map.of(y, state, x, state); + + OptimizedAnalyzedCFG res = new OptimizedAnalyzedCFG<>( + cfg, + new UniqueScope(), + state, + entries, + results, + new TestInterproceduralAnalysis<>()); + + assertEquals(state, res.getAnalysisStateAfter(y)); + assertEquals(state, res.getAnalysisStateBefore(y)); + assertEquals(state, res.getAnalysisStateAfter(x)); + assertEquals(state, res.getAnalysisStateBefore(x)); + } + + @Test + public void testIssue189Backward() throws SemanticException { + SourceCodeLocation unknown = new SourceCodeLocation("unknown", 0, 0); + CFG cfg = new CFG(new CodeMemberDescriptor(unknown, unit, false, "emptyIf")); + VariableRef x = new VariableRef(cfg, unknown, "x"); + Return y = new Return(cfg, unknown, x); + cfg.addNode(y, true); + + AnalysisState state = new AnalysisState<>( + new TestAbstractState(), + new ExpressionSet()); + + Map> entries = Map.of(y, state); + Map> results = Map.of(y, state, x, state); + + BackwardAnalyzedCFG res = new BackwardAnalyzedCFG<>( + cfg, + new UniqueScope(), + state, + entries, + results); + + assertEquals(state, res.getAnalysisStateAfter(y)); + assertEquals(state, res.getAnalysisStateBefore(y)); + assertEquals(state, res.getAnalysisStateAfter(x)); + assertEquals(state, res.getAnalysisStateBefore(x)); + } + + @Test + public void testIssue189BackwardOptimized() throws SemanticException { + SourceCodeLocation unknown = new SourceCodeLocation("unknown", 0, 0); + CFG cfg = new CFG(new CodeMemberDescriptor(unknown, unit, false, "emptyIf")); + VariableRef x = new VariableRef(cfg, unknown, "x"); + Return y = new Return(cfg, unknown, x); + cfg.addNode(y, true); + + AnalysisState state = new AnalysisState<>( + new TestAbstractState(), + new ExpressionSet()); + + Map> entries = Map.of(y, state); + Map> results = Map.of(y, state, x, state); + + BackwardOptimizedAnalyzedCFG res = new BackwardOptimizedAnalyzedCFG<>( + cfg, + new UniqueScope(), + state, + entries, + results, + new TestInterproceduralAnalysis<>()); assertEquals(state, res.getAnalysisStateAfter(y)); assertEquals(state, res.getAnalysisStateBefore(y)); diff --git a/lisa/lisa-sdk/src/test/java/it/unive/lisa/analysis/SubstitutionTest.java b/lisa/lisa-sdk/src/test/java/it/unive/lisa/analysis/SubstitutionTest.java index fdbc1cc08..3dfbf3041 100644 --- a/lisa/lisa-sdk/src/test/java/it/unive/lisa/analysis/SubstitutionTest.java +++ b/lisa/lisa-sdk/src/test/java/it/unive/lisa/analysis/SubstitutionTest.java @@ -3,19 +3,22 @@ import static it.unive.lisa.util.collections.CollectionUtilities.collect; import static org.junit.Assert.assertTrue; +import it.unive.lisa.TestAbstractState; import it.unive.lisa.analysis.heap.HeapSemanticOperation.HeapReplacement; import it.unive.lisa.analysis.lattices.ExpressionSet; -import it.unive.lisa.analysis.representation.DomainRepresentation; +import it.unive.lisa.analysis.lattices.Satisfiability; import it.unive.lisa.analysis.value.ValueDomain; import it.unive.lisa.program.SyntheticLocation; import it.unive.lisa.program.cfg.CFG; import it.unive.lisa.program.cfg.CodeLocation; import it.unive.lisa.program.cfg.ProgramPoint; +import it.unive.lisa.symbolic.SymbolicExpression; import it.unive.lisa.symbolic.value.Identifier; import it.unive.lisa.symbolic.value.ValueExpression; import it.unive.lisa.symbolic.value.Variable; import it.unive.lisa.type.Untyped; import it.unive.lisa.util.collections.CollectionsDiffBuilder; +import it.unive.lisa.util.representation.StructuredRepresentation; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; @@ -29,70 +32,98 @@ public class SubstitutionTest { private static class Collector implements ValueDomain { - private final ExpressionSet assigned, removed; + private final ExpressionSet assigned, removed; private Collector() { - this.assigned = new ExpressionSet<>(new HashSet<>()); - this.removed = new ExpressionSet<>(new HashSet<>()); + this.assigned = new ExpressionSet(new HashSet<>()); + this.removed = new ExpressionSet(new HashSet<>()); } - private Collector(Collector other) { - this.assigned = new ExpressionSet<>(other.assigned.elements()); - this.removed = new ExpressionSet<>(other.removed.elements()); + private Collector( + Collector other) { + this.assigned = new ExpressionSet(other.assigned.elements()); + this.removed = new ExpressionSet(other.removed.elements()); } @Override - public Collector assign(Identifier id, ValueExpression expression, ProgramPoint pp) throws SemanticException { + public Collector assign( + Identifier id, + ValueExpression expression, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { Collector add = new Collector(this); add.assigned.elements().add(id); return add; } @Override - public Collector smallStepSemantics(ValueExpression expression, ProgramPoint pp) throws SemanticException { + public Collector smallStepSemantics( + ValueExpression expression, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { return null; // not used } @Override - public Collector assume(ValueExpression expression, ProgramPoint src, ProgramPoint dest) + public Collector assume( + ValueExpression expression, + ProgramPoint src, + ProgramPoint dest, + SemanticOracle oracle) throws SemanticException { return null; // not used } @Override - public Collector forgetIdentifier(Identifier id) throws SemanticException { + public Collector forgetIdentifier( + Identifier id) + throws SemanticException { Collector rem = new Collector(this); rem.removed.elements().add(id); return rem; } @Override - public Collector forgetIdentifiersIf(Predicate test) throws SemanticException { + public Collector forgetIdentifiersIf( + Predicate test) + throws SemanticException { return null; } @Override - public Satisfiability satisfies(ValueExpression expression, ProgramPoint pp) throws SemanticException { + public Satisfiability satisfies( + ValueExpression expression, + ProgramPoint pp, + SemanticOracle oracle) + throws SemanticException { return null; // not used } @Override - public Collector pushScope(ScopeToken token) throws SemanticException { + public Collector pushScope( + ScopeToken token) + throws SemanticException { return null; // not used } @Override - public Collector popScope(ScopeToken token) throws SemanticException { + public Collector popScope( + ScopeToken token) + throws SemanticException { return null; // not used } @Override - public DomainRepresentation representation() { + public StructuredRepresentation representation() { return null; // not used } @Override - public Collector lub(Collector other) throws SemanticException { + public Collector lub( + Collector other) + throws SemanticException { Collector lub = new Collector(this); lub.assigned.elements().addAll(other.assigned.elements()); lub.removed.elements().addAll(other.removed.elements()); @@ -100,7 +131,9 @@ public Collector lub(Collector other) throws SemanticException { } @Override - public boolean lessOrEqual(Collector other) throws SemanticException { + public boolean lessOrEqual( + Collector other) + throws SemanticException { return false; // not used } @@ -114,6 +147,11 @@ public Collector bottom() { return new Collector(); } + @Override + public boolean knowsIdentifier( + Identifier id) { + return false; // not used + } } private static final ProgramPoint fake = new ProgramPoint() { @@ -133,21 +171,28 @@ public CFG getCFG() { private final Variable y = new Variable(Untyped.INSTANCE, "y", SyntheticLocation.INSTANCE); private final Variable z = new Variable(Untyped.INSTANCE, "z", SyntheticLocation.INSTANCE); private final Variable w = new Variable(Untyped.INSTANCE, "w", SyntheticLocation.INSTANCE); - private final Comparator comparer = (l, r) -> l.getName().compareTo(r.getName()); - - private void check(List sub, - Collection addexpected, - Collection remexpected) + private final Comparator< + SymbolicExpression> comparer = ( + l, + r) -> ((Identifier) l).getName().compareTo(((Identifier) r).getName()); + + private void check( + List sub, + Collection addexpected, + Collection remexpected) throws SemanticException { Collector c = new Collector(); + TestAbstractState oracle = new TestAbstractState(); if (sub != null) for (HeapReplacement repl : sub) - c = c.lub(c.applyReplacement(repl, fake)); + c = c.lub(c.applyReplacement(repl, fake, oracle)); CollectionsDiffBuilder< - Identifier> add = new CollectionsDiffBuilder<>(Identifier.class, addexpected, c.assigned.elements()); + SymbolicExpression> add = new CollectionsDiffBuilder<>(SymbolicExpression.class, addexpected, + c.assigned.elements()); CollectionsDiffBuilder< - Identifier> rem = new CollectionsDiffBuilder<>(Identifier.class, remexpected, c.removed.elements()); + SymbolicExpression> rem = new CollectionsDiffBuilder<>(SymbolicExpression.class, remexpected, + c.removed.elements()); add.compute(comparer); rem.compute(comparer); diff --git a/lisa/lisa-sdk/src/test/java/it/unive/lisa/checks/semantic/CheckToolWithAnalysisResultsTest.java b/lisa/lisa-sdk/src/test/java/it/unive/lisa/checks/semantic/CheckToolWithAnalysisResultsTest.java index 5fe2842f2..b25ea9514 100644 --- a/lisa/lisa-sdk/src/test/java/it/unive/lisa/checks/semantic/CheckToolWithAnalysisResultsTest.java +++ b/lisa/lisa-sdk/src/test/java/it/unive/lisa/checks/semantic/CheckToolWithAnalysisResultsTest.java @@ -4,11 +4,8 @@ import static org.junit.Assert.assertTrue; import it.unive.lisa.TestAbstractState; -import it.unive.lisa.TestHeapDomain; import it.unive.lisa.TestLanguageFeatures; -import it.unive.lisa.TestTypeDomain; import it.unive.lisa.TestTypeSystem; -import it.unive.lisa.TestValueDomain; import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.AnalyzedCFG; import it.unive.lisa.analysis.lattices.ExpressionSet; @@ -70,31 +67,40 @@ public class CheckToolWithAnalysisResultsTest { private static final CallGraph fakeCallGraph = new CallGraph() { @Override - public void registerCall(CFGCall call) { + public void registerCall( + CFGCall call) { } @Override - public void init(Application app) throws CallGraphConstructionException { + public void init( + Application app) + throws CallGraphConstructionException { super.init(app); } @Override - public Collection getCallers(CodeMember cm) { + public Collection getCallers( + CodeMember cm) { return null; } @Override - public Collection getCallees(CodeMember cm) { + public Collection getCallees( + CodeMember cm) { return null; } @Override - public Collection getCallSites(CodeMember cm) { + public Collection getCallSites( + CodeMember cm) { return null; } @Override - public Call resolve(UnresolvedCall call, Set[] types, SymbolAliasing aliasing) + public Call resolve( + UnresolvedCall call, + Set[] types, + SymbolAliasing aliasing) throws CallResolutionException { return null; } @@ -105,12 +111,16 @@ public Collection> getRecursions() { } @Override - public Collection> getRecursionsContaining(CodeMember cm) { + public Collection> getRecursionsContaining( + CodeMember cm) { return null; } }; - private static Warning build(CheckTool tool, Object target, String message) { + private static Warning build( + CheckTool tool, + Object target, + String message) { if (target == null) { tool.warn(message); return new Warning(message); @@ -138,9 +148,8 @@ private static Warning build(CheckTool tool, Object target, String message) { @Test public void testCopy() { - CheckToolWithAnalysisResults tool = new CheckToolWithAnalysisResults<>(new LiSAConfiguration(), + CheckToolWithAnalysisResults< + TestAbstractState> tool = new CheckToolWithAnalysisResults<>(new LiSAConfiguration(), new FileManager("foo"), Map.of(), fakeCallGraph); Collection exp = new HashSet<>(); @@ -169,9 +178,8 @@ public void testCopy() { @Test public void testSimpleFill() { - CheckToolWithAnalysisResults tool = new CheckToolWithAnalysisResults<>(new LiSAConfiguration(), + CheckToolWithAnalysisResults< + TestAbstractState> tool = new CheckToolWithAnalysisResults<>(new LiSAConfiguration(), new FileManager("foo"), Map.of(), fakeCallGraph); Collection exp = new HashSet<>(); @@ -187,9 +195,8 @@ public void testSimpleFill() { @Test public void testDisjointWarnings() { - CheckToolWithAnalysisResults tool = new CheckToolWithAnalysisResults<>(new LiSAConfiguration(), + CheckToolWithAnalysisResults< + TestAbstractState> tool = new CheckToolWithAnalysisResults<>(new LiSAConfiguration(), new FileManager("foo"), Map.of(), fakeCallGraph); Collection exp = new HashSet<>(); @@ -203,9 +210,8 @@ public void testDisjointWarnings() { @Test public void testDuplicateWarnings() { - CheckToolWithAnalysisResults tool = new CheckToolWithAnalysisResults<>(new LiSAConfiguration(), + CheckToolWithAnalysisResults< + TestAbstractState> tool = new CheckToolWithAnalysisResults<>(new LiSAConfiguration(), new FileManager("foo"), Map.of(), fakeCallGraph); Collection exp = new HashSet<>(); @@ -222,25 +228,19 @@ public void testDuplicateWarnings() { @Test public void testResultRetrieval() { - AnalysisState singleton = new AnalysisState<>( - new TestAbstractState(), - new ExpressionSet<>(), new SymbolAliasing()); + AnalysisState singleton = new AnalysisState<>( + new TestAbstractState(), + new ExpressionSet()); NoOp noop = new NoOp(cfg, new SourceCodeLocation("fake", 3, 0)); - AnalyzedCFG res1 = new AnalyzedCFG<>(cfg, new UniqueScope(), singleton, - Map.of(noop, singleton.bottom()), Map.of(noop, singleton.bottom())); + AnalyzedCFG res1 = new AnalyzedCFG<>(cfg, new UniqueScope(), singleton, + Map.of(noop, singleton.bottom()), Map.of(noop, singleton.bottom())); noop = new NoOp(cfg2, new SourceCodeLocation("fake", 30, 0)); - AnalyzedCFG res2 = new AnalyzedCFG<>(cfg2, new UniqueScope(), singleton, - Map.of(noop, singleton.bottom()), Map.of(noop, singleton.bottom())); - - CheckToolWithAnalysisResults tool = new CheckToolWithAnalysisResults<>(new LiSAConfiguration(), + AnalyzedCFG res2 = new AnalyzedCFG<>(cfg2, new UniqueScope(), singleton, + Map.of(noop, singleton.bottom()), Map.of(noop, singleton.bottom())); + + CheckToolWithAnalysisResults< + TestAbstractState> tool = new CheckToolWithAnalysisResults<>(new LiSAConfiguration(), new FileManager("foo"), Map.of(cfg, Collections.singleton(res1), cfg2, Collections.singleton(res2)), fakeCallGraph); diff --git a/lisa/lisa-sdk/src/test/java/it/unive/lisa/checks/syntactic/CheckToolTest.java b/lisa/lisa-sdk/src/test/java/it/unive/lisa/checks/syntactic/CheckToolTest.java index 12b9b0141..5ab7c3d33 100644 --- a/lisa/lisa-sdk/src/test/java/it/unive/lisa/checks/syntactic/CheckToolTest.java +++ b/lisa/lisa-sdk/src/test/java/it/unive/lisa/checks/syntactic/CheckToolTest.java @@ -39,7 +39,10 @@ public class CheckToolTest { "foo"); private static final CFG cfg = new CFG(descriptor); - private static Warning build(CheckTool tool, Object target, String message) { + private static Warning build( + CheckTool tool, + Object target, + String message) { if (target == null) { tool.warn(message); return new Warning(message); diff --git a/lisa/lisa-sdk/src/test/java/it/unive/lisa/interprocedural/callgraph/BaseCallGraphTest.java b/lisa/lisa-sdk/src/test/java/it/unive/lisa/interprocedural/callgraph/BaseCallGraphTest.java index 3fd806333..d24e9ba13 100644 --- a/lisa/lisa-sdk/src/test/java/it/unive/lisa/interprocedural/callgraph/BaseCallGraphTest.java +++ b/lisa/lisa-sdk/src/test/java/it/unive/lisa/interprocedural/callgraph/BaseCallGraphTest.java @@ -37,34 +37,40 @@ public class BaseCallGraphTest { private final class StrType implements StringType { @Override - public Type commonSupertype(Type other) { + public Type commonSupertype( + Type other) { return canBeAssignedTo(other) ? this : Untyped.INSTANCE; } @Override - public boolean canBeAssignedTo(Type other) { + public boolean canBeAssignedTo( + Type other) { return other.getClass() == getClass(); } @Override - public Set allInstances(TypeSystem types) { + public Set allInstances( + TypeSystem types) { return Collections.singleton(this); } } private final class BoolType implements BooleanType { @Override - public Type commonSupertype(Type other) { + public Type commonSupertype( + Type other) { return canBeAssignedTo(other) ? this : Untyped.INSTANCE; } @Override - public boolean canBeAssignedTo(Type other) { + public boolean canBeAssignedTo( + Type other) { return other.getClass() == getClass(); } @Override - public Set allInstances(TypeSystem types) { + public Set allInstances( + TypeSystem types) { return Collections.singleton(this); } } diff --git a/lisa/lisa-sdk/src/test/java/it/unive/lisa/logging/TimeFormatTest.java b/lisa/lisa-sdk/src/test/java/it/unive/lisa/logging/TimeFormatTest.java index 54981cd7c..45807afe1 100644 --- a/lisa/lisa-sdk/src/test/java/it/unive/lisa/logging/TimeFormatTest.java +++ b/lisa/lisa-sdk/src/test/java/it/unive/lisa/logging/TimeFormatTest.java @@ -159,7 +159,9 @@ public void testUpToHours() { private static final Random generator = new Random(); - private void loopRunner(Function expectedGenerator, Function actualGenerator) { + private void loopRunner( + Function expectedGenerator, + Function actualGenerator) { LongStream .iterate(1L + generator.nextInt(9), l -> (1L + generator.nextInt(9)) * ((long) Math.pow(10, Math.log10(l))) + l) diff --git a/lisa/lisa-sdk/src/test/java/it/unive/lisa/outputs/SerializableGraphTest.java b/lisa/lisa-sdk/src/test/java/it/unive/lisa/outputs/SerializableGraphTest.java index 42b1acb40..065f367e2 100644 --- a/lisa/lisa-sdk/src/test/java/it/unive/lisa/outputs/SerializableGraphTest.java +++ b/lisa/lisa-sdk/src/test/java/it/unive/lisa/outputs/SerializableGraphTest.java @@ -33,14 +33,19 @@ public class SerializableGraphTest { private static final ClassUnit unit = new ClassUnit(SyntheticLocation.INSTANCE, new Program(new TestLanguageFeatures(), new TestTypeSystem()), "Testing", false); - private static void addNode(SortedSet nodes, Statement st, Statement... inner) { + private static void addNode( + SortedSet nodes, + Statement st, + Statement... inner) { List list = new ArrayList<>(inner.length); for (int i = 0; i < inner.length; i++) list.add(inner[i].getOffset()); nodes.add(new SerializableNode(st.getOffset(), list, st.toString())); } - private static void addEdge(SortedSet edges, Edge e) { + private static void addEdge( + SortedSet edges, + Edge e) { edges.add(new SerializableEdge(e.getSource().getOffset(), e.getDestination().getOffset(), e.getClass().getSimpleName())); } diff --git a/lisa/lisa-sdk/src/test/java/it/unive/lisa/program/cfg/ConditionalsExtractionTest.java b/lisa/lisa-sdk/src/test/java/it/unive/lisa/program/cfg/ConditionalsExtractionTest.java index c862f0a48..84608200f 100644 --- a/lisa/lisa-sdk/src/test/java/it/unive/lisa/program/cfg/ConditionalsExtractionTest.java +++ b/lisa/lisa-sdk/src/test/java/it/unive/lisa/program/cfg/ConditionalsExtractionTest.java @@ -37,7 +37,9 @@ public class ConditionalsExtractionTest { new Program(new TestLanguageFeatures(), new TestTypeSystem()), "Testing", false); - private static void checkMatrix(String label, Collection nodes, + private static void checkMatrix( + String label, + Collection nodes, Collection expected) { Collection missingNodes = new HashSet<>(expected), extraNodes = new HashSet<>(nodes); @@ -53,15 +55,23 @@ private static void checkMatrix(String label, Collection nodes, missingNodes.isEmpty() && extraNodes.isEmpty()); } - private void assertIf(Statement condition, Statement follower, Collection tnodes, - Collection fnodes, IfThenElse ith) { + private void assertIf( + Statement condition, + Statement follower, + Collection tnodes, + Collection fnodes, + IfThenElse ith) { assertEquals("Wrong condition: " + ith.getCondition(), condition, ith.getCondition()); assertEquals("Wrong follower: " + ith.getFirstFollower(), follower, ith.getFirstFollower()); checkMatrix("true branch", ith.getTrueBranch(), tnodes); checkMatrix("false branch", ith.getFalseBranch(), fnodes); } - private void assertLoop(Statement condition, Statement follower, Collection nodes, Loop loop) { + private void assertLoop( + Statement condition, + Statement follower, + Collection nodes, + Loop loop) { assertEquals("Wrong condition: " + loop.getCondition(), condition, loop.getCondition()); assertEquals("Wrong follower: " + loop.getFirstFollower(), follower, loop.getFirstFollower()); checkMatrix("loop body", loop.getBody(), nodes); diff --git a/lisa/lisa-sdk/src/test/java/it/unive/lisa/program/cfg/fixpoints/OptimizedFixpointTest.java b/lisa/lisa-sdk/src/test/java/it/unive/lisa/program/cfg/fixpoints/OptimizedFixpointTest.java index 7136bf43e..4739972d4 100644 --- a/lisa/lisa-sdk/src/test/java/it/unive/lisa/program/cfg/fixpoints/OptimizedFixpointTest.java +++ b/lisa/lisa-sdk/src/test/java/it/unive/lisa/program/cfg/fixpoints/OptimizedFixpointTest.java @@ -5,15 +5,11 @@ import static org.junit.Assert.fail; import it.unive.lisa.TestAbstractState; -import it.unive.lisa.TestHeapDomain; import it.unive.lisa.TestLanguageFeatures; -import it.unive.lisa.TestTypeDomain; import it.unive.lisa.TestTypeSystem; -import it.unive.lisa.TestValueDomain; import it.unive.lisa.analysis.AnalysisState; import it.unive.lisa.analysis.StatementStore; import it.unive.lisa.analysis.lattices.ExpressionSet; -import it.unive.lisa.analysis.symbols.SymbolAliasing; import it.unive.lisa.program.CodeUnit; import it.unive.lisa.program.Program; import it.unive.lisa.program.SyntheticLocation; @@ -39,45 +35,50 @@ public class OptimizedFixpointTest { - private static class FixpointTester2 implements FixpointImplementation> { + private static class FixpointTester2 + implements + FixpointImplementation> { @Override - public CompoundState semantics( + public CompoundState semantics( Statement node, - CompoundState entrystate) + CompoundState entrystate) throws Exception { return entrystate; } @Override - public CompoundState traverse(Edge edge, - CompoundState entrystate) + public CompoundState traverse( + Edge edge, + CompoundState entrystate) throws Exception { return entrystate; } @Override - public CompoundState union(Statement node, - CompoundState left, - CompoundState right) + public CompoundState union( + Statement node, + CompoundState left, + CompoundState right) throws Exception { return left.lub(right); } @Override - public CompoundState operation( + public CompoundState operation( Statement node, - CompoundState approx, - CompoundState old) + CompoundState approx, + CompoundState old) throws Exception { return old.lub(approx); } @Override - public boolean equality(Statement node, - CompoundState approx, - CompoundState old) + public boolean equality( + Statement node, + CompoundState approx, + CompoundState old) throws Exception { return approx.lessOrEqual(old); } @@ -101,16 +102,13 @@ public void testLinearGraph() { graph.computeBasicBlocks(); Map> res = null; - AnalysisState state = new AnalysisState<>( - new TestAbstractState(), - new ExpressionSet<>(), - new SymbolAliasing()); - CompoundState comp = CompoundState.of(state.bottom(), new StatementStore<>(state.bottom())); + CompoundState> res = null; + AnalysisState state = new AnalysisState<>( + new TestAbstractState(), + new ExpressionSet()); + CompoundState comp = CompoundState.of(state.bottom(), new StatementStore<>(state.bottom())); try { - res = new OptimizedFixpoint(graph, + res = new OptimizedFixpoint(graph, false, st -> st instanceof Call).fixpoint( Map.of(source, comp), FIFOWorkingSet.mk(), @@ -152,16 +150,13 @@ public void testBranchingGraph() { graph.computeBasicBlocks(); Map> res = null; - AnalysisState state = new AnalysisState<>( - new TestAbstractState(), - new ExpressionSet<>(), - new SymbolAliasing()); - CompoundState comp = CompoundState.of(state.bottom(), new StatementStore<>(state.bottom())); + CompoundState> res = null; + AnalysisState state = new AnalysisState<>( + new TestAbstractState(), + new ExpressionSet()); + CompoundState comp = CompoundState.of(state.bottom(), new StatementStore<>(state.bottom())); try { - res = new OptimizedFixpoint(graph, + res = new OptimizedFixpoint(graph, false, st -> st instanceof Call).fixpoint( Map.of(source, comp), FIFOWorkingSet.mk(), @@ -203,16 +198,13 @@ public void testCyclicGraph() { graph.computeBasicBlocks(); Map> res = null; - AnalysisState state = new AnalysisState<>( - new TestAbstractState(), - new ExpressionSet<>(), - new SymbolAliasing()); - CompoundState comp = CompoundState.of(state.bottom(), new StatementStore<>(state.bottom())); + CompoundState> res = null; + AnalysisState state = new AnalysisState<>( + new TestAbstractState(), + new ExpressionSet()); + CompoundState comp = CompoundState.of(state.bottom(), new StatementStore<>(state.bottom())); try { - res = new OptimizedFixpoint(graph, + res = new OptimizedFixpoint(graph, false, st -> st instanceof Call).fixpoint( Map.of(source, comp), FIFOWorkingSet.mk(), diff --git a/lisa/lisa-sdk/src/test/java/it/unive/lisa/util/collections/externalSet/BitExternalSetTest.java b/lisa/lisa-sdk/src/test/java/it/unive/lisa/util/collections/externalSet/BitExternalSetTest.java index 72238ec4c..42088e34a 100644 --- a/lisa/lisa-sdk/src/test/java/it/unive/lisa/util/collections/externalSet/BitExternalSetTest.java +++ b/lisa/lisa-sdk/src/test/java/it/unive/lisa/util/collections/externalSet/BitExternalSetTest.java @@ -21,7 +21,8 @@ public class BitExternalSetTest { private static final Random random = new Random(); - private static void populateSingle(Set[] sets) { + private static void populateSingle( + Set[] sets) { for (int limit = ADD_LIMIT + random.nextInt(ADD_LIMIT); limit >= 0; limit--) { String str = UUID.randomUUID().toString(); for (Set set : sets) @@ -29,7 +30,8 @@ private static void populateSingle(Set[] sets) { } } - private static void removeSingle(Set[] sets) { + private static void removeSingle( + Set[] sets) { List copy = new ArrayList<>(sets[0]); Set toRemove = new HashSet<>(); for (int limit = REM_LIMIT + random.nextInt(REM_LIMIT); limit >= 0; limit--) { @@ -45,7 +47,9 @@ private static void removeSingle(Set[] sets) { set.remove(str); } - private static void populateDouble(Set[] sets1, Set[] sets2) { + private static void populateDouble( + Set[] sets1, + Set[] sets2) { for (int limit = ADD_LIMIT + random.nextInt(ADD_LIMIT); limit >= 0; limit--) { String str = UUID.randomUUID().toString(); if (random.nextBoolean()) @@ -57,7 +61,10 @@ private static void populateDouble(Set[] sets1, Set[] sets2) { } } - private static void populateTriple(Set[] sets1, Set[] sets2, Set[] sets3) { + private static void populateTriple( + Set[] sets1, + Set[] sets2, + Set[] sets3) { for (int limit = ADD_LIMIT + random.nextInt(ADD_LIMIT); limit >= 0; limit--) { String str = UUID.randomUUID().toString(); int flag = random.nextInt(3); @@ -73,7 +80,8 @@ else if (flag == 1) } } - private static void verify(BiFunction, Set, Boolean> test, + private static void verify( + BiFunction, Set, Boolean> test, Pair, Set>... sets) { for (Pair, Set> pair : sets) assertTrue("The pair of sets are different", test.apply(pair.getLeft(), pair.getRight())); @@ -88,9 +96,15 @@ public void testSingleSetAdd() { verify(Set::equals, Pair.of(set, eset)); verify(Set::containsAll, Pair.of(set, eset)); - verify((s, es) -> s.stream().allMatch(es::contains), Pair.of(set, eset)); - verify((s, es) -> s.isEmpty() == es.isEmpty(), Pair.of(set, eset)); - verify((s, es) -> s.size() == es.size(), Pair.of(set, eset)); + verify(( + s, + es) -> s.stream().allMatch(es::contains), Pair.of(set, eset)); + verify(( + s, + es) -> s.isEmpty() == es.isEmpty(), Pair.of(set, eset)); + verify(( + s, + es) -> s.size() == es.size(), Pair.of(set, eset)); } @Test @@ -103,9 +117,15 @@ public void testDoubleSetAdd() { populateDouble(new Set[] { set1, eset1 }, new Set[] { set2, eset2 }); verify(Set::equals, Pair.of(set1, eset1), Pair.of(set2, eset2)); verify(Set::containsAll, Pair.of(set1, eset1), Pair.of(set2, eset2)); - verify((s, es) -> s.stream().allMatch(es::contains), Pair.of(set1, eset1), Pair.of(set2, eset2)); - verify((s, es) -> s.isEmpty() == es.isEmpty(), Pair.of(set1, eset1), Pair.of(set2, eset2)); - verify((s, es) -> s.size() == es.size(), Pair.of(set1, eset1), Pair.of(set2, eset2)); + verify(( + s, + es) -> s.stream().allMatch(es::contains), Pair.of(set1, eset1), Pair.of(set2, eset2)); + verify(( + s, + es) -> s.isEmpty() == es.isEmpty(), Pair.of(set1, eset1), Pair.of(set2, eset2)); + verify(( + s, + es) -> s.size() == es.size(), Pair.of(set1, eset1), Pair.of(set2, eset2)); } @Test @@ -120,11 +140,17 @@ public void testTripleSetAdd() { populateTriple(new Set[] { set1, eset1 }, new Set[] { set2, eset2 }, new Set[] { set3, eset3 }); verify(Set::equals, Pair.of(set1, eset1), Pair.of(set2, eset2), Pair.of(set3, eset3)); verify(Set::containsAll, Pair.of(set1, eset1), Pair.of(set2, eset2), Pair.of(set3, eset3)); - verify((s, es) -> s.stream().allMatch(es::contains), Pair.of(set1, eset1), Pair.of(set2, eset2), + verify(( + s, + es) -> s.stream().allMatch(es::contains), Pair.of(set1, eset1), Pair.of(set2, eset2), Pair.of(set3, eset3)); - verify((s, es) -> s.isEmpty() == es.isEmpty(), Pair.of(set1, eset1), Pair.of(set2, eset2), + verify(( + s, + es) -> s.isEmpty() == es.isEmpty(), Pair.of(set1, eset1), Pair.of(set2, eset2), Pair.of(set3, eset3)); - verify((s, es) -> s.size() == es.size(), Pair.of(set1, eset1), Pair.of(set2, eset2), Pair.of(set3, eset3)); + verify(( + s, + es) -> s.size() == es.size(), Pair.of(set1, eset1), Pair.of(set2, eset2), Pair.of(set3, eset3)); } @Test @@ -136,9 +162,15 @@ public void testSingleSetAddAll() { eset.addAll(set); verify(Set::equals, Pair.of(set, eset)); verify(Set::containsAll, Pair.of(set, eset)); - verify((s, es) -> s.stream().allMatch(es::contains), Pair.of(set, eset)); - verify((s, es) -> s.isEmpty() == es.isEmpty(), Pair.of(set, eset)); - verify((s, es) -> s.size() == es.size(), Pair.of(set, eset)); + verify(( + s, + es) -> s.stream().allMatch(es::contains), Pair.of(set, eset)); + verify(( + s, + es) -> s.isEmpty() == es.isEmpty(), Pair.of(set, eset)); + verify(( + s, + es) -> s.size() == es.size(), Pair.of(set, eset)); } @Test @@ -153,9 +185,15 @@ public void testDoubleSetAddAll() { eset2.addAll(set2); verify(Set::equals, Pair.of(set1, eset1), Pair.of(set2, eset2)); verify(Set::containsAll, Pair.of(set1, eset1), Pair.of(set2, eset2)); - verify((s, es) -> s.stream().allMatch(es::contains), Pair.of(set1, eset1), Pair.of(set2, eset2)); - verify((s, es) -> s.isEmpty() == es.isEmpty(), Pair.of(set1, eset1), Pair.of(set2, eset2)); - verify((s, es) -> s.size() == es.size(), Pair.of(set1, eset1), Pair.of(set2, eset2)); + verify(( + s, + es) -> s.stream().allMatch(es::contains), Pair.of(set1, eset1), Pair.of(set2, eset2)); + verify(( + s, + es) -> s.isEmpty() == es.isEmpty(), Pair.of(set1, eset1), Pair.of(set2, eset2)); + verify(( + s, + es) -> s.size() == es.size(), Pair.of(set1, eset1), Pair.of(set2, eset2)); } @Test @@ -173,11 +211,17 @@ public void testTripleSetAddAll() { eset3.addAll(set3); verify(Set::equals, Pair.of(set1, eset1), Pair.of(set2, eset2), Pair.of(set3, eset3)); verify(Set::containsAll, Pair.of(set1, eset1), Pair.of(set2, eset2), Pair.of(set3, eset3)); - verify((s, es) -> s.stream().allMatch(es::contains), Pair.of(set1, eset1), Pair.of(set2, eset2), + verify(( + s, + es) -> s.stream().allMatch(es::contains), Pair.of(set1, eset1), Pair.of(set2, eset2), Pair.of(set3, eset3)); - verify((s, es) -> s.isEmpty() == es.isEmpty(), Pair.of(set1, eset1), Pair.of(set2, eset2), + verify(( + s, + es) -> s.isEmpty() == es.isEmpty(), Pair.of(set1, eset1), Pair.of(set2, eset2), Pair.of(set3, eset3)); - verify((s, es) -> s.size() == es.size(), Pair.of(set1, eset1), Pair.of(set2, eset2), Pair.of(set3, eset3)); + verify(( + s, + es) -> s.size() == es.size(), Pair.of(set1, eset1), Pair.of(set2, eset2), Pair.of(set3, eset3)); } @Test @@ -189,9 +233,15 @@ public void testSingleSetAddAllExternals() { eset.addAll(set); verify(Set::equals, Pair.of(set, eset)); verify(Set::containsAll, Pair.of(set, eset)); - verify((s, es) -> s.stream().allMatch(es::contains), Pair.of(set, eset)); - verify((s, es) -> s.isEmpty() == es.isEmpty(), Pair.of(set, eset)); - verify((s, es) -> s.size() == es.size(), Pair.of(set, eset)); + verify(( + s, + es) -> s.stream().allMatch(es::contains), Pair.of(set, eset)); + verify(( + s, + es) -> s.isEmpty() == es.isEmpty(), Pair.of(set, eset)); + verify(( + s, + es) -> s.size() == es.size(), Pair.of(set, eset)); } @Test @@ -206,9 +256,15 @@ public void testDoubleSetAddAllExternals() { eset2.addAll(set2); verify(Set::equals, Pair.of(set1, eset1), Pair.of(set2, eset2)); verify(Set::containsAll, Pair.of(set1, eset1), Pair.of(set2, eset2)); - verify((s, es) -> s.stream().allMatch(es::contains), Pair.of(set1, eset1), Pair.of(set2, eset2)); - verify((s, es) -> s.isEmpty() == es.isEmpty(), Pair.of(set1, eset1), Pair.of(set2, eset2)); - verify((s, es) -> s.size() == es.size(), Pair.of(set1, eset1), Pair.of(set2, eset2)); + verify(( + s, + es) -> s.stream().allMatch(es::contains), Pair.of(set1, eset1), Pair.of(set2, eset2)); + verify(( + s, + es) -> s.isEmpty() == es.isEmpty(), Pair.of(set1, eset1), Pair.of(set2, eset2)); + verify(( + s, + es) -> s.size() == es.size(), Pair.of(set1, eset1), Pair.of(set2, eset2)); } @Test @@ -226,11 +282,17 @@ public void testTripleSetAddAllExternals() { eset3.addAll(set3); verify(Set::equals, Pair.of(set1, eset1), Pair.of(set2, eset2), Pair.of(set3, eset3)); verify(Set::containsAll, Pair.of(set1, eset1), Pair.of(set2, eset2), Pair.of(set3, eset3)); - verify((s, es) -> s.stream().allMatch(es::contains), Pair.of(set1, eset1), Pair.of(set2, eset2), + verify(( + s, + es) -> s.stream().allMatch(es::contains), Pair.of(set1, eset1), Pair.of(set2, eset2), Pair.of(set3, eset3)); - verify((s, es) -> s.isEmpty() == es.isEmpty(), Pair.of(set1, eset1), Pair.of(set2, eset2), + verify(( + s, + es) -> s.isEmpty() == es.isEmpty(), Pair.of(set1, eset1), Pair.of(set2, eset2), Pair.of(set3, eset3)); - verify((s, es) -> s.size() == es.size(), Pair.of(set1, eset1), Pair.of(set2, eset2), Pair.of(set3, eset3)); + verify(( + s, + es) -> s.size() == es.size(), Pair.of(set1, eset1), Pair.of(set2, eset2), Pair.of(set3, eset3)); } @Test @@ -243,9 +305,15 @@ public void testSingleSetRemove() { verify(Set::equals, Pair.of(set, eset)); verify(Set::containsAll, Pair.of(set, eset)); - verify((s, es) -> s.stream().allMatch(es::contains), Pair.of(set, eset)); - verify((s, es) -> s.isEmpty() == es.isEmpty(), Pair.of(set, eset)); - verify((s, es) -> s.size() == es.size(), Pair.of(set, eset)); + verify(( + s, + es) -> s.stream().allMatch(es::contains), Pair.of(set, eset)); + verify(( + s, + es) -> s.isEmpty() == es.isEmpty(), Pair.of(set, eset)); + verify(( + s, + es) -> s.size() == es.size(), Pair.of(set, eset)); } @Test @@ -261,9 +329,15 @@ public void testDoubleSetRemove() { verify(Set::equals, Pair.of(set1, eset1), Pair.of(set2, eset2)); verify(Set::containsAll, Pair.of(set1, eset1), Pair.of(set2, eset2)); - verify((s, es) -> s.stream().allMatch(es::contains), Pair.of(set1, eset1), Pair.of(set2, eset2)); - verify((s, es) -> s.isEmpty() == es.isEmpty(), Pair.of(set1, eset1), Pair.of(set2, eset2)); - verify((s, es) -> s.size() == es.size(), Pair.of(set1, eset1), Pair.of(set2, eset2)); + verify(( + s, + es) -> s.stream().allMatch(es::contains), Pair.of(set1, eset1), Pair.of(set2, eset2)); + verify(( + s, + es) -> s.isEmpty() == es.isEmpty(), Pair.of(set1, eset1), Pair.of(set2, eset2)); + verify(( + s, + es) -> s.size() == es.size(), Pair.of(set1, eset1), Pair.of(set2, eset2)); } @Test @@ -282,11 +356,17 @@ public void testTripleSetRemove() { verify(Set::equals, Pair.of(set1, eset1), Pair.of(set2, eset2), Pair.of(set3, eset3)); verify(Set::containsAll, Pair.of(set1, eset1), Pair.of(set2, eset2), Pair.of(set3, eset3)); - verify((s, es) -> s.stream().allMatch(es::contains), Pair.of(set1, eset1), Pair.of(set2, eset2), + verify(( + s, + es) -> s.stream().allMatch(es::contains), Pair.of(set1, eset1), Pair.of(set2, eset2), Pair.of(set3, eset3)); - verify((s, es) -> s.isEmpty() == es.isEmpty(), Pair.of(set1, eset1), Pair.of(set2, eset2), + verify(( + s, + es) -> s.isEmpty() == es.isEmpty(), Pair.of(set1, eset1), Pair.of(set2, eset2), Pair.of(set3, eset3)); - verify((s, es) -> s.size() == es.size(), Pair.of(set1, eset1), Pair.of(set2, eset2), Pair.of(set3, eset3)); + verify(( + s, + es) -> s.size() == es.size(), Pair.of(set1, eset1), Pair.of(set2, eset2), Pair.of(set3, eset3)); } @Test @@ -300,9 +380,15 @@ public void testSetOperations() { verify(Set::equals, Pair.of(set1, eset1), Pair.of(set2, eset2)); verify(Set::containsAll, Pair.of(set1, eset1), Pair.of(set2, eset2)); - verify((s, es) -> s.stream().allMatch(es::contains), Pair.of(set1, eset1), Pair.of(set2, eset2)); - verify((s, es) -> s.isEmpty() == es.isEmpty(), Pair.of(set1, eset1), Pair.of(set2, eset2)); - verify((s, es) -> s.size() == es.size(), Pair.of(set1, eset1), Pair.of(set2, eset2)); + verify(( + s, + es) -> s.stream().allMatch(es::contains), Pair.of(set1, eset1), Pair.of(set2, eset2)); + verify(( + s, + es) -> s.isEmpty() == es.isEmpty(), Pair.of(set1, eset1), Pair.of(set2, eset2)); + verify(( + s, + es) -> s.size() == es.size(), Pair.of(set1, eset1), Pair.of(set2, eset2)); Set tmp = new HashSet<>(set1); tmp.addAll(set2); diff --git a/lisa/lisa-sdk/src/test/java/it/unive/lisa/util/collections/externalSet/BitLogicTest.java b/lisa/lisa-sdk/src/test/java/it/unive/lisa/util/collections/externalSet/BitLogicTest.java index 10d8b49bc..f84013692 100644 --- a/lisa/lisa-sdk/src/test/java/it/unive/lisa/util/collections/externalSet/BitLogicTest.java +++ b/lisa/lisa-sdk/src/test/java/it/unive/lisa/util/collections/externalSet/BitLogicTest.java @@ -67,14 +67,16 @@ public void testSetUnset() { } } - private static long smash(long[] bits) { + private static long smash( + long[] bits) { long res = 0L; for (long l : bits) res += l; return res; } - private static int[] actives(long[] bits) { + private static int[] actives( + long[] bits) { List res = new ArrayList<>(); for (int i = 0; i < bits.length; i++) if (bits[i] != 0) { diff --git a/lisa/lisa-sdk/src/test/java/it/unive/lisa/util/collections/workset/WorksetTest.java b/lisa/lisa-sdk/src/test/java/it/unive/lisa/util/collections/workset/WorksetTest.java index 9e0576be6..3ae5d3c1d 100644 --- a/lisa/lisa-sdk/src/test/java/it/unive/lisa/util/collections/workset/WorksetTest.java +++ b/lisa/lisa-sdk/src/test/java/it/unive/lisa/util/collections/workset/WorksetTest.java @@ -17,14 +17,22 @@ public class WorksetTest { @SuppressWarnings("unchecked") - private static void random(WorkingSet ws, boolean lifo, boolean duplicates, T... elements) { + private static void random( + WorkingSet ws, + boolean lifo, + boolean duplicates, + T... elements) { List list = Arrays.asList(elements); Collections.shuffle(list); linear(ws, lifo, duplicates, (T[]) list.toArray()); } @SuppressWarnings("unchecked") - private static void linear(WorkingSet ws, boolean lifo, boolean duplicates, T... elements) { + private static void linear( + WorkingSet ws, + boolean lifo, + boolean duplicates, + T... elements) { assertTrue("The working set is not empty at the beginning", ws.isEmpty()); try { @@ -113,11 +121,18 @@ public void FIFOsWsTest() { interface Tester { @SuppressWarnings("unchecked") - void test(WorkingSet ws, boolean lifo, T... elements); + void test( + WorkingSet ws, + boolean lifo, + T... elements); } @SafeVarargs - private static void unique(VisitOnceWorkingSet ws, boolean lifo, Tester tester, T... elements) { + private static void unique( + VisitOnceWorkingSet ws, + boolean lifo, + Tester tester, + T... elements) { Set set = new HashSet<>(); List list = new ArrayList<>(); Set elementsSet = new HashSet<>(Arrays.asList(elements)); @@ -135,22 +150,46 @@ private static void unique(VisitOnceWorkingSet ws, boolean lifo, Tester linear(ws, lifo, false, el), "a", "b", "c", "d", + unique(VisitOnceFIFOWorkingSet.mk(), false, ( + ws, + lifo, + el) -> linear(ws, lifo, false, el), "a", "b", "c", "d", "d", "f", "a", "b", "i"); - unique(VisitOnceFIFOWorkingSet.mk(), false, (ws, lifo, el) -> linear(ws, lifo, false, el), "a", null, "c", "d", + unique(VisitOnceFIFOWorkingSet.mk(), false, ( + ws, + lifo, + el) -> linear(ws, lifo, false, el), "a", null, "c", "d", "d", "f", "a", "b", null, "i"); - unique(VisitOnceFIFOWorkingSet.mk(), false, (ws, lifo, el) -> random(ws, lifo, false, el), "a", "b", "c", "d", + unique(VisitOnceFIFOWorkingSet.mk(), false, ( + ws, + lifo, + el) -> random(ws, lifo, false, el), "a", "b", "c", "d", "d", "f", "a", "b", "i"); - unique(VisitOnceFIFOWorkingSet.mk(), false, (ws, lifo, el) -> random(ws, lifo, false, el), "a", null, "c", "d", + unique(VisitOnceFIFOWorkingSet.mk(), false, ( + ws, + lifo, + el) -> random(ws, lifo, false, el), "a", null, "c", "d", "d", "f", "a", "b", null, "i"); - unique(VisitOnceLIFOWorkingSet.mk(), true, (ws, lifo, el) -> linear(ws, lifo, false, el), "a", "b", "c", "d", + unique(VisitOnceLIFOWorkingSet.mk(), true, ( + ws, + lifo, + el) -> linear(ws, lifo, false, el), "a", "b", "c", "d", "d", "f", "a", "b", "i"); - unique(VisitOnceLIFOWorkingSet.mk(), true, (ws, lifo, el) -> linear(ws, lifo, false, el), "a", null, "c", "d", + unique(VisitOnceLIFOWorkingSet.mk(), true, ( + ws, + lifo, + el) -> linear(ws, lifo, false, el), "a", null, "c", "d", "d", "f", "a", "b", null, "i"); - unique(VisitOnceLIFOWorkingSet.mk(), true, (ws, lifo, el) -> random(ws, lifo, false, el), "a", "b", "c", "d", + unique(VisitOnceLIFOWorkingSet.mk(), true, ( + ws, + lifo, + el) -> random(ws, lifo, false, el), "a", "b", "c", "d", "d", "f", "a", "b", "i"); - unique(VisitOnceLIFOWorkingSet.mk(), true, (ws, lifo, el) -> random(ws, lifo, false, el), "a", null, "c", "d", + unique(VisitOnceLIFOWorkingSet.mk(), true, ( + ws, + lifo, + el) -> random(ws, lifo, false, el), "a", null, "c", "d", "d", "f", "a", "b", null, "i"); } } diff --git a/lisa/lisa-sdk/src/test/java/it/unive/lisa/util/datastructures/automaton/RandomToRegexTest.java b/lisa/lisa-sdk/src/test/java/it/unive/lisa/util/datastructures/automaton/RandomToRegexTest.java index 922bf50ce..c3534d78a 100644 --- a/lisa/lisa-sdk/src/test/java/it/unive/lisa/util/datastructures/automaton/RandomToRegexTest.java +++ b/lisa/lisa-sdk/src/test/java/it/unive/lisa/util/datastructures/automaton/RandomToRegexTest.java @@ -42,7 +42,8 @@ public void initialize() { mapping.put(4, q4); } - private static void check(TestAutomaton a) { + private static void check( + TestAutomaton a) { RegularExpression fromRegex = a.toRegex().simplify(); TestAutomaton revert = fromRegex.toAutomaton(a); assertTrue(a + " is different from " + revert, a.isEqualTo(revert)); diff --git a/lisa/lisa-sdk/src/test/java/it/unive/lisa/util/datastructures/automaton/TestAutomaton.java b/lisa/lisa-sdk/src/test/java/it/unive/lisa/util/datastructures/automaton/TestAutomaton.java index ec0ade3f4..b6c78a891 100644 --- a/lisa/lisa-sdk/src/test/java/it/unive/lisa/util/datastructures/automaton/TestAutomaton.java +++ b/lisa/lisa-sdk/src/test/java/it/unive/lisa/util/datastructures/automaton/TestAutomaton.java @@ -10,7 +10,8 @@ public final class TestAutomaton extends Automaton { @Override - public TestAutomaton singleString(String string) { + public TestAutomaton singleString( + String string) { return new TestAutomaton(string); } @@ -35,7 +36,9 @@ public TestAutomaton emptyString() { } @Override - public TestAutomaton from(SortedSet states, SortedSet> transitions) { + public TestAutomaton from( + SortedSet states, + SortedSet> transitions) { return new TestAutomaton(states, transitions); } @@ -45,12 +48,15 @@ public TestSymbol epsilon() { } @Override - public TestSymbol concat(TestSymbol first, TestSymbol second) { + public TestSymbol concat( + TestSymbol first, + TestSymbol second) { return first.concat(second); } @Override - public RegularExpression symbolToRegex(TestSymbol symbol) { + public RegularExpression symbolToRegex( + TestSymbol symbol) { return new Atom(symbol.getSymbol()); } @@ -60,7 +66,9 @@ public RegularExpression symbolToRegex(TestSymbol symbol) { * @param states the set of states of the new automaton * @param transitions the set of the transitions of the new automaton */ - public TestAutomaton(SortedSet states, SortedSet> transitions) { + public TestAutomaton( + SortedSet states, + SortedSet> transitions) { super(states, transitions); } @@ -69,7 +77,8 @@ public TestAutomaton(SortedSet states, SortedSet> * * @param s the only string accepted by the automaton. */ - public TestAutomaton(String s) { + public TestAutomaton( + String s) { super(); if (s.isEmpty()) @@ -100,7 +109,8 @@ public TestAutomaton(String s) { * @return a boolean value that indicates either if {@code str} has been * accepted or not. */ - public boolean validateString(String str) { + public boolean validateString( + String str) { // stores all the possible states reached by the automaton after each // input char Set currentStates = epsilonClosure(getInitialStates()); diff --git a/lisa/lisa-sdk/src/test/java/it/unive/lisa/util/datastructures/automaton/TestSymbol.java b/lisa/lisa-sdk/src/test/java/it/unive/lisa/util/datastructures/automaton/TestSymbol.java index 4e49cc00d..f8f414a72 100644 --- a/lisa/lisa-sdk/src/test/java/it/unive/lisa/util/datastructures/automaton/TestSymbol.java +++ b/lisa/lisa-sdk/src/test/java/it/unive/lisa/util/datastructures/automaton/TestSymbol.java @@ -4,12 +4,14 @@ public class TestSymbol implements TransitionSymbol { private final String symbol; - public TestSymbol(String symbol) { + public TestSymbol( + String symbol) { this.symbol = symbol; } @Override - public int compareTo(TestSymbol o) { + public int compareTo( + TestSymbol o) { return symbol.compareTo(o.symbol); } @@ -32,7 +34,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -57,7 +60,8 @@ public String getSymbol() { return symbol; } - public TestSymbol concat(TestSymbol other) { + public TestSymbol concat( + TestSymbol other) { if (isEpsilon()) return other; if (other.isEpsilon()) diff --git a/lisa/lisa-sdk/src/test/java/it/unive/lisa/util/datastructures/automaton/TestUtil.java b/lisa/lisa-sdk/src/test/java/it/unive/lisa/util/datastructures/automaton/TestUtil.java index 45abcb5bf..84e7f9e3c 100644 --- a/lisa/lisa-sdk/src/test/java/it/unive/lisa/util/datastructures/automaton/TestUtil.java +++ b/lisa/lisa-sdk/src/test/java/it/unive/lisa/util/datastructures/automaton/TestUtil.java @@ -8,7 +8,8 @@ public class TestUtil { private static final Random random = new Random(); - public static TestAutomaton build(State... states) { + public static TestAutomaton build( + State... states) { SortedSet ss = new TreeSet<>(); for (State q : states) ss.add(q); @@ -17,21 +18,27 @@ public static TestAutomaton build(State... states) { } @SafeVarargs - public static TestAutomaton addEdges(TestAutomaton a, Transition... transitions) { + public static TestAutomaton addEdges( + TestAutomaton a, + Transition... transitions) { for (Transition t : transitions) a.addTransition(t); return a; } - public static TestSymbol randomChar(int count) { + public static TestSymbol randomChar( + int count) { String ALPHA_NUMERIC_STRING = "0123456789qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM"; int character = (int) (Math.random() * ALPHA_NUMERIC_STRING.length()); return new TestSymbol(String.valueOf(ALPHA_NUMERIC_STRING.charAt(character))); } - public static TestAutomaton generateAutomaton(SortedSet states, Map mapping, - int numberOfTransitionsForEachState, int charLen) { + public static TestAutomaton generateAutomaton( + SortedSet states, + Map mapping, + int numberOfTransitionsForEachState, + int charLen) { TestAutomaton a = null; do { diff --git a/lisa/lisa-sdk/src/test/java/it/unive/lisa/util/datastructures/graph/AdjacencyMatrixTest.java b/lisa/lisa-sdk/src/test/java/it/unive/lisa/util/datastructures/graph/AdjacencyMatrixTest.java index 34d75a27a..2ef81a6c9 100644 --- a/lisa/lisa-sdk/src/test/java/it/unive/lisa/util/datastructures/graph/AdjacencyMatrixTest.java +++ b/lisa/lisa-sdk/src/test/java/it/unive/lisa/util/datastructures/graph/AdjacencyMatrixTest.java @@ -26,7 +26,11 @@ public class AdjacencyMatrixTest { private static final Random rand = new Random(); - private String msg(String objs, String extra, Collection exp, Collection act) { + private String msg( + String objs, + String extra, + Collection exp, + Collection act) { Set ex = exp instanceof Set ? (Set) exp : new HashSet<>(exp); Set ac = act instanceof Set ? (Set) act : new HashSet<>(act); return "Set of " + objs + " is different " + extra @@ -34,15 +38,24 @@ private String msg(String objs, String extra, Collection exp, Collection< + "\nonly actual: " + SetUtils.difference(ac, ex); } - private void verify(Map> adj, Collection nodes, Collection edges, - AdjacencyMatrix matrix, Collection entries, + private void verify( + Map> adj, + Collection nodes, + Collection edges, + AdjacencyMatrix matrix, + Collection entries, Collection exits) { verify(adj, nodes, edges, matrix, entries, exits, ""); } - private void verify(Map> adj, Collection nodes, Collection edges, - AdjacencyMatrix matrix, Collection entries, - Collection exits, String extra) { + private void verify( + Map> adj, + Collection nodes, + Collection edges, + AdjacencyMatrix matrix, + Collection entries, + Collection exits, + String extra) { TestNode externalNode = new TestNode(-1); TestEdge externalEdge = new TestEdge(externalNode, externalNode); @@ -131,8 +144,11 @@ private void verify(Map> adj, Collection> populate(AdjacencyMatrix matrix, - Collection nodes, Collection edges, Collection entries, + private Map> populate( + AdjacencyMatrix matrix, + Collection nodes, + Collection edges, + Collection entries, Collection exits) { for (int i = 20 + rand.nextInt(100); i >= 0; i--) { TestNode node = new TestNode(i); @@ -534,7 +550,9 @@ public void testNodeRemoval() { nodes.remove(n); edges.removeIf(e -> e.getSource() == n || e.getDestination() == n); adj.remove(n); - adj.forEach((nn, follows) -> follows.remove(n)); + adj.forEach(( + nn, + follows) -> follows.remove(n)); matrix.removeNode(n); } @@ -548,7 +566,8 @@ public void testNodeRemoval() { verify(adj, nodes, edges, matrix, entries, exits, "after removing " + removed.toString()); } - private static T random(Collection elements) { + private static T random( + Collection elements) { int idx = rand.nextInt(elements.size()); for (T e : elements) if (--idx < 0) diff --git a/lisa/lisa-sdk/src/test/java/it/unive/lisa/util/datastructures/graph/TestGraph.java b/lisa/lisa-sdk/src/test/java/it/unive/lisa/util/datastructures/graph/TestGraph.java index 5b8d6648b..1db4c2345 100644 --- a/lisa/lisa-sdk/src/test/java/it/unive/lisa/util/datastructures/graph/TestGraph.java +++ b/lisa/lisa-sdk/src/test/java/it/unive/lisa/util/datastructures/graph/TestGraph.java @@ -6,12 +6,15 @@ public static class TestNode implements Node { private final int id; - public TestNode(int id) { + public TestNode( + int id) { this.id = id; } @Override - public boolean accept(GraphVisitor visitor, V tool) { + public boolean accept( + GraphVisitor visitor, + V tool) { return false; } @@ -29,7 +32,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -47,7 +51,9 @@ public static class TestEdge implements Edge { private final TestNode source, destination; - public TestEdge(TestNode source, TestNode destination) { + public TestEdge( + TestNode source, + TestNode destination) { this.source = source; this.destination = destination; } @@ -63,7 +69,9 @@ public TestNode getDestination() { } @Override - public boolean accept(GraphVisitor visitor, V tool) { + public boolean accept( + GraphVisitor visitor, + V tool) { return false; } @@ -82,7 +90,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) diff --git a/lisa/lisa-sdk/src/test/java/it/unive/lisa/util/datastructures/graph/algorithms/FixpointTest.java b/lisa/lisa-sdk/src/test/java/it/unive/lisa/util/datastructures/graph/algorithms/FixpointTest.java index 894691f0d..a9eedf475 100644 --- a/lisa/lisa-sdk/src/test/java/it/unive/lisa/util/datastructures/graph/algorithms/FixpointTest.java +++ b/lisa/lisa-sdk/src/test/java/it/unive/lisa/util/datastructures/graph/algorithms/FixpointTest.java @@ -23,29 +23,47 @@ public class FixpointTest { private static class FixpointTester implements FixpointImplementation> { @Override - public Set semantics(TestNode node, Set entrystate) throws Exception { + public Set semantics( + TestNode node, + Set entrystate) + throws Exception { Set res = new HashSet<>(entrystate); res.add(node); return res; } @Override - public Set traverse(TestEdge edge, Set entrystate) throws Exception { + public Set traverse( + TestEdge edge, + Set entrystate) + throws Exception { return entrystate; } @Override - public Set union(TestNode node, Set left, Set right) throws Exception { + public Set union( + TestNode node, + Set left, + Set right) + throws Exception { return SetUtils.union(left, right); } @Override - public Set operation(TestNode node, Set approx, Set old) throws Exception { + public Set operation( + TestNode node, + Set approx, + Set old) + throws Exception { return SetUtils.union(approx, old); } @Override - public boolean equality(TestNode node, Set approx, Set old) throws Exception { + public boolean equality( + TestNode node, + Set approx, + Set old) + throws Exception { return old.containsAll(approx); } } @@ -182,40 +200,59 @@ private static class ExceptionalTester implements FixpointImplementation semantics(TestNode node, Set entrystate) throws Exception { + public Set semantics( + TestNode node, + Set entrystate) + throws Exception { if (type == 0) throw new Exception(); return Collections.emptySet(); } @Override - public Set traverse(TestEdge edge, Set entrystate) throws Exception { + public Set traverse( + TestEdge edge, + Set entrystate) + throws Exception { if (type == 1) throw new Exception(); return Collections.emptySet(); } @Override - public Set union(TestNode node, Set left, Set right) throws Exception { + public Set union( + TestNode node, + Set left, + Set right) + throws Exception { if (type == 2) throw new Exception(); return Collections.emptySet(); } @Override - public Set operation(TestNode node, Set approx, Set old) throws Exception { + public Set operation( + TestNode node, + Set approx, + Set old) + throws Exception { if (type == 3) throw new Exception(); return Collections.emptySet(); } @Override - public boolean equality(TestNode node, Set approx, Set old) throws Exception { + public boolean equality( + TestNode node, + Set approx, + Set old) + throws Exception { if (type == 4) throw new Exception(); return true; diff --git a/lisa/lisa-sdk/src/test/java/it/unive/lisa/util/datastructures/graph/code/NodeListTest.java b/lisa/lisa-sdk/src/test/java/it/unive/lisa/util/datastructures/graph/code/NodeListTest.java index 6eafeafb3..cbbc7f54e 100644 --- a/lisa/lisa-sdk/src/test/java/it/unive/lisa/util/datastructures/graph/code/NodeListTest.java +++ b/lisa/lisa-sdk/src/test/java/it/unive/lisa/util/datastructures/graph/code/NodeListTest.java @@ -26,7 +26,11 @@ public class NodeListTest { private static final Random rand = new Random(); - private String msg(String objs, String extra, Collection exp, Collection act) { + private String msg( + String objs, + String extra, + Collection exp, + Collection act) { Set ex = exp instanceof Set ? (Set) exp : new HashSet<>(exp); Set ac = act instanceof Set ? (Set) act : new HashSet<>(act); return "Set of " + objs + " is different " + extra @@ -34,17 +38,24 @@ private String msg(String objs, String extra, Collection exp, Collection< + "\nonly actual: " + SetUtils.difference(ac, ex); } - private void verify(Map> adj, Collection nodes, + private void verify( + Map> adj, + Collection nodes, Collection edges, - NodeList matrix, Collection entries, + NodeList matrix, + Collection entries, Collection exits) { verify(adj, nodes, edges, matrix, entries, exits, ""); } - private void verify(Map> adj, Collection nodes, + private void verify( + Map> adj, + Collection nodes, Collection edges, - NodeList matrix, Collection entries, - Collection exits, String extra) { + NodeList matrix, + Collection entries, + Collection exits, + String extra) { TestCodeNode externalNode = new TestCodeNode(-1); TestCodeEdge externalEdge = new TestCodeEdge(externalNode, externalNode); @@ -138,7 +149,9 @@ private void verify(Map> adj, Collection< private Map> populate( NodeList matrix, - Collection nodes, Collection edges, Collection entries, + Collection nodes, + Collection edges, + Collection entries, Collection exits) { for (int i = 20 + rand.nextInt(100); i >= 0; i--) { TestCodeNode node = new TestCodeNode(i); @@ -543,7 +556,9 @@ public void testCodeNodeRemoval() { exits.remove(n); edges.removeIf(e -> e.getSource() == n || e.getDestination() == n); adj.remove(n); - adj.forEach((nn, follows) -> follows.remove(n)); + adj.forEach(( + nn, + follows) -> follows.remove(n)); matrix.removeNode(n); } @@ -556,7 +571,8 @@ public void testCodeNodeRemoval() { verify(adj, nodes, edges, matrix, entries, exits, "after removing " + removed.toString()); } - private static T random(Collection elements) { + private static T random( + Collection elements) { int idx = rand.nextInt(elements.size()); for (T e : elements) if (--idx < 0) diff --git a/lisa/lisa-sdk/src/test/java/it/unive/lisa/util/datastructures/graph/code/TestCodeGraph.java b/lisa/lisa-sdk/src/test/java/it/unive/lisa/util/datastructures/graph/code/TestCodeGraph.java index f944dad78..0a436009c 100644 --- a/lisa/lisa-sdk/src/test/java/it/unive/lisa/util/datastructures/graph/code/TestCodeGraph.java +++ b/lisa/lisa-sdk/src/test/java/it/unive/lisa/util/datastructures/graph/code/TestCodeGraph.java @@ -12,17 +12,21 @@ public static class TestCodeNode implements CodeNode boolean accept(GraphVisitor visitor, V tool) { + public boolean accept( + GraphVisitor visitor, + V tool) { return false; } @Override - public int setOffset(int offset) { + public int setOffset( + int offset) { return offset; } @@ -40,7 +44,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -54,7 +59,8 @@ public boolean equals(Object obj) { } @Override - public int compareTo(TestCodeNode o) { + public int compareTo( + TestCodeNode o) { return id - o.id; } @@ -68,7 +74,9 @@ public static class TestCodeEdge implements CodeEdge boolean accept(GraphVisitor visitor, V tool) { + public boolean accept( + GraphVisitor visitor, + V tool) { return false; } @@ -94,7 +104,9 @@ public boolean isUnconditional() { } @Override - public TestCodeEdge newInstance(TestCodeNode source, TestCodeNode destination) { + public TestCodeEdge newInstance( + TestCodeNode source, + TestCodeNode destination) { return new TestCodeEdge(source, destination); } @@ -113,7 +125,8 @@ public int hashCode() { } @Override - public boolean equals(Object obj) { + public boolean equals( + Object obj) { if (this == obj) return true; if (obj == null) @@ -135,7 +148,8 @@ public boolean equals(Object obj) { } @Override - public int compareTo(TestCodeEdge o) { + public int compareTo( + TestCodeEdge o) { if (source.id - o.source.id != 0) return source.id - o.source.id; return destination.id - o.destination.id; diff --git a/lisa/lisa-sdk/src/test/java/it/unive/lisa/util/numeric/IntIntervalTest.java b/lisa/lisa-sdk/src/test/java/it/unive/lisa/util/numeric/IntIntervalTest.java index f81387479..cb8d3d947 100644 --- a/lisa/lisa-sdk/src/test/java/it/unive/lisa/util/numeric/IntIntervalTest.java +++ b/lisa/lisa-sdk/src/test/java/it/unive/lisa/util/numeric/IntIntervalTest.java @@ -24,8 +24,16 @@ public void testBaseArithmetic() { assertEquals(new IntInterval(0, 1), x.div(y, false, true)); } - private static void test(Integer x1, Integer x2, Integer y1, Integer y2, Integer e1, Integer e2, String symbol, - BiFunction operator, boolean expectNaN) { + private static void test( + Integer x1, + Integer x2, + Integer y1, + Integer y2, + Integer e1, + Integer e2, + String symbol, + BiFunction operator, + boolean expectNaN) { IntInterval x = new IntInterval(x1, x2); IntInterval y = new IntInterval(y1, y2); IntInterval actual = operator.apply(x, y); @@ -37,11 +45,21 @@ private static void test(Integer x1, Integer x2, Integer y1, Integer y2, Integer assertEquals(x + " " + symbol + " " + y + " = " + expected + " (got " + actual + ")", expected, actual); } - private static void mul(Integer x1, Integer x2, Integer y1, Integer y2, Integer e1, Integer e2) { + private static void mul( + Integer x1, + Integer x2, + Integer y1, + Integer y2, + Integer e1, + Integer e2) { test(x1, x2, y1, y2, e1, e2, "*", IntInterval::mul, false); } - private static void mul(Integer x1, Integer x2, Integer y1, Integer y2) { + private static void mul( + Integer x1, + Integer x2, + Integer y1, + Integer y2) { test(x1, x2, y1, y2, null, null, "*", IntInterval::mul, true); } @@ -77,13 +95,28 @@ public void testMultiplication() { mul(0, 0, 0, 0, 0, 0); } - private static void div(Integer x1, Integer x2, Integer y1, Integer y2, Integer e1, Integer e2, + private static void div( + Integer x1, + Integer x2, + Integer y1, + Integer y2, + Integer e1, + Integer e2, boolean ignoreZero) { - test(x1, x2, y1, y2, e1, e2, "/", (l, r) -> l.div(r, ignoreZero, false), false); + test(x1, x2, y1, y2, e1, e2, "/", ( + l, + r) -> l.div(r, ignoreZero, false), false); } - private static void div(Integer x1, Integer x2, Integer y1, Integer y2, boolean ignoreZero) { - test(x1, x2, y1, y2, null, null, "/", (l, r) -> l.div(r, ignoreZero, false), true); + private static void div( + Integer x1, + Integer x2, + Integer y1, + Integer y2, + boolean ignoreZero) { + test(x1, x2, y1, y2, null, null, "/", ( + l, + r) -> l.div(r, ignoreZero, false), true); } @Test diff --git a/lisa/lisa-sdk/src/test/resources/log4j2.xml b/lisa/lisa-sdk/src/test/resources/log4j2.xml index 781933f92..cbdcb32af 100644 --- a/lisa/lisa-sdk/src/test/resources/log4j2.xml +++ b/lisa/lisa-sdk/src/test/resources/log4j2.xml @@ -2,13 +2,13 @@ - + - + diff --git a/lisa/spotless-formatting.xml b/lisa/spotless-formatting.xml index 68a421bb5..7fdadb274 100644 --- a/lisa/spotless-formatting.xml +++ b/lisa/spotless-formatting.xml @@ -1,6 +1,6 @@ - - + + @@ -28,8 +28,8 @@ - - + + @@ -73,12 +73,13 @@ - + + @@ -104,11 +105,12 @@ + - + @@ -128,7 +130,7 @@ - + @@ -156,12 +158,14 @@ + + @@ -218,7 +222,7 @@ - + @@ -227,6 +231,7 @@ + @@ -238,6 +243,7 @@ + @@ -266,7 +272,7 @@ - + @@ -280,10 +286,13 @@ + + + - + @@ -317,13 +326,14 @@ - + + @@ -341,7 +351,7 @@ - + @@ -349,7 +359,7 @@ - + @@ -361,6 +371,7 @@ +