Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 38af193

Browse files
committed
Python: CG trace: Rename ValidRecordedCall to IdentifiedRecordedCall
1 parent bbfea44 commit 38af193

2 files changed

Lines changed: 8 additions & 9 deletions

File tree

python/tools/recorded-call-graph-metrics/ql/RecordedCalls.qll

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,10 @@ private Builtin traverse_qualname(Builtin parent, string qualname) {
113113
}
114114

115115
/**
116-
* Class of recorded calls where we can uniquely identify both the `call` and the `callee`.
116+
* Class of recorded calls where we can identify both the `call` and the `callee`.
117117
*/
118-
class ValidRecordedCall extends XMLRecordedCall {
119-
ValidRecordedCall() {
118+
class IdentifiedRecordedCall extends XMLRecordedCall {
119+
IdentifiedRecordedCall() {
120120
strictcount(this.getCall()) = 1 and
121121
(
122122
strictcount(this.getXMLCallee().(XMLPythonCallee).getCallee()) = 1
@@ -145,12 +145,12 @@ class ValidRecordedCall extends XMLRecordedCall {
145145
}
146146
}
147147

148-
class InvalidRecordedCall extends XMLRecordedCall {
149-
InvalidRecordedCall() { not this instanceof ValidRecordedCall }
148+
class UnidentifiedRecordedCall extends XMLRecordedCall {
149+
UnidentifiedRecordedCall() { not this instanceof IdentifiedRecordedCall }
150150
}
151151

152152
module PointsToBasedCallGraph {
153-
class ResolvableRecordedCall extends ValidRecordedCall {
153+
class ResolvableRecordedCall extends IdentifiedRecordedCall {
154154
Value calleeValue;
155155

156156
ResolvableRecordedCall() {
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import RecordedCalls
22

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

0 commit comments

Comments
 (0)