Python: CG trace: Rename ValidRecordedCall to IdentifiedRecordedCall

This commit is contained in:
Rasmus Wriedt Larsen
2020-07-21 10:19:47 +02:00
parent bbfea44db0
commit 38af1930fe
2 changed files with 8 additions and 9 deletions

View File

@@ -113,10 +113,10 @@ private Builtin traverse_qualname(Builtin parent, string qualname) {
}
/**
* Class of recorded calls where we can uniquely identify both the `call` and the `callee`.
* Class of recorded calls where we can identify both the `call` and the `callee`.
*/
class ValidRecordedCall extends XMLRecordedCall {
ValidRecordedCall() {
class IdentifiedRecordedCall extends XMLRecordedCall {
IdentifiedRecordedCall() {
strictcount(this.getCall()) = 1 and
(
strictcount(this.getXMLCallee().(XMLPythonCallee).getCallee()) = 1
@@ -145,12 +145,12 @@ class ValidRecordedCall extends XMLRecordedCall {
}
}
class InvalidRecordedCall extends XMLRecordedCall {
InvalidRecordedCall() { not this instanceof ValidRecordedCall }
class UnidentifiedRecordedCall extends XMLRecordedCall {
UnidentifiedRecordedCall() { not this instanceof IdentifiedRecordedCall }
}
module PointsToBasedCallGraph {
class ResolvableRecordedCall extends ValidRecordedCall {
class ResolvableRecordedCall extends IdentifiedRecordedCall {
Value calleeValue;
ResolvableRecordedCall() {

View File

@@ -1,6 +1,5 @@
import RecordedCalls
from RecordedCall rc
where not rc instanceof ValidRecordedCall
from UnidentifiedRecordedCall rc, XMLCall xml_call
select "Could not uniquely identify this recorded call (either call or callee was not uniquely identified)",
rc, rc.call_filename(), rc.call_linenum(), rc.call_inst_index()
rc, rc.getXMLCall().get_filename_data(), rc.getXMLCall().get_linenum_data(), rc.getXMLCall().get_inst_index_data()