mirror of
https://github.com/github/codeql.git
synced 2026-04-29 02:35:15 +02:00
QL: Merge branch 'main' into qldoc-nodes
This commit is contained in:
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -589,7 +589,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "tree-sitter-ql"
|
||||
version = "0.19.0"
|
||||
source = "git+https://github.com/tausbn/tree-sitter-ql.git?rev=f95bfc0bc4f2cda7f6f0bf608360fdee7574b003#f95bfc0bc4f2cda7f6f0bf608360fdee7574b003"
|
||||
source = "git+https://github.com/tausbn/tree-sitter-ql.git?rev=ef46f6c4c076cc06bb206686794cec26b5c544a7#ef46f6c4c076cc06bb206686794cec26b5c544a7"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"tree-sitter",
|
||||
|
||||
@@ -10,7 +10,7 @@ edition = "2018"
|
||||
flate2 = "1.0"
|
||||
node-types = { path = "../node-types" }
|
||||
tree-sitter = "0.19"
|
||||
tree-sitter-ql = { git = "https://github.com/tausbn/tree-sitter-ql.git", rev = "f95bfc0bc4f2cda7f6f0bf608360fdee7574b003" }
|
||||
tree-sitter-ql = { git = "https://github.com/tausbn/tree-sitter-ql.git", rev = "ef46f6c4c076cc06bb206686794cec26b5c544a7" }
|
||||
clap = "2.33"
|
||||
tracing = "0.1"
|
||||
tracing-subscriber = { version = "0.2", features = ["env-filter"] }
|
||||
|
||||
@@ -10,4 +10,4 @@ edition = "2018"
|
||||
node-types = { path = "../node-types" }
|
||||
tracing = "0.1"
|
||||
tracing-subscriber = { version = "0.2", features = ["env-filter"] }
|
||||
tree-sitter-ql = { git = "https://github.com/tausbn/tree-sitter-ql.git", rev = "f95bfc0bc4f2cda7f6f0bf608360fdee7574b003" }
|
||||
tree-sitter-ql = { git = "https://github.com/tausbn/tree-sitter-ql.git", rev = "ef46f6c4c076cc06bb206686794cec26b5c544a7" }
|
||||
|
||||
@@ -17,6 +17,7 @@ impl<'a> fmt::Display for TopLevel<'a> {
|
||||
|
||||
#[derive(Clone, Eq, PartialEq, Hash)]
|
||||
pub struct Class<'a> {
|
||||
pub qldoc: Option<String>,
|
||||
pub name: &'a str,
|
||||
pub is_abstract: bool,
|
||||
pub supertypes: BTreeSet<Type<'a>>,
|
||||
@@ -26,6 +27,9 @@ pub struct Class<'a> {
|
||||
|
||||
impl<'a> fmt::Display for Class<'a> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
if let Some(qldoc) = &self.qldoc {
|
||||
write!(f, "/** {} */", qldoc)?;
|
||||
}
|
||||
if self.is_abstract {
|
||||
write!(f, "abstract ")?;
|
||||
}
|
||||
@@ -43,6 +47,7 @@ impl<'a> fmt::Display for Class<'a> {
|
||||
f,
|
||||
" {}\n",
|
||||
Predicate {
|
||||
qldoc: None,
|
||||
name: self.name.clone(),
|
||||
overridden: false,
|
||||
return_type: None,
|
||||
@@ -176,6 +181,7 @@ impl<'a> fmt::Display for Expression<'a> {
|
||||
|
||||
#[derive(Clone, Eq, PartialEq, Hash)]
|
||||
pub struct Predicate<'a> {
|
||||
pub qldoc: Option<String>,
|
||||
pub name: &'a str,
|
||||
pub overridden: bool,
|
||||
pub return_type: Option<Type<'a>>,
|
||||
@@ -185,6 +191,9 @@ pub struct Predicate<'a> {
|
||||
|
||||
impl<'a> fmt::Display for Predicate<'a> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
if let Some(qldoc) = &self.qldoc {
|
||||
write!(f, "/** {} */", qldoc)?;
|
||||
}
|
||||
if self.overridden {
|
||||
write!(f, "override ")?;
|
||||
}
|
||||
|
||||
@@ -29,6 +29,9 @@ pub fn write(language: &Language, classes: &[ql::TopLevel]) -> std::io::Result<(
|
||||
fn create_ast_node_class<'a>() -> ql::Class<'a> {
|
||||
// Default implementation of `toString` calls `this.getAPrimaryQlClass()`
|
||||
let to_string = ql::Predicate {
|
||||
qldoc: Some(String::from(
|
||||
"Gets a string representation of this element.",
|
||||
)),
|
||||
name: "toString",
|
||||
overridden: false,
|
||||
return_type: Some(ql::Type::String),
|
||||
@@ -42,11 +45,20 @@ fn create_ast_node_class<'a>() -> ql::Class<'a> {
|
||||
)),
|
||||
),
|
||||
};
|
||||
let get_location =
|
||||
create_none_predicate("getLocation", false, Some(ql::Type::Normal("Location")));
|
||||
let get_a_field_or_child =
|
||||
create_none_predicate("getAFieldOrChild", false, Some(ql::Type::Normal("AstNode")));
|
||||
let get_location = create_none_predicate(
|
||||
Some(String::from("Gets the location of this element.")),
|
||||
"getLocation",
|
||||
false,
|
||||
Some(ql::Type::Normal("Location")),
|
||||
);
|
||||
let get_a_field_or_child = create_none_predicate(
|
||||
Some(String::from("Gets a field or child node of this node.")),
|
||||
"getAFieldOrChild",
|
||||
false,
|
||||
Some(ql::Type::Normal("AstNode")),
|
||||
);
|
||||
let get_parent = ql::Predicate {
|
||||
qldoc: Some(String::from("Gets the parent of this element.")),
|
||||
name: "getParent",
|
||||
overridden: false,
|
||||
return_type: Some(ql::Type::Normal("AstNode")),
|
||||
@@ -61,6 +73,9 @@ fn create_ast_node_class<'a>() -> ql::Class<'a> {
|
||||
),
|
||||
};
|
||||
let get_parent_index = ql::Predicate {
|
||||
qldoc: Some(String::from(
|
||||
"Gets the index of this node among the children of its parent.",
|
||||
)),
|
||||
name: "getParentIndex",
|
||||
overridden: false,
|
||||
return_type: Some(ql::Type::Int),
|
||||
@@ -75,6 +90,9 @@ fn create_ast_node_class<'a>() -> ql::Class<'a> {
|
||||
),
|
||||
};
|
||||
let get_a_primary_ql_class = ql::Predicate {
|
||||
qldoc: Some(String::from(
|
||||
"Gets the name of the primary QL class for this element.",
|
||||
)),
|
||||
name: "getAPrimaryQlClass",
|
||||
overridden: false,
|
||||
return_type: Some(ql::Type::String),
|
||||
@@ -85,6 +103,7 @@ fn create_ast_node_class<'a>() -> ql::Class<'a> {
|
||||
),
|
||||
};
|
||||
ql::Class {
|
||||
qldoc: Some(String::from("The base class for all AST nodes")),
|
||||
name: "AstNode",
|
||||
is_abstract: false,
|
||||
supertypes: vec![ql::Type::AtType("ast_node")].into_iter().collect(),
|
||||
@@ -103,6 +122,7 @@ fn create_ast_node_class<'a>() -> ql::Class<'a> {
|
||||
fn create_token_class<'a>() -> ql::Class<'a> {
|
||||
let tokeninfo_arity = 6;
|
||||
let get_value = ql::Predicate {
|
||||
qldoc: Some(String::from("Gets the value of this token.")),
|
||||
name: "getValue",
|
||||
overridden: false,
|
||||
return_type: Some(ql::Type::String),
|
||||
@@ -110,6 +130,7 @@ fn create_token_class<'a>() -> ql::Class<'a> {
|
||||
body: create_get_field_expr_for_column_storage("result", "tokeninfo", 3, tokeninfo_arity),
|
||||
};
|
||||
let get_location = ql::Predicate {
|
||||
qldoc: Some(String::from("Gets the location of this token.")),
|
||||
name: "getLocation",
|
||||
overridden: true,
|
||||
return_type: Some(ql::Type::Normal("Location")),
|
||||
@@ -117,6 +138,9 @@ fn create_token_class<'a>() -> ql::Class<'a> {
|
||||
body: create_get_field_expr_for_column_storage("result", "tokeninfo", 4, tokeninfo_arity),
|
||||
};
|
||||
let to_string = ql::Predicate {
|
||||
qldoc: Some(String::from(
|
||||
"Gets a string representation of this element.",
|
||||
)),
|
||||
name: "toString",
|
||||
overridden: true,
|
||||
return_type: Some(ql::Type::String),
|
||||
@@ -127,6 +151,7 @@ fn create_token_class<'a>() -> ql::Class<'a> {
|
||||
),
|
||||
};
|
||||
ql::Class {
|
||||
qldoc: Some(String::from("A token.")),
|
||||
name: "Token",
|
||||
is_abstract: false,
|
||||
supertypes: vec![ql::Type::AtType("token"), ql::Type::Normal("AstNode")]
|
||||
@@ -148,6 +173,7 @@ fn create_reserved_word_class<'a>() -> ql::Class<'a> {
|
||||
let class_name = "ReservedWord";
|
||||
let get_a_primary_ql_class = create_get_a_primary_ql_class(&class_name);
|
||||
ql::Class {
|
||||
qldoc: Some(String::from("A reserved word.")),
|
||||
name: class_name,
|
||||
is_abstract: false,
|
||||
supertypes: vec![ql::Type::AtType(db_name), ql::Type::Normal("Token")]
|
||||
@@ -160,11 +186,13 @@ fn create_reserved_word_class<'a>() -> ql::Class<'a> {
|
||||
|
||||
/// Creates a predicate whose body is `none()`.
|
||||
fn create_none_predicate<'a>(
|
||||
qldoc: Option<String>,
|
||||
name: &'a str,
|
||||
overridden: bool,
|
||||
return_type: Option<ql::Type<'a>>,
|
||||
) -> ql::Predicate<'a> {
|
||||
ql::Predicate {
|
||||
qldoc: qldoc,
|
||||
name: name,
|
||||
overridden,
|
||||
return_type,
|
||||
@@ -177,6 +205,9 @@ fn create_none_predicate<'a>(
|
||||
/// name.
|
||||
fn create_get_a_primary_ql_class<'a>(class_name: &'a str) -> ql::Predicate<'a> {
|
||||
ql::Predicate {
|
||||
qldoc: Some(String::from(
|
||||
"Gets the name of the primary QL class for this element.",
|
||||
)),
|
||||
name: "getAPrimaryQlClass",
|
||||
overridden: true,
|
||||
return_type: Some(ql::Type::String),
|
||||
@@ -196,6 +227,7 @@ fn create_get_a_primary_ql_class<'a>(class_name: &'a str) -> ql::Predicate<'a> {
|
||||
/// `arity` - the total number of columns in the table
|
||||
fn create_get_location_predicate<'a>(def_table: &'a str, arity: usize) -> ql::Predicate<'a> {
|
||||
ql::Predicate {
|
||||
qldoc: Some(String::from("Gets the location of this element.")),
|
||||
name: "getLocation",
|
||||
overridden: true,
|
||||
return_type: Some(ql::Type::Normal("Location")),
|
||||
@@ -220,6 +252,7 @@ fn create_get_location_predicate<'a>(def_table: &'a str, arity: usize) -> ql::Pr
|
||||
/// `def_table` - the name of the table that defines the entity and its text.
|
||||
fn create_get_text_predicate<'a>(def_table: &'a str) -> ql::Predicate<'a> {
|
||||
ql::Predicate {
|
||||
qldoc: Some(String::from("Gets the text content of this element.")),
|
||||
name: "getText",
|
||||
overridden: false,
|
||||
return_type: Some(ql::Type::String),
|
||||
@@ -419,6 +452,10 @@ fn create_field_getters<'a>(
|
||||
};
|
||||
(
|
||||
ql::Predicate {
|
||||
qldoc: field
|
||||
.name
|
||||
.as_ref()
|
||||
.map(|name| format!("Gets the node corresponding to the field `{}`.", name)),
|
||||
name: &field.getter_name,
|
||||
overridden: false,
|
||||
return_type,
|
||||
@@ -456,6 +493,7 @@ pub fn convert_nodes<'a>(nodes: &'a node_types::NodeTypeMap) -> Vec<ql::TopLevel
|
||||
supertypes.insert(ql::Type::AtType(&node.dbscheme_name));
|
||||
supertypes.insert(ql::Type::Normal("Token"));
|
||||
classes.push(ql::TopLevel::Class(ql::Class {
|
||||
qldoc: Some(format!("A class representing `{}` tokens.", type_name.kind)),
|
||||
name: &node.ql_class_name,
|
||||
is_abstract: false,
|
||||
supertypes,
|
||||
@@ -468,6 +506,7 @@ pub fn convert_nodes<'a>(nodes: &'a node_types::NodeTypeMap) -> Vec<ql::TopLevel
|
||||
// It's a tree-sitter supertype node, so we're wrapping a dbscheme
|
||||
// union type.
|
||||
classes.push(ql::TopLevel::Class(ql::Class {
|
||||
qldoc: None,
|
||||
name: &node.ql_class_name,
|
||||
is_abstract: false,
|
||||
supertypes: vec![
|
||||
@@ -501,6 +540,7 @@ pub fn convert_nodes<'a>(nodes: &'a node_types::NodeTypeMap) -> Vec<ql::TopLevel
|
||||
|
||||
let main_class_name = &node.ql_class_name;
|
||||
let mut main_class = ql::Class {
|
||||
qldoc: Some(format!("A class representing `{}` nodes.", type_name.kind)),
|
||||
name: &main_class_name,
|
||||
is_abstract: false,
|
||||
supertypes: vec![
|
||||
@@ -543,6 +583,7 @@ pub fn convert_nodes<'a>(nodes: &'a node_types::NodeTypeMap) -> Vec<ql::TopLevel
|
||||
}
|
||||
|
||||
main_class.predicates.push(ql::Predicate {
|
||||
qldoc: Some(String::from("Gets a field or child node of this node.")),
|
||||
name: "getAFieldOrChild",
|
||||
overridden: true,
|
||||
return_type: Some(ql::Type::Normal("AstNode")),
|
||||
|
||||
@@ -59,6 +59,15 @@ class AstNode extends TAstNode {
|
||||
|
||||
/** Gets the QLDoc comment for this AST node, if any. */
|
||||
QLDoc getQLDoc() { none() }
|
||||
|
||||
/**
|
||||
* Gets the predicate that contains this AST node.
|
||||
*/
|
||||
pragma[noinline]
|
||||
Predicate getEnclosingPredicate() {
|
||||
not this instanceof Predicate and
|
||||
toGenerated(result) = toGenerated(this).getParent+()
|
||||
}
|
||||
}
|
||||
|
||||
/** A toplevel QL program, i.e. a file. */
|
||||
@@ -191,7 +200,14 @@ class Predicate extends TPredicate, AstNode, Declaration {
|
||||
/**
|
||||
* Gets the number of parameters.
|
||||
*/
|
||||
int getArity() { result = count(getParameter(_)) }
|
||||
int getArity() {
|
||||
not this.(ClasslessPredicate).getAlias() instanceof PredicateExpr and
|
||||
result = count(getParameter(_))
|
||||
or
|
||||
exists(PredicateExpr alias | alias = this.(ClasslessPredicate).getAlias() |
|
||||
result = alias.getArity()
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the return type (if any) of the predicate.
|
||||
@@ -1074,6 +1090,21 @@ class Float extends Literal {
|
||||
float getValue() { result = lit.getChild().(Generated::Float).getValue().toFloat() }
|
||||
}
|
||||
|
||||
/** A boolean literal */
|
||||
class Boolean extends Literal {
|
||||
Generated::Bool bool;
|
||||
|
||||
Boolean() { lit.getChild() = bool }
|
||||
|
||||
/** Holds if the value is `true` */
|
||||
predicate isTrue() { bool.getChild() instanceof Generated::True }
|
||||
|
||||
/** Holds if the value is `false` */
|
||||
predicate isFalse() { bool.getChild() instanceof Generated::False }
|
||||
|
||||
override string getAPrimaryQlClass() { result = "Boolean" }
|
||||
}
|
||||
|
||||
/** A comparison symbol, such as `"<"` or `"="`. */
|
||||
class ComparisonSymbol extends string {
|
||||
ComparisonSymbol() {
|
||||
@@ -1399,6 +1430,19 @@ class ExprAggregate extends TExprAggregate, Expr {
|
||||
pred = indexedMember("getOrderBy", i) and result = this.getOrderBy(i)
|
||||
)
|
||||
}
|
||||
|
||||
override Type getType() {
|
||||
exists(PrimitiveType prim | prim = result |
|
||||
kind.regexpMatch("(strict)?count|sum|min|max|rank") and
|
||||
result.getName() = "int"
|
||||
or
|
||||
kind.regexpMatch("(strict)?concat") and
|
||||
result.getName() = "string"
|
||||
)
|
||||
or
|
||||
not kind = ["count", "strictcount"] and
|
||||
result = getExpr(0).getType()
|
||||
}
|
||||
}
|
||||
|
||||
/** An aggregate expression, such as `count` or `sum`. */
|
||||
@@ -1449,12 +1493,21 @@ class Aggregate extends TAggregate, Expr {
|
||||
|
||||
override string getAPrimaryQlClass() { result = "Aggregate[" + kind + "]" }
|
||||
|
||||
override PrimitiveType getType() {
|
||||
kind.regexpMatch("(strict)?count|sum|min|max|rank") and
|
||||
result.getName() = "int"
|
||||
override Type getType() {
|
||||
exists(PrimitiveType prim | prim = result |
|
||||
kind.regexpMatch("(strict)?count|sum|min|max|rank") and
|
||||
result.getName() = "int"
|
||||
or
|
||||
kind.regexpMatch("(strict)?concat") and
|
||||
result.getName() = "string"
|
||||
)
|
||||
or
|
||||
kind.regexpMatch("(strict)?concat") and
|
||||
result.getName() = "string"
|
||||
kind = ["any", "min", "max"] and
|
||||
not exists(getExpr(_)) and
|
||||
result = getArgument(0).getTypeExpr().getResolvedType()
|
||||
or
|
||||
not kind = ["count", "strictcount"] and
|
||||
result = getExpr(0).getType()
|
||||
}
|
||||
|
||||
override AstNode getAChild(string pred) {
|
||||
@@ -1583,6 +1636,13 @@ class ThisAccess extends Identifier {
|
||||
override string getAPrimaryQlClass() { result = "ThisAccess" }
|
||||
}
|
||||
|
||||
/** A use of `super`. */
|
||||
class Super extends TSuper, Expr {
|
||||
Super() { this = TSuper(_) }
|
||||
|
||||
override string getAPrimaryQlClass() { result = "SuperAccess" }
|
||||
}
|
||||
|
||||
/** An access to `result`. */
|
||||
class ResultAccess extends Identifier {
|
||||
ResultAccess() { any(Generated::Result r).getParent() = id }
|
||||
|
||||
@@ -25,6 +25,7 @@ newtype TAstNode =
|
||||
TExprAggregate(Generated::Aggregate agg) {
|
||||
agg.getChild(_) instanceof Generated::ExprAggregateBody
|
||||
} or
|
||||
TSuper(Generated::SuperRef sup) or
|
||||
TIdentifier(Generated::Variable var) or
|
||||
TAsExpr(Generated::AsExpr asExpr) { asExpr.getChild(1) instanceof Generated::VarName } or
|
||||
TPredicateCall(Generated::CallOrUnqualAggExpr call) or
|
||||
@@ -64,7 +65,7 @@ class TBinOpExpr = TAddSubExpr or TMulDivModExpr;
|
||||
|
||||
class TExpr =
|
||||
TBinOpExpr or TLiteral or TAggregate or TExprAggregate or TIdentifier or TInlineCast or TCall or
|
||||
TUnaryExpr or TExprAnnotation or TDontCare or TRange or TSet or TAsExpr;
|
||||
TUnaryExpr or TExprAnnotation or TDontCare or TRange or TSet or TAsExpr or TSuper;
|
||||
|
||||
class TCall = TPredicateCall or TMemberCall or TNoneCall or TAnyCall;
|
||||
|
||||
@@ -157,6 +158,8 @@ Generated::AstNode toGenerated(AST::AstNode n) {
|
||||
n = TNoneCall(result)
|
||||
or
|
||||
n = TAnyCall(result)
|
||||
or
|
||||
n = TSuper(result)
|
||||
}
|
||||
|
||||
class TPredicate = TCharPred or TClasslessPredicate or TClassPredicate;
|
||||
|
||||
@@ -79,6 +79,13 @@ private module Cached {
|
||||
t = mc.getBase().getType() and
|
||||
p = t.getClassPredicate(mc.getMemberName(), mc.getNumberOfArguments())
|
||||
)
|
||||
or
|
||||
// super calls
|
||||
exists(Super sup, ClassType type |
|
||||
mc.getBase() = sup and
|
||||
sup.getEnclosingPredicate().(ClassPredicate).getParent().getType() = type and
|
||||
p = type.getASuperType().getClassPredicate(mc.getMemberName(), mc.getNumberOfArguments())
|
||||
)
|
||||
}
|
||||
|
||||
cached
|
||||
@@ -233,6 +240,7 @@ module PredConsistency {
|
||||
query predicate noResolveCall(Call c) {
|
||||
not resolveCall(c, _) and
|
||||
not c instanceof NoneCall and
|
||||
not c instanceof AnyCall and
|
||||
not c.getLocation().getFile().getAbsolutePath().regexpMatch(".*/(test|examples)/.*")
|
||||
}
|
||||
|
||||
@@ -243,7 +251,12 @@ module PredConsistency {
|
||||
}
|
||||
|
||||
query predicate multipleResolveCall(Call call, int c, PredicateOrBuiltin p) {
|
||||
c = strictcount(PredicateOrBuiltin p0 | resolveCall(call, p0)) and
|
||||
c =
|
||||
strictcount(PredicateOrBuiltin p0 |
|
||||
resolveCall(call, p0) and
|
||||
// aliases are expected to resolve to multiple.
|
||||
not exists(p0.getDeclaration().(ClasslessPredicate).getAlias())
|
||||
) and
|
||||
c > 1 and
|
||||
resolveCall(call, p)
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -48,6 +48,11 @@ private predicate resolveVar(VarAccess va, VarDecl decl, string kind) {
|
||||
kind = "variable"
|
||||
}
|
||||
|
||||
private predicate resolveField(FieldAccess va, VarDecl decl, string kind) {
|
||||
decl = va.getDeclaration() and
|
||||
kind = "field"
|
||||
}
|
||||
|
||||
private predicate resolveCall(Call c, Predicate p, string kind) {
|
||||
p = c.getTarget().getDeclaration() and
|
||||
kind = "call"
|
||||
@@ -61,6 +66,8 @@ predicate resolve(Loc ref, Loc target, string kind) {
|
||||
or
|
||||
resolvePredicate(ref.asAst(), target.asAst(), kind)
|
||||
or
|
||||
resolveField(ref.asAst(), target.asAst(), kind)
|
||||
or
|
||||
resolveVar(ref.asAst(), target.asAst(), kind)
|
||||
or
|
||||
resolveCall(ref.asAst(), target.asAst(), kind)
|
||||
|
||||
33
ql/test/callgraph/Foo.qll
Normal file
33
ql/test/callgraph/Foo.qll
Normal file
@@ -0,0 +1,33 @@
|
||||
import ql
|
||||
|
||||
predicate foo() { none() }
|
||||
|
||||
query predicate test() { foo() }
|
||||
|
||||
class Foo extends AstNode {
|
||||
predicate bar() { none() }
|
||||
|
||||
predicate baz() { bar() }
|
||||
}
|
||||
|
||||
class Sub extends Foo {
|
||||
override predicate baz() { super.baz() }
|
||||
}
|
||||
|
||||
query predicate test2() { any(Foo f).bar() }
|
||||
|
||||
module Aliases {
|
||||
predicate myThing2(int i, int j) { i = 2 and j = 3 }
|
||||
|
||||
predicate myThing0() { any() }
|
||||
|
||||
predicate alias0 = myThing0/0;
|
||||
|
||||
predicate alias2 = myThing2/2;
|
||||
|
||||
query predicate test3() {
|
||||
alias2(3, 4) // doesn't work.
|
||||
or
|
||||
alias0() // <- works
|
||||
}
|
||||
}
|
||||
8
ql/test/callgraph/callgraph.expected
Normal file
8
ql/test/callgraph/callgraph.expected
Normal file
@@ -0,0 +1,8 @@
|
||||
| Foo.qll:5:26:5:30 | PredicateCall | Foo.qll:3:1:3:26 | ClasslessPredicate foo |
|
||||
| Foo.qll:10:21:10:25 | PredicateCall | Foo.qll:8:3:8:28 | ClassPredicate bar |
|
||||
| Foo.qll:14:30:14:40 | MemberCall | Foo.qll:10:3:10:27 | ClassPredicate baz |
|
||||
| Foo.qll:17:27:17:42 | MemberCall | Foo.qll:8:3:8:28 | ClassPredicate bar |
|
||||
| Foo.qll:29:5:29:16 | PredicateCall | Foo.qll:20:3:20:54 | ClasslessPredicate myThing2 |
|
||||
| Foo.qll:29:5:29:16 | PredicateCall | Foo.qll:26:3:26:32 | ClasslessPredicate alias2 |
|
||||
| Foo.qll:31:5:31:12 | PredicateCall | Foo.qll:22:3:22:32 | ClasslessPredicate myThing0 |
|
||||
| Foo.qll:31:5:31:12 | PredicateCall | Foo.qll:24:3:24:32 | ClasslessPredicate alias0 |
|
||||
3
ql/test/callgraph/callgraph.ql
Normal file
3
ql/test/callgraph/callgraph.ql
Normal file
@@ -0,0 +1,3 @@
|
||||
import ql
|
||||
|
||||
query AstNode getTarget(Call call) { result = call.getTarget().getDeclaration() }
|
||||
@@ -22,4 +22,6 @@ predicate calls(Foo f) {
|
||||
f = any(Foo f)
|
||||
or
|
||||
2 = 1 + (2 + (3 + 4))
|
||||
or
|
||||
true = false
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
nodes
|
||||
| Foo.qll:1:1:1:17 | Import | semmle.label | [Import] Import |
|
||||
| Foo.qll:1:1:1:17 | Import | semmle.order | 1 |
|
||||
| Foo.qll:1:1:25:2 | TopLevel | semmle.label | [TopLevel] TopLevel |
|
||||
| Foo.qll:1:1:25:2 | TopLevel | semmle.order | 1 |
|
||||
| Foo.qll:1:1:27:2 | TopLevel | semmle.label | [TopLevel] TopLevel |
|
||||
| Foo.qll:1:1:27:2 | TopLevel | semmle.order | 1 |
|
||||
| Foo.qll:3:1:7:1 | Class Foo | semmle.label | [Class] Class Foo |
|
||||
| Foo.qll:3:1:7:1 | Class Foo | semmle.order | 3 |
|
||||
| Foo.qll:3:19:3:22 | TypeExpr | semmle.label | [TypeExpr] TypeExpr |
|
||||
@@ -65,8 +65,8 @@ nodes
|
||||
| Foo.qll:10:69:10:73 | inner | semmle.order | 32 |
|
||||
| Foo.qll:10:69:10:84 | MemberCall | semmle.label | [MemberCall] MemberCall |
|
||||
| Foo.qll:10:69:10:84 | MemberCall | semmle.order | 32 |
|
||||
| Foo.qll:13:1:25:1 | ClasslessPredicate calls | semmle.label | [ClasslessPredicate] ClasslessPredicate calls |
|
||||
| Foo.qll:13:1:25:1 | ClasslessPredicate calls | semmle.order | 34 |
|
||||
| Foo.qll:13:1:27:1 | ClasslessPredicate calls | semmle.label | [ClasslessPredicate] ClasslessPredicate calls |
|
||||
| Foo.qll:13:1:27:1 | ClasslessPredicate calls | semmle.order | 34 |
|
||||
| Foo.qll:13:17:13:19 | TypeExpr | semmle.label | [TypeExpr] TypeExpr |
|
||||
| Foo.qll:13:17:13:19 | TypeExpr | semmle.order | 35 |
|
||||
| Foo.qll:13:17:13:21 | f | semmle.label | [VarDecl] f |
|
||||
@@ -83,95 +83,105 @@ nodes
|
||||
| Foo.qll:14:3:22:16 | Disjunction | semmle.order | 37 |
|
||||
| Foo.qll:14:3:24:23 | Disjunction | semmle.label | [Disjunction] Disjunction |
|
||||
| Foo.qll:14:3:24:23 | Disjunction | semmle.order | 37 |
|
||||
| Foo.qll:14:3:26:14 | Disjunction | semmle.label | [Disjunction] Disjunction |
|
||||
| Foo.qll:14:3:26:14 | Disjunction | semmle.order | 37 |
|
||||
| Foo.qll:14:9:14:9 | f | semmle.label | [VarAccess] f |
|
||||
| Foo.qll:14:9:14:9 | f | semmle.order | 43 |
|
||||
| Foo.qll:14:9:14:9 | f | semmle.order | 44 |
|
||||
| Foo.qll:16:3:16:7 | String | semmle.label | [String] String |
|
||||
| Foo.qll:16:3:16:7 | String | semmle.order | 44 |
|
||||
| Foo.qll:16:3:16:7 | String | semmle.order | 45 |
|
||||
| Foo.qll:16:3:16:29 | ComparisonFormula | semmle.label | [ComparisonFormula] ComparisonFormula |
|
||||
| Foo.qll:16:3:16:29 | ComparisonFormula | semmle.order | 44 |
|
||||
| Foo.qll:16:3:16:29 | ComparisonFormula | semmle.order | 45 |
|
||||
| Foo.qll:16:9:16:9 | ComparisonOp | semmle.label | [ComparisonOp] ComparisonOp |
|
||||
| Foo.qll:16:9:16:9 | ComparisonOp | semmle.order | 46 |
|
||||
| Foo.qll:16:9:16:9 | ComparisonOp | semmle.order | 47 |
|
||||
| Foo.qll:16:11:16:11 | f | semmle.label | [VarAccess] f |
|
||||
| Foo.qll:16:11:16:11 | f | semmle.order | 47 |
|
||||
| Foo.qll:16:11:16:11 | f | semmle.order | 48 |
|
||||
| Foo.qll:16:11:16:29 | MemberCall | semmle.label | [MemberCall] MemberCall |
|
||||
| Foo.qll:16:11:16:29 | MemberCall | semmle.order | 47 |
|
||||
| Foo.qll:16:11:16:29 | MemberCall | semmle.order | 48 |
|
||||
| Foo.qll:16:22:16:22 | Integer | semmle.label | [Integer] Integer |
|
||||
| Foo.qll:16:22:16:22 | Integer | semmle.order | 49 |
|
||||
| Foo.qll:16:22:16:22 | Integer | semmle.order | 50 |
|
||||
| Foo.qll:16:25:16:25 | Integer | semmle.label | [Integer] Integer |
|
||||
| Foo.qll:16:25:16:25 | Integer | semmle.order | 50 |
|
||||
| Foo.qll:16:25:16:25 | Integer | semmle.order | 51 |
|
||||
| Foo.qll:16:28:16:28 | Integer | semmle.label | [Integer] Integer |
|
||||
| Foo.qll:16:28:16:28 | Integer | semmle.order | 51 |
|
||||
| Foo.qll:16:28:16:28 | Integer | semmle.order | 52 |
|
||||
| Foo.qll:18:3:18:3 | f | semmle.label | [VarAccess] f |
|
||||
| Foo.qll:18:3:18:3 | f | semmle.order | 52 |
|
||||
| Foo.qll:18:3:18:3 | f | semmle.order | 53 |
|
||||
| Foo.qll:18:3:18:9 | InlineCast | semmle.label | [InlineCast] InlineCast |
|
||||
| Foo.qll:18:3:18:9 | InlineCast | semmle.order | 52 |
|
||||
| Foo.qll:18:3:18:9 | InlineCast | semmle.order | 53 |
|
||||
| Foo.qll:18:3:18:20 | MemberCall | semmle.label | [MemberCall] MemberCall |
|
||||
| Foo.qll:18:3:18:20 | MemberCall | semmle.order | 52 |
|
||||
| Foo.qll:18:3:18:20 | MemberCall | semmle.order | 53 |
|
||||
| Foo.qll:18:3:18:28 | ComparisonFormula | semmle.label | [ComparisonFormula] ComparisonFormula |
|
||||
| Foo.qll:18:3:18:28 | ComparisonFormula | semmle.order | 52 |
|
||||
| Foo.qll:18:3:18:28 | ComparisonFormula | semmle.order | 53 |
|
||||
| Foo.qll:18:6:18:8 | TypeExpr | semmle.label | [TypeExpr] TypeExpr |
|
||||
| Foo.qll:18:6:18:8 | TypeExpr | semmle.order | 56 |
|
||||
| Foo.qll:18:6:18:8 | TypeExpr | semmle.order | 57 |
|
||||
| Foo.qll:18:22:18:22 | ComparisonOp | semmle.label | [ComparisonOp] ComparisonOp |
|
||||
| Foo.qll:18:22:18:22 | ComparisonOp | semmle.order | 57 |
|
||||
| Foo.qll:18:22:18:22 | ComparisonOp | semmle.order | 58 |
|
||||
| Foo.qll:18:24:18:28 | String | semmle.label | [String] String |
|
||||
| Foo.qll:18:24:18:28 | String | semmle.order | 58 |
|
||||
| Foo.qll:18:24:18:28 | String | semmle.order | 59 |
|
||||
| Foo.qll:20:3:20:3 | f | semmle.label | [VarAccess] f |
|
||||
| Foo.qll:20:3:20:3 | f | semmle.order | 59 |
|
||||
| Foo.qll:20:3:20:3 | f | semmle.order | 60 |
|
||||
| Foo.qll:20:3:20:9 | InlineCast | semmle.label | [InlineCast] InlineCast |
|
||||
| Foo.qll:20:3:20:9 | InlineCast | semmle.order | 59 |
|
||||
| Foo.qll:20:3:20:9 | InlineCast | semmle.order | 60 |
|
||||
| Foo.qll:20:3:20:13 | ComparisonFormula | semmle.label | [ComparisonFormula] ComparisonFormula |
|
||||
| Foo.qll:20:3:20:13 | ComparisonFormula | semmle.order | 59 |
|
||||
| Foo.qll:20:3:20:13 | ComparisonFormula | semmle.order | 60 |
|
||||
| Foo.qll:20:6:20:8 | TypeExpr | semmle.label | [TypeExpr] TypeExpr |
|
||||
| Foo.qll:20:6:20:8 | TypeExpr | semmle.order | 62 |
|
||||
| Foo.qll:20:6:20:8 | TypeExpr | semmle.order | 63 |
|
||||
| Foo.qll:20:11:20:11 | ComparisonOp | semmle.label | [ComparisonOp] ComparisonOp |
|
||||
| Foo.qll:20:11:20:11 | ComparisonOp | semmle.order | 63 |
|
||||
| Foo.qll:20:11:20:11 | ComparisonOp | semmle.order | 64 |
|
||||
| Foo.qll:20:13:20:13 | f | semmle.label | [VarAccess] f |
|
||||
| Foo.qll:20:13:20:13 | f | semmle.order | 64 |
|
||||
| Foo.qll:20:13:20:13 | f | semmle.order | 65 |
|
||||
| Foo.qll:22:3:22:3 | f | semmle.label | [VarAccess] f |
|
||||
| Foo.qll:22:3:22:3 | f | semmle.order | 65 |
|
||||
| Foo.qll:22:3:22:3 | f | semmle.order | 66 |
|
||||
| Foo.qll:22:3:22:16 | ComparisonFormula | semmle.label | [ComparisonFormula] ComparisonFormula |
|
||||
| Foo.qll:22:3:22:16 | ComparisonFormula | semmle.order | 65 |
|
||||
| Foo.qll:22:3:22:16 | ComparisonFormula | semmle.order | 66 |
|
||||
| Foo.qll:22:5:22:5 | ComparisonOp | semmle.label | [ComparisonOp] ComparisonOp |
|
||||
| Foo.qll:22:5:22:5 | ComparisonOp | semmle.order | 67 |
|
||||
| Foo.qll:22:5:22:5 | ComparisonOp | semmle.order | 68 |
|
||||
| Foo.qll:22:7:22:16 | Aggregate[any] | semmle.label | [Aggregate[any]] Aggregate[any] |
|
||||
| Foo.qll:22:7:22:16 | Aggregate[any] | semmle.order | 68 |
|
||||
| Foo.qll:22:7:22:16 | Aggregate[any] | semmle.order | 69 |
|
||||
| Foo.qll:22:11:22:13 | TypeExpr | semmle.label | [TypeExpr] TypeExpr |
|
||||
| Foo.qll:22:11:22:13 | TypeExpr | semmle.order | 69 |
|
||||
| Foo.qll:22:11:22:13 | TypeExpr | semmle.order | 70 |
|
||||
| Foo.qll:22:11:22:15 | f | semmle.label | [VarDecl] f |
|
||||
| Foo.qll:22:11:22:15 | f | semmle.order | 69 |
|
||||
| Foo.qll:22:11:22:15 | f | semmle.order | 70 |
|
||||
| Foo.qll:24:3:24:3 | Integer | semmle.label | [Integer] Integer |
|
||||
| Foo.qll:24:3:24:3 | Integer | semmle.order | 71 |
|
||||
| Foo.qll:24:3:24:3 | Integer | semmle.order | 72 |
|
||||
| Foo.qll:24:3:24:23 | ComparisonFormula | semmle.label | [ComparisonFormula] ComparisonFormula |
|
||||
| Foo.qll:24:3:24:23 | ComparisonFormula | semmle.order | 71 |
|
||||
| Foo.qll:24:3:24:23 | ComparisonFormula | semmle.order | 72 |
|
||||
| Foo.qll:24:5:24:5 | ComparisonOp | semmle.label | [ComparisonOp] ComparisonOp |
|
||||
| Foo.qll:24:5:24:5 | ComparisonOp | semmle.order | 73 |
|
||||
| Foo.qll:24:5:24:5 | ComparisonOp | semmle.order | 74 |
|
||||
| Foo.qll:24:7:24:7 | Integer | semmle.label | [Integer] Integer |
|
||||
| Foo.qll:24:7:24:7 | Integer | semmle.order | 74 |
|
||||
| Foo.qll:24:7:24:7 | Integer | semmle.order | 75 |
|
||||
| Foo.qll:24:7:24:23 | AddExpr | semmle.label | [AddExpr] AddExpr |
|
||||
| Foo.qll:24:7:24:23 | AddExpr | semmle.order | 74 |
|
||||
| Foo.qll:24:7:24:23 | AddExpr | semmle.order | 75 |
|
||||
| Foo.qll:24:12:24:12 | Integer | semmle.label | [Integer] Integer |
|
||||
| Foo.qll:24:12:24:12 | Integer | semmle.order | 76 |
|
||||
| Foo.qll:24:12:24:12 | Integer | semmle.order | 77 |
|
||||
| Foo.qll:24:12:24:22 | AddExpr | semmle.label | [AddExpr] AddExpr |
|
||||
| Foo.qll:24:12:24:22 | AddExpr | semmle.order | 76 |
|
||||
| Foo.qll:24:12:24:22 | AddExpr | semmle.order | 77 |
|
||||
| Foo.qll:24:17:24:17 | Integer | semmle.label | [Integer] Integer |
|
||||
| Foo.qll:24:17:24:17 | Integer | semmle.order | 78 |
|
||||
| Foo.qll:24:17:24:17 | Integer | semmle.order | 79 |
|
||||
| Foo.qll:24:17:24:21 | AddExpr | semmle.label | [AddExpr] AddExpr |
|
||||
| Foo.qll:24:17:24:21 | AddExpr | semmle.order | 78 |
|
||||
| Foo.qll:24:17:24:21 | AddExpr | semmle.order | 79 |
|
||||
| Foo.qll:24:21:24:21 | Integer | semmle.label | [Integer] Integer |
|
||||
| Foo.qll:24:21:24:21 | Integer | semmle.order | 80 |
|
||||
| Foo.qll:24:21:24:21 | Integer | semmle.order | 81 |
|
||||
| Foo.qll:26:3:26:6 | Boolean | semmle.label | [Boolean] Boolean |
|
||||
| Foo.qll:26:3:26:6 | Boolean | semmle.order | 82 |
|
||||
| Foo.qll:26:3:26:14 | ComparisonFormula | semmle.label | [ComparisonFormula] ComparisonFormula |
|
||||
| Foo.qll:26:3:26:14 | ComparisonFormula | semmle.order | 82 |
|
||||
| Foo.qll:26:8:26:8 | ComparisonOp | semmle.label | [ComparisonOp] ComparisonOp |
|
||||
| Foo.qll:26:8:26:8 | ComparisonOp | semmle.order | 84 |
|
||||
| Foo.qll:26:10:26:14 | Boolean | semmle.label | [Boolean] Boolean |
|
||||
| Foo.qll:26:10:26:14 | Boolean | semmle.order | 85 |
|
||||
| printAst.ql:1:1:1:28 | Import | semmle.label | [Import] Import |
|
||||
| printAst.ql:1:1:1:28 | Import | semmle.order | 81 |
|
||||
| printAst.ql:1:1:1:28 | Import | semmle.order | 86 |
|
||||
| printAst.ql:1:1:1:29 | TopLevel | semmle.label | [TopLevel] TopLevel |
|
||||
| printAst.ql:1:1:1:29 | TopLevel | semmle.order | 81 |
|
||||
| printAst.ql:1:1:1:29 | TopLevel | semmle.order | 86 |
|
||||
edges
|
||||
| Foo.qll:1:1:25:2 | TopLevel | Foo.qll:1:1:1:17 | Import | semmle.label | getAnImport() |
|
||||
| Foo.qll:1:1:25:2 | TopLevel | Foo.qll:1:1:1:17 | Import | semmle.order | 1 |
|
||||
| Foo.qll:1:1:25:2 | TopLevel | Foo.qll:3:1:7:1 | Class Foo | semmle.label | getAClass() |
|
||||
| Foo.qll:1:1:25:2 | TopLevel | Foo.qll:3:1:7:1 | Class Foo | semmle.order | 3 |
|
||||
| Foo.qll:1:1:25:2 | TopLevel | Foo.qll:9:7:11:1 | ClasslessPredicate foo | semmle.label | getAPredicate() |
|
||||
| Foo.qll:1:1:25:2 | TopLevel | Foo.qll:9:7:11:1 | ClasslessPredicate foo | semmle.order | 16 |
|
||||
| Foo.qll:1:1:25:2 | TopLevel | Foo.qll:13:1:25:1 | ClasslessPredicate calls | semmle.label | getAPredicate() |
|
||||
| Foo.qll:1:1:25:2 | TopLevel | Foo.qll:13:1:25:1 | ClasslessPredicate calls | semmle.order | 34 |
|
||||
| Foo.qll:1:1:27:2 | TopLevel | Foo.qll:1:1:1:17 | Import | semmle.label | getAnImport() |
|
||||
| Foo.qll:1:1:27:2 | TopLevel | Foo.qll:1:1:1:17 | Import | semmle.order | 1 |
|
||||
| Foo.qll:1:1:27:2 | TopLevel | Foo.qll:3:1:7:1 | Class Foo | semmle.label | getAClass() |
|
||||
| Foo.qll:1:1:27:2 | TopLevel | Foo.qll:3:1:7:1 | Class Foo | semmle.order | 3 |
|
||||
| Foo.qll:1:1:27:2 | TopLevel | Foo.qll:9:7:11:1 | ClasslessPredicate foo | semmle.label | getAPredicate() |
|
||||
| Foo.qll:1:1:27:2 | TopLevel | Foo.qll:9:7:11:1 | ClasslessPredicate foo | semmle.order | 16 |
|
||||
| Foo.qll:1:1:27:2 | TopLevel | Foo.qll:13:1:27:1 | ClasslessPredicate calls | semmle.label | getAPredicate() |
|
||||
| Foo.qll:1:1:27:2 | TopLevel | Foo.qll:13:1:27:1 | ClasslessPredicate calls | semmle.order | 34 |
|
||||
| Foo.qll:3:1:7:1 | Class Foo | Foo.qll:3:19:3:22 | TypeExpr | semmle.label | getASuperType() |
|
||||
| Foo.qll:3:1:7:1 | Class Foo | Foo.qll:3:19:3:22 | TypeExpr | semmle.order | 4 |
|
||||
| Foo.qll:3:1:7:1 | Class Foo | Foo.qll:4:3:4:17 | CharPred Foo | semmle.label | getCharPred() |
|
||||
@@ -230,99 +240,109 @@ edges
|
||||
| Foo.qll:10:27:10:50 | ComparisonFormula | Foo.qll:10:46:10:50 | String | semmle.order | 30 |
|
||||
| Foo.qll:10:69:10:84 | MemberCall | Foo.qll:10:69:10:73 | inner | semmle.label | getBase() |
|
||||
| Foo.qll:10:69:10:84 | MemberCall | Foo.qll:10:69:10:73 | inner | semmle.order | 32 |
|
||||
| Foo.qll:13:1:25:1 | ClasslessPredicate calls | Foo.qll:13:17:13:21 | f | semmle.label | getParameter(_) |
|
||||
| Foo.qll:13:1:25:1 | ClasslessPredicate calls | Foo.qll:13:17:13:21 | f | semmle.order | 35 |
|
||||
| Foo.qll:13:1:25:1 | ClasslessPredicate calls | Foo.qll:14:3:24:23 | Disjunction | semmle.label | getBody() |
|
||||
| Foo.qll:13:1:25:1 | ClasslessPredicate calls | Foo.qll:14:3:24:23 | Disjunction | semmle.order | 37 |
|
||||
| Foo.qll:13:1:27:1 | ClasslessPredicate calls | Foo.qll:13:17:13:21 | f | semmle.label | getParameter(_) |
|
||||
| Foo.qll:13:1:27:1 | ClasslessPredicate calls | Foo.qll:13:17:13:21 | f | semmle.order | 35 |
|
||||
| Foo.qll:13:1:27:1 | ClasslessPredicate calls | Foo.qll:14:3:26:14 | Disjunction | semmle.label | getBody() |
|
||||
| Foo.qll:13:1:27:1 | ClasslessPredicate calls | Foo.qll:14:3:26:14 | Disjunction | semmle.order | 37 |
|
||||
| Foo.qll:13:17:13:21 | f | Foo.qll:13:17:13:19 | TypeExpr | semmle.label | getTypeExpr() |
|
||||
| Foo.qll:13:17:13:21 | f | Foo.qll:13:17:13:19 | TypeExpr | semmle.order | 35 |
|
||||
| Foo.qll:14:3:14:10 | PredicateCall | Foo.qll:14:9:14:9 | f | semmle.label | getArgument(_) |
|
||||
| Foo.qll:14:3:14:10 | PredicateCall | Foo.qll:14:9:14:9 | f | semmle.order | 43 |
|
||||
| Foo.qll:14:3:14:10 | PredicateCall | Foo.qll:14:9:14:9 | f | semmle.order | 44 |
|
||||
| Foo.qll:14:3:16:29 | Disjunction | Foo.qll:14:3:14:10 | PredicateCall | semmle.label | getAnOperand() |
|
||||
| Foo.qll:14:3:16:29 | Disjunction | Foo.qll:14:3:14:10 | PredicateCall | semmle.order | 37 |
|
||||
| Foo.qll:14:3:16:29 | Disjunction | Foo.qll:16:3:16:29 | ComparisonFormula | semmle.label | getAnOperand() |
|
||||
| Foo.qll:14:3:16:29 | Disjunction | Foo.qll:16:3:16:29 | ComparisonFormula | semmle.order | 44 |
|
||||
| Foo.qll:14:3:16:29 | Disjunction | Foo.qll:16:3:16:29 | ComparisonFormula | semmle.order | 45 |
|
||||
| Foo.qll:14:3:18:28 | Disjunction | Foo.qll:14:3:16:29 | Disjunction | semmle.label | getAnOperand() |
|
||||
| Foo.qll:14:3:18:28 | Disjunction | Foo.qll:14:3:16:29 | Disjunction | semmle.order | 37 |
|
||||
| Foo.qll:14:3:18:28 | Disjunction | Foo.qll:18:3:18:28 | ComparisonFormula | semmle.label | getAnOperand() |
|
||||
| Foo.qll:14:3:18:28 | Disjunction | Foo.qll:18:3:18:28 | ComparisonFormula | semmle.order | 52 |
|
||||
| Foo.qll:14:3:18:28 | Disjunction | Foo.qll:18:3:18:28 | ComparisonFormula | semmle.order | 53 |
|
||||
| Foo.qll:14:3:20:13 | Disjunction | Foo.qll:14:3:18:28 | Disjunction | semmle.label | getAnOperand() |
|
||||
| Foo.qll:14:3:20:13 | Disjunction | Foo.qll:14:3:18:28 | Disjunction | semmle.order | 37 |
|
||||
| Foo.qll:14:3:20:13 | Disjunction | Foo.qll:20:3:20:13 | ComparisonFormula | semmle.label | getAnOperand() |
|
||||
| Foo.qll:14:3:20:13 | Disjunction | Foo.qll:20:3:20:13 | ComparisonFormula | semmle.order | 59 |
|
||||
| Foo.qll:14:3:20:13 | Disjunction | Foo.qll:20:3:20:13 | ComparisonFormula | semmle.order | 60 |
|
||||
| Foo.qll:14:3:22:16 | Disjunction | Foo.qll:14:3:20:13 | Disjunction | semmle.label | getAnOperand() |
|
||||
| Foo.qll:14:3:22:16 | Disjunction | Foo.qll:14:3:20:13 | Disjunction | semmle.order | 37 |
|
||||
| Foo.qll:14:3:22:16 | Disjunction | Foo.qll:22:3:22:16 | ComparisonFormula | semmle.label | getAnOperand() |
|
||||
| Foo.qll:14:3:22:16 | Disjunction | Foo.qll:22:3:22:16 | ComparisonFormula | semmle.order | 65 |
|
||||
| Foo.qll:14:3:22:16 | Disjunction | Foo.qll:22:3:22:16 | ComparisonFormula | semmle.order | 66 |
|
||||
| Foo.qll:14:3:24:23 | Disjunction | Foo.qll:14:3:22:16 | Disjunction | semmle.label | getAnOperand() |
|
||||
| Foo.qll:14:3:24:23 | Disjunction | Foo.qll:14:3:22:16 | Disjunction | semmle.order | 37 |
|
||||
| Foo.qll:14:3:24:23 | Disjunction | Foo.qll:24:3:24:23 | ComparisonFormula | semmle.label | getAnOperand() |
|
||||
| Foo.qll:14:3:24:23 | Disjunction | Foo.qll:24:3:24:23 | ComparisonFormula | semmle.order | 71 |
|
||||
| Foo.qll:14:3:24:23 | Disjunction | Foo.qll:24:3:24:23 | ComparisonFormula | semmle.order | 72 |
|
||||
| Foo.qll:14:3:26:14 | Disjunction | Foo.qll:14:3:24:23 | Disjunction | semmle.label | getAnOperand() |
|
||||
| Foo.qll:14:3:26:14 | Disjunction | Foo.qll:14:3:24:23 | Disjunction | semmle.order | 37 |
|
||||
| Foo.qll:14:3:26:14 | Disjunction | Foo.qll:26:3:26:14 | ComparisonFormula | semmle.label | getAnOperand() |
|
||||
| Foo.qll:14:3:26:14 | Disjunction | Foo.qll:26:3:26:14 | ComparisonFormula | semmle.order | 82 |
|
||||
| Foo.qll:16:3:16:29 | ComparisonFormula | Foo.qll:16:3:16:7 | String | semmle.label | getLeftOperand() |
|
||||
| Foo.qll:16:3:16:29 | ComparisonFormula | Foo.qll:16:3:16:7 | String | semmle.order | 44 |
|
||||
| Foo.qll:16:3:16:29 | ComparisonFormula | Foo.qll:16:3:16:7 | String | semmle.order | 45 |
|
||||
| Foo.qll:16:3:16:29 | ComparisonFormula | Foo.qll:16:9:16:9 | ComparisonOp | semmle.label | getOperator() |
|
||||
| Foo.qll:16:3:16:29 | ComparisonFormula | Foo.qll:16:9:16:9 | ComparisonOp | semmle.order | 46 |
|
||||
| Foo.qll:16:3:16:29 | ComparisonFormula | Foo.qll:16:9:16:9 | ComparisonOp | semmle.order | 47 |
|
||||
| Foo.qll:16:3:16:29 | ComparisonFormula | Foo.qll:16:11:16:29 | MemberCall | semmle.label | getRightOperand() |
|
||||
| Foo.qll:16:3:16:29 | ComparisonFormula | Foo.qll:16:11:16:29 | MemberCall | semmle.order | 47 |
|
||||
| Foo.qll:16:3:16:29 | ComparisonFormula | Foo.qll:16:11:16:29 | MemberCall | semmle.order | 48 |
|
||||
| Foo.qll:16:11:16:29 | MemberCall | Foo.qll:16:11:16:11 | f | semmle.label | getBase() |
|
||||
| Foo.qll:16:11:16:29 | MemberCall | Foo.qll:16:11:16:11 | f | semmle.order | 47 |
|
||||
| Foo.qll:16:11:16:29 | MemberCall | Foo.qll:16:11:16:11 | f | semmle.order | 48 |
|
||||
| Foo.qll:16:11:16:29 | MemberCall | Foo.qll:16:22:16:22 | Integer | semmle.label | getArgument(_) |
|
||||
| Foo.qll:16:11:16:29 | MemberCall | Foo.qll:16:22:16:22 | Integer | semmle.order | 49 |
|
||||
| Foo.qll:16:11:16:29 | MemberCall | Foo.qll:16:22:16:22 | Integer | semmle.order | 50 |
|
||||
| Foo.qll:16:11:16:29 | MemberCall | Foo.qll:16:25:16:25 | Integer | semmle.label | getArgument(_) |
|
||||
| Foo.qll:16:11:16:29 | MemberCall | Foo.qll:16:25:16:25 | Integer | semmle.order | 50 |
|
||||
| Foo.qll:16:11:16:29 | MemberCall | Foo.qll:16:25:16:25 | Integer | semmle.order | 51 |
|
||||
| Foo.qll:16:11:16:29 | MemberCall | Foo.qll:16:28:16:28 | Integer | semmle.label | getArgument(_) |
|
||||
| Foo.qll:16:11:16:29 | MemberCall | Foo.qll:16:28:16:28 | Integer | semmle.order | 51 |
|
||||
| Foo.qll:16:11:16:29 | MemberCall | Foo.qll:16:28:16:28 | Integer | semmle.order | 52 |
|
||||
| Foo.qll:18:3:18:9 | InlineCast | Foo.qll:18:3:18:3 | f | semmle.label | getBase() |
|
||||
| Foo.qll:18:3:18:9 | InlineCast | Foo.qll:18:3:18:3 | f | semmle.order | 52 |
|
||||
| Foo.qll:18:3:18:9 | InlineCast | Foo.qll:18:3:18:3 | f | semmle.order | 53 |
|
||||
| Foo.qll:18:3:18:9 | InlineCast | Foo.qll:18:6:18:8 | TypeExpr | semmle.label | getTypeExpr() |
|
||||
| Foo.qll:18:3:18:9 | InlineCast | Foo.qll:18:6:18:8 | TypeExpr | semmle.order | 56 |
|
||||
| Foo.qll:18:3:18:9 | InlineCast | Foo.qll:18:6:18:8 | TypeExpr | semmle.order | 57 |
|
||||
| Foo.qll:18:3:18:20 | MemberCall | Foo.qll:18:3:18:9 | InlineCast | semmle.label | getBase() |
|
||||
| Foo.qll:18:3:18:20 | MemberCall | Foo.qll:18:3:18:9 | InlineCast | semmle.order | 52 |
|
||||
| Foo.qll:18:3:18:20 | MemberCall | Foo.qll:18:3:18:9 | InlineCast | semmle.order | 53 |
|
||||
| Foo.qll:18:3:18:28 | ComparisonFormula | Foo.qll:18:3:18:20 | MemberCall | semmle.label | getLeftOperand() |
|
||||
| Foo.qll:18:3:18:28 | ComparisonFormula | Foo.qll:18:3:18:20 | MemberCall | semmle.order | 52 |
|
||||
| Foo.qll:18:3:18:28 | ComparisonFormula | Foo.qll:18:3:18:20 | MemberCall | semmle.order | 53 |
|
||||
| Foo.qll:18:3:18:28 | ComparisonFormula | Foo.qll:18:22:18:22 | ComparisonOp | semmle.label | getOperator() |
|
||||
| Foo.qll:18:3:18:28 | ComparisonFormula | Foo.qll:18:22:18:22 | ComparisonOp | semmle.order | 57 |
|
||||
| Foo.qll:18:3:18:28 | ComparisonFormula | Foo.qll:18:22:18:22 | ComparisonOp | semmle.order | 58 |
|
||||
| Foo.qll:18:3:18:28 | ComparisonFormula | Foo.qll:18:24:18:28 | String | semmle.label | getRightOperand() |
|
||||
| Foo.qll:18:3:18:28 | ComparisonFormula | Foo.qll:18:24:18:28 | String | semmle.order | 58 |
|
||||
| Foo.qll:18:3:18:28 | ComparisonFormula | Foo.qll:18:24:18:28 | String | semmle.order | 59 |
|
||||
| Foo.qll:20:3:20:9 | InlineCast | Foo.qll:20:3:20:3 | f | semmle.label | getBase() |
|
||||
| Foo.qll:20:3:20:9 | InlineCast | Foo.qll:20:3:20:3 | f | semmle.order | 59 |
|
||||
| Foo.qll:20:3:20:9 | InlineCast | Foo.qll:20:3:20:3 | f | semmle.order | 60 |
|
||||
| Foo.qll:20:3:20:9 | InlineCast | Foo.qll:20:6:20:8 | TypeExpr | semmle.label | getTypeExpr() |
|
||||
| Foo.qll:20:3:20:9 | InlineCast | Foo.qll:20:6:20:8 | TypeExpr | semmle.order | 62 |
|
||||
| Foo.qll:20:3:20:9 | InlineCast | Foo.qll:20:6:20:8 | TypeExpr | semmle.order | 63 |
|
||||
| Foo.qll:20:3:20:13 | ComparisonFormula | Foo.qll:20:3:20:9 | InlineCast | semmle.label | getLeftOperand() |
|
||||
| Foo.qll:20:3:20:13 | ComparisonFormula | Foo.qll:20:3:20:9 | InlineCast | semmle.order | 59 |
|
||||
| Foo.qll:20:3:20:13 | ComparisonFormula | Foo.qll:20:3:20:9 | InlineCast | semmle.order | 60 |
|
||||
| Foo.qll:20:3:20:13 | ComparisonFormula | Foo.qll:20:11:20:11 | ComparisonOp | semmle.label | getOperator() |
|
||||
| Foo.qll:20:3:20:13 | ComparisonFormula | Foo.qll:20:11:20:11 | ComparisonOp | semmle.order | 63 |
|
||||
| Foo.qll:20:3:20:13 | ComparisonFormula | Foo.qll:20:11:20:11 | ComparisonOp | semmle.order | 64 |
|
||||
| Foo.qll:20:3:20:13 | ComparisonFormula | Foo.qll:20:13:20:13 | f | semmle.label | getRightOperand() |
|
||||
| Foo.qll:20:3:20:13 | ComparisonFormula | Foo.qll:20:13:20:13 | f | semmle.order | 64 |
|
||||
| Foo.qll:20:3:20:13 | ComparisonFormula | Foo.qll:20:13:20:13 | f | semmle.order | 65 |
|
||||
| Foo.qll:22:3:22:16 | ComparisonFormula | Foo.qll:22:3:22:3 | f | semmle.label | getLeftOperand() |
|
||||
| Foo.qll:22:3:22:16 | ComparisonFormula | Foo.qll:22:3:22:3 | f | semmle.order | 65 |
|
||||
| Foo.qll:22:3:22:16 | ComparisonFormula | Foo.qll:22:3:22:3 | f | semmle.order | 66 |
|
||||
| Foo.qll:22:3:22:16 | ComparisonFormula | Foo.qll:22:5:22:5 | ComparisonOp | semmle.label | getOperator() |
|
||||
| Foo.qll:22:3:22:16 | ComparisonFormula | Foo.qll:22:5:22:5 | ComparisonOp | semmle.order | 67 |
|
||||
| Foo.qll:22:3:22:16 | ComparisonFormula | Foo.qll:22:5:22:5 | ComparisonOp | semmle.order | 68 |
|
||||
| Foo.qll:22:3:22:16 | ComparisonFormula | Foo.qll:22:7:22:16 | Aggregate[any] | semmle.label | getRightOperand() |
|
||||
| Foo.qll:22:3:22:16 | ComparisonFormula | Foo.qll:22:7:22:16 | Aggregate[any] | semmle.order | 68 |
|
||||
| Foo.qll:22:3:22:16 | ComparisonFormula | Foo.qll:22:7:22:16 | Aggregate[any] | semmle.order | 69 |
|
||||
| Foo.qll:22:7:22:16 | Aggregate[any] | Foo.qll:22:11:22:15 | f | semmle.label | getArgument(_) |
|
||||
| Foo.qll:22:7:22:16 | Aggregate[any] | Foo.qll:22:11:22:15 | f | semmle.order | 69 |
|
||||
| Foo.qll:22:7:22:16 | Aggregate[any] | Foo.qll:22:11:22:15 | f | semmle.order | 70 |
|
||||
| Foo.qll:22:11:22:15 | f | Foo.qll:22:11:22:13 | TypeExpr | semmle.label | getTypeExpr() |
|
||||
| Foo.qll:22:11:22:15 | f | Foo.qll:22:11:22:13 | TypeExpr | semmle.order | 69 |
|
||||
| Foo.qll:22:11:22:15 | f | Foo.qll:22:11:22:13 | TypeExpr | semmle.order | 70 |
|
||||
| Foo.qll:24:3:24:23 | ComparisonFormula | Foo.qll:24:3:24:3 | Integer | semmle.label | getLeftOperand() |
|
||||
| Foo.qll:24:3:24:23 | ComparisonFormula | Foo.qll:24:3:24:3 | Integer | semmle.order | 71 |
|
||||
| Foo.qll:24:3:24:23 | ComparisonFormula | Foo.qll:24:3:24:3 | Integer | semmle.order | 72 |
|
||||
| Foo.qll:24:3:24:23 | ComparisonFormula | Foo.qll:24:5:24:5 | ComparisonOp | semmle.label | getOperator() |
|
||||
| Foo.qll:24:3:24:23 | ComparisonFormula | Foo.qll:24:5:24:5 | ComparisonOp | semmle.order | 73 |
|
||||
| Foo.qll:24:3:24:23 | ComparisonFormula | Foo.qll:24:5:24:5 | ComparisonOp | semmle.order | 74 |
|
||||
| Foo.qll:24:3:24:23 | ComparisonFormula | Foo.qll:24:7:24:23 | AddExpr | semmle.label | getRightOperand() |
|
||||
| Foo.qll:24:3:24:23 | ComparisonFormula | Foo.qll:24:7:24:23 | AddExpr | semmle.order | 74 |
|
||||
| Foo.qll:24:3:24:23 | ComparisonFormula | Foo.qll:24:7:24:23 | AddExpr | semmle.order | 75 |
|
||||
| Foo.qll:24:7:24:23 | AddExpr | Foo.qll:24:7:24:7 | Integer | semmle.label | getLeftOperand() |
|
||||
| Foo.qll:24:7:24:23 | AddExpr | Foo.qll:24:7:24:7 | Integer | semmle.order | 74 |
|
||||
| Foo.qll:24:7:24:23 | AddExpr | Foo.qll:24:7:24:7 | Integer | semmle.order | 75 |
|
||||
| Foo.qll:24:7:24:23 | AddExpr | Foo.qll:24:12:24:22 | AddExpr | semmle.label | getRightOperand() |
|
||||
| Foo.qll:24:7:24:23 | AddExpr | Foo.qll:24:12:24:22 | AddExpr | semmle.order | 76 |
|
||||
| Foo.qll:24:7:24:23 | AddExpr | Foo.qll:24:12:24:22 | AddExpr | semmle.order | 77 |
|
||||
| Foo.qll:24:12:24:22 | AddExpr | Foo.qll:24:12:24:12 | Integer | semmle.label | getLeftOperand() |
|
||||
| Foo.qll:24:12:24:22 | AddExpr | Foo.qll:24:12:24:12 | Integer | semmle.order | 76 |
|
||||
| Foo.qll:24:12:24:22 | AddExpr | Foo.qll:24:12:24:12 | Integer | semmle.order | 77 |
|
||||
| Foo.qll:24:12:24:22 | AddExpr | Foo.qll:24:17:24:21 | AddExpr | semmle.label | getRightOperand() |
|
||||
| Foo.qll:24:12:24:22 | AddExpr | Foo.qll:24:17:24:21 | AddExpr | semmle.order | 78 |
|
||||
| Foo.qll:24:12:24:22 | AddExpr | Foo.qll:24:17:24:21 | AddExpr | semmle.order | 79 |
|
||||
| Foo.qll:24:17:24:21 | AddExpr | Foo.qll:24:17:24:17 | Integer | semmle.label | getLeftOperand() |
|
||||
| Foo.qll:24:17:24:21 | AddExpr | Foo.qll:24:17:24:17 | Integer | semmle.order | 78 |
|
||||
| Foo.qll:24:17:24:21 | AddExpr | Foo.qll:24:17:24:17 | Integer | semmle.order | 79 |
|
||||
| Foo.qll:24:17:24:21 | AddExpr | Foo.qll:24:21:24:21 | Integer | semmle.label | getRightOperand() |
|
||||
| Foo.qll:24:17:24:21 | AddExpr | Foo.qll:24:21:24:21 | Integer | semmle.order | 80 |
|
||||
| Foo.qll:24:17:24:21 | AddExpr | Foo.qll:24:21:24:21 | Integer | semmle.order | 81 |
|
||||
| Foo.qll:26:3:26:14 | ComparisonFormula | Foo.qll:26:3:26:6 | Boolean | semmle.label | getLeftOperand() |
|
||||
| Foo.qll:26:3:26:14 | ComparisonFormula | Foo.qll:26:3:26:6 | Boolean | semmle.order | 82 |
|
||||
| Foo.qll:26:3:26:14 | ComparisonFormula | Foo.qll:26:8:26:8 | ComparisonOp | semmle.label | getOperator() |
|
||||
| Foo.qll:26:3:26:14 | ComparisonFormula | Foo.qll:26:8:26:8 | ComparisonOp | semmle.order | 84 |
|
||||
| Foo.qll:26:3:26:14 | ComparisonFormula | Foo.qll:26:10:26:14 | Boolean | semmle.label | getRightOperand() |
|
||||
| Foo.qll:26:3:26:14 | ComparisonFormula | Foo.qll:26:10:26:14 | Boolean | semmle.order | 85 |
|
||||
| printAst.ql:1:1:1:29 | TopLevel | printAst.ql:1:1:1:28 | Import | semmle.label | getAnImport() |
|
||||
| printAst.ql:1:1:1:29 | TopLevel | printAst.ql:1:1:1:28 | Import | semmle.order | 81 |
|
||||
| printAst.ql:1:1:1:29 | TopLevel | printAst.ql:1:1:1:28 | Import | semmle.order | 86 |
|
||||
graphProperties
|
||||
| semmle.graphKind | tree |
|
||||
|
||||
Reference in New Issue
Block a user