Python: CG trace: Restructure QL code

This commit is contained in:
Rasmus Wriedt Larsen
2020-07-24 17:00:13 +02:00
parent 321d5104f0
commit 4c689434c3
7 changed files with 6 additions and 6 deletions

View File

@@ -1,7 +1,7 @@
import python import python
import semmle.python.types.Builtins import semmle.python.types.Builtins
import semmle.python.objects.Callables import semmle.python.objects.Callables
import BytecodeExpr import lib.BytecodeExpr
/** The XML data for a recorded call (includes all data). */ /** The XML data for a recorded call (includes all data). */
class XMLRecordedCall extends XMLElement { class XMLRecordedCall extends XMLElement {

View File

@@ -3,7 +3,7 @@
* See Metrics.ql for call-graph quality metrics. * See Metrics.ql for call-graph quality metrics.
*/ */
import RecordedCalls import lib.RecordedCalls
from string text, float number, float ratio from string text, float number, float ratio
where where

View File

@@ -1,4 +1,4 @@
import RecordedCalls import lib.RecordedCalls
// colum i is just used for sorting // colum i is just used for sorting
from string text, float number, float ratio, int i from string text, float number, float ratio, int i

View File

@@ -1,4 +1,4 @@
import RecordedCalls import lib.RecordedCalls
from PointsToBasedCallGraph::ResolvableRecordedCall rc from PointsToBasedCallGraph::ResolvableRecordedCall rc
select rc.getACall(), "-->", rc.getCalleeValue() select rc.getACall(), "-->", rc.getCalleeValue()

View File

@@ -1,4 +1,4 @@
import RecordedCalls import lib.RecordedCalls
from IdentifiedRecordedCall rc from IdentifiedRecordedCall rc
where not rc instanceof PointsToBasedCallGraph::ResolvableRecordedCall where not rc instanceof PointsToBasedCallGraph::ResolvableRecordedCall

View File

@@ -1,4 +1,4 @@
import RecordedCalls import lib.RecordedCalls
from UnidentifiedRecordedCall rc, XMLCall xml_call from UnidentifiedRecordedCall rc, XMLCall xml_call
select "Could not uniquely identify this recorded call (either call or callee was not uniquely identified)", select "Could not uniquely identify this recorded call (either call or callee was not uniquely identified)",