diff --git a/python/ql/examples/snippets/raw_string.ql b/python/ql/examples/snippets/raw_string.ql index 78b1bbefb9a4..347d91ad4128 100644 --- a/python/ql/examples/snippets/raw_string.ql +++ b/python/ql/examples/snippets/raw_string.ql @@ -8,6 +8,6 @@ import python -from StrConst s +from StringLiteral s where s.getPrefix().matches("%r%") select s diff --git a/python/ql/examples/snippets/singlequotestring.ql b/python/ql/examples/snippets/singlequotestring.ql index 2c2ee5704a57..3111f39fcea4 100644 --- a/python/ql/examples/snippets/singlequotestring.ql +++ b/python/ql/examples/snippets/singlequotestring.ql @@ -9,6 +9,6 @@ import python -from StrConst s +from StringLiteral s where s.getPrefix().charAt(_) = "'" select s diff --git a/python/ql/lib/analysis/DefinitionTracking.qll b/python/ql/lib/analysis/DefinitionTracking.qll index 6cf9e1186810..5a9811f62488 100644 --- a/python/ql/lib/analysis/DefinitionTracking.qll +++ b/python/ql/lib/analysis/DefinitionTracking.qll @@ -410,7 +410,7 @@ private predicate sets_attribute(ArgumentRefinement def, string name) { call = def.getDefiningNode() and call.getFunction().refersTo(Object::builtin("setattr")) and def.getInput().getAUse() = call.getArg(0) and - call.getArg(1).getNode().(StrConst).getText() = name + call.getArg(1).getNode().(StringLiteral).getText() = name ) } diff --git a/python/ql/lib/change-notes/2024-04-22-renaming-StrConst-to-StringLiteral.md b/python/ql/lib/change-notes/2024-04-22-renaming-StrConst-to-StringLiteral.md new file mode 100644 index 000000000000..958262dda2bf --- /dev/null +++ b/python/ql/lib/change-notes/2024-04-22-renaming-StrConst-to-StringLiteral.md @@ -0,0 +1,5 @@ +--- +category: deprecated +--- + +- Renamed the `StrConst` class to `StringLiteral`, for greater consistency with other languages. The `StrConst` and `Str` classes are now deprecated and will be removed in a future release. diff --git a/python/ql/lib/experimental/cryptography/modules/stdlib/HashlibModule.qll b/python/ql/lib/experimental/cryptography/modules/stdlib/HashlibModule.qll index 7ceb58c109da..5b2586dc54a6 100644 --- a/python/ql/lib/experimental/cryptography/modules/stdlib/HashlibModule.qll +++ b/python/ql/lib/experimental/cryptography/modules/stdlib/HashlibModule.qll @@ -26,10 +26,10 @@ module Hashes { } override string getName() { - result = super.normalizeName(this.asExpr().(StrConst).getText()) + result = super.normalizeName(this.asExpr().(StringLiteral).getText()) or // if not a known/static string, assume from an outside source and the algorithm is UNKNOWN - not this.asExpr() instanceof StrConst and result = unknownAlgorithm() + not this.asExpr() instanceof StringLiteral and result = unknownAlgorithm() } } @@ -49,10 +49,10 @@ module Hashes { } override string getName() { - result = super.normalizeName(this.asExpr().(StrConst).getText()) + result = super.normalizeName(this.asExpr().(StringLiteral).getText()) or // if not a known/static string, assume from an outside source and the algorithm is UNKNOWN - not this.asExpr() instanceof StrConst and result = unknownAlgorithm() + not this.asExpr() instanceof StringLiteral and result = unknownAlgorithm() } } @@ -88,9 +88,9 @@ module Hashes { // Name is a string constant or consider the name unknown // NOTE: we are excluding hmac.new and hmac.HMAC constructor calls so we are expecting // a string or an outside configuration only - result = super.normalizeName(this.asExpr().(StrConst).getText()) + result = super.normalizeName(this.asExpr().(StringLiteral).getText()) or - not this.asExpr() instanceof StrConst and + not this.asExpr() instanceof StringLiteral and result = unknownAlgorithm() } } diff --git a/python/ql/lib/experimental/cryptography/modules/stdlib/HmacModule.qll b/python/ql/lib/experimental/cryptography/modules/stdlib/HmacModule.qll index 25634543a0b0..0ae3829b2f95 100644 --- a/python/ql/lib/experimental/cryptography/modules/stdlib/HmacModule.qll +++ b/python/ql/lib/experimental/cryptography/modules/stdlib/HmacModule.qll @@ -62,9 +62,9 @@ module Hashes { then result = super.normalizeName("MD5") else ( // Else get the string name, if its a string constant, or UNKNOWN if otherwise - result = super.normalizeName(this.asExpr().(StrConst).getText()) + result = super.normalizeName(this.asExpr().(StringLiteral).getText()) or - not this.asExpr() instanceof StrConst and result = unknownAlgorithm() + not this.asExpr() instanceof StringLiteral and result = unknownAlgorithm() ) } } diff --git a/python/ql/lib/semmle/python/ApiGraphs.qll b/python/ql/lib/semmle/python/ApiGraphs.qll index 6f27c829e32c..b89e5c249877 100644 --- a/python/ql/lib/semmle/python/ApiGraphs.qll +++ b/python/ql/lib/semmle/python/ApiGraphs.qll @@ -257,7 +257,7 @@ module API { */ Node getSubscript(string key) { exists(API::Node index | result = this.getSubscriptAt(index) | - key = index.getAValueReachingSink().asExpr().(PY::StrConst).getText() + key = index.getAValueReachingSink().asExpr().(PY::StringLiteral).getText() ) } diff --git a/python/ql/lib/semmle/python/Concepts.qll b/python/ql/lib/semmle/python/Concepts.qll index 92f94abf0d66..4b14a834b318 100644 --- a/python/ql/lib/semmle/python/Concepts.qll +++ b/python/ql/lib/semmle/python/Concepts.qll @@ -855,7 +855,7 @@ module Http { /** Gets the URL pattern for this route, if it can be statically determined. */ string getUrlPattern() { - exists(StrConst str | + exists(StringLiteral str | this.getUrlPatternArg().getALocalSource() = DataFlow::exprNode(str) and result = str.getText() ) @@ -983,7 +983,7 @@ module Http { /** Gets the mimetype of this HTTP response, if it can be statically determined. */ string getMimetype() { - exists(StrConst str | + exists(StringLiteral str | this.getMimetypeOrContentTypeArg().getALocalSource() = DataFlow::exprNode(str) and result = str.getText().splitAt(";", 0) ) diff --git a/python/ql/lib/semmle/python/Exprs.qll b/python/ql/lib/semmle/python/Exprs.qll index 0c2732e27e5c..47e31bb07cdd 100644 --- a/python/ql/lib/semmle/python/Exprs.qll +++ b/python/ql/lib/semmle/python/Exprs.qll @@ -236,7 +236,7 @@ class Call extends Call_ { string getANamedArgumentName() { result = this.getAKeyword().getArg() or - result = this.getKwargs().(Dict).getAKey().(StrConst).getText() + result = this.getKwargs().(Dict).getAKey().(StringLiteral).getText() } /** Gets the positional argument count of this call, provided there is no more than one tuple (*) argument. */ @@ -299,7 +299,7 @@ class Repr extends Repr_ { * A bytes constant, such as `b'ascii'`. Note that unadorned string constants such as * `"hello"` are treated as Bytes for Python2, but Unicode for Python3. */ -class Bytes extends StrConst { +class Bytes extends StringLiteral { /* syntax: b"hello" */ Bytes() { not this.isUnicode() } @@ -446,7 +446,7 @@ class NegativeIntegerLiteral extends ImmutableLiteral, UnaryExpr { * A unicode string expression, such as `u"\u20ac"`. Note that unadorned string constants such as * "hello" are treated as Bytes for Python2, but Unicode for Python3. */ -class Unicode extends StrConst { +class Unicode extends StringLiteral { /* syntax: "hello" */ Unicode() { this.isUnicode() } @@ -599,7 +599,7 @@ class Slice extends Slice_ { /** * Returns all string prefixes in the database that are explicitly marked as Unicode strings. * - * Helper predicate for `StrConst::isUnicode`. + * Helper predicate for `StringLiteral::isUnicode`. */ pragma[nomagic] private string unicode_prefix() { @@ -610,7 +610,7 @@ private string unicode_prefix() { /** * Returns all string prefixes in the database that are _not_ explicitly marked as bytestrings. * - * Helper predicate for `StrConst::isUnicode`. + * Helper predicate for `StringLiteral::isUnicode`. */ pragma[nomagic] private string non_byte_prefix() { @@ -618,12 +618,19 @@ private string non_byte_prefix() { not result.charAt(_) in ["b", "B"] } -/** A string constant. This is a placeholder class -- use `StrConst` instead. */ -class Str = StrConst; +/** DEPRECATED. Use `StringLiteral` instead. */ +deprecated class Str = StringLiteral; + +/** DEPRECATED. Use `StringLiteral` instead. */ +deprecated class StrConst = StringLiteral; /** A string constant. */ -class StrConst extends Str_, ImmutableLiteral { +class StringLiteral extends Str_, ImmutableLiteral { /* syntax: "hello" */ + /** + * Holds if this string is a unicode string, either by default (e.g. if Python 3), or with an + * explicit prefix. + */ predicate isUnicode() { this.getPrefix() = unicode_prefix() or @@ -652,6 +659,8 @@ class StrConst extends Str_, ImmutableLiteral { } override Object getLiteralObject() { none() } + + override string toString() { result = "StringLiteral" } } private predicate name_consts(Name_ n, string id) { diff --git a/python/ql/lib/semmle/python/Files.qll b/python/ql/lib/semmle/python/Files.qll index 5340a3fdc438..2da0dd61f885 100644 --- a/python/ql/lib/semmle/python/Files.qll +++ b/python/ql/lib/semmle/python/Files.qll @@ -93,7 +93,7 @@ class File extends Container, Impl::File { exists(Stmt s | s.getLocation().getFile() = this) or // The file contains the usual `if __name__ == '__main__':` construction - exists(If i, Name name, StrConst main, Cmpop op | + exists(If i, Name name, StringLiteral main, Cmpop op | i.getScope().(Module).getFile() = this and op instanceof Eq and i.getTest().(Compare).compares(name, op, main) and @@ -123,7 +123,7 @@ private predicate occupied_line(File f, int n) { exists(Location l | l.getFile() = f | l.getStartLine() = n or - exists(StrConst s | s.getLocation() = l | n in [l.getStartLine() .. l.getEndLine()]) + exists(StringLiteral s | s.getLocation() = l | n in [l.getStartLine() .. l.getEndLine()]) ) } diff --git a/python/ql/lib/semmle/python/Module.qll b/python/ql/lib/semmle/python/Module.qll index 0a083eec9a8c..307433fe95bc 100644 --- a/python/ql/lib/semmle/python/Module.qll +++ b/python/ql/lib/semmle/python/Module.qll @@ -125,9 +125,9 @@ class Module extends Module_, Scope, AstNode { a.getScope() = this and all.getId() = "__all__" and ( - a.getValue().(List).getAnElt().(StrConst).getText() = name + a.getValue().(List).getAnElt().(StringLiteral).getText() = name or - a.getValue().(Tuple).getAnElt().(StrConst).getText() = name + a.getValue().(Tuple).getAnElt().(StringLiteral).getText() = name ) ) } diff --git a/python/ql/lib/semmle/python/PrintAst.qll b/python/ql/lib/semmle/python/PrintAst.qll index 6189a47d4bb6..d2aec338a586 100644 --- a/python/ql/lib/semmle/python/PrintAst.qll +++ b/python/ql/lib/semmle/python/PrintAst.qll @@ -423,13 +423,13 @@ class ParameterNode extends AstElementNode { } /** - * A print node for a `StrConst`. + * A print node for a `StringLiteral`. * * The string has a child, if the child is used as a regular expression, * which is the root of the regular expression. */ -class StrConstNode extends AstElementNode { - override StrConst element; +class StringLiteralNode extends AstElementNode { + override StringLiteral element; } /** @@ -599,7 +599,7 @@ private module PrettyPrinting { or result = "class " + a.(Class).getName() or - result = a.(StrConst).getText() + result = a.(StringLiteral).getText() or result = "yield " + a.(Yield).getValue() or diff --git a/python/ql/lib/semmle/python/Scope.qll b/python/ql/lib/semmle/python/Scope.qll index c40936dbdabd..891e249faf57 100644 --- a/python/ql/lib/semmle/python/Scope.qll +++ b/python/ql/lib/semmle/python/Scope.qll @@ -48,7 +48,7 @@ class Scope extends Scope_ { string getName() { py_strs(result, this, 0) } /** Gets the docstring for this scope */ - StrConst getDocString() { result = this.getStmt(0).(ExprStmt).getValue() } + StringLiteral getDocString() { result = this.getStmt(0).(ExprStmt).getValue() } /** Gets the entry point into this Scope's control flow graph */ ControlFlowNode getEntryNode() { py_scope_flow(result, this, -1) } diff --git a/python/ql/lib/semmle/python/Stmts.qll b/python/ql/lib/semmle/python/Stmts.qll index cc42c933af6b..ea309227af67 100644 --- a/python/ql/lib/semmle/python/Stmts.qll +++ b/python/ql/lib/semmle/python/Stmts.qll @@ -284,7 +284,7 @@ class If extends If_ { /** Whether this if statement takes the form `if __name__ == "__main__":` */ predicate isNameEqMain() { - exists(StrConst m, Name n, Compare c | + exists(StringLiteral m, Name n, Compare c | this.getTest() = c and c.getOp(0) instanceof Eq and ( diff --git a/python/ql/lib/semmle/python/dataflow/new/BarrierGuards.qll b/python/ql/lib/semmle/python/dataflow/new/BarrierGuards.qll index 2d501b3ce17e..ad8b668a94ad 100644 --- a/python/ql/lib/semmle/python/dataflow/new/BarrierGuards.qll +++ b/python/ql/lib/semmle/python/dataflow/new/BarrierGuards.qll @@ -5,7 +5,7 @@ private import semmle.python.dataflow.new.DataFlow private predicate stringConstCompare(DataFlow::GuardNode g, ControlFlowNode node, boolean branch) { exists(CompareNode cn | cn = g | - exists(StrConst str_const, Cmpop op | + exists(StringLiteral str_const, Cmpop op | op = any(Eq eq) and branch = true or op = any(NotEq ne) and branch = false @@ -21,7 +21,7 @@ private predicate stringConstCompare(DataFlow::GuardNode g, ControlFlowNode node op = any(NotIn ni) and branch = false | forall(ControlFlowNode elem | elem = str_const_iterable.getAnElement() | - elem.getNode() instanceof StrConst + elem.getNode() instanceof StringLiteral ) and cn.operands(node, op, str_const_iterable) ) diff --git a/python/ql/lib/semmle/python/dataflow/new/SensitiveDataSources.qll b/python/ql/lib/semmle/python/dataflow/new/SensitiveDataSources.qll index 0ef65c478d53..705c4476fb13 100644 --- a/python/ql/lib/semmle/python/dataflow/new/SensitiveDataSources.qll +++ b/python/ql/lib/semmle/python/dataflow/new/SensitiveDataSources.qll @@ -91,7 +91,7 @@ private module SensitiveDataModeling { // Note: If this is implemented with type-tracking, we will get cross-talk as // illustrated in python/ql/test/experimental/dataflow/sensitive-data/test.py exists(DataFlow::LocalSourceNode source | - source.asExpr().(StrConst).getText() = sensitiveString(classification) and + source.asExpr().(StringLiteral).getText() = sensitiveString(classification) and source.flowsTo(result) ) } @@ -173,8 +173,8 @@ private module SensitiveDataModeling { } pragma[nomagic] - private string sensitiveStrConstCandidate() { - result = any(StrConst s | not s.isDocString()).getText() and + private string sensitiveStringLiteralCandidate() { + result = any(StringLiteral s | not s.isDocString()).getText() and not result.regexpMatch(notSensitiveRegexp()) } @@ -217,7 +217,7 @@ private module SensitiveDataModeling { result in [ sensitiveNameCandidate(), sensitiveAttributeNameCandidate(), sensitiveParameterNameCandidate(), sensitiveFunctionNameCandidate(), - sensitiveStrConstCandidate() + sensitiveStringLiteralCandidate() ] } diff --git a/python/ql/lib/semmle/python/dataflow/new/internal/Attributes.qll b/python/ql/lib/semmle/python/dataflow/new/internal/Attributes.qll index ff88dd47d35e..51dccc29312c 100644 --- a/python/ql/lib/semmle/python/dataflow/new/internal/Attributes.qll +++ b/python/ql/lib/semmle/python/dataflow/new/internal/Attributes.qll @@ -40,7 +40,7 @@ abstract class AttrRef extends Node { or exists(LocalSourceNode nodeFrom | nodeFrom.flowsTo(this.getAttributeNameExpr()) and - attrName = nodeFrom.(CfgNode).getNode().getNode().(StrConst).getText() + attrName = nodeFrom.(CfgNode).getNode().getNode().(StringLiteral).getText() ) } @@ -178,7 +178,7 @@ private class SetAttrCallAsAttrWrite extends AttrWrite, CfgNode { override ExprNode getAttributeNameExpr() { result.asCfgNode() = node.getName() } override string getAttributeName() { - result = this.getAttributeNameExpr().(CfgNode).getNode().getNode().(StrConst).getText() + result = this.getAttributeNameExpr().(CfgNode).getNode().getNode().(StringLiteral).getText() } } @@ -254,7 +254,7 @@ private class GetAttrCallAsAttrRead extends AttrRead, CfgNode { override ExprNode getAttributeNameExpr() { result.asCfgNode() = node.getName() } override string getAttributeName() { - result = this.getAttributeNameExpr().(CfgNode).getNode().getNode().(StrConst).getText() + result = this.getAttributeNameExpr().(CfgNode).getNode().getNode().(StringLiteral).getText() } } diff --git a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPrivate.qll b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPrivate.qll index 9d7b1d5aa84b..c7d0da2c519e 100644 --- a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPrivate.qll +++ b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPrivate.qll @@ -813,7 +813,7 @@ predicate dictStoreStep(CfgNode nodeFrom, DictionaryElementContent c, Node nodeT exists(KeyValuePair item | item = nodeTo.asCfgNode().(DictNode).getNode().(Dict).getAnItem() and nodeFrom.getNode().getNode() = item.getValue() and - c.getKey() = item.getKey().(StrConst).getS() + c.getKey() = item.getKey().(StringLiteral).getS() ) } @@ -829,13 +829,13 @@ private predicate moreDictStoreSteps(CfgNode nodeFrom, DictionaryElementContent exists(SubscriptNode subscript | nodeTo.(PostUpdateNode).getPreUpdateNode().asCfgNode() = subscript.getObject() and nodeFrom.asCfgNode() = subscript.(DefinitionNode).getValue() and - c.getKey() = subscript.getIndex().getNode().(StrConst).getText() + c.getKey() = subscript.getIndex().getNode().(StringLiteral).getText() ) or // see https://docs.python.org/3.10/library/stdtypes.html#dict.setdefault exists(MethodCallNode call | call.calls(nodeTo.(PostUpdateNode).getPreUpdateNode(), "setdefault") and - call.getArg(0).asExpr().(StrConst).getText() = c.getKey() and + call.getArg(0).asExpr().(StringLiteral).getText() = c.getKey() and nodeFrom = call.getArg(1) ) } @@ -844,7 +844,7 @@ predicate dictClearStep(Node node, DictionaryElementContent c) { exists(SubscriptNode subscript | subscript instanceof DefinitionNode and node.asCfgNode() = subscript.getObject() and - c.getKey() = subscript.getIndex().getNode().(StrConst).getText() + c.getKey() = subscript.getIndex().getNode().(StringLiteral).getText() ) } @@ -954,7 +954,7 @@ predicate subscriptReadStep(CfgNode nodeFrom, Content c, CfgNode nodeTo) { nodeTo.getNode().(SubscriptNode).getIndex().getNode().(IntegerLiteral).getValue() or c.(DictionaryElementContent).getKey() = - nodeTo.getNode().(SubscriptNode).getIndex().getNode().(StrConst).getS() + nodeTo.getNode().(SubscriptNode).getIndex().getNode().(StringLiteral).getS() ) } diff --git a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPublic.qll b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPublic.qll index f9ee4fc6e462..9b9caf28ad3c 100644 --- a/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPublic.qll +++ b/python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPublic.qll @@ -606,17 +606,18 @@ newtype TContent = /** An element of a dictionary under a specific key. */ TDictionaryElementContent(string key) { // {"key": ...} - key = any(KeyValuePair kvp).getKey().(StrConst).getText() + key = any(KeyValuePair kvp).getKey().(StringLiteral).getText() or // func(key=...) key = any(Keyword kw).getArg() or // d["key"] = ... - key = any(SubscriptNode sub | sub.isStore() | sub.getIndex().getNode().(StrConst).getText()) + key = + any(SubscriptNode sub | sub.isStore() | sub.getIndex().getNode().(StringLiteral).getText()) or // d.setdefault("key", ...) exists(CallNode call | call.getFunction().(AttrNode).getName() = "setdefault" | - key = call.getArg(0).getNode().(StrConst).getText() + key = call.getArg(0).getNode().(StringLiteral).getText() ) } or /** An element of a dictionary under any key. */ diff --git a/python/ql/lib/semmle/python/dataflow/new/internal/ImportResolution.qll b/python/ql/lib/semmle/python/dataflow/new/internal/ImportResolution.qll index 40d9463e5461..36773abe2b4e 100644 --- a/python/ql/lib/semmle/python/dataflow/new/internal/ImportResolution.qll +++ b/python/ql/lib/semmle/python/dataflow/new/internal/ImportResolution.qll @@ -146,7 +146,7 @@ module ImportResolution { def.getValue() = n and def.(NameNode).getId() = "__all__" and def.getScope() = m and - any(StrConst s | s.getText() = name) = n.getAnElement().getNode() + any(StringLiteral s | s.getText() = name) = n.getAnElement().getNode() ) } @@ -210,7 +210,7 @@ module ImportResolution { exists(SubscriptNode sub | sub.getObject() = sys_modules_reference().asCfgNode() and sub.getIndex() = n and - n.getNode().(StrConst).getText() = name and + n.getNode().(StringLiteral).getText() = name and sub.(DefinitionNode).getValue() = mod.asCfgNode() and mod = getModuleReference(result) ) diff --git a/python/ql/lib/semmle/python/dataflow/new/internal/MatchUnpacking.qll b/python/ql/lib/semmle/python/dataflow/new/internal/MatchUnpacking.qll index 4883dea52d4b..8064c34d9218 100644 --- a/python/ql/lib/semmle/python/dataflow/new/internal/MatchUnpacking.qll +++ b/python/ql/lib/semmle/python/dataflow/new/internal/MatchUnpacking.qll @@ -224,7 +224,7 @@ predicate matchMappingReadStep(Node nodeFrom, Content c, Node nodeTo) { | nodeFrom.(CfgNode).getNode().getNode() = subject and nodeTo.(CfgNode).getNode().getNode() = value and - c.(DictionaryElementContent).getKey() = key.getLiteral().(StrConst).getText() + c.(DictionaryElementContent).getKey() = key.getLiteral().(StringLiteral).getText() ) } @@ -256,7 +256,7 @@ predicate matchMappingClearStep(Node n, Content c) { dstar = subject.getAMapping() | n.(CfgNode).getNode().getNode() = dstar.getTarget() and - c.(DictionaryElementContent).getKey() = key.getLiteral().(StrConst).getText() + c.(DictionaryElementContent).getKey() = key.getLiteral().(StringLiteral).getText() ) } diff --git a/python/ql/lib/semmle/python/dataflow/new/internal/PrintNode.qll b/python/ql/lib/semmle/python/dataflow/new/internal/PrintNode.qll index 14dec8d14b70..76cd0a378229 100644 --- a/python/ql/lib/semmle/python/dataflow/new/internal/PrintNode.qll +++ b/python/ql/lib/semmle/python/dataflow/new/internal/PrintNode.qll @@ -18,7 +18,7 @@ private import semmle.python.dataflow.new.internal.DataFlowPrivate as DataFlowPr */ string prettyExpr(Expr e) { not e instanceof Num and - not e instanceof StrConst and + not e instanceof StringLiteral and not e instanceof Subscript and not e instanceof Call and not e instanceof Attribute and @@ -27,8 +27,8 @@ string prettyExpr(Expr e) { result = e.(Num).getN() or result = - e.(StrConst).getPrefix() + e.(StrConst).getText() + - e.(StrConst).getPrefix().regexpReplaceAll("[a-zA-Z]+", "") + e.(StringLiteral).getPrefix() + e.(StringLiteral).getText() + + e.(StringLiteral).getPrefix().regexpReplaceAll("[a-zA-Z]+", "") or result = prettyExpr(e.(Subscript).getObject()) + "[" + prettyExpr(e.(Subscript).getIndex()) + "]" or diff --git a/python/ql/lib/semmle/python/dataflow/old/Implementation.qll b/python/ql/lib/semmle/python/dataflow/old/Implementation.qll index 55ea5de10597..19197f4bd306 100644 --- a/python/ql/lib/semmle/python/dataflow/old/Implementation.qll +++ b/python/ql/lib/semmle/python/dataflow/old/Implementation.qll @@ -410,7 +410,7 @@ class TaintTrackingImplementation extends string instanceof TaintTracking::Confi call = node.asCfgNode() and call.getFunction().pointsTo(ObjectInternal::builtin("getattr")) and arg = call.getArg(0) and - attrname = call.getArg(1).getNode().(StrConst).getText() and + attrname = call.getArg(1).getNode().(StringLiteral).getText() and arg = srcnode.asCfgNode() | path = srcpath.fromAttribute(attrname) and diff --git a/python/ql/lib/semmle/python/frameworks/Cryptodome.qll b/python/ql/lib/semmle/python/frameworks/Cryptodome.qll index f0a309644ad7..4dc193b13866 100644 --- a/python/ql/lib/semmle/python/frameworks/Cryptodome.qll +++ b/python/ql/lib/semmle/python/frameworks/Cryptodome.qll @@ -83,7 +83,7 @@ private module CryptodomeModel { /** Gets the name of the curve to use, as well as the origin that explains how we obtained this name. */ string getCurveWithOrigin(DataFlow::Node origin) { - exists(StrConst str | origin = DataFlow::exprNode(str) | + exists(StringLiteral str | origin = DataFlow::exprNode(str) | origin = this.getCurveArg().getALocalSource() and result = str.getText() ) diff --git a/python/ql/lib/semmle/python/frameworks/Django.qll b/python/ql/lib/semmle/python/frameworks/Django.qll index 3e9fd8030ffe..064dba57f92a 100644 --- a/python/ql/lib/semmle/python/frameworks/Django.qll +++ b/python/ql/lib/semmle/python/frameworks/Django.qll @@ -2862,14 +2862,14 @@ module PrivateDjango { // // This also strongly implies that `mw` is in fact a Django middleware setting and // not just a variable named `MIDDLEWARE`. - list.getAnElt().(StrConst).getText() = + list.getAnElt().(StringLiteral).getText() = "django.contrib.auth.middleware.AuthenticationMiddleware" ) } override boolean getVerificationSetting() { if - list.getAnElt().(StrConst).getText() in [ + list.getAnElt().(StringLiteral).getText() in [ "django.middleware.csrf.CsrfViewMiddleware", // see https://github.com/mozilla/django-session-csrf "session_csrf.CsrfMiddleware" diff --git a/python/ql/lib/semmle/python/frameworks/FastApi.qll b/python/ql/lib/semmle/python/frameworks/FastApi.qll index cc5739c0cf7f..8c958e9343db 100644 --- a/python/ql/lib/semmle/python/frameworks/FastApi.qll +++ b/python/ql/lib/semmle/python/frameworks/FastApi.qll @@ -183,7 +183,7 @@ module FastApi { | exists(Assign assign | assign = cls.getAStmt() | assign.getATarget().(Name).getId() = "media_type" and - result = assign.getValue().(StrConst).getText() + result = assign.getValue().(StringLiteral).getText() ) or // TODO: this should use a proper MRO calculation instead @@ -372,7 +372,7 @@ module FastApi { headers.accesses(instance(), "headers") and this.calls(headers, "append") and keyArg in [this.getArg(0), this.getArgByName("key")] and - keyArg.getALocalSource().asExpr().(StrConst).getText().toLowerCase() = "set-cookie" + keyArg.getALocalSource().asExpr().(StringLiteral).getText().toLowerCase() = "set-cookie" ) } diff --git a/python/ql/lib/semmle/python/frameworks/Rsa.qll b/python/ql/lib/semmle/python/frameworks/Rsa.qll index 4b7142177f9b..0f0dd2d3d927 100644 --- a/python/ql/lib/semmle/python/frameworks/Rsa.qll +++ b/python/ql/lib/semmle/python/frameworks/Rsa.qll @@ -80,7 +80,7 @@ private module Rsa { result.getName() = "RSA" or // hashing part - exists(StrConst str, DataFlow::Node hashNameArg | + exists(StringLiteral str, DataFlow::Node hashNameArg | hashNameArg in [this.getArg(2), this.getArgByName("hash_method")] and DataFlow::exprNode(str) = hashNameArg.getALocalSource() and result.matchesName(str.getText()) @@ -132,7 +132,7 @@ private module Rsa { override DataFlow::Node getInitialization() { result = this } override Cryptography::CryptographicAlgorithm getAlgorithm() { - exists(StrConst str, DataFlow::Node hashNameArg | + exists(StringLiteral str, DataFlow::Node hashNameArg | hashNameArg in [this.getArg(1), this.getArgByName("method_name")] and DataFlow::exprNode(str) = hashNameArg.getALocalSource() and result.matchesName(str.getText()) diff --git a/python/ql/lib/semmle/python/frameworks/Stdlib.qll b/python/ql/lib/semmle/python/frameworks/Stdlib.qll index b674d10daf91..97c112f58b4a 100644 --- a/python/ql/lib/semmle/python/frameworks/Stdlib.qll +++ b/python/ql/lib/semmle/python/frameworks/Stdlib.qll @@ -2785,7 +2785,7 @@ module StdlibPrivate { /** Gets a call to `hashlib.new` with `algorithmName` as the first argument. */ private API::CallNode hashlibNewCall(string algorithmName) { algorithmName = - result.getParameter(0, "name").getAValueReachingSink().asExpr().(StrConst).getText() and + result.getParameter(0, "name").getAValueReachingSink().asExpr().(StringLiteral).getText() and result = API::moduleImport("hashlib").getMember("new").getACall() } @@ -2908,7 +2908,8 @@ module StdlibPrivate { exists(string algorithmName | result.matchesName(algorithmName) | this.getDigestArg().asSink() = hashlibMember(algorithmName).asSource() or - this.getDigestArg().getAValueReachingSink().asExpr().(StrConst).getText() = algorithmName + this.getDigestArg().getAValueReachingSink().asExpr().(StringLiteral).getText() = + algorithmName ) } @@ -4418,7 +4419,7 @@ module StdlibPrivate { override DataFlow::CallCfgNode getACall() { result.(DataFlow::MethodCallNode).getMethodName() = "pop" and - result.getArg(0).getALocalSource().asExpr().(StrConst).getText() = key + result.getArg(0).getALocalSource().asExpr().(StringLiteral).getText() = key } override DataFlow::ArgumentNode getACallback() { none() } @@ -4441,7 +4442,7 @@ module StdlibPrivate { override DataFlow::CallCfgNode getACall() { result.(DataFlow::MethodCallNode).getMethodName() = "get" and - result.getArg(0).getALocalSource().asExpr().(StrConst).getText() = key + result.getArg(0).getALocalSource().asExpr().(StringLiteral).getText() = key } override DataFlow::ArgumentNode getACallback() { none() } @@ -4541,7 +4542,7 @@ module StdlibPrivate { override DataFlow::CallCfgNode getACall() { result.(DataFlow::MethodCallNode).getMethodName() = "setdefault" and - result.getArg(0).getALocalSource().asExpr().(StrConst).getText() = key + result.getArg(0).getALocalSource().asExpr().(StringLiteral).getText() = key } override DataFlow::ArgumentNode getACallback() { none() } diff --git a/python/ql/lib/semmle/python/frameworks/Urllib3.qll b/python/ql/lib/semmle/python/frameworks/Urllib3.qll index 23332afc7aae..ee35fc9af0a9 100644 --- a/python/ql/lib/semmle/python/frameworks/Urllib3.qll +++ b/python/ql/lib/semmle/python/frameworks/Urllib3.qll @@ -78,7 +78,7 @@ module Urllib3 { // see https://urllib3.readthedocs.io/en/stable/user-guide.html?highlight=cert_reqs#certificate-verification disablingNode = constructor.getKeywordParameter("cert_reqs").asSink() and argumentOrigin = constructor.getKeywordParameter("cert_reqs").getAValueReachingSink() and - argumentOrigin.asExpr().(StrConst).getText() = "CERT_NONE" + argumentOrigin.asExpr().(StringLiteral).getText() = "CERT_NONE" or // assert_hostname // see https://urllib3.readthedocs.io/en/stable/reference/urllib3.connectionpool.html?highlight=assert_hostname#urllib3.HTTPSConnectionPool diff --git a/python/ql/lib/semmle/python/objects/Constants.qll b/python/ql/lib/semmle/python/objects/Constants.qll index 7813e3639adc..31b63399ff44 100644 --- a/python/ql/lib/semmle/python/objects/Constants.qll +++ b/python/ql/lib/semmle/python/objects/Constants.qll @@ -239,8 +239,8 @@ class UnicodeObjectInternal extends ConstantObjectInternal, TUnicode { override predicate introducedAt(ControlFlowNode node, PointsToContext context) { context.appliesTo(node) and - node.getNode().(StrConst).getText() = this.strValue() and - node.getNode().(StrConst).isUnicode() + node.getNode().(StringLiteral).getText() = this.strValue() and + node.getNode().(StringLiteral).isUnicode() } override ObjectInternal getClass() { result = TBuiltinClassObject(Builtin::special("unicode")) } @@ -272,8 +272,8 @@ class BytesObjectInternal extends ConstantObjectInternal, TBytes { override predicate introducedAt(ControlFlowNode node, PointsToContext context) { context.appliesTo(node) and - node.getNode().(StrConst).getText() = this.strValue() and - not node.getNode().(StrConst).isUnicode() + node.getNode().(StringLiteral).getText() = this.strValue() and + not node.getNode().(StringLiteral).isUnicode() } override ObjectInternal getClass() { result = TBuiltinClassObject(Builtin::special("bytes")) } diff --git a/python/ql/lib/semmle/python/objects/ObjectAPI.qll b/python/ql/lib/semmle/python/objects/ObjectAPI.qll index 3ac0f3818065..dc1363b2ebe2 100644 --- a/python/ql/lib/semmle/python/objects/ObjectAPI.qll +++ b/python/ql/lib/semmle/python/objects/ObjectAPI.qll @@ -201,7 +201,7 @@ class ModuleValue extends Value instanceof ModuleObjectInternal { ( not this.getPath().getExtension() = "py" or - exists(If i, Name name, StrConst main, Cmpop op | + exists(If i, Name name, StringLiteral main, Cmpop op | i.getScope() = this.getScope() and op instanceof Eq and i.getTest().(Compare).compares(name, op, main) and diff --git a/python/ql/lib/semmle/python/objects/TObject.qll b/python/ql/lib/semmle/python/objects/TObject.qll index 55f5bb0215f8..12b4dc901c39 100644 --- a/python/ql/lib/semmle/python/objects/TObject.qll +++ b/python/ql/lib/semmle/python/objects/TObject.qll @@ -84,7 +84,7 @@ newtype TObject = /** The unicode string `s` */ TUnicode(string s) { // Any string explicitly mentioned in the source code. - exists(StrConst str | + exists(StringLiteral str | s = str.getText() and str.isUnicode() ) @@ -100,7 +100,7 @@ newtype TObject = /** The byte string `s` */ TBytes(string s) { // Any string explicitly mentioned in the source code. - exists(StrConst str | + exists(StringLiteral str | s = str.getText() and not str.isUnicode() ) diff --git a/python/ql/lib/semmle/python/pointsto/Filters.qll b/python/ql/lib/semmle/python/pointsto/Filters.qll index 4ae756857301..f9e0229ef6f1 100644 --- a/python/ql/lib/semmle/python/pointsto/Filters.qll +++ b/python/ql/lib/semmle/python/pointsto/Filters.qll @@ -9,7 +9,7 @@ import python predicate hasattr(CallNode c, ControlFlowNode obj, string attr) { c.getFunction().getNode().(Name).getId() = "hasattr" and c.getArg(0) = obj and - c.getArg(1).getNode().(StrConst).getText() = attr + c.getArg(1).getNode().(StringLiteral).getText() = attr } /** Holds if `c` is a call to `isinstance(use, cls)`. */ diff --git a/python/ql/lib/semmle/python/pointsto/PointsTo.qll b/python/ql/lib/semmle/python/pointsto/PointsTo.qll index fb05e9b49ff6..56e8f6d6a63e 100644 --- a/python/ql/lib/semmle/python/pointsto/PointsTo.qll +++ b/python/ql/lib/semmle/python/pointsto/PointsTo.qll @@ -691,7 +691,7 @@ module PointsToInternal { sub.getObject() = sys_modules_flow and pointsTo(sys_modules_flow, _, ObjectInternal::sysModules(), _) and sub.getIndex() = n and - n.getNode().(StrConst).getText() = name and + n.getNode().(StringLiteral).getText() = name and sub.(DefinitionNode).getValue() = mod and pointsTo(mod, _, m, _) ) diff --git a/python/ql/lib/semmle/python/pointsto/PointsToContext.qll b/python/ql/lib/semmle/python/pointsto/PointsToContext.qll index 4bbc4001b4d0..d68ce93e5761 100644 --- a/python/ql/lib/semmle/python/pointsto/PointsToContext.qll +++ b/python/ql/lib/semmle/python/pointsto/PointsToContext.qll @@ -253,7 +253,7 @@ predicate executes_in_runtime_context(Function f) { } private predicate maybe_main(Module m) { - exists(If i, Compare cmp, Name name, StrConst main | m.getAStmt() = i and i.getTest() = cmp | + exists(If i, Compare cmp, Name name, StringLiteral main | m.getAStmt() = i and i.getTest() = cmp | cmp.compares(name, any(Eq eq), main) and name.getId() = "__name__" and main.getText() = "__main__" diff --git a/python/ql/lib/semmle/python/regex.qll b/python/ql/lib/semmle/python/regex.qll index 827f6b89e343..0c96e5049464 100644 --- a/python/ql/lib/semmle/python/regex.qll +++ b/python/ql/lib/semmle/python/regex.qll @@ -15,7 +15,7 @@ RegExpTerm getTermForExecution(Concepts::RegexExecution exec) { ) } -/** A StrConst used as a regular expression */ +/** A StringLiteral used as a regular expression */ deprecated class RegexString extends Regex { RegexString() { this = RegExpTracking::regExpSource(_).asExpr() } } diff --git a/python/ql/lib/semmle/python/regexp/RegexTreeView.qll b/python/ql/lib/semmle/python/regexp/RegexTreeView.qll index 1f8712d67636..a2952a5680bc 100644 --- a/python/ql/lib/semmle/python/regexp/RegexTreeView.qll +++ b/python/ql/lib/semmle/python/regexp/RegexTreeView.qll @@ -9,7 +9,7 @@ import Impl as RegexTreeView import Impl /** Gets the parse tree resulting from parsing `re`, if such has been constructed. */ -RegExpTerm getParsedRegExp(StrConst re) { result.getRegex() = re and result.isRootTerm() } +RegExpTerm getParsedRegExp(StringLiteral re) { result.getRegex() = re and result.isRootTerm() } /** * An element containing a regular expression term, that is, either @@ -230,7 +230,8 @@ module Impl implements RegexTreeViewSig { index > 0 and exists(int previousOffset | previousOffset = this.getPartOffset(index - 1) | result = - previousOffset + re.(StrConst).getImplicitlyConcatenatedPart(index - 1).getContentLength() + previousOffset + + re.(StringLiteral).getImplicitlyConcatenatedPart(index - 1).getContentLength() ) } @@ -240,7 +241,7 @@ module Impl implements RegexTreeViewSig { */ StringPart getPart(int localOffset) { exists(int index, int prefixLength | index = max(int i | this.getPartOffset(i) <= start) | - result = re.(StrConst).getImplicitlyConcatenatedPart(index) and + result = re.(StringLiteral).getImplicitlyConcatenatedPart(index) and result.contextSize(prefixLength, _) and // Example: // re.compile('...' r"""...this..""") diff --git a/python/ql/lib/semmle/python/regexp/internal/ParseRegExp.qll b/python/ql/lib/semmle/python/regexp/internal/ParseRegExp.qll index 4e2d76a8a998..6ac12e00e818 100644 --- a/python/ql/lib/semmle/python/regexp/internal/ParseRegExp.qll +++ b/python/ql/lib/semmle/python/regexp/internal/ParseRegExp.qll @@ -105,8 +105,8 @@ private module FindRegexMode { */ deprecated class Regex = RegExp; -/** A StrConst used as a regular expression */ -class RegExp extends Expr instanceof StrConst { +/** A StringLiteral used as a regular expression */ +class RegExp extends Expr instanceof StringLiteral { DataFlow::Node use; RegExp() { this = RegExpTracking::regExpSource(use).asExpr() } diff --git a/python/ql/lib/semmle/python/regexp/internal/RegExpTracking.qll b/python/ql/lib/semmle/python/regexp/internal/RegExpTracking.qll index 39d3e918de93..a48650f963ac 100644 --- a/python/ql/lib/semmle/python/regexp/internal/RegExpTracking.qll +++ b/python/ql/lib/semmle/python/regexp/internal/RegExpTracking.qll @@ -15,7 +15,7 @@ private import semmle.python.dataflow.new.DataFlow private import semmle.python.Concepts as Concepts /** Gets a constant string value that may be used as a regular expression. */ -DataFlow::LocalSourceNode strStart() { result.asExpr() instanceof StrConst } +DataFlow::LocalSourceNode strStart() { result.asExpr() instanceof StringLiteral } private import semmle.python.regex as Regex diff --git a/python/ql/lib/semmle/python/security/dataflow/LogInjectionCustomizations.qll b/python/ql/lib/semmle/python/security/dataflow/LogInjectionCustomizations.qll index 2e2c71ee53b6..2f582a7f67d4 100644 --- a/python/ql/lib/semmle/python/security/dataflow/LogInjectionCustomizations.qll +++ b/python/ql/lib/semmle/python/security/dataflow/LogInjectionCustomizations.qll @@ -90,7 +90,7 @@ module LogInjection { // TODO: Consider rewriting using flow states. ReplaceLineBreaksSanitizer() { this.getFunction().(DataFlow::AttrRead).getAttributeName() = "replace" and - this.getArg(0).asExpr().(StrConst).getText() in ["\r\n", "\n"] + this.getArg(0).asExpr().(StringLiteral).getText() in ["\r\n", "\n"] } } } diff --git a/python/ql/lib/semmle/python/security/dataflow/PamAuthorizationCustomizations.qll b/python/ql/lib/semmle/python/security/dataflow/PamAuthorizationCustomizations.qll index b3acdef6ef5c..afba208e0e45 100644 --- a/python/ql/lib/semmle/python/security/dataflow/PamAuthorizationCustomizations.qll +++ b/python/ql/lib/semmle/python/security/dataflow/PamAuthorizationCustomizations.qll @@ -20,7 +20,7 @@ module PamAuthorizationCustomizations { exists(API::CallNode findLibCall, API::CallNode cdllCall | findLibCall = API::moduleImport("ctypes").getMember("util").getMember("find_library").getACall() and - findLibCall.getParameter(0).getAValueReachingSink().asExpr().(StrConst).getText() = "pam" and + findLibCall.getParameter(0).getAValueReachingSink().asExpr().(StringLiteral).getText() = "pam" and cdllCall = API::moduleImport("ctypes").getMember("CDLL").getACall() and cdllCall.getParameter(0).getAValueReachingSink() = findLibCall | diff --git a/python/ql/lib/semmle/python/security/dataflow/ServerSideRequestForgeryCustomizations.qll b/python/ql/lib/semmle/python/security/dataflow/ServerSideRequestForgeryCustomizations.qll index 82dfb9ebec27..a462752b3194 100644 --- a/python/ql/lib/semmle/python/security/dataflow/ServerSideRequestForgeryCustomizations.qll +++ b/python/ql/lib/semmle/python/security/dataflow/ServerSideRequestForgeryCustomizations.qll @@ -88,7 +88,9 @@ module ServerSideRequestForgery { exists(BinaryExprNode add | add.getOp() instanceof Add and add.getRight() = this.asCfgNode() and - not add.getLeft().getNode().(StrConst).getText().toLowerCase() in ["http://", "https://"] + not add.getLeft().getNode().(StringLiteral).getText().toLowerCase() in [ + "http://", "https://" + ] ) or // % formatting @@ -97,7 +99,7 @@ module ServerSideRequestForgery { fmt.getRight() = this.asCfgNode() and // detecting %-formatting is not super easy, so we simplify it to only handle // when there is a **single** substitution going on. - not fmt.getLeft().getNode().(StrConst).getText().regexpMatch("^(?i)https?://%s[^%]*$") + not fmt.getLeft().getNode().(StringLiteral).getText().regexpMatch("^(?i)https?://%s[^%]*$") ) or // arguments to a format call @@ -106,9 +108,9 @@ module ServerSideRequestForgery { | call.getMethodName() = "format" and ( - if call.getObject().asExpr().(StrConst).getText().regexpMatch(httpPrefixRe) + if call.getObject().asExpr().(StringLiteral).getText().regexpMatch(httpPrefixRe) then - exists(string text | text = call.getObject().asExpr().(StrConst).getText() | + exists(string text | text = call.getObject().asExpr().(StringLiteral).getText() | // `http://{}...` exists(text.regexpCapture(httpPrefixRe, 1)) and this in [call.getArg(any(int i | i >= 1)), call.getArgByName(_)] @@ -129,7 +131,7 @@ module ServerSideRequestForgery { or // f-string exists(Fstring fstring | - if fstring.getValue(0).(StrConst).getText().toLowerCase() in ["http://", "https://"] + if fstring.getValue(0).(StringLiteral).getText().toLowerCase() in ["http://", "https://"] then fstring.getValue(any(int i | i >= 2)) = this.asExpr() else fstring.getValue(any(int i | i >= 1)) = this.asExpr() ) diff --git a/python/ql/lib/semmle/python/security/dataflow/TarSlipCustomizations.qll b/python/ql/lib/semmle/python/security/dataflow/TarSlipCustomizations.qll index 442d6e8ebb4f..2dbe2c542aee 100644 --- a/python/ql/lib/semmle/python/security/dataflow/TarSlipCustomizations.qll +++ b/python/ql/lib/semmle/python/security/dataflow/TarSlipCustomizations.qll @@ -39,7 +39,7 @@ module TarSlip { this = API::moduleImport("tarfile").getMember("open").getACall() and // If argument refers to a string object, then it's a hardcoded path and // this tarfile is safe. - not this.(DataFlow::CallCfgNode).getArg(0).getALocalSource().asExpr() instanceof StrConst and + not this.(DataFlow::CallCfgNode).getArg(0).getALocalSource().asExpr() instanceof StringLiteral and // Ignore opens within the tarfile module itself not this.getLocation().getFile().getBaseName() = "tarfile.py" } @@ -70,7 +70,7 @@ module TarSlip { exists(Expr filterValue | filterValue = call.getParameter(4, "filter").getAValueReachingSink().asExpr() and ( - filterValue.(StrConst).getText() = "fully_trusted" + filterValue.(StringLiteral).getText() = "fully_trusted" or filterValue instanceof None ) diff --git a/python/ql/lib/semmle/python/security/dataflow/UnsafeShellCommandConstructionCustomizations.qll b/python/ql/lib/semmle/python/security/dataflow/UnsafeShellCommandConstructionCustomizations.qll index 6d245f472de3..1e35b8c428c9 100644 --- a/python/ql/lib/semmle/python/security/dataflow/UnsafeShellCommandConstructionCustomizations.qll +++ b/python/ql/lib/semmle/python/security/dataflow/UnsafeShellCommandConstructionCustomizations.qll @@ -33,7 +33,7 @@ module UnsafeShellCommandConstruction { /** A sink for shell command constructed from library input vulnerabilities. */ abstract class Sink extends DataFlow::Node { - Sink() { not this.asExpr() instanceof StrConst } // filter out string constants, makes testing easier + Sink() { not this.asExpr() instanceof StringLiteral } // filter out string constants, makes testing easier /** Gets a description of how the string in this sink was constructed. */ abstract string describe(); @@ -113,7 +113,7 @@ module UnsafeShellCommandConstruction { ArrayJoin() { call.getMethodName() = "join" and - unique( | | call.getArg(_)).asExpr().(Str).getText() = " " and + unique( | | call.getArg(_)).asExpr().(StringLiteral).getText() = " " and isUsedAsShellCommand(call, s) and ( this = call.getArg(0) and diff --git a/python/ql/lib/semmle/python/security/dataflow/UrlRedirectCustomizations.qll b/python/ql/lib/semmle/python/security/dataflow/UrlRedirectCustomizations.qll index 8a9f54b50850..f765386010c6 100644 --- a/python/ql/lib/semmle/python/security/dataflow/UrlRedirectCustomizations.qll +++ b/python/ql/lib/semmle/python/security/dataflow/UrlRedirectCustomizations.qll @@ -118,8 +118,8 @@ module UrlRedirect { ReplaceBackslashesSanitizer() { this.calls(receiver, "replace") and - this.getArg(0).asExpr().(StrConst).getText() = "\\" and - this.getArg(1).asExpr().(StrConst).getText() in ["/", ""] + this.getArg(0).asExpr().(StringLiteral).getText() = "\\" and + this.getArg(1).asExpr().(StringLiteral).getText() in ["/", ""] } override predicate sanitizes(FlowState state) { state instanceof MayContainBackslashes } diff --git a/python/ql/lib/semmle/python/strings.qll b/python/ql/lib/semmle/python/strings.qll index c8a134736d3b..6db098c07b56 100644 --- a/python/ql/lib/semmle/python/strings.qll +++ b/python/ql/lib/semmle/python/strings.qll @@ -1,10 +1,10 @@ import python -predicate format_string(StrConst e) { +predicate format_string(StringLiteral e) { exists(BinaryExpr b | b.getOp() instanceof Mod and b.getLeft() = e) } -predicate mapping_format(StrConst e) { +predicate mapping_format(StringLiteral e) { conversion_specifier(e, _).regexpMatch("%\\([A-Z_a-z0-9]+\\).*") } @@ -17,18 +17,18 @@ predicate mapping_format(StrConst e) { * TYPE = "[bdiouxXeEfFgGcrs%]" */ -private string conversion_specifier_string(StrConst e, int number, int position) { +private string conversion_specifier_string(StringLiteral e, int number, int position) { exists(string s, string regex | s = e.getText() | regex = "%(\\([^)]*\\))?[#0\\- +]*(\\*|[0-9]*)(\\.(\\*|[0-9]*))?(h|H|l|L)?[badiouxXeEfFgGcrs%]" and result = s.regexpFind(regex, number, position) ) } -private string conversion_specifier(StrConst e, int number) { +private string conversion_specifier(StringLiteral e, int number) { result = conversion_specifier_string(e, number, _) and result != "%%" } -int illegal_conversion_specifier(StrConst e) { +int illegal_conversion_specifier(StringLiteral e) { format_string(e) and "%" = e.getText().charAt(result) and // not the start of a conversion specifier or the second % of a %% @@ -37,7 +37,7 @@ int illegal_conversion_specifier(StrConst e) { } /** Gets the number of format items in a format string */ -int format_items(StrConst e) { +int format_items(StringLiteral e) { result = count(int i | | conversion_specifier(e, i)) + // a conversion specifier uses an extra item for each * @@ -47,7 +47,7 @@ int format_items(StrConst e) { private string str(Expr e) { result = e.(Num).getN() or - result = "'" + e.(StrConst).getText() + "'" + result = "'" + e.(StringLiteral).getText() + "'" } /** Gets a string representation of an expression more suited for embedding in message strings than .toString() */ diff --git a/python/ql/lib/semmle/python/types/ModuleKind.qll b/python/ql/lib/semmle/python/types/ModuleKind.qll index edb582b3627f..ef44d80701ec 100644 --- a/python/ql/lib/semmle/python/types/ModuleKind.qll +++ b/python/ql/lib/semmle/python/types/ModuleKind.qll @@ -15,7 +15,7 @@ private predicate is_script(ModuleObject m) { ( m.getModule().getFile().getExtension() != ".py" or - exists(If i, Name name, StrConst main, Cmpop op | + exists(If i, Name name, StringLiteral main, Cmpop op | i.getScope() = m.getModule() and op instanceof Eq and i.getTest().(Compare).compares(name, op, main) and diff --git a/python/ql/lib/semmle/python/types/Object.qll b/python/ql/lib/semmle/python/types/Object.qll index b408fc7ba1cb..6c76067dc68e 100644 --- a/python/ql/lib/semmle/python/types/Object.qll +++ b/python/ql/lib/semmle/python/types/Object.qll @@ -9,7 +9,7 @@ private predicate is_an_object(@py_object obj) { /* CFG nodes for numeric literals, all of which have a @py_cobject for the value of that literal */ obj instanceof ControlFlowNode and not obj.(ControlFlowNode).getNode() instanceof IntegerLiteral and - not obj.(ControlFlowNode).getNode() instanceof StrConst + not obj.(ControlFlowNode).getNode() instanceof StringLiteral or obj instanceof Builtin } diff --git a/python/ql/src/Expressions/DuplicateKeyInDictionaryLiteral.ql b/python/ql/src/Expressions/DuplicateKeyInDictionaryLiteral.ql index 61046863718c..7a5399700ec7 100644 --- a/python/ql/src/Expressions/DuplicateKeyInDictionaryLiteral.ql +++ b/python/ql/src/Expressions/DuplicateKeyInDictionaryLiteral.ql @@ -22,7 +22,7 @@ predicate dict_key(Dict d, Expr k, string s) { // We use � to mark unrepresentable characters // so two instances of � may represent different strings in the source code not "�" = s.charAt(_) and - exists(StrConst c | c = k | + exists(StringLiteral c | c = k | s = "u\"" + c.getText() + "\"" and c.isUnicode() or s = "b\"" + c.getText() + "\"" and not c.isUnicode() diff --git a/python/ql/src/Expressions/Formatting/AdvancedFormatting.qll b/python/ql/src/Expressions/Formatting/AdvancedFormatting.qll index 1ba8a1843d99..7da80ffa0278 100644 --- a/python/ql/src/Expressions/Formatting/AdvancedFormatting.qll +++ b/python/ql/src/Expressions/Formatting/AdvancedFormatting.qll @@ -1,7 +1,7 @@ import python /** A string constant that looks like it may be used in string formatting operations. */ -class PossibleAdvancedFormatString extends StrConst { +class PossibleAdvancedFormatString extends StringLiteral { PossibleAdvancedFormatString() { this.getText().matches("%{%}%") } private predicate field(int start, int end) { diff --git a/python/ql/src/Expressions/IncorrectComparisonUsingIs.ql b/python/ql/src/Expressions/IncorrectComparisonUsingIs.ql index aab2ba6bfa1e..a60430aa4c1c 100644 --- a/python/ql/src/Expressions/IncorrectComparisonUsingIs.ql +++ b/python/ql/src/Expressions/IncorrectComparisonUsingIs.ql @@ -21,7 +21,7 @@ predicate comparison_using_is(Compare comp, ControlFlowNode left, Cmpop op, Cont } private predicate cpython_interned_value(Expr e) { - exists(string text | text = e.(StrConst).getText() | + exists(string text | text = e.(StringLiteral).getText() | text.length() = 0 or text.length() = 1 and text.regexpMatch("[U+0000-U+00ff]") @@ -34,7 +34,7 @@ private predicate cpython_interned_value(Expr e) { predicate uninterned_literal(Expr e) { ( - e instanceof StrConst + e instanceof StringLiteral or e instanceof IntegerLiteral or diff --git a/python/ql/src/Expressions/IsComparisons.qll b/python/ql/src/Expressions/IsComparisons.qll index b6f06b30108f..7825d01999b9 100644 --- a/python/ql/src/Expressions/IsComparisons.qll +++ b/python/ql/src/Expressions/IsComparisons.qll @@ -49,7 +49,7 @@ predicate simple_constant(ControlFlowNode f) { } private predicate cpython_interned_value(Expr e) { - exists(string text | text = e.(StrConst).getText() | + exists(string text | text = e.(StringLiteral).getText() | text.length() = 0 or text.length() = 1 and text.regexpMatch("[U+0000-U+00ff]") @@ -70,7 +70,7 @@ private predicate universally_interned_value(Expr e) { or exists(Tuple t | t = e and not exists(t.getAnElt())) or - e.(StrConst).getText() = "" + e.(StringLiteral).getText() = "" } /** Holds if the expression `e` points to an interned constant in CPython. */ diff --git a/python/ql/src/Expressions/UnintentionalImplicitStringConcatenation.ql b/python/ql/src/Expressions/UnintentionalImplicitStringConcatenation.ql index 9547d0045cae..f653db40571d 100644 --- a/python/ql/src/Expressions/UnintentionalImplicitStringConcatenation.ql +++ b/python/ql/src/Expressions/UnintentionalImplicitStringConcatenation.ql @@ -15,12 +15,12 @@ import python predicate string_const(Expr s) { - s instanceof StrConst + s instanceof StringLiteral or string_const(s.(BinaryExpr).getLeft()) and string_const(s.(BinaryExpr).getRight()) } -from StrConst s +from StringLiteral s where // Implicitly concatenated string is in a list and that list contains at least one other string. exists(List l, Expr other | diff --git a/python/ql/src/Expressions/WrongNumberArgumentsForFormat.ql b/python/ql/src/Expressions/WrongNumberArgumentsForFormat.ql index 2bf67102ff3e..2a6d3f62be86 100644 --- a/python/ql/src/Expressions/WrongNumberArgumentsForFormat.ql +++ b/python/ql/src/Expressions/WrongNumberArgumentsForFormat.ql @@ -15,7 +15,7 @@ import python import semmle.python.strings -predicate string_format(BinaryExpr operation, StrConst str, Value args, AstNode origin) { +predicate string_format(BinaryExpr operation, StringLiteral str, Value args, AstNode origin) { operation.getOp() instanceof Mod and exists(Context ctx | operation.getLeft().pointsTo(ctx, _, str) and @@ -34,7 +34,7 @@ int sequence_length(Value args) { } from - BinaryExpr operation, StrConst fmt, Value args, int slen, int alen, AstNode origin, + BinaryExpr operation, StringLiteral fmt, Value args, int slen, int alen, AstNode origin, string provided where string_format(operation, fmt, args, origin) and diff --git a/python/ql/src/Imports/UnusedImport.ql b/python/ql/src/Imports/UnusedImport.ql index e9c2dbe839d9..787ec019f579 100644 --- a/python/ql/src/Imports/UnusedImport.ql +++ b/python/ql/src/Imports/UnusedImport.ql @@ -53,7 +53,7 @@ predicate imported_module_used_in_doctest(Import imp) { pragma[noinline] private string doctest_in_scope(Scope scope) { - exists(StrConst doc | + exists(StringLiteral doc | doc.getEnclosingModule() = scope and doc.isDocString() and result = doc.getText() and @@ -63,7 +63,7 @@ private string doctest_in_scope(Scope scope) { pragma[noinline] private string typehint_annotation_in_module(Module module_scope) { - exists(StrConst annotation | + exists(StringLiteral annotation | annotation = any(Arguments a).getAnAnnotation().getASubExpression*() or annotation = any(AnnAssign a).getAnnotation().getASubExpression*() diff --git a/python/ql/src/Security/CVE-2018-1281/BindToAllInterfaces.ql b/python/ql/src/Security/CVE-2018-1281/BindToAllInterfaces.ql index 5751c23493eb..5e2e27b3bf40 100644 --- a/python/ql/src/Security/CVE-2018-1281/BindToAllInterfaces.ql +++ b/python/ql/src/Security/CVE-2018-1281/BindToAllInterfaces.ql @@ -29,9 +29,9 @@ private string vulnerableHostname() { /** Gets a reference to a hostname that can be used to bind to all interfaces. */ private DataFlow::TypeTrackingNode vulnerableHostnameRef(DataFlow::TypeTracker t, string hostname) { t.start() and - exists(StrConst allInterfacesStrConst | hostname = vulnerableHostname() | - allInterfacesStrConst.getText() = hostname and - result.asExpr() = allInterfacesStrConst + exists(StringLiteral allInterfacesStringLiteral | hostname = vulnerableHostname() | + allInterfacesStringLiteral.getText() = hostname and + result.asExpr() = allInterfacesStringLiteral ) or exists(DataFlow::TypeTracker t2 | result = vulnerableHostnameRef(t2, hostname).track(t2, t)) diff --git a/python/ql/src/Security/CWE-020/IncompleteUrlSubstringSanitization.ql b/python/ql/src/Security/CWE-020/IncompleteUrlSubstringSanitization.ql index 6bf97d50bf5f..5ab77438d637 100644 --- a/python/ql/src/Security/CWE-020/IncompleteUrlSubstringSanitization.ql +++ b/python/ql/src/Security/CWE-020/IncompleteUrlSubstringSanitization.ql @@ -16,7 +16,7 @@ import semmle.python.regex private string commonTopLevelDomainRegex() { result = "com|org|edu|gov|uk|net|io" } -predicate looksLikeUrl(StrConst s) { +predicate looksLikeUrl(StringLiteral s) { exists(string text | text = s.getText() | text.regexpMatch("(?i)([a-z]*:?//)?\\.?([a-z0-9-]+\\.)+(" + commonTopLevelDomainRegex() + ")(:[0-9]+)?/?") @@ -26,7 +26,7 @@ predicate looksLikeUrl(StrConst s) { ) } -predicate incomplete_sanitization(Expr sanitizer, StrConst url) { +predicate incomplete_sanitization(Expr sanitizer, StringLiteral url) { looksLikeUrl(url) and ( sanitizer.(Compare).compares(url, any(In i), _) @@ -37,19 +37,19 @@ predicate incomplete_sanitization(Expr sanitizer, StrConst url) { ) } -predicate unsafe_call_to_startswith(Call sanitizer, StrConst url) { +predicate unsafe_call_to_startswith(Call sanitizer, StringLiteral url) { sanitizer.getFunc().(Attribute).getName() = "startswith" and sanitizer.getArg(0) = url and not url.getText().regexpMatch("(?i)https?://[\\.a-z0-9-]+/.*") } -predicate unsafe_call_to_endswith(Call sanitizer, StrConst url) { +predicate unsafe_call_to_endswith(Call sanitizer, StringLiteral url) { sanitizer.getFunc().(Attribute).getName() = "endswith" and sanitizer.getArg(0) = url and not url.getText().regexpMatch("(?i)\\.([a-z0-9-]+)(\\.[a-z0-9-]+)+") } -from Expr sanitizer, StrConst url +from Expr sanitizer, StringLiteral url where incomplete_sanitization(sanitizer, url) select sanitizer, "The string $@ may be at an arbitrary position in the sanitized URL.", url, url.getText() diff --git a/python/ql/src/Security/CWE-798/HardcodedCredentials.ql b/python/ql/src/Security/CWE-798/HardcodedCredentials.ql index 04197b136103..4a2ff24a2f28 100644 --- a/python/ql/src/Security/CWE-798/HardcodedCredentials.ql +++ b/python/ql/src/Security/CWE-798/HardcodedCredentials.ql @@ -20,7 +20,7 @@ private import semmle.python.dataflow.new.internal.DataFlowDispatch as DataFlowD private import semmle.python.dataflow.new.internal.Builtins::Builtins as Builtins bindingset[char, fraction] -predicate fewer_characters_than(StrConst str, string char, float fraction) { +predicate fewer_characters_than(StringLiteral str, string char, float fraction) { exists(string text, int chars | text = str.getText() and chars = count(int i | text.charAt(i) = char) @@ -41,15 +41,15 @@ predicate possible_reflective_name(string name) { exists(Builtins::likelyBuiltin(name)) } -int char_count(StrConst str) { result = count(string c | c = str.getText().charAt(_)) } +int char_count(StringLiteral str) { result = count(string c | c = str.getText().charAt(_)) } -predicate capitalized_word(StrConst str) { str.getText().regexpMatch("[A-Z][a-z]+") } +predicate capitalized_word(StringLiteral str) { str.getText().regexpMatch("[A-Z][a-z]+") } -predicate format_string(StrConst str) { str.getText().matches("%{%}%") } +predicate format_string(StringLiteral str) { str.getText().matches("%{%}%") } predicate maybeCredential(ControlFlowNode f) { /* A string that is not too short and unlikely to be text or an identifier. */ - exists(StrConst str | str = f.getNode() | + exists(StringLiteral str | str = f.getNode() | /* At least 10 characters */ str.getText().length() > 9 and /* Not too much whitespace */ diff --git a/python/ql/src/Statements/AssertLiteralConstant.ql b/python/ql/src/Statements/AssertLiteralConstant.ql index 372b25fd10da..73bd16458589 100644 --- a/python/ql/src/Statements/AssertLiteralConstant.ql +++ b/python/ql/src/Statements/AssertLiteralConstant.ql @@ -21,7 +21,7 @@ where exists(Expr test | test = a.getTest() | value = test.(IntegerLiteral).getN() or - value = "\"" + test.(StrConst).getS() + "\"" + value = "\"" + test.(StringLiteral).getS() + "\"" or value = test.(NameConstant).toString() ) and diff --git a/python/ql/src/Statements/StatementNoEffect.ql b/python/ql/src/Statements/StatementNoEffect.ql index 5343b3e866f0..72a9c91f8aeb 100644 --- a/python/ql/src/Statements/StatementNoEffect.ql +++ b/python/ql/src/Statements/StatementNoEffect.ql @@ -121,7 +121,7 @@ predicate python2_print(Expr e) { predicate no_effect(Expr e) { // strings can be used as comments - not e instanceof StrConst and + not e instanceof StringLiteral and not e.hasSideEffects() and forall(Expr sub | sub = e.getASubExpression*() | not side_effecting_binary(sub) and diff --git a/python/ql/src/Statements/TopLevelPrint.ql b/python/ql/src/Statements/TopLevelPrint.ql index 8d35c7c942b6..068bd594f745 100644 --- a/python/ql/src/Statements/TopLevelPrint.ql +++ b/python/ql/src/Statements/TopLevelPrint.ql @@ -14,7 +14,7 @@ import python predicate main_eq_name(If i) { - exists(Name n, StrConst m, Compare c | + exists(Name n, StringLiteral m, Compare c | i.getTest() = c and c.getLeft() = n and c.getAComparator() = m and diff --git a/python/ql/src/Variables/Loop.qll b/python/ql/src/Variables/Loop.qll index be19d4077c4c..c7749fe476bf 100644 --- a/python/ql/src/Variables/Loop.qll +++ b/python/ql/src/Variables/Loop.qll @@ -9,7 +9,7 @@ private predicate empty_sequence(Expr e) { or e instanceof Tuple and not exists(e.(Tuple).getAnElt()) or - e.(StrConst).getText().length() = 0 + e.(StringLiteral).getText().length() = 0 } /* This has the potential for refinement, but we err on the side of fewer false positives for now. */ diff --git a/python/ql/src/Variables/MonkeyPatched.qll b/python/ql/src/Variables/MonkeyPatched.qll index d06731f5223f..ab842afbf265 100644 --- a/python/ql/src/Variables/MonkeyPatched.qll +++ b/python/ql/src/Variables/MonkeyPatched.qll @@ -1,7 +1,7 @@ import python predicate monkey_patched_builtin(string name) { - exists(AttrNode attr, SubscriptNode subscr, StrConst s | + exists(AttrNode attr, SubscriptNode subscr, StringLiteral s | subscr.isStore() and subscr.getIndex().getNode() = s and s.getText() = name and @@ -9,7 +9,7 @@ predicate monkey_patched_builtin(string name) { attr.getObject("__dict__").pointsTo(Module::builtinModule()) ) or - exists(CallNode call, ControlFlowNode bltn, StrConst s | + exists(CallNode call, ControlFlowNode bltn, StringLiteral s | call.getArg(0) = bltn and bltn.pointsTo(Module::builtinModule()) and call.getArg(1).getNode() = s and diff --git a/python/ql/src/Variables/MultiplyDefined.ql b/python/ql/src/Variables/MultiplyDefined.ql index a045dd6e8fa5..7d0e76fb6c30 100644 --- a/python/ql/src/Variables/MultiplyDefined.ql +++ b/python/ql/src/Variables/MultiplyDefined.ql @@ -43,7 +43,7 @@ predicate simple_literal(Expr e) { or e instanceof Dict and not exists(e.(Dict).getAKey()) or - e.(StrConst).getText() = "" + e.(StringLiteral).getText() = "" } /** diff --git a/python/ql/src/Variables/UndefinedExport.ql b/python/ql/src/Variables/UndefinedExport.ql index c57925cb5912..537828616e57 100644 --- a/python/ql/src/Variables/UndefinedExport.ql +++ b/python/ql/src/Variables/UndefinedExport.ql @@ -14,7 +14,7 @@ import python /** Whether name is declared in the __all__ list of this module */ -predicate declaredInAll(Module m, StrConst name) { +predicate declaredInAll(Module m, StringLiteral name) { exists(Assign a, GlobalVariable all | a.defines(all) and a.getScope() = m and @@ -70,7 +70,7 @@ predicate contains_unknown_import_star(ModuleValue m) { ) } -from ModuleValue m, StrConst name, string exported_name +from ModuleValue m, StringLiteral name, string exported_name where declaredInAll(m.getScope(), name) and exported_name = name.getText() and diff --git a/python/ql/src/Variables/UnusedModuleVariable.ql b/python/ql/src/Variables/UnusedModuleVariable.ql index 543f17f6f35a..869c31cb4fa1 100644 --- a/python/ql/src/Variables/UnusedModuleVariable.ql +++ b/python/ql/src/Variables/UnusedModuleVariable.ql @@ -24,7 +24,7 @@ predicate complex_all(Module m) { | not a.getValue() instanceof List or - exists(Expr e | e = a.getValue().(List).getAnElt() | not e instanceof StrConst) + exists(Expr e | e = a.getValue().(List).getAnElt() | not e instanceof StringLiteral) ) or exists(Call c, GlobalVariable all | diff --git a/python/ql/src/experimental/Security/CWE-287-ConstantSecretKey/WebAppConstantSecretKeyFlask.qll b/python/ql/src/experimental/Security/CWE-287-ConstantSecretKey/WebAppConstantSecretKeyFlask.qll index b9068b2cdeaf..139f3e58f243 100644 --- a/python/ql/src/experimental/Security/CWE-287-ConstantSecretKey/WebAppConstantSecretKeyFlask.qll +++ b/python/ql/src/experimental/Security/CWE-287-ConstantSecretKey/WebAppConstantSecretKeyFlask.qll @@ -121,7 +121,7 @@ module FlaskConstantSecretKeyConfig { .getACall() and result = [ - cn.getParameter(0).getAValueReachingSink().asExpr().(StrConst).getText(), + cn.getParameter(0).getAValueReachingSink().asExpr().(StringLiteral).getText(), cn.getParameter(0).asSink().asExpr().(Name).getId() ] } @@ -134,6 +134,6 @@ module FlaskConstantSecretKeyConfig { .getASuccessor*() .getMember("from_object") .getACall() and - result = cn.getParameter(0).asSink().asExpr().(StrConst).getText() + result = cn.getParameter(0).asSink().asExpr().(StringLiteral).getText() } } diff --git a/python/ql/src/experimental/Security/CWE-287-ConstantSecretKey/WebAppConstantSecretKeySource.qll b/python/ql/src/experimental/Security/CWE-287-ConstantSecretKey/WebAppConstantSecretKeySource.qll index ab176bf7f2e3..21f042d42db7 100644 --- a/python/ql/src/experimental/Security/CWE-287-ConstantSecretKey/WebAppConstantSecretKeySource.qll +++ b/python/ql/src/experimental/Security/CWE-287-ConstantSecretKey/WebAppConstantSecretKeySource.qll @@ -11,12 +11,12 @@ class WebAppConstantSecretKeySource extends DataFlow::Node { env = API::moduleImport("environ").getMember("Env") and // has default value exists(API::Node param | param = env.getKeywordParameter("SECRET_KEY") | - param.asSink().asExpr().getASubExpression*() instanceof StrConst + param.asSink().asExpr().getASubExpression*() instanceof StringLiteral ) and this = env.getReturn().getReturn().asSource() ) or - this.asExpr() instanceof StrConst + this.asExpr() instanceof StringLiteral or exists(API::CallNode cn | cn = @@ -25,7 +25,8 @@ class WebAppConstantSecretKeySource extends DataFlow::Node { API::moduleImport("os").getMember("environ").getMember("get").getACall() ] and cn.getNumArgument() = 2 and - DataFlow::localFlow(any(DataFlow::Node n | n.asExpr() instanceof StrConst), cn.getArg(1)) and + DataFlow::localFlow(any(DataFlow::Node n | n.asExpr() instanceof StringLiteral), + cn.getArg(1)) and this.asExpr() = cn.asExpr() ) ) and diff --git a/python/ql/src/experimental/Security/CWE-287/ImproperLdapAuth.ql b/python/ql/src/experimental/Security/CWE-287/ImproperLdapAuth.ql index 22fc39f09f58..14008dff8d4f 100644 --- a/python/ql/src/experimental/Security/CWE-287/ImproperLdapAuth.ql +++ b/python/ql/src/experimental/Security/CWE-287/ImproperLdapAuth.ql @@ -20,7 +20,7 @@ predicate authenticatesImproperly(LdapBind ldapBind) { not exists(ldapBind.getPassword()) ) or - exists(StrConst emptyString | + exists(StringLiteral emptyString | emptyString.getText() = "" and DataFlow::localFlow(DataFlow::exprNode(emptyString), ldapBind.getPassword()) ) diff --git a/python/ql/src/experimental/Security/CWE-327/Azure/UnsafeUsageOfClientSideEncryptionVersion.ql b/python/ql/src/experimental/Security/CWE-327/Azure/UnsafeUsageOfClientSideEncryptionVersion.ql index b23ca4b0bc66..c548eac68364 100644 --- a/python/ql/src/experimental/Security/CWE-327/Azure/UnsafeUsageOfClientSideEncryptionVersion.ql +++ b/python/ql/src/experimental/Security/CWE-327/Azure/UnsafeUsageOfClientSideEncryptionVersion.ql @@ -109,7 +109,7 @@ private module AzureBlobClientConfig implements DataFlow::StateConfigSig { exists(DataFlow::AttrWrite attr | node = anyClient(_).getAValueReachableFromSource() and attr.accesses(node, "encryption_version") and - attr.getValue().asExpr().(StrConst).getText() in ["'2.0'", "2.0"] + attr.getValue().asExpr().(StringLiteral).getText() in ["'2.0'", "2.0"] ) or // small optimization to block flow with no encryption out of the post-update node diff --git a/python/ql/src/experimental/Security/CWE-348/ClientSuppliedIpUsedInSecurityCheck.ql b/python/ql/src/experimental/Security/CWE-348/ClientSuppliedIpUsedInSecurityCheck.ql index 51d6c9b66524..219192ce45db 100644 --- a/python/ql/src/experimental/Security/CWE-348/ClientSuppliedIpUsedInSecurityCheck.ql +++ b/python/ql/src/experimental/Security/CWE-348/ClientSuppliedIpUsedInSecurityCheck.ql @@ -41,7 +41,7 @@ private module ClientSuppliedIpUsedInSecurityCheckConfig implements DataFlow::Co exists(Subscript ss | not ss.getIndex().(IntegerLiteral).getText() = "0" and ss.getObject().(Call).getFunc().(Attribute).getName() = "split" and - ss.getObject().(Call).getAnArg().(StrConst).getText() = "," and + ss.getObject().(Call).getAnArg().(StringLiteral).getText() = "," and ss = node.asExpr() ) } diff --git a/python/ql/src/experimental/Security/CWE-348/ClientSuppliedIpUsedInSecurityCheckLib.qll b/python/ql/src/experimental/Security/CWE-348/ClientSuppliedIpUsedInSecurityCheckLib.qll index 9167e300ac5b..3d6ff03d3e44 100644 --- a/python/ql/src/experimental/Security/CWE-348/ClientSuppliedIpUsedInSecurityCheckLib.qll +++ b/python/ql/src/experimental/Security/CWE-348/ClientSuppliedIpUsedInSecurityCheckLib.qll @@ -20,7 +20,7 @@ private class FlaskClientSuppliedIpUsedInSecurityCheck extends ClientSuppliedIpU { FlaskClientSuppliedIpUsedInSecurityCheck() { this = Flask::request().getMember("headers").getMember(["get", "get_all", "getlist"]).getACall() and - this.getArg(0).asExpr().(StrConst).getText().toLowerCase() = clientIpParameterName() + this.getArg(0).asExpr().(StringLiteral).getText().toLowerCase() = clientIpParameterName() } } @@ -35,7 +35,7 @@ private class DjangoClientSuppliedIpUsedInSecurityCheck extends ClientSuppliedIp headers.getAttributeName() in ["headers", "META"] and this.calls(headers, "get") ) and - this.getArg(0).asExpr().(StrConst).getText().toLowerCase() = clientIpParameterName() + this.getArg(0).asExpr().(StringLiteral).getText().toLowerCase() = clientIpParameterName() } } @@ -54,7 +54,7 @@ private class TornadoClientSuppliedIpUsedInSecurityCheck extends ClientSuppliedI headers.getAttributeName() = "headers" and this.calls(headers, ["get", "get_list"]) ) and - this.getArg(0).asExpr().(StrConst).getText().toLowerCase() = clientIpParameterName() + this.getArg(0).asExpr().(StringLiteral).getText().toLowerCase() = clientIpParameterName() } } @@ -85,8 +85,8 @@ private class CompareSink extends PossibleSecurityCheck { CompareSink() { exists(Call call | call.getFunc().(Attribute).getName() = "startswith" and - call.getArg(0).(StrConst).getText().regexpMatch(getIpAddressRegex()) and - not call.getArg(0).(StrConst).getText() = "0:0:0:0:0:0:0:1" and + call.getArg(0).(StringLiteral).getText().regexpMatch(getIpAddressRegex()) and + not call.getArg(0).(StringLiteral).getText() = "0:0:0:0:0:0:0:1" and call.getFunc().(Attribute).getObject() = this.asExpr() ) or @@ -97,12 +97,12 @@ private class CompareSink extends PossibleSecurityCheck { ) and ( compare.getLeft() = this.asExpr() and - compare.getComparator(0).(StrConst).getText() instanceof PrivateHostName and - not compare.getComparator(0).(StrConst).getText() = "0:0:0:0:0:0:0:1" + compare.getComparator(0).(StringLiteral).getText() instanceof PrivateHostName and + not compare.getComparator(0).(StringLiteral).getText() = "0:0:0:0:0:0:0:1" or compare.getComparator(0) = this.asExpr() and - compare.getLeft().(StrConst).getText() instanceof PrivateHostName and - not compare.getLeft().(StrConst).getText() = "0:0:0:0:0:0:0:1" + compare.getLeft().(StringLiteral).getText() instanceof PrivateHostName and + not compare.getLeft().(StringLiteral).getText() = "0:0:0:0:0:0:0:1" ) ) or @@ -115,7 +115,7 @@ private class CompareSink extends PossibleSecurityCheck { compare.getLeft() = this.asExpr() or compare.getComparator(0) = this.asExpr() and - not compare.getLeft().(StrConst).getText() in ["%", ",", "."] + not compare.getLeft().(StringLiteral).getText() in ["%", ",", "."] ) ) } diff --git a/python/ql/src/experimental/Security/CWE-770/UnicodeDoS.ql b/python/ql/src/experimental/Security/CWE-770/UnicodeDoS.ql index 9e0a3a3018ac..47edf3ed0f92 100644 --- a/python/ql/src/experimental/Security/CWE-770/UnicodeDoS.ql +++ b/python/ql/src/experimental/Security/CWE-770/UnicodeDoS.ql @@ -25,16 +25,22 @@ class UnicodeCompatibilityNormalize extends API::CallNode { UnicodeCompatibilityNormalize() { ( this = API::moduleImport("unicodedata").getMember("normalize").getACall() and - this.getParameter(0).getAValueReachingSink().asExpr().(StrConst).getText() in ["NFKC", "NFKD"] + this.getParameter(0).getAValueReachingSink().asExpr().(StringLiteral).getText() in [ + "NFKC", "NFKD" + ] or this = API::moduleImport("pyunormalize").getMember("normalize").getACall() and - this.getParameter(0).getAValueReachingSink().asExpr().(StrConst).getText() in ["NFKC", "NFKD"] + this.getParameter(0).getAValueReachingSink().asExpr().(StringLiteral).getText() in [ + "NFKC", "NFKD" + ] ) and argIdx = 1 or ( this = API::moduleImport("textnorm").getMember("normalize_unicode").getACall() and - this.getParameter(1).getAValueReachingSink().asExpr().(StrConst).getText() in ["NFKC", "NFKD"] + this.getParameter(1).getAValueReachingSink().asExpr().(StringLiteral).getText() in [ + "NFKC", "NFKD" + ] or this = API::moduleImport("unidecode").getMember("unidecode").getACall() or diff --git a/python/ql/src/experimental/semmle/python/CookieHeader.qll b/python/ql/src/experimental/semmle/python/CookieHeader.qll index 690dff3ecba6..3a1437dff4ac 100644 --- a/python/ql/src/experimental/semmle/python/CookieHeader.qll +++ b/python/ql/src/experimental/semmle/python/CookieHeader.qll @@ -28,7 +28,7 @@ import experimental.semmle.python.Concepts */ class CookieHeader extends Cookie::Range instanceof HeaderDeclaration { CookieHeader() { - exists(StrConst str | + exists(StringLiteral str | str.getText() = "Set-Cookie" and DataFlow::exprNode(str) .(DataFlow::LocalSourceNode) @@ -37,7 +37,7 @@ class CookieHeader extends Cookie::Range instanceof HeaderDeclaration { } override predicate isSecure() { - exists(StrConst str | + exists(StringLiteral str | str.getText().regexpMatch(".*; *Secure;.*") and DataFlow::exprNode(str) .(DataFlow::LocalSourceNode) @@ -46,7 +46,7 @@ class CookieHeader extends Cookie::Range instanceof HeaderDeclaration { } override predicate isHttpOnly() { - exists(StrConst str | + exists(StringLiteral str | str.getText().regexpMatch(".*; *HttpOnly;.*") and DataFlow::exprNode(str) .(DataFlow::LocalSourceNode) @@ -55,7 +55,7 @@ class CookieHeader extends Cookie::Range instanceof HeaderDeclaration { } override predicate isSameSite() { - exists(StrConst str | + exists(StringLiteral str | str.getText().regexpMatch(".*; *SameSite=(Strict|Lax);.*") and DataFlow::exprNode(str) .(DataFlow::LocalSourceNode) diff --git a/python/ql/src/experimental/semmle/python/frameworks/Django.qll b/python/ql/src/experimental/semmle/python/frameworks/Django.qll index 47b05cc95fd5..c1a5629ef686 100644 --- a/python/ql/src/experimental/semmle/python/frameworks/Django.qll +++ b/python/ql/src/experimental/semmle/python/frameworks/Django.qll @@ -159,7 +159,7 @@ private module ExperimentalPrivateDjango { } override predicate isSameSite() { - exists(StrConst str | + exists(StringLiteral str | str.getText() in ["Strict", "Lax"] and DataFlow::exprNode(str) .(DataFlow::LocalSourceNode) diff --git a/python/ql/src/experimental/semmle/python/frameworks/Flask.qll b/python/ql/src/experimental/semmle/python/frameworks/Flask.qll index 3252acf24fdc..aa120dc1fcbb 100644 --- a/python/ql/src/experimental/semmle/python/frameworks/Flask.qll +++ b/python/ql/src/experimental/semmle/python/frameworks/Flask.qll @@ -119,7 +119,7 @@ module ExperimentalFlask { } override predicate isSameSite() { - exists(StrConst str | + exists(StringLiteral str | str.getText() in ["Strict", "Lax"] and DataFlow::exprNode(str) .(DataFlow::LocalSourceNode) diff --git a/python/ql/src/experimental/semmle/python/frameworks/JWT.qll b/python/ql/src/experimental/semmle/python/frameworks/JWT.qll index f5098014f2b4..5d8fd98f2c01 100644 --- a/python/ql/src/experimental/semmle/python/frameworks/JWT.qll +++ b/python/ql/src/experimental/semmle/python/frameworks/JWT.qll @@ -6,7 +6,7 @@ predicate isEmptyOrNone(DataFlow::Node arg) { isEmpty(arg) or isNone(arg) } /** Checks if an empty string `""` flows to `arg` */ predicate isEmpty(DataFlow::Node arg) { - exists(StrConst emptyString | + exists(StringLiteral emptyString | emptyString.getText() = "" and DataFlow::exprNode(emptyString).(DataFlow::LocalSourceNode).flowsTo(arg) ) diff --git a/python/ql/src/experimental/semmle/python/frameworks/Sendgrid.qll b/python/ql/src/experimental/semmle/python/frameworks/Sendgrid.qll index 51ff2fda3544..e0b1219c2ebb 100644 --- a/python/ql/src/experimental/semmle/python/frameworks/Sendgrid.qll +++ b/python/ql/src/experimental/semmle/python/frameworks/Sendgrid.qll @@ -74,7 +74,7 @@ private module Sendgrid { private DataFlow::Node sendgridContent(DataFlow::CallCfgNode contentCall, string mime) { mime in ["text/plain", "text/html", "text/x-amp-html"] and - exists(StrConst mimeNode | + exists(StringLiteral mimeNode | mimeNode.getText() = mime and DataFlow::exprNode(mimeNode).(DataFlow::LocalSourceNode).flowsTo(contentCall.getArg(0)) and result = contentCall.getArg(1) @@ -122,8 +122,12 @@ private module Sendgrid { contentElement = this.getKeywordParameter("request_body").getSubscript("content").getASubscript() | - contentElement.getSubscript("type").getAValueReachingSink().asExpr().(StrConst).getText() = - ["text/html", "text/x-amp-html"] and + contentElement + .getSubscript("type") + .getAValueReachingSink() + .asExpr() + .(StringLiteral) + .getText() = ["text/html", "text/x-amp-html"] and result = contentElement.getSubscript("value").getAValueReachingSink() ) or diff --git a/python/ql/src/experimental/semmle/python/libraries/Authlib.qll b/python/ql/src/experimental/semmle/python/libraries/Authlib.qll index afb80950ea6e..02c52ca2b720 100644 --- a/python/ql/src/experimental/semmle/python/libraries/Authlib.qll +++ b/python/ql/src/experimental/semmle/python/libraries/Authlib.qll @@ -49,7 +49,7 @@ private module Authlib { } override string getAlgorithmString() { - exists(StrConst str | + exists(StringLiteral str | DataFlow::exprNode(str).(DataFlow::LocalSourceNode).flowsTo(this.getAlgorithm()) and result = str.getText() ) diff --git a/python/ql/src/experimental/semmle/python/libraries/PyJWT.qll b/python/ql/src/experimental/semmle/python/libraries/PyJWT.qll index fb4764310c8e..caf09b4bd99a 100644 --- a/python/ql/src/experimental/semmle/python/libraries/PyJWT.qll +++ b/python/ql/src/experimental/semmle/python/libraries/PyJWT.qll @@ -39,7 +39,7 @@ private module PyJwt { } override string getAlgorithmString() { - exists(StrConst str | + exists(StringLiteral str | DataFlow::exprNode(str).(DataFlow::LocalSourceNode).flowsTo(this.getAlgorithm()) and result = str.getText() ) @@ -75,7 +75,7 @@ private module PyJwt { } override string getAlgorithmString() { - exists(StrConst str | + exists(StringLiteral str | DataFlow::exprNode(str).(DataFlow::LocalSourceNode).flowsTo(this.getAlgorithm()) and result = str.getText() ) diff --git a/python/ql/src/experimental/semmle/python/libraries/PythonJose.qll b/python/ql/src/experimental/semmle/python/libraries/PythonJose.qll index 86efd7f86bf9..d17f5ec62d56 100644 --- a/python/ql/src/experimental/semmle/python/libraries/PythonJose.qll +++ b/python/ql/src/experimental/semmle/python/libraries/PythonJose.qll @@ -40,7 +40,7 @@ private module PythonJose { } override string getAlgorithmString() { - exists(StrConst str | + exists(StringLiteral str | DataFlow::exprNode(str).(DataFlow::LocalSourceNode).flowsTo(this.getAlgorithm()) and result = str.getText() ) @@ -76,7 +76,7 @@ private module PythonJose { } override string getAlgorithmString() { - exists(StrConst str | + exists(StringLiteral str | DataFlow::exprNode(str).(DataFlow::LocalSourceNode).flowsTo(this.getAlgorithm()) and result = str.getText() ) diff --git a/python/ql/src/experimental/semmle/python/libraries/Python_JWT.qll b/python/ql/src/experimental/semmle/python/libraries/Python_JWT.qll index abfca2e63750..b46d9e35b92f 100644 --- a/python/ql/src/experimental/semmle/python/libraries/Python_JWT.qll +++ b/python/ql/src/experimental/semmle/python/libraries/Python_JWT.qll @@ -38,7 +38,7 @@ private module Python_Jwt { override DataFlow::Node getAlgorithm() { result = this.verifyCall().getArg(2) } override string getAlgorithmString() { - exists(StrConst str | + exists(StringLiteral str | DataFlow::exprNode(str).(DataFlow::LocalSourceNode).flowsTo(this.getAlgorithm()) and result = str.getText() ) diff --git a/python/ql/src/experimental/semmle/python/libraries/SmtpLib.qll b/python/ql/src/experimental/semmle/python/libraries/SmtpLib.qll index 7ecbbc1beba2..f174220727e2 100644 --- a/python/ql/src/experimental/semmle/python/libraries/SmtpLib.qll +++ b/python/ql/src/experimental/semmle/python/libraries/SmtpLib.qll @@ -23,7 +23,8 @@ module SmtpLib { private DataFlow::CallCfgNode mimeText(string mimetype) { result = smtpMimeTextInstance().getACall() and - [result.getArg(1), result.getArgByName("_subtype")].asExpr().(StrConst).getText() = mimetype + [result.getArg(1), result.getArgByName("_subtype")].asExpr().(StringLiteral).getText() = + mimetype } /** diff --git a/python/ql/src/experimental/semmle/python/security/DecompressionBomb.qll b/python/ql/src/experimental/semmle/python/security/DecompressionBomb.qll index b7821abcaf8b..552f901b7e0c 100644 --- a/python/ql/src/experimental/semmle/python/security/DecompressionBomb.qll +++ b/python/ql/src/experimental/semmle/python/security/DecompressionBomb.qll @@ -145,7 +145,7 @@ module TarFile { .getParameter(1, "mode") .getAValueReachingSink() .asExpr() - .(StrConst) + .(StringLiteral) .getText() ) or not result @@ -153,7 +153,7 @@ module TarFile { .getParameter(1, "mode") .getAValueReachingSink() .asExpr() - .(StrConst) + .(StringLiteral) .getText() .matches("r:%") ) @@ -211,7 +211,7 @@ module Pandas { .getKeywordParameter("compression") .getAValueReachingSink() .asExpr() - .(StrConst) + .(StringLiteral) .getText() = "tar" ) ) @@ -260,13 +260,18 @@ module Gzip { this = gzipCall.getParameter(0, "filename").asSink() and ( not exists( - gzipCall.getParameter(1, "mode").getAValueReachingSink().asExpr().(StrConst).getText() + gzipCall + .getParameter(1, "mode") + .getAValueReachingSink() + .asExpr() + .(StringLiteral) + .getText() ) or gzipCall .getParameter(1, "mode") .getAValueReachingSink() .asExpr() - .(StrConst) + .(StringLiteral) .getText() .matches("%r%") ) @@ -297,13 +302,18 @@ module Bz2 { this = bz2Call.getParameter(0, "filename").asSink() and ( not exists( - bz2Call.getParameter(1, "mode").getAValueReachingSink().asExpr().(StrConst).getText() + bz2Call + .getParameter(1, "mode") + .getAValueReachingSink() + .asExpr() + .(StringLiteral) + .getText() ) or bz2Call .getParameter(1, "mode") .getAValueReachingSink() .asExpr() - .(StrConst) + .(StringLiteral) .getText() .matches("%r%") ) @@ -334,13 +344,18 @@ module Lzma { this = lzmaCall.getParameter(0, "filename").asSink() and ( not exists( - lzmaCall.getParameter(1, "mode").getAValueReachingSink().asExpr().(StrConst).getText() + lzmaCall + .getParameter(1, "mode") + .getAValueReachingSink() + .asExpr() + .(StringLiteral) + .getText() ) or lzmaCall .getParameter(1, "mode") .getAValueReachingSink() .asExpr() - .(StrConst) + .(StringLiteral) .getText() .matches("%r%") ) diff --git a/python/ql/src/experimental/semmle/python/security/LdapInsecureAuth.qll b/python/ql/src/experimental/semmle/python/security/LdapInsecureAuth.qll index e8249dcdff73..a63332137d19 100644 --- a/python/ql/src/experimental/semmle/python/security/LdapInsecureAuth.qll +++ b/python/ql/src/experimental/semmle/python/security/LdapInsecureAuth.qll @@ -18,7 +18,7 @@ string getPrivateHostRegex() { } // "ldap://somethingon.theinternet.com" -class LdapFullHost extends StrConst { +class LdapFullHost extends StringLiteral { LdapFullHost() { exists(string s | s = this.getText() and @@ -29,15 +29,15 @@ class LdapFullHost extends StrConst { } } -class LdapSchema extends StrConst { +class LdapSchema extends StringLiteral { LdapSchema() { this.getText().regexpMatch(getSchemaRegex()) } } -class LdapPrivateHost extends StrConst { +class LdapPrivateHost extends StringLiteral { LdapPrivateHost() { this.getText().regexpMatch(getPrivateHostRegex()) } } -predicate concatAndCompareAgainstFullHostRegex(LdapSchema schema, StrConst host) { +predicate concatAndCompareAgainstFullHostRegex(LdapSchema schema, StringLiteral host) { not host instanceof LdapPrivateHost and (schema.getText() + host.getText()).regexpMatch(getFullHostRegex()) } diff --git a/python/ql/src/experimental/semmle/python/security/TimingAttack.qll b/python/ql/src/experimental/semmle/python/security/TimingAttack.qll index f072f2123059..6d8cc98f21ce 100644 --- a/python/ql/src/experimental/semmle/python/security/TimingAttack.qll +++ b/python/ql/src/experimental/semmle/python/security/TimingAttack.qll @@ -204,8 +204,11 @@ abstract class ClientSuppliedSecret extends DataFlow::CallCfgNode { } private class FlaskClientSuppliedSecret extends ClientSuppliedSecret { FlaskClientSuppliedSecret() { this = Flask::request().getMember("headers").getMember(["get", "get_all", "getlist"]).getACall() and - [this.getArg(0), this.getArgByName(["key", "name"])].asExpr().(StrConst).getText().toLowerCase() = - sensitiveheaders() + [this.getArg(0), this.getArgByName(["key", "name"])] + .asExpr() + .(StringLiteral) + .getText() + .toLowerCase() = sensitiveheaders() } } @@ -216,7 +219,7 @@ private class DjangoClientSuppliedSecret extends ClientSuppliedSecret { .getMember(["headers", "META"]) .getMember("get") .getACall() and - [this.getArg(0), this.getArgByName("key")].asExpr().(StrConst).getText().toLowerCase() = + [this.getArg(0), this.getArgByName("key")].asExpr().(StringLiteral).getText().toLowerCase() = sensitiveheaders() } } @@ -229,7 +232,7 @@ API::Node requesthandler() { private class TornadoClientSuppliedSecret extends ClientSuppliedSecret { TornadoClientSuppliedSecret() { this = requesthandler().getMember(["headers", "META"]).getMember("get").getACall() and - [this.getArg(0), this.getArgByName("key")].asExpr().(StrConst).getText().toLowerCase() = + [this.getArg(0), this.getArgByName("key")].asExpr().(StringLiteral).getText().toLowerCase() = sensitiveheaders() } } @@ -243,8 +246,11 @@ private class WerkzeugClientSuppliedSecret extends ClientSuppliedSecret { WerkzeugClientSuppliedSecret() { this = headers().getMember(["headers", "META"]).getMember(["get", "get_all", "getlist"]).getACall() and - [this.getArg(0), this.getArgByName(["key", "name"])].asExpr().(StrConst).getText().toLowerCase() = - sensitiveheaders() + [this.getArg(0), this.getArgByName(["key", "name"])] + .asExpr() + .(StringLiteral) + .getText() + .toLowerCase() = sensitiveheaders() } } @@ -314,10 +320,10 @@ class CompareSink extends DataFlow::Node { ) and ( compare.getLeft() = this.asExpr() and - not compare.getComparator(0).(StrConst).getText() = "bearer" + not compare.getComparator(0).(StringLiteral).getText() = "bearer" or compare.getComparator(0) = this.asExpr() and - not compare.getLeft().(StrConst).getText() = "bearer" + not compare.getLeft().(StringLiteral).getText() = "bearer" ) ) or diff --git a/python/ql/test/2/extractor-tests/exec/successors.expected b/python/ql/test/2/extractor-tests/exec/successors.expected index fb159095eba8..8d0643122d61 100644 --- a/python/ql/test/2/extractor-tests/exec/successors.expected +++ b/python/ql/test/2/extractor-tests/exec/successors.expected @@ -3,8 +3,8 @@ | test.py | 1 | ControlFlowNode for f | 0 | Exit node for Module test | normal | | test.py | 1 | ControlFlowNode for x | 2 | ControlFlowNode for exec | normal | | test.py | 1 | Entry node for Function f | 1 | ControlFlowNode for x | normal | -| test.py | 2 | ControlFlowNode for Str | 2 | ControlFlowNode for exec() | normal | -| test.py | 2 | ControlFlowNode for exec | 2 | ControlFlowNode for Str | normal | +| test.py | 2 | ControlFlowNode for StringLiteral | 2 | ControlFlowNode for exec() | normal | +| test.py | 2 | ControlFlowNode for exec | 2 | ControlFlowNode for StringLiteral | normal | | test.py | 2 | ControlFlowNode for exec() | 3 | ControlFlowNode for x | normal | | test.py | 3 | ControlFlowNode for Return | 1 | Exit node for Function f | normal | | test.py | 3 | ControlFlowNode for x | 3 | ControlFlowNode for Return | normal | @@ -16,8 +16,8 @@ | unicode.py | 3 | ControlFlowNode for f | 0 | Exit node for Module unicode | normal | | unicode.py | 3 | ControlFlowNode for x | 4 | ControlFlowNode for exec | normal | | unicode.py | 3 | Entry node for Function f | 3 | ControlFlowNode for x | normal | -| unicode.py | 4 | ControlFlowNode for Str | 4 | ControlFlowNode for exec() | normal | -| unicode.py | 4 | ControlFlowNode for exec | 4 | ControlFlowNode for Str | normal | +| unicode.py | 4 | ControlFlowNode for StringLiteral | 4 | ControlFlowNode for exec() | normal | +| unicode.py | 4 | ControlFlowNode for exec | 4 | ControlFlowNode for StringLiteral | normal | | unicode.py | 4 | ControlFlowNode for exec() | 5 | ControlFlowNode for x | normal | | unicode.py | 5 | ControlFlowNode for Return | 3 | Exit node for Function f | normal | | unicode.py | 5 | ControlFlowNode for x | 5 | ControlFlowNode for Return | normal | diff --git a/python/ql/test/2/extractor-tests/multibyte/Test.expected b/python/ql/test/2/extractor-tests/multibyte/Test.expected index dc3e84e5419f..8b9e00491c3f 100644 --- a/python/ql/test/2/extractor-tests/multibyte/Test.expected +++ b/python/ql/test/2/extractor-tests/multibyte/Test.expected @@ -1,6 +1,6 @@ -| test.py:3:1:3:11 | Str | \u0111\u0142e\u00b6\u014b\u00b6\u0142\u014b | -| test.py:3:15:3:19 | Str | hi | -| test.py:3:23:3:27 | Str | \n | -| test.py:4:1:4:11 | Str | \u0111\u0142e\u00b6\u014b\u00b6\u0142\u014b | -| test.py:4:15:4:19 | Str | hi | -| test.py:4:23:4:27 | Str | \n | +| test.py:3:1:3:11 | StringLiteral | \u0111\u0142e\u00b6\u014b\u00b6\u0142\u014b | +| test.py:3:15:3:19 | StringLiteral | hi | +| test.py:3:23:3:27 | StringLiteral | \n | +| test.py:4:1:4:11 | StringLiteral | \u0111\u0142e\u00b6\u014b\u00b6\u0142\u014b | +| test.py:4:15:4:19 | StringLiteral | hi | +| test.py:4:23:4:27 | StringLiteral | \n | diff --git a/python/ql/test/2/extractor-tests/multibyte/Test.ql b/python/ql/test/2/extractor-tests/multibyte/Test.ql index c6c92eefdd3c..25b5e9c0a2ce 100644 --- a/python/ql/test/2/extractor-tests/multibyte/Test.ql +++ b/python/ql/test/2/extractor-tests/multibyte/Test.ql @@ -1,4 +1,4 @@ import python -from StrConst s +from StringLiteral s select s, s.getText() diff --git a/python/ql/test/2/library-tests/PointsTo/imports/Runtime.expected b/python/ql/test/2/library-tests/PointsTo/imports/Runtime.expected index 787034efd426..a36c90a773bf 100644 --- a/python/ql/test/2/library-tests/PointsTo/imports/Runtime.expected +++ b/python/ql/test/2/library-tests/PointsTo/imports/Runtime.expected @@ -9,7 +9,7 @@ | foo.py | 2 | ControlFlowNode for foo | class foo | ControlFlowNode for ClassExpr | | foo.py | 2 | ControlFlowNode for object | builtin-class object | ControlFlowNode for object | | foo.py | 5 | ControlFlowNode for List | List | ControlFlowNode for List | -| foo.py | 5 | ControlFlowNode for Str | str b'foo' | ControlFlowNode for Str | +| foo.py | 5 | ControlFlowNode for StringLiteral | str b'foo' | ControlFlowNode for StringLiteral | | foo.py | 5 | ControlFlowNode for __all__ | List | ControlFlowNode for List | | test.py | 2 | ControlFlowNode for ImportExpr | Module package | ControlFlowNode for ImportExpr | | test.py | 2 | ControlFlowNode for ImportMember | class foo | ControlFlowNode for ClassExpr | diff --git a/python/ql/test/2/library-tests/locations/general/Prefix.ql b/python/ql/test/2/library-tests/locations/general/Prefix.ql index bee9e555cc69..361499ce8faa 100644 --- a/python/ql/test/2/library-tests/locations/general/Prefix.ql +++ b/python/ql/test/2/library-tests/locations/general/Prefix.ql @@ -1,4 +1,4 @@ import python -from StrConst s +from StringLiteral s select s.getLocation().getStartLine(), s.getText(), s.getPrefix() diff --git a/python/ql/test/2/library-tests/locations/strings/test.ql b/python/ql/test/2/library-tests/locations/strings/test.ql index be3052d9500a..8956611c0a95 100644 --- a/python/ql/test/2/library-tests/locations/strings/test.ql +++ b/python/ql/test/2/library-tests/locations/strings/test.ql @@ -1,5 +1,5 @@ import python -from StrConst s, int bl, int bc, int el, int ec +from StringLiteral s, int bl, int bc, int el, int ec where s.getLocation().hasLocationInfo(_, bl, bc, el, ec) select bl, bc, el, ec, s.getText() diff --git a/python/ql/test/2/query-tests/Statements/IterableStringOrSequence.expected b/python/ql/test/2/query-tests/Statements/IterableStringOrSequence.expected index 184dd03d9e55..4a1752b768d8 100644 --- a/python/ql/test/2/query-tests/Statements/IterableStringOrSequence.expected +++ b/python/ql/test/2/query-tests/Statements/IterableStringOrSequence.expected @@ -1 +1 @@ -| statements_test.py:21:5:21:19 | For | Iteration over $@, of class list, may also iterate over $@. | statements_test.py:20:13:20:33 | ControlFlowNode for List | sequence | statements_test.py:18:13:18:26 | ControlFlowNode for Str | string | +| statements_test.py:21:5:21:19 | For | Iteration over $@, of class list, may also iterate over $@. | statements_test.py:20:13:20:33 | ControlFlowNode for List | sequence | statements_test.py:18:13:18:26 | ControlFlowNode for StringLiteral | string | diff --git a/python/ql/test/2/query-tests/Variables/undefined/UndefinedExport.expected b/python/ql/test/2/query-tests/Variables/undefined/UndefinedExport.expected index 82260d7c3c6a..2b1ef223673e 100644 --- a/python/ql/test/2/query-tests/Variables/undefined/UndefinedExport.expected +++ b/python/ql/test/2/query-tests/Variables/undefined/UndefinedExport.expected @@ -1,4 +1,4 @@ -| UndefinedExport.py:3:18:3:20 | Str | The name 'y' is exported by __all__ but is not defined. | -| UndefinedExport.py:3:23:3:25 | Str | The name 'z' is exported by __all__ but is not defined. | -| UndefinedExport.py:3:28:3:35 | Str | The name 'module' is exported by __all__ but is not defined. | -| package/__init__.py:1:23:1:34 | Str | The name 'not_exists' is exported by __all__ but is not defined. | +| UndefinedExport.py:3:18:3:20 | StringLiteral | The name 'y' is exported by __all__ but is not defined. | +| UndefinedExport.py:3:23:3:25 | StringLiteral | The name 'z' is exported by __all__ but is not defined. | +| UndefinedExport.py:3:28:3:35 | StringLiteral | The name 'module' is exported by __all__ but is not defined. | +| package/__init__.py:1:23:1:34 | StringLiteral | The name 'not_exists' is exported by __all__ but is not defined. | diff --git a/python/ql/test/3/extractor-tests/async3.6/Locations.expected b/python/ql/test/3/extractor-tests/async3.6/Locations.expected index d0e0fe76034d..9cb05ba6e6b3 100644 --- a/python/ql/test/3/extractor-tests/async3.6/Locations.expected +++ b/python/ql/test/3/extractor-tests/async3.6/Locations.expected @@ -6,7 +6,7 @@ | 5 | 18 | 5 | 22 | delay | | 5 | 25 | 5 | 26 | to | | 6 | 5 | 6 | 61 | ExprStmt | -| 6 | 5 | 6 | 61 | Str | +| 6 | 5 | 6 | 61 | StringLiteral | | 7 | 5 | 7 | 23 | For | | 7 | 9 | 7 | 9 | i | | 7 | 14 | 7 | 18 | range | diff --git a/python/ql/test/3/extractor-tests/async3.6/Successors.expected b/python/ql/test/3/extractor-tests/async3.6/Successors.expected index ae9420a1e9b2..d6ed0886a91a 100644 --- a/python/ql/test/3/extractor-tests/async3.6/Successors.expected +++ b/python/ql/test/3/extractor-tests/async3.6/Successors.expected @@ -1,7 +1,7 @@ | 5 | Function ticker | 5 | delay | | 5 | delay | 5 | to | -| 5 | to | 6 | Str | -| 6 | Str | 7 | range | +| 5 | to | 6 | StringLiteral | +| 6 | StringLiteral | 7 | range | | 7 | For | 5 | Function ticker | | 7 | For | 7 | i | | 7 | i | 8 | i | diff --git a/python/ql/test/3/extractor-tests/fstrings3.6/FString.expected b/python/ql/test/3/extractor-tests/fstrings3.6/FString.expected index 0edd4c473a91..4bb6749858bf 100644 --- a/python/ql/test/3/extractor-tests/fstrings3.6/FString.expected +++ b/python/ql/test/3/extractor-tests/fstrings3.6/FString.expected @@ -1,75 +1,75 @@ -| 2 | Fstring | 0 | Str | +| 2 | Fstring | 0 | StringLiteral | | 2 | Fstring | 1 | world | -| 2 | Fstring | 2 | Str | -| 3 | Fstring | 0 | Str | +| 2 | Fstring | 2 | StringLiteral | +| 3 | Fstring | 0 | StringLiteral | | 3 | Fstring | 1 | one | -| 3 | Fstring | 2 | Str | +| 3 | Fstring | 2 | StringLiteral | | 3 | Fstring | 3 | two | -| 3 | Fstring | 4 | Str | +| 3 | Fstring | 4 | StringLiteral | | 3 | Fstring | 5 | three | -| 3 | Fstring | 6 | Str | -| 4 | Fstring | 0 | Str | +| 3 | Fstring | 6 | StringLiteral | +| 4 | Fstring | 0 | StringLiteral | | 4 | Fstring | 1 | cruel | -| 4 | Fstring | 2 | Str | -| 5 | Fstring | 0 | Str | +| 4 | Fstring | 2 | StringLiteral | +| 5 | Fstring | 0 | StringLiteral | | 5 | Fstring | 1 | thing | -| 5 | Fstring | 2 | Str | -| 6 | Fstring | 0 | Str | +| 5 | Fstring | 2 | StringLiteral | +| 6 | Fstring | 0 | StringLiteral | | 6 | Fstring | 1 | x | -| 6 | Fstring | 2 | Str | -| 8 | Fstring | 0 | Str | +| 6 | Fstring | 2 | StringLiteral | +| 8 | Fstring | 0 | StringLiteral | | 8 | Fstring | 1 | name | -| 8 | Fstring | 2 | Str | +| 8 | Fstring | 2 | StringLiteral | | 8 | Fstring | 3 | BinaryExpr | -| 8 | Fstring | 4 | Str | +| 8 | Fstring | 4 | StringLiteral | | 8 | Fstring | 5 | anniversary | -| 8 | Fstring | 6 | Str | -| 13 | Fstring | 0 | Str | +| 8 | Fstring | 6 | StringLiteral | +| 13 | Fstring | 0 | StringLiteral | | 13 | Fstring | 1 | world | -| 13 | Fstring | 2 | Str | -| 16 | Fstring | 0 | Str | +| 13 | Fstring | 2 | StringLiteral | +| 16 | Fstring | 0 | StringLiteral | | 16 | Fstring | 1 | Tuple | -| 16 | Fstring | 2 | Str | +| 16 | Fstring | 2 | StringLiteral | | 16 | Fstring | 3 | Tuple | -| 16 | Fstring | 4 | Str | -| 19 | Fstring | 0 | Str | +| 16 | Fstring | 4 | StringLiteral | +| 19 | Fstring | 0 | StringLiteral | | 19 | Fstring | 1 | Tuple | -| 19 | Fstring | 2 | Str | +| 19 | Fstring | 2 | StringLiteral | | 19 | Fstring | 3 | Tuple | -| 19 | Fstring | 4 | Str | -| 32 | Fstring | 0 | Str | +| 19 | Fstring | 4 | StringLiteral | +| 32 | Fstring | 0 | StringLiteral | | 32 | Fstring | 1 | IntegerLiteral | -| 32 | Fstring | 2 | Str | -| 34 | Fstring | 0 | Str | +| 32 | Fstring | 2 | StringLiteral | +| 34 | Fstring | 0 | StringLiteral | | 34 | Fstring | 1 | IntegerLiteral | -| 34 | Fstring | 2 | Str | -| 36 | Fstring | 0 | Str | +| 34 | Fstring | 2 | StringLiteral | +| 36 | Fstring | 0 | StringLiteral | | 36 | Fstring | 1 | IntegerLiteral | -| 36 | Fstring | 2 | Str | -| 38 | Fstring | 0 | Str | +| 36 | Fstring | 2 | StringLiteral | +| 38 | Fstring | 0 | StringLiteral | | 38 | Fstring | 1 | IntegerLiteral | -| 38 | Fstring | 2 | Str | -| 53 | Fstring | 0 | Str | +| 38 | Fstring | 2 | StringLiteral | +| 53 | Fstring | 0 | StringLiteral | | 53 | Fstring | 1 | degrees | -| 53 | Fstring | 2 | Str | -| 56 | Fstring | 0 | Str | +| 53 | Fstring | 2 | StringLiteral | +| 56 | Fstring | 0 | StringLiteral | | 56 | Fstring | 1 | IntegerLiteral | -| 56 | Fstring | 2 | Str | -| 59 | Fstring | 0 | Str | +| 56 | Fstring | 2 | StringLiteral | +| 59 | Fstring | 0 | StringLiteral | | 59 | Fstring | 1 | IntegerLiteral | -| 59 | Fstring | 2 | Str | -| 62 | Fstring | 0 | Str | +| 59 | Fstring | 2 | StringLiteral | +| 62 | Fstring | 0 | StringLiteral | | 62 | Fstring | 1 | IntegerLiteral | -| 62 | Fstring | 2 | Str | -| 67 | Fstring | 0 | Str | +| 62 | Fstring | 2 | StringLiteral | +| 67 | Fstring | 0 | StringLiteral | | 67 | Fstring | 1 | IntegerLiteral | -| 67 | Fstring | 2 | Str | -| 70 | Fstring | 0 | Str | +| 67 | Fstring | 2 | StringLiteral | +| 70 | Fstring | 0 | StringLiteral | | 70 | Fstring | 1 | IntegerLiteral | -| 70 | Fstring | 2 | Str | -| 75 | Fstring | 0 | Str | +| 70 | Fstring | 2 | StringLiteral | +| 75 | Fstring | 0 | StringLiteral | | 75 | Fstring | 1 | IntegerLiteral | -| 75 | Fstring | 2 | Str | -| 78 | Fstring | 0 | Str | +| 75 | Fstring | 2 | StringLiteral | +| 78 | Fstring | 0 | StringLiteral | | 78 | Fstring | 1 | IntegerLiteral | -| 78 | Fstring | 2 | Str | +| 78 | Fstring | 2 | StringLiteral | diff --git a/python/ql/test/3/extractor-tests/fstrings3.6/Formatted.ql b/python/ql/test/3/extractor-tests/fstrings3.6/Formatted.ql index 3685825bfe3e..b57e9ee0c33d 100644 --- a/python/ql/test/3/extractor-tests/fstrings3.6/Formatted.ql +++ b/python/ql/test/3/extractor-tests/fstrings3.6/Formatted.ql @@ -8,7 +8,7 @@ where not exists(val.getConversion()) and typeconv = " " ) and ( - format = val.getFormatSpec().getValue(0).(StrConst).getText() + format = val.getFormatSpec().getValue(0).(StringLiteral).getText() or not exists(val.getFormatSpec()) and format = "" ) diff --git a/python/ql/test/3/extractor-tests/fstrings3.6/Locations.expected b/python/ql/test/3/extractor-tests/fstrings3.6/Locations.expected index b1515413cc60..bf9d62dc0557 100644 --- a/python/ql/test/3/extractor-tests/fstrings3.6/Locations.expected +++ b/python/ql/test/3/extractor-tests/fstrings3.6/Locations.expected @@ -1,116 +1,116 @@ -| 2 | 1 | 2 | 9 | Str | +| 2 | 1 | 2 | 9 | StringLiteral | | 2 | 1 | 2 | 18 | Fstring | | 2 | 10 | 2 | 14 | world | -| 2 | 17 | 2 | 18 | Str | -| 3 | 1 | 3 | 4 | Str | +| 2 | 17 | 2 | 18 | StringLiteral | +| 3 | 1 | 3 | 4 | StringLiteral | | 3 | 1 | 3 | 42 | Fstring | | 3 | 5 | 3 | 7 | one | -| 3 | 13 | 3 | 15 | Str | +| 3 | 13 | 3 | 15 | StringLiteral | | 3 | 16 | 3 | 18 | two | -| 3 | 26 | 3 | 28 | Str | +| 3 | 26 | 3 | 28 | StringLiteral | | 3 | 29 | 3 | 33 | three | -| 3 | 41 | 3 | 42 | Str | -| 4 | 1 | 4 | 11 | Str | +| 3 | 41 | 3 | 42 | StringLiteral | +| 4 | 1 | 4 | 11 | StringLiteral | | 4 | 1 | 4 | 24 | Fstring | | 4 | 12 | 4 | 16 | cruel | -| 4 | 17 | 4 | 24 | Str | -| 5 | 1 | 5 | 8 | Str | +| 4 | 17 | 4 | 24 | StringLiteral | +| 5 | 1 | 5 | 8 | StringLiteral | | 5 | 1 | 5 | 17 | Fstring | | 5 | 9 | 5 | 13 | thing | -| 5 | 16 | 5 | 17 | Str | -| 6 | 1 | 6 | 3 | Str | +| 5 | 16 | 5 | 17 | StringLiteral | +| 6 | 1 | 6 | 3 | StringLiteral | | 6 | 1 | 6 | 8 | Fstring | | 6 | 4 | 6 | 4 | x | -| 6 | 7 | 6 | 8 | Str | -| 8 | 1 | 8 | 16 | Str | +| 6 | 7 | 6 | 8 | StringLiteral | +| 8 | 1 | 8 | 16 | StringLiteral | | 8 | 1 | 10 | 31 | Fstring | | 8 | 17 | 8 | 20 | name | -| 8 | 21 | 9 | 1 | Str | +| 8 | 21 | 9 | 1 | StringLiteral | | 9 | 2 | 9 | 4 | age | | 9 | 2 | 9 | 6 | BinaryExpr | | 9 | 6 | 9 | 6 | IntegerLiteral | -| 9 | 7 | 10 | 1 | Str | +| 9 | 7 | 10 | 1 | StringLiteral | | 10 | 2 | 10 | 12 | anniversary | -| 10 | 27 | 10 | 31 | Str | -| 13 | 1 | 13 | 12 | Str | +| 10 | 27 | 10 | 31 | StringLiteral | +| 13 | 1 | 13 | 12 | StringLiteral | | 13 | 1 | 13 | 21 | Fstring | | 13 | 13 | 13 | 17 | world | -| 13 | 20 | 13 | 21 | Str | -| 16 | 1 | 16 | 3 | Str | +| 13 | 20 | 13 | 21 | StringLiteral | +| 16 | 1 | 16 | 3 | StringLiteral | | 16 | 1 | 16 | 13 | Fstring | | 16 | 4 | 16 | 4 | IntegerLiteral | | 16 | 4 | 16 | 6 | Tuple | | 16 | 6 | 16 | 6 | IntegerLiteral | -| 16 | 7 | 16 | 8 | Str | +| 16 | 7 | 16 | 8 | StringLiteral | | 16 | 9 | 16 | 9 | IntegerLiteral | | 16 | 9 | 16 | 11 | Tuple | | 16 | 11 | 16 | 11 | IntegerLiteral | -| 16 | 12 | 16 | 13 | Str | -| 19 | 1 | 19 | 3 | Str | +| 16 | 12 | 16 | 13 | StringLiteral | +| 19 | 1 | 19 | 3 | StringLiteral | | 19 | 1 | 19 | 11 | Fstring | | 19 | 4 | 19 | 4 | IntegerLiteral | | 19 | 4 | 19 | 5 | Tuple | -| 19 | 6 | 19 | 7 | Str | +| 19 | 6 | 19 | 7 | StringLiteral | | 19 | 8 | 19 | 8 | IntegerLiteral | | 19 | 8 | 19 | 9 | Tuple | -| 19 | 10 | 19 | 11 | Str | -| 24 | 2 | 24 | 9 | Str | -| 26 | 2 | 26 | 5 | Str | -| 28 | 2 | 28 | 9 | Str | -| 30 | 2 | 30 | 5 | Str | -| 32 | 2 | 32 | 6 | Str | +| 19 | 10 | 19 | 11 | StringLiteral | +| 24 | 2 | 24 | 9 | StringLiteral | +| 26 | 2 | 26 | 5 | StringLiteral | +| 28 | 2 | 28 | 9 | StringLiteral | +| 30 | 2 | 30 | 5 | StringLiteral | +| 32 | 2 | 32 | 6 | StringLiteral | | 32 | 2 | 32 | 11 | Fstring | | 32 | 7 | 32 | 7 | IntegerLiteral | -| 32 | 8 | 32 | 11 | Str | -| 34 | 2 | 34 | 4 | Str | +| 32 | 8 | 32 | 11 | StringLiteral | +| 34 | 2 | 34 | 4 | StringLiteral | | 34 | 2 | 34 | 7 | Fstring | | 34 | 5 | 34 | 5 | IntegerLiteral | -| 34 | 6 | 34 | 7 | Str | -| 36 | 2 | 36 | 6 | Str | +| 34 | 6 | 34 | 7 | StringLiteral | +| 36 | 2 | 36 | 6 | StringLiteral | | 36 | 2 | 36 | 11 | Fstring | | 36 | 7 | 36 | 7 | IntegerLiteral | -| 36 | 8 | 36 | 11 | Str | -| 38 | 2 | 38 | 4 | Str | +| 36 | 8 | 36 | 11 | StringLiteral | +| 38 | 2 | 38 | 4 | StringLiteral | | 38 | 2 | 38 | 7 | Fstring | | 38 | 5 | 38 | 5 | IntegerLiteral | -| 38 | 6 | 38 | 7 | Str | -| 40 | 2 | 40 | 8 | Str | -| 42 | 2 | 42 | 4 | Str | -| 44 | 2 | 44 | 8 | Str | -| 46 | 2 | 46 | 4 | Str | -| 53 | 1 | 53 | 18 | Str | +| 38 | 6 | 38 | 7 | StringLiteral | +| 40 | 2 | 40 | 8 | StringLiteral | +| 42 | 2 | 42 | 4 | StringLiteral | +| 44 | 2 | 44 | 8 | StringLiteral | +| 46 | 2 | 46 | 4 | StringLiteral | +| 53 | 1 | 53 | 18 | StringLiteral | | 53 | 1 | 53 | 27 | Fstring | | 53 | 19 | 53 | 25 | degrees | -| 53 | 26 | 53 | 27 | Str | -| 56 | 1 | 56 | 3 | Str | +| 53 | 26 | 53 | 27 | StringLiteral | +| 56 | 1 | 56 | 3 | StringLiteral | | 56 | 1 | 56 | 21 | Fstring | | 56 | 4 | 56 | 4 | IntegerLiteral | -| 56 | 5 | 56 | 21 | Str | -| 59 | 1 | 59 | 7 | Str | +| 56 | 5 | 56 | 21 | StringLiteral | +| 59 | 1 | 59 | 7 | StringLiteral | | 59 | 1 | 59 | 11 | Fstring | | 59 | 8 | 59 | 8 | IntegerLiteral | -| 59 | 9 | 59 | 11 | Str | -| 62 | 1 | 62 | 4 | Str | +| 59 | 9 | 59 | 11 | StringLiteral | +| 62 | 1 | 62 | 4 | StringLiteral | | 62 | 1 | 62 | 10 | Fstring | | 62 | 5 | 62 | 5 | IntegerLiteral | -| 62 | 6 | 62 | 10 | Str | -| 67 | 1 | 67 | 6 | Str | +| 62 | 6 | 62 | 10 | StringLiteral | +| 67 | 1 | 67 | 6 | StringLiteral | | 67 | 1 | 67 | 43 | Fstring | | 67 | 7 | 67 | 7 | IntegerLiteral | -| 67 | 38 | 67 | 43 | Str | -| 70 | 1 | 70 | 6 | Str | +| 67 | 38 | 67 | 43 | StringLiteral | +| 70 | 1 | 70 | 6 | StringLiteral | | 70 | 1 | 70 | 39 | Fstring | | 70 | 7 | 70 | 7 | IntegerLiteral | -| 70 | 34 | 70 | 39 | Str | -| 75 | 1 | 75 | 7 | Str | +| 70 | 34 | 70 | 39 | StringLiteral | +| 75 | 1 | 75 | 7 | StringLiteral | | 75 | 1 | 75 | 11 | Fstring | | 75 | 8 | 75 | 8 | IntegerLiteral | -| 75 | 9 | 75 | 11 | Str | -| 78 | 1 | 78 | 4 | Str | +| 75 | 9 | 75 | 11 | StringLiteral | +| 78 | 1 | 78 | 4 | StringLiteral | | 78 | 1 | 78 | 10 | Fstring | | 78 | 5 | 78 | 5 | IntegerLiteral | -| 78 | 6 | 78 | 10 | Str | -| 81 | 1 | 81 | 3 | Str | -| 82 | 1 | 82 | 3 | Str | -| 83 | 1 | 83 | 7 | Str | -| 84 | 1 | 84 | 7 | Str | +| 78 | 6 | 78 | 10 | StringLiteral | +| 81 | 1 | 81 | 3 | StringLiteral | +| 82 | 1 | 82 | 3 | StringLiteral | +| 83 | 1 | 83 | 7 | StringLiteral | +| 84 | 1 | 84 | 7 | StringLiteral | diff --git a/python/ql/test/3/extractor-tests/fstrings3.6/Successors.ql b/python/ql/test/3/extractor-tests/fstrings3.6/Successors.ql index f18572f75acb..fe8e7f836dea 100644 --- a/python/ql/test/3/extractor-tests/fstrings3.6/Successors.ql +++ b/python/ql/test/3/extractor-tests/fstrings3.6/Successors.ql @@ -1,9 +1,9 @@ import python string repr(AstNode a) { - not a instanceof StrConst and result = a.toString() + not a instanceof StringLiteral and result = a.toString() or - result = "\"" + a.(StrConst).getText() + "\"" + result = "\"" + a.(StringLiteral).getText() + "\"" } from ControlFlowNode p, ControlFlowNode s, BasicBlock b, int n diff --git a/python/ql/test/3/extractor-tests/fstrings3.8/FString.expected b/python/ql/test/3/extractor-tests/fstrings3.8/FString.expected index 9ec4d19cffb8..7a1b9b52265a 100644 --- a/python/ql/test/3/extractor-tests/fstrings3.8/FString.expected +++ b/python/ql/test/3/extractor-tests/fstrings3.8/FString.expected @@ -1,17 +1,17 @@ -| 4 | Fstring | 0 | Str | +| 4 | Fstring | 0 | StringLiteral | | 4 | Fstring | 1 | foo | -| 4 | Fstring | 2 | Str | -| 5 | Fstring | 0 | Str | +| 4 | Fstring | 2 | StringLiteral | +| 5 | Fstring | 0 | StringLiteral | | 5 | Fstring | 1 | foo | -| 5 | Fstring | 2 | Str | -| 6 | Fstring | 0 | Str | +| 5 | Fstring | 2 | StringLiteral | +| 6 | Fstring | 0 | StringLiteral | | 6 | Fstring | 1 | Attribute() | -| 6 | Fstring | 2 | Str | -| 7 | Fstring | 0 | Str | +| 6 | Fstring | 2 | StringLiteral | +| 7 | Fstring | 0 | StringLiteral | | 7 | Fstring | 1 | foo | -| 7 | Fstring | 2 | Str | -| 8 | Fstring | 0 | Str | +| 7 | Fstring | 2 | StringLiteral | +| 8 | Fstring | 0 | StringLiteral | | 8 | Fstring | 1 | foo | -| 8 | Fstring | 2 | Str | +| 8 | Fstring | 2 | StringLiteral | | 8 | Fstring | 3 | Attribute() | -| 8 | Fstring | 4 | Str | +| 8 | Fstring | 4 | StringLiteral | diff --git a/python/ql/test/3/extractor-tests/fstrings3.8/Locations.expected b/python/ql/test/3/extractor-tests/fstrings3.8/Locations.expected index 3a0842fadb02..66258564456d 100644 --- a/python/ql/test/3/extractor-tests/fstrings3.8/Locations.expected +++ b/python/ql/test/3/extractor-tests/fstrings3.8/Locations.expected @@ -1,40 +1,40 @@ | 1 | 1 | 1 | 3 | foo | | 1 | 7 | 1 | 7 | IntegerLiteral | | 3 | 1 | 3 | 3 | bar | -| 3 | 7 | 3 | 11 | Str | +| 3 | 7 | 3 | 11 | StringLiteral | | 4 | 1 | 4 | 5 | print | | 4 | 1 | 4 | 16 | print() | -| 4 | 7 | 4 | 9 | Str | +| 4 | 7 | 4 | 9 | StringLiteral | | 4 | 7 | 4 | 15 | Fstring | | 4 | 10 | 4 | 12 | foo | -| 4 | 14 | 4 | 15 | Str | +| 4 | 14 | 4 | 15 | StringLiteral | | 5 | 1 | 5 | 5 | print | | 5 | 1 | 5 | 18 | print() | -| 5 | 7 | 5 | 9 | Str | +| 5 | 7 | 5 | 9 | StringLiteral | | 5 | 7 | 5 | 17 | Fstring | | 5 | 10 | 5 | 12 | foo | -| 5 | 16 | 5 | 17 | Str | +| 5 | 16 | 5 | 17 | StringLiteral | | 6 | 1 | 6 | 5 | print | | 6 | 1 | 6 | 24 | print() | -| 6 | 7 | 6 | 9 | Str | +| 6 | 7 | 6 | 9 | StringLiteral | | 6 | 7 | 6 | 23 | Fstring | | 6 | 10 | 6 | 12 | bar | | 6 | 10 | 6 | 18 | Attribute | | 6 | 10 | 6 | 20 | Attribute() | -| 6 | 22 | 6 | 23 | Str | +| 6 | 22 | 6 | 23 | StringLiteral | | 7 | 1 | 7 | 5 | print | | 7 | 1 | 7 | 23 | print() | -| 7 | 7 | 7 | 10 | Str | +| 7 | 7 | 7 | 10 | StringLiteral | | 7 | 7 | 7 | 22 | Fstring | | 7 | 11 | 7 | 13 | foo | -| 7 | 20 | 7 | 22 | Str | +| 7 | 20 | 7 | 22 | StringLiteral | | 8 | 1 | 8 | 5 | print | | 8 | 1 | 8 | 37 | print() | -| 8 | 7 | 8 | 10 | Str | +| 8 | 7 | 8 | 10 | StringLiteral | | 8 | 7 | 8 | 36 | Fstring | | 8 | 11 | 8 | 13 | foo | -| 8 | 20 | 8 | 21 | Str | +| 8 | 20 | 8 | 21 | StringLiteral | | 8 | 22 | 8 | 24 | bar | | 8 | 22 | 8 | 30 | Attribute | | 8 | 22 | 8 | 32 | Attribute() | -| 8 | 34 | 8 | 36 | Str | +| 8 | 34 | 8 | 36 | StringLiteral | diff --git a/python/ql/test/3/extractor-tests/fstrings3.8/Successors.ql b/python/ql/test/3/extractor-tests/fstrings3.8/Successors.ql index f18572f75acb..fe8e7f836dea 100644 --- a/python/ql/test/3/extractor-tests/fstrings3.8/Successors.ql +++ b/python/ql/test/3/extractor-tests/fstrings3.8/Successors.ql @@ -1,9 +1,9 @@ import python string repr(AstNode a) { - not a instanceof StrConst and result = a.toString() + not a instanceof StringLiteral and result = a.toString() or - result = "\"" + a.(StrConst).getText() + "\"" + result = "\"" + a.(StringLiteral).getText() + "\"" } from ControlFlowNode p, ControlFlowNode s, BasicBlock b, int n diff --git a/python/ql/test/3/extractor-tests/multibyte/Test.expected b/python/ql/test/3/extractor-tests/multibyte/Test.expected index 3b2a64a4e944..e61112d743f9 100644 --- a/python/ql/test/3/extractor-tests/multibyte/Test.expected +++ b/python/ql/test/3/extractor-tests/multibyte/Test.expected @@ -1,3 +1,3 @@ -| test.py:4:1:4:11 | Str | \u0111\u0142e\u00b6\u014b\u00b6\u0142\u014b | -| test.py:4:15:4:19 | Str | hi | -| test.py:4:23:4:27 | Str | \n | +| test.py:4:1:4:11 | StringLiteral | \u0111\u0142e\u00b6\u014b\u00b6\u0142\u014b | +| test.py:4:15:4:19 | StringLiteral | hi | +| test.py:4:23:4:27 | StringLiteral | \n | diff --git a/python/ql/test/3/extractor-tests/multibyte/Test.ql b/python/ql/test/3/extractor-tests/multibyte/Test.ql index c6c92eefdd3c..25b5e9c0a2ce 100644 --- a/python/ql/test/3/extractor-tests/multibyte/Test.ql +++ b/python/ql/test/3/extractor-tests/multibyte/Test.ql @@ -1,4 +1,4 @@ import python -from StrConst s +from StringLiteral s select s, s.getText() diff --git a/python/ql/test/3/extractor-tests/unpacking/AST.expected b/python/ql/test/3/extractor-tests/unpacking/AST.expected index 3de3c81cd24e..32e9d4720831 100644 --- a/python/ql/test/3/extractor-tests/unpacking/AST.expected +++ b/python/ql/test/3/extractor-tests/unpacking/AST.expected @@ -18,18 +18,18 @@ | 3 | 1 | 3 | 42 | fn() | | 3 | 4 | 3 | 21 | DictUnpacking | | 3 | 6 | 3 | 21 | Dict | -| 3 | 7 | 3 | 9 | Str | +| 3 | 7 | 3 | 9 | StringLiteral | | 3 | 7 | 3 | 12 | KeyValuePair | | 3 | 12 | 3 | 12 | IntegerLiteral | -| 3 | 15 | 3 | 17 | Str | +| 3 | 15 | 3 | 17 | StringLiteral | | 3 | 15 | 3 | 20 | KeyValuePair | | 3 | 20 | 3 | 20 | IntegerLiteral | | 3 | 24 | 3 | 41 | DictUnpacking | | 3 | 26 | 3 | 41 | Dict | -| 3 | 27 | 3 | 29 | Str | +| 3 | 27 | 3 | 29 | StringLiteral | | 3 | 27 | 3 | 32 | KeyValuePair | | 3 | 32 | 3 | 32 | IntegerLiteral | -| 3 | 35 | 3 | 37 | Str | +| 3 | 35 | 3 | 37 | StringLiteral | | 3 | 35 | 3 | 40 | KeyValuePair | | 3 | 40 | 3 | 40 | IntegerLiteral | | 4 | 1 | 4 | 1 | g | @@ -84,11 +84,11 @@ | 13 | 24 | 13 | 24 | IntegerLiteral | | 16 | 1 | 16 | 20 | Dict | | 16 | 1 | 16 | 20 | ExprStmt | -| 16 | 2 | 16 | 4 | Str | +| 16 | 2 | 16 | 4 | StringLiteral | | 16 | 2 | 16 | 7 | KeyValuePair | | 16 | 7 | 16 | 7 | IntegerLiteral | | 16 | 10 | 16 | 19 | DictUnpacking | | 16 | 12 | 16 | 19 | Dict | -| 16 | 13 | 16 | 15 | Str | +| 16 | 13 | 16 | 15 | StringLiteral | | 16 | 13 | 16 | 18 | KeyValuePair | | 16 | 18 | 16 | 18 | IntegerLiteral | diff --git a/python/ql/test/3/extractor-tests/walrus_operator/AssignExprs.expected b/python/ql/test/3/extractor-tests/walrus_operator/AssignExprs.expected index cd81ead4987c..87c909774359 100644 --- a/python/ql/test/3/extractor-tests/walrus_operator/AssignExprs.expected +++ b/python/ql/test/3/extractor-tests/walrus_operator/AssignExprs.expected @@ -22,7 +22,7 @@ | test.py:32:2:32:21 | AssignExpr | total | BinaryExpr | | test.py:33:5:33:26 | AssignExpr | lines | Attribute() | | test.py:34:5:34:10 | AssignExpr | x | IntegerLiteral | -| test.py:35:10:35:29 | AssignExpr | category | Str | +| test.py:35:10:35:29 | AssignExpr | category | StringLiteral | | test.py:36:12:36:24 | AssignExpr | longline | l | | test.py:38:4:38:53 | AssignExpr | env_base | Attribute() | | test.py:40:26:40:65 | AssignExpr | ans | Attribute() | diff --git a/python/ql/test/3/library-tests/PointsTo/attributes/Test.expected b/python/ql/test/3/library-tests/PointsTo/attributes/Test.expected index 0adb7c86bef4..18d4bc813753 100644 --- a/python/ql/test/3/library-tests/PointsTo/attributes/Test.expected +++ b/python/ql/test/3/library-tests/PointsTo/attributes/Test.expected @@ -143,23 +143,23 @@ | 92 | ControlFlowNode for FunctionExpr | Function meth1 | 92 | | 92 | ControlFlowNode for meth1 | Function meth1 | 92 | | 93 | ControlFlowNode for IntegerLiteral | int 0 | 93 | -| 93 | ControlFlowNode for Str | str u'a' | 93 | +| 93 | ControlFlowNode for StringLiteral | str u'a' | 93 | | 93 | ControlFlowNode for self | self | 92 | | 93 | ControlFlowNode for self | self | 98 | | 93 | ControlFlowNode for setattr | Builtin-function setattr | 93 | | 93 | ControlFlowNode for setattr() | NoneType None | 93 | | 94 | ControlFlowNode for IntegerLiteral | int 1 | 94 | -| 94 | ControlFlowNode for Str | str u'b' | 94 | +| 94 | ControlFlowNode for StringLiteral | str u'b' | 94 | | 94 | ControlFlowNode for self | self | 92 | | 94 | ControlFlowNode for self | self | 98 | | 94 | ControlFlowNode for setattr | Builtin-function setattr | 94 | | 94 | ControlFlowNode for setattr() | NoneType None | 94 | -| 95 | ControlFlowNode for Str | str u'a' | 95 | +| 95 | ControlFlowNode for StringLiteral | str u'a' | 95 | | 95 | ControlFlowNode for getattr | Builtin-function getattr | 95 | | 95 | ControlFlowNode for getattr() | int 0 | 93 | | 95 | ControlFlowNode for self | self | 92 | | 95 | ControlFlowNode for self | self | 98 | -| 96 | ControlFlowNode for Str | str u'b' | 96 | +| 96 | ControlFlowNode for StringLiteral | str u'b' | 96 | | 96 | ControlFlowNode for getattr | Builtin-function getattr | 96 | | 96 | ControlFlowNode for getattr() | int 1 | 94 | | 96 | ControlFlowNode for self | self | 92 | @@ -167,27 +167,27 @@ | 98 | ControlFlowNode for FunctionExpr | Function meth2 | 98 | | 98 | ControlFlowNode for meth2 | Function meth2 | 98 | | 99 | ControlFlowNode for FloatLiteral | float 7.0 | 99 | -| 99 | ControlFlowNode for Str | str u'a' | 99 | +| 99 | ControlFlowNode for StringLiteral | str u'a' | 99 | | 99 | ControlFlowNode for self | self | 98 | | 99 | ControlFlowNode for setattr | Builtin-function setattr | 99 | | 99 | ControlFlowNode for setattr() | NoneType None | 99 | | 100 | ControlFlowNode for IntegerLiteral | int 2 | 100 | -| 100 | ControlFlowNode for Str | str u'c' | 100 | +| 100 | ControlFlowNode for StringLiteral | str u'c' | 100 | | 100 | ControlFlowNode for self | self | 98 | | 100 | ControlFlowNode for setattr | Builtin-function setattr | 100 | | 100 | ControlFlowNode for setattr() | NoneType None | 100 | | 101 | ControlFlowNode for Attribute | Attribute | 101 | | 101 | ControlFlowNode for Attribute() | NoneType None | 92 | | 101 | ControlFlowNode for self | self | 98 | -| 102 | ControlFlowNode for Str | str u'a' | 102 | +| 102 | ControlFlowNode for StringLiteral | str u'a' | 102 | | 102 | ControlFlowNode for getattr | Builtin-function getattr | 102 | | 102 | ControlFlowNode for getattr() | int 0 | 93 | | 102 | ControlFlowNode for self | self | 98 | -| 103 | ControlFlowNode for Str | str u'b' | 103 | +| 103 | ControlFlowNode for StringLiteral | str u'b' | 103 | | 103 | ControlFlowNode for getattr | Builtin-function getattr | 103 | | 103 | ControlFlowNode for getattr() | int 1 | 94 | | 103 | ControlFlowNode for self | self | 98 | -| 104 | ControlFlowNode for Str | str u'c' | 104 | +| 104 | ControlFlowNode for StringLiteral | str u'c' | 104 | | 104 | ControlFlowNode for getattr | Builtin-function getattr | 104 | | 104 | ControlFlowNode for getattr() | int 2 | 100 | | 104 | ControlFlowNode for self | self | 98 | @@ -197,7 +197,7 @@ | 108 | ControlFlowNode for FunctionExpr | Function __init__ | 108 | | 108 | ControlFlowNode for __init__ | Function __init__ | 108 | | 109 | ControlFlowNode for IntegerLiteral | int 0 | 109 | -| 109 | ControlFlowNode for Str | str u'x' | 109 | +| 109 | ControlFlowNode for StringLiteral | str u'x' | 109 | | 109 | ControlFlowNode for self | self | 108 | | 109 | ControlFlowNode for setattr | Builtin-function setattr | 109 | | 109 | ControlFlowNode for setattr() | NoneType None | 109 | diff --git a/python/ql/test/3/library-tests/PointsTo/attributes/TestWithType.expected b/python/ql/test/3/library-tests/PointsTo/attributes/TestWithType.expected index 92bd08344a03..6fd7bd5801c7 100644 --- a/python/ql/test/3/library-tests/PointsTo/attributes/TestWithType.expected +++ b/python/ql/test/3/library-tests/PointsTo/attributes/TestWithType.expected @@ -143,23 +143,23 @@ | 92 | ControlFlowNode for FunctionExpr | Function meth1 | builtin-class function | 92 | | 92 | ControlFlowNode for meth1 | Function meth1 | builtin-class function | 92 | | 93 | ControlFlowNode for IntegerLiteral | int 0 | builtin-class int | 93 | -| 93 | ControlFlowNode for Str | str u'a' | builtin-class str | 93 | +| 93 | ControlFlowNode for StringLiteral | str u'a' | builtin-class str | 93 | | 93 | ControlFlowNode for self | self | class F | 92 | | 93 | ControlFlowNode for self | self | class F | 98 | | 93 | ControlFlowNode for setattr | Builtin-function setattr | builtin-class builtin_function_or_method | 93 | | 93 | ControlFlowNode for setattr() | NoneType None | builtin-class NoneType | 93 | | 94 | ControlFlowNode for IntegerLiteral | int 1 | builtin-class int | 94 | -| 94 | ControlFlowNode for Str | str u'b' | builtin-class str | 94 | +| 94 | ControlFlowNode for StringLiteral | str u'b' | builtin-class str | 94 | | 94 | ControlFlowNode for self | self | class F | 92 | | 94 | ControlFlowNode for self | self | class F | 98 | | 94 | ControlFlowNode for setattr | Builtin-function setattr | builtin-class builtin_function_or_method | 94 | | 94 | ControlFlowNode for setattr() | NoneType None | builtin-class NoneType | 94 | -| 95 | ControlFlowNode for Str | str u'a' | builtin-class str | 95 | +| 95 | ControlFlowNode for StringLiteral | str u'a' | builtin-class str | 95 | | 95 | ControlFlowNode for getattr | Builtin-function getattr | builtin-class builtin_function_or_method | 95 | | 95 | ControlFlowNode for getattr() | int 0 | builtin-class int | 93 | | 95 | ControlFlowNode for self | self | class F | 92 | | 95 | ControlFlowNode for self | self | class F | 98 | -| 96 | ControlFlowNode for Str | str u'b' | builtin-class str | 96 | +| 96 | ControlFlowNode for StringLiteral | str u'b' | builtin-class str | 96 | | 96 | ControlFlowNode for getattr | Builtin-function getattr | builtin-class builtin_function_or_method | 96 | | 96 | ControlFlowNode for getattr() | int 1 | builtin-class int | 94 | | 96 | ControlFlowNode for self | self | class F | 92 | @@ -167,27 +167,27 @@ | 98 | ControlFlowNode for FunctionExpr | Function meth2 | builtin-class function | 98 | | 98 | ControlFlowNode for meth2 | Function meth2 | builtin-class function | 98 | | 99 | ControlFlowNode for FloatLiteral | float 7.0 | builtin-class float | 99 | -| 99 | ControlFlowNode for Str | str u'a' | builtin-class str | 99 | +| 99 | ControlFlowNode for StringLiteral | str u'a' | builtin-class str | 99 | | 99 | ControlFlowNode for self | self | class F | 98 | | 99 | ControlFlowNode for setattr | Builtin-function setattr | builtin-class builtin_function_or_method | 99 | | 99 | ControlFlowNode for setattr() | NoneType None | builtin-class NoneType | 99 | | 100 | ControlFlowNode for IntegerLiteral | int 2 | builtin-class int | 100 | -| 100 | ControlFlowNode for Str | str u'c' | builtin-class str | 100 | +| 100 | ControlFlowNode for StringLiteral | str u'c' | builtin-class str | 100 | | 100 | ControlFlowNode for self | self | class F | 98 | | 100 | ControlFlowNode for setattr | Builtin-function setattr | builtin-class builtin_function_or_method | 100 | | 100 | ControlFlowNode for setattr() | NoneType None | builtin-class NoneType | 100 | | 101 | ControlFlowNode for Attribute | Attribute | builtin-class method | 101 | | 101 | ControlFlowNode for Attribute() | NoneType None | builtin-class NoneType | 92 | | 101 | ControlFlowNode for self | self | class F | 98 | -| 102 | ControlFlowNode for Str | str u'a' | builtin-class str | 102 | +| 102 | ControlFlowNode for StringLiteral | str u'a' | builtin-class str | 102 | | 102 | ControlFlowNode for getattr | Builtin-function getattr | builtin-class builtin_function_or_method | 102 | | 102 | ControlFlowNode for getattr() | int 0 | builtin-class int | 93 | | 102 | ControlFlowNode for self | self | class F | 98 | -| 103 | ControlFlowNode for Str | str u'b' | builtin-class str | 103 | +| 103 | ControlFlowNode for StringLiteral | str u'b' | builtin-class str | 103 | | 103 | ControlFlowNode for getattr | Builtin-function getattr | builtin-class builtin_function_or_method | 103 | | 103 | ControlFlowNode for getattr() | int 1 | builtin-class int | 94 | | 103 | ControlFlowNode for self | self | class F | 98 | -| 104 | ControlFlowNode for Str | str u'c' | builtin-class str | 104 | +| 104 | ControlFlowNode for StringLiteral | str u'c' | builtin-class str | 104 | | 104 | ControlFlowNode for getattr | Builtin-function getattr | builtin-class builtin_function_or_method | 104 | | 104 | ControlFlowNode for getattr() | int 2 | builtin-class int | 100 | | 104 | ControlFlowNode for self | self | class F | 98 | @@ -197,7 +197,7 @@ | 108 | ControlFlowNode for FunctionExpr | Function __init__ | builtin-class function | 108 | | 108 | ControlFlowNode for __init__ | Function __init__ | builtin-class function | 108 | | 109 | ControlFlowNode for IntegerLiteral | int 0 | builtin-class int | 109 | -| 109 | ControlFlowNode for Str | str u'x' | builtin-class str | 109 | +| 109 | ControlFlowNode for StringLiteral | str u'x' | builtin-class str | 109 | | 109 | ControlFlowNode for self | self | class G | 108 | | 109 | ControlFlowNode for setattr | Builtin-function setattr | builtin-class builtin_function_or_method | 109 | | 109 | ControlFlowNode for setattr() | NoneType None | builtin-class NoneType | 109 | diff --git a/python/ql/test/3/library-tests/functions/FunctionExpr.getASubExpression.expected b/python/ql/test/3/library-tests/functions/FunctionExpr.getASubExpression.expected index a4ef726012a9..d655c99a4319 100644 --- a/python/ql/test/3/library-tests/functions/FunctionExpr.getASubExpression.expected +++ b/python/ql/test/3/library-tests/functions/FunctionExpr.getASubExpression.expected @@ -2,12 +2,12 @@ | test.py:4:1:11:2 | FunctionExpr | test.py:5:21:5:22 | UnaryExpr | | test.py:4:1:11:2 | FunctionExpr | test.py:7:13:7:15 | int | | test.py:4:1:11:2 | FunctionExpr | test.py:7:19:7:20 | UnaryExpr | -| test.py:4:1:11:2 | FunctionExpr | test.py:8:12:8:23 | Str | +| test.py:4:1:11:2 | FunctionExpr | test.py:8:12:8:23 | StringLiteral | | test.py:4:1:11:2 | FunctionExpr | test.py:9:19:9:21 | int | | test.py:4:1:11:2 | FunctionExpr | test.py:9:25:9:26 | UnaryExpr | -| test.py:4:1:11:2 | FunctionExpr | test.py:10:15:10:30 | Str | -| test.py:23:1:31:2 | FunctionExpr | test.py:25:20:25:24 | Str | +| test.py:4:1:11:2 | FunctionExpr | test.py:10:15:10:30 | StringLiteral | +| test.py:23:1:31:2 | FunctionExpr | test.py:25:20:25:24 | StringLiteral | | test.py:23:1:31:2 | FunctionExpr | test.py:25:28:25:31 | None | | test.py:23:1:31:2 | FunctionExpr | test.py:26:20:26:23 | None | -| test.py:23:1:31:2 | FunctionExpr | test.py:29:24:29:28 | Str | +| test.py:23:1:31:2 | FunctionExpr | test.py:29:24:29:28 | StringLiteral | | test.py:23:1:31:2 | FunctionExpr | test.py:29:32:29:35 | None | diff --git a/python/ql/test/3/library-tests/functions/FunctionExpr.getArgs.getAnnotation.expected b/python/ql/test/3/library-tests/functions/FunctionExpr.getArgs.getAnnotation.expected index 71573e3ad262..52be288c69c6 100644 --- a/python/ql/test/3/library-tests/functions/FunctionExpr.getArgs.getAnnotation.expected +++ b/python/ql/test/3/library-tests/functions/FunctionExpr.getArgs.getAnnotation.expected @@ -1,3 +1,3 @@ | test.py:4:1:11:2 | FunctionExpr | 0 | test.py:5:15:5:17 | int | | test.py:4:1:11:2 | FunctionExpr | 1 | test.py:7:13:7:15 | int | -| test.py:23:1:31:2 | FunctionExpr | 1 | test.py:25:20:25:24 | Str | +| test.py:23:1:31:2 | FunctionExpr | 1 | test.py:25:20:25:24 | StringLiteral | diff --git a/python/ql/test/3/library-tests/functions/FunctionExpr.getArgs.getKwAnnotation.expected b/python/ql/test/3/library-tests/functions/FunctionExpr.getArgs.getKwAnnotation.expected index c3e879fb7223..aa19407192e3 100644 --- a/python/ql/test/3/library-tests/functions/FunctionExpr.getArgs.getKwAnnotation.expected +++ b/python/ql/test/3/library-tests/functions/FunctionExpr.getArgs.getKwAnnotation.expected @@ -1,2 +1,2 @@ | test.py:4:1:11:2 | FunctionExpr | 0 | test.py:9:19:9:21 | int | -| test.py:23:1:31:2 | FunctionExpr | 1 | test.py:29:24:29:28 | Str | +| test.py:23:1:31:2 | FunctionExpr | 1 | test.py:29:24:29:28 | StringLiteral | diff --git a/python/ql/test/3/library-tests/locations/general/Prefix.ql b/python/ql/test/3/library-tests/locations/general/Prefix.ql index bee9e555cc69..361499ce8faa 100644 --- a/python/ql/test/3/library-tests/locations/general/Prefix.ql +++ b/python/ql/test/3/library-tests/locations/general/Prefix.ql @@ -1,4 +1,4 @@ import python -from StrConst s +from StringLiteral s select s.getLocation().getStartLine(), s.getText(), s.getPrefix() diff --git a/python/ql/test/3/library-tests/parameters/Annotations.expected b/python/ql/test/3/library-tests/parameters/Annotations.expected index 91835eac4194..3d5f34083767 100644 --- a/python/ql/test/3/library-tests/parameters/Annotations.expected +++ b/python/ql/test/3/library-tests/parameters/Annotations.expected @@ -1,7 +1,7 @@ -| args | test.py:8:12:8:23 | Str | +| args | test.py:8:12:8:23 | StringLiteral | | keyword_only | test.py:9:19:9:21 | int | -| keyword_w_default | test.py:29:24:29:28 | Str | -| kwargs | test.py:10:15:10:30 | Str | +| keyword_w_default | test.py:29:24:29:28 | StringLiteral | +| kwargs | test.py:10:15:10:30 | StringLiteral | | normal | test.py:7:13:7:15 | int | | pos_only | test.py:5:15:5:17 | int | -| pos_w_default | test.py:25:20:25:24 | Str | +| pos_w_default | test.py:25:20:25:24 | StringLiteral | diff --git a/python/ql/test/3/query-tests/Statements/iter/IterableStringOrSequence.expected b/python/ql/test/3/query-tests/Statements/iter/IterableStringOrSequence.expected index 184dd03d9e55..4a1752b768d8 100644 --- a/python/ql/test/3/query-tests/Statements/iter/IterableStringOrSequence.expected +++ b/python/ql/test/3/query-tests/Statements/iter/IterableStringOrSequence.expected @@ -1 +1 @@ -| statements_test.py:21:5:21:19 | For | Iteration over $@, of class list, may also iterate over $@. | statements_test.py:20:13:20:33 | ControlFlowNode for List | sequence | statements_test.py:18:13:18:26 | ControlFlowNode for Str | string | +| statements_test.py:21:5:21:19 | For | Iteration over $@, of class list, may also iterate over $@. | statements_test.py:20:13:20:33 | ControlFlowNode for List | sequence | statements_test.py:18:13:18:26 | ControlFlowNode for StringLiteral | string | diff --git a/python/ql/test/3/query-tests/Variables/undefined/UndefinedExport.expected b/python/ql/test/3/query-tests/Variables/undefined/UndefinedExport.expected index 82260d7c3c6a..2b1ef223673e 100644 --- a/python/ql/test/3/query-tests/Variables/undefined/UndefinedExport.expected +++ b/python/ql/test/3/query-tests/Variables/undefined/UndefinedExport.expected @@ -1,4 +1,4 @@ -| UndefinedExport.py:3:18:3:20 | Str | The name 'y' is exported by __all__ but is not defined. | -| UndefinedExport.py:3:23:3:25 | Str | The name 'z' is exported by __all__ but is not defined. | -| UndefinedExport.py:3:28:3:35 | Str | The name 'module' is exported by __all__ but is not defined. | -| package/__init__.py:1:23:1:34 | Str | The name 'not_exists' is exported by __all__ but is not defined. | +| UndefinedExport.py:3:18:3:20 | StringLiteral | The name 'y' is exported by __all__ but is not defined. | +| UndefinedExport.py:3:23:3:25 | StringLiteral | The name 'z' is exported by __all__ but is not defined. | +| UndefinedExport.py:3:28:3:35 | StringLiteral | The name 'module' is exported by __all__ but is not defined. | +| package/__init__.py:1:23:1:34 | StringLiteral | The name 'not_exists' is exported by __all__ but is not defined. | diff --git a/python/ql/test/experimental/attrs/AttrWrites.expected b/python/ql/test/experimental/attrs/AttrWrites.expected index 6346c46da346..f8a55824043f 100644 --- a/python/ql/test/experimental/attrs/AttrWrites.expected +++ b/python/ql/test/experimental/attrs/AttrWrites.expected @@ -1,4 +1,4 @@ | test.py:5:9:5:16 | ControlFlowNode for __init__ | test.py:4:1:4:20 | ControlFlowNode for ClassExpr | __init__ | test.py:5:5:5:28 | ControlFlowNode for FunctionExpr | | test.py:6:9:6:16 | ControlFlowNode for Attribute | test.py:6:9:6:12 | ControlFlowNode for self | foo | test.py:6:20:6:22 | ControlFlowNode for foo | -| test.py:9:1:9:9 | ControlFlowNode for Attribute | test.py:9:1:9:5 | ControlFlowNode for myobj | foo | test.py:9:13:9:17 | ControlFlowNode for Str | +| test.py:9:1:9:9 | ControlFlowNode for Attribute | test.py:9:1:9:5 | ControlFlowNode for myobj | foo | test.py:9:13:9:17 | ControlFlowNode for StringLiteral | | test.py:12:1:12:25 | ControlFlowNode for setattr() | test.py:12:9:12:13 | ControlFlowNode for myobj | foo | test.py:12:23:12:24 | ControlFlowNode for IntegerLiteral | diff --git a/python/ql/test/experimental/dataflow/enclosing-callable/EnclosingCallable.expected b/python/ql/test/experimental/dataflow/enclosing-callable/EnclosingCallable.expected index 3bd4cd81d54f..0a26a2f2cb39 100644 --- a/python/ql/test/experimental/dataflow/enclosing-callable/EnclosingCallable.expected +++ b/python/ql/test/experimental/dataflow/enclosing-callable/EnclosingCallable.expected @@ -6,11 +6,11 @@ | class_example.py:0:0:0:0 | Module class_example | class_example.py:4:11:4:11 | ControlFlowNode for IntegerLiteral | | class_example.py:0:0:0:0 | Module class_example | class_example.py:5:5:5:9 | ControlFlowNode for print | | class_example.py:0:0:0:0 | Module class_example | class_example.py:5:5:5:26 | ControlFlowNode for print() | -| class_example.py:0:0:0:0 | Module class_example | class_example.py:5:11:5:20 | ControlFlowNode for Str | +| class_example.py:0:0:0:0 | Module class_example | class_example.py:5:11:5:20 | ControlFlowNode for StringLiteral | | class_example.py:0:0:0:0 | Module class_example | class_example.py:5:23:5:25 | ControlFlowNode for wat | | class_example.py:0:0:0:0 | Module class_example | class_example.py:7:1:7:5 | ControlFlowNode for print | | class_example.py:0:0:0:0 | Module class_example | class_example.py:7:1:7:23 | ControlFlowNode for print() | -| class_example.py:0:0:0:0 | Module class_example | class_example.py:7:7:7:17 | ControlFlowNode for Str | +| class_example.py:0:0:0:0 | Module class_example | class_example.py:7:7:7:17 | ControlFlowNode for StringLiteral | | class_example.py:0:0:0:0 | Module class_example | class_example.py:7:20:7:22 | ControlFlowNode for wat | | generator.py:0:0:0:0 | Module generator | generator.py:1:1:1:23 | ControlFlowNode for FunctionExpr | | generator.py:0:0:0:0 | Module generator | generator.py:1:5:1:18 | ControlFlowNode for generator_func | diff --git a/python/ql/test/experimental/dataflow/testConfig.qll b/python/ql/test/experimental/dataflow/testConfig.qll index 887f9e48e8e0..552180eeaaf3 100644 --- a/python/ql/test/experimental/dataflow/testConfig.qll +++ b/python/ql/test/experimental/dataflow/testConfig.qll @@ -27,7 +27,7 @@ module TestConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node node) { node.(DataFlow::CfgNode).getNode().(NameNode).getId() = "SOURCE" or - node.(DataFlow::CfgNode).getNode().getNode().(StrConst).getS() = "source" + node.(DataFlow::CfgNode).getNode().getNode().(StringLiteral).getS() = "source" or node.(DataFlow::CfgNode).getNode().getNode().(IntegerLiteral).getN() = "42" or diff --git a/python/ql/test/experimental/dataflow/testTaintConfig.qll b/python/ql/test/experimental/dataflow/testTaintConfig.qll index 89e9593c89fc..c9770600eeb4 100644 --- a/python/ql/test/experimental/dataflow/testTaintConfig.qll +++ b/python/ql/test/experimental/dataflow/testTaintConfig.qll @@ -28,7 +28,7 @@ module TestConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node node) { node.(DataFlow::CfgNode).getNode().(NameNode).getId() = "SOURCE" or - node.(DataFlow::CfgNode).getNode().getNode().(StrConst).getS() = "source" + node.(DataFlow::CfgNode).getNode().getNode().(StringLiteral).getS() = "source" or node.(DataFlow::CfgNode).getNode().getNode().(IntegerLiteral).getN() = "42" or diff --git a/python/ql/test/experimental/import-resolution/importflow.ql b/python/ql/test/experimental/import-resolution/importflow.ql index 0225cb2dc863..0398f1a7a699 100644 --- a/python/ql/test/experimental/import-resolution/importflow.ql +++ b/python/ql/test/experimental/import-resolution/importflow.ql @@ -9,7 +9,7 @@ private class SourceString extends DataFlow::Node { string contents; SourceString() { - this.asExpr().(StrConst).getText() = contents and + this.asExpr().(StringLiteral).getText() = contents and this.asExpr().getParent() instanceof Assign or this.asExpr().(ClassExpr).getInnerScope().getName() = "SOURCE" and diff --git a/python/ql/test/experimental/query-tests/Security/CWE-287-ConstantSecretKey/ConstantSecretKey.expected b/python/ql/test/experimental/query-tests/Security/CWE-287-ConstantSecretKey/ConstantSecretKey.expected index 2a2d0c85ee0e..00c32be4267c 100644 --- a/python/ql/test/experimental/query-tests/Security/CWE-287-ConstantSecretKey/ConstantSecretKey.expected +++ b/python/ql/test/experimental/query-tests/Security/CWE-287-ConstantSecretKey/ConstantSecretKey.expected @@ -3,28 +3,28 @@ edges | app_unsafe.py:4:1:4:9 | ControlFlowNode for aConstant | app_unsafe.py:6:18:6:26 | ControlFlowNode for aConstant | provenance | | | app_unsafe.py:4:1:4:9 | ControlFlowNode for aConstant | app_unsafe.py:7:30:7:38 | ControlFlowNode for aConstant | provenance | | | app_unsafe.py:4:1:4:9 | ControlFlowNode for aConstant | app_unsafe.py:8:36:8:44 | ControlFlowNode for aConstant | provenance | | -| app_unsafe.py:4:13:4:23 | ControlFlowNode for Str | app_unsafe.py:4:1:4:9 | ControlFlowNode for aConstant | provenance | | +| app_unsafe.py:4:13:4:23 | ControlFlowNode for StringLiteral | app_unsafe.py:4:1:4:9 | ControlFlowNode for aConstant | provenance | | | config.py:7:1:7:9 | ControlFlowNode for aConstant | config.py:12:18:12:26 | ControlFlowNode for aConstant | provenance | | | config.py:7:1:7:9 | ControlFlowNode for aConstant | config.py:12:18:12:26 | ControlFlowNode for aConstant | provenance | | | config.py:7:1:7:9 | ControlFlowNode for aConstant | config.py:17:38:17:46 | ControlFlowNode for aConstant | provenance | | | config.py:7:1:7:9 | ControlFlowNode for aConstant | config.py:18:43:18:51 | ControlFlowNode for aConstant | provenance | | -| config.py:7:13:7:23 | ControlFlowNode for Str | config.py:7:1:7:9 | ControlFlowNode for aConstant | provenance | | +| config.py:7:13:7:23 | ControlFlowNode for StringLiteral | config.py:7:1:7:9 | ControlFlowNode for aConstant | provenance | | | config.py:12:18:12:26 | ControlFlowNode for aConstant | config.py:17:38:17:46 | ControlFlowNode for aConstant | provenance | | | config.py:12:18:12:26 | ControlFlowNode for aConstant | config.py:18:43:18:51 | ControlFlowNode for aConstant | provenance | | | config.py:17:38:17:46 | ControlFlowNode for aConstant | config.py:17:18:17:47 | ControlFlowNode for Attribute() | provenance | os.getenv | | config.py:17:38:17:46 | ControlFlowNode for aConstant | config.py:18:43:18:51 | ControlFlowNode for aConstant | provenance | | | config.py:18:43:18:51 | ControlFlowNode for aConstant | config.py:18:18:18:52 | ControlFlowNode for Attribute() | provenance | dict.get | nodes -| app_safe.py:5:28:5:37 | ControlFlowNode for Str | semmle.label | ControlFlowNode for Str | +| app_safe.py:5:28:5:37 | ControlFlowNode for StringLiteral | semmle.label | ControlFlowNode for StringLiteral | | app_unsafe.py:4:1:4:9 | ControlFlowNode for aConstant | semmle.label | ControlFlowNode for aConstant | -| app_unsafe.py:4:13:4:23 | ControlFlowNode for Str | semmle.label | ControlFlowNode for Str | +| app_unsafe.py:4:13:4:23 | ControlFlowNode for StringLiteral | semmle.label | ControlFlowNode for StringLiteral | | app_unsafe.py:5:28:5:36 | ControlFlowNode for aConstant | semmle.label | ControlFlowNode for aConstant | | app_unsafe.py:6:18:6:26 | ControlFlowNode for aConstant | semmle.label | ControlFlowNode for aConstant | | app_unsafe.py:7:30:7:38 | ControlFlowNode for aConstant | semmle.label | ControlFlowNode for aConstant | | app_unsafe.py:8:36:8:44 | ControlFlowNode for aConstant | semmle.label | ControlFlowNode for aConstant | -| config2.py:5:14:5:24 | ControlFlowNode for Str | semmle.label | ControlFlowNode for Str | +| config2.py:5:14:5:24 | ControlFlowNode for StringLiteral | semmle.label | ControlFlowNode for StringLiteral | | config.py:7:1:7:9 | ControlFlowNode for aConstant | semmle.label | ControlFlowNode for aConstant | -| config.py:7:13:7:23 | ControlFlowNode for Str | semmle.label | ControlFlowNode for Str | +| config.py:7:13:7:23 | ControlFlowNode for StringLiteral | semmle.label | ControlFlowNode for StringLiteral | | config.py:12:18:12:26 | ControlFlowNode for aConstant | semmle.label | ControlFlowNode for aConstant | | config.py:12:18:12:26 | ControlFlowNode for aConstant | semmle.label | ControlFlowNode for aConstant | | config.py:17:18:17:47 | ControlFlowNode for Attribute() | semmle.label | ControlFlowNode for Attribute() | @@ -33,12 +33,12 @@ nodes | config.py:18:43:18:51 | ControlFlowNode for aConstant | semmle.label | ControlFlowNode for aConstant | subpaths #select -| app_safe.py:5:28:5:37 | ControlFlowNode for Str | app_safe.py:5:28:5:37 | ControlFlowNode for Str | app_safe.py:5:28:5:37 | ControlFlowNode for Str | The SECRET_KEY config variable is assigned by $@. | app_safe.py:5:28:5:37 | ControlFlowNode for Str | this constant String | -| app_unsafe.py:5:28:5:36 | ControlFlowNode for aConstant | app_unsafe.py:4:13:4:23 | ControlFlowNode for Str | app_unsafe.py:5:28:5:36 | ControlFlowNode for aConstant | The SECRET_KEY config variable is assigned by $@. | app_unsafe.py:4:13:4:23 | ControlFlowNode for Str | this constant String | -| app_unsafe.py:6:18:6:26 | ControlFlowNode for aConstant | app_unsafe.py:4:13:4:23 | ControlFlowNode for Str | app_unsafe.py:6:18:6:26 | ControlFlowNode for aConstant | The SECRET_KEY config variable is assigned by $@. | app_unsafe.py:4:13:4:23 | ControlFlowNode for Str | this constant String | -| app_unsafe.py:7:30:7:38 | ControlFlowNode for aConstant | app_unsafe.py:4:13:4:23 | ControlFlowNode for Str | app_unsafe.py:7:30:7:38 | ControlFlowNode for aConstant | The SECRET_KEY config variable is assigned by $@. | app_unsafe.py:4:13:4:23 | ControlFlowNode for Str | this constant String | -| app_unsafe.py:8:36:8:44 | ControlFlowNode for aConstant | app_unsafe.py:4:13:4:23 | ControlFlowNode for Str | app_unsafe.py:8:36:8:44 | ControlFlowNode for aConstant | The SECRET_KEY config variable is assigned by $@. | app_unsafe.py:4:13:4:23 | ControlFlowNode for Str | this constant String | -| config2.py:5:14:5:24 | ControlFlowNode for Str | config2.py:5:14:5:24 | ControlFlowNode for Str | config2.py:5:14:5:24 | ControlFlowNode for Str | The SECRET_KEY config variable is assigned by $@. | config2.py:5:14:5:24 | ControlFlowNode for Str | this constant String | -| config.py:12:18:12:26 | ControlFlowNode for aConstant | config.py:7:13:7:23 | ControlFlowNode for Str | config.py:12:18:12:26 | ControlFlowNode for aConstant | The SECRET_KEY config variable is assigned by $@. | config.py:7:13:7:23 | ControlFlowNode for Str | this constant String | -| config.py:17:18:17:47 | ControlFlowNode for Attribute() | config.py:7:13:7:23 | ControlFlowNode for Str | config.py:17:18:17:47 | ControlFlowNode for Attribute() | The SECRET_KEY config variable is assigned by $@. | config.py:7:13:7:23 | ControlFlowNode for Str | this constant String | -| config.py:18:18:18:52 | ControlFlowNode for Attribute() | config.py:7:13:7:23 | ControlFlowNode for Str | config.py:18:18:18:52 | ControlFlowNode for Attribute() | The SECRET_KEY config variable is assigned by $@. | config.py:7:13:7:23 | ControlFlowNode for Str | this constant String | +| app_safe.py:5:28:5:37 | ControlFlowNode for StringLiteral | app_safe.py:5:28:5:37 | ControlFlowNode for StringLiteral | app_safe.py:5:28:5:37 | ControlFlowNode for StringLiteral | The SECRET_KEY config variable is assigned by $@. | app_safe.py:5:28:5:37 | ControlFlowNode for StringLiteral | this constant String | +| app_unsafe.py:5:28:5:36 | ControlFlowNode for aConstant | app_unsafe.py:4:13:4:23 | ControlFlowNode for StringLiteral | app_unsafe.py:5:28:5:36 | ControlFlowNode for aConstant | The SECRET_KEY config variable is assigned by $@. | app_unsafe.py:4:13:4:23 | ControlFlowNode for StringLiteral | this constant String | +| app_unsafe.py:6:18:6:26 | ControlFlowNode for aConstant | app_unsafe.py:4:13:4:23 | ControlFlowNode for StringLiteral | app_unsafe.py:6:18:6:26 | ControlFlowNode for aConstant | The SECRET_KEY config variable is assigned by $@. | app_unsafe.py:4:13:4:23 | ControlFlowNode for StringLiteral | this constant String | +| app_unsafe.py:7:30:7:38 | ControlFlowNode for aConstant | app_unsafe.py:4:13:4:23 | ControlFlowNode for StringLiteral | app_unsafe.py:7:30:7:38 | ControlFlowNode for aConstant | The SECRET_KEY config variable is assigned by $@. | app_unsafe.py:4:13:4:23 | ControlFlowNode for StringLiteral | this constant String | +| app_unsafe.py:8:36:8:44 | ControlFlowNode for aConstant | app_unsafe.py:4:13:4:23 | ControlFlowNode for StringLiteral | app_unsafe.py:8:36:8:44 | ControlFlowNode for aConstant | The SECRET_KEY config variable is assigned by $@. | app_unsafe.py:4:13:4:23 | ControlFlowNode for StringLiteral | this constant String | +| config2.py:5:14:5:24 | ControlFlowNode for StringLiteral | config2.py:5:14:5:24 | ControlFlowNode for StringLiteral | config2.py:5:14:5:24 | ControlFlowNode for StringLiteral | The SECRET_KEY config variable is assigned by $@. | config2.py:5:14:5:24 | ControlFlowNode for StringLiteral | this constant String | +| config.py:12:18:12:26 | ControlFlowNode for aConstant | config.py:7:13:7:23 | ControlFlowNode for StringLiteral | config.py:12:18:12:26 | ControlFlowNode for aConstant | The SECRET_KEY config variable is assigned by $@. | config.py:7:13:7:23 | ControlFlowNode for StringLiteral | this constant String | +| config.py:17:18:17:47 | ControlFlowNode for Attribute() | config.py:7:13:7:23 | ControlFlowNode for StringLiteral | config.py:17:18:17:47 | ControlFlowNode for Attribute() | The SECRET_KEY config variable is assigned by $@. | config.py:7:13:7:23 | ControlFlowNode for StringLiteral | this constant String | +| config.py:18:18:18:52 | ControlFlowNode for Attribute() | config.py:7:13:7:23 | ControlFlowNode for StringLiteral | config.py:18:18:18:52 | ControlFlowNode for Attribute() | The SECRET_KEY config variable is assigned by $@. | config.py:7:13:7:23 | ControlFlowNode for StringLiteral | this constant String | diff --git a/python/ql/test/extractor-tests/ast/Child.expected b/python/ql/test/extractor-tests/ast/Child.expected index 29cff9d5507e..b4a7158b0041 100644 --- a/python/ql/test/extractor-tests/ast/Child.expected +++ b/python/ql/test/extractor-tests/ast/Child.expected @@ -296,24 +296,24 @@ | test.py:103:9 | Keyword | test.py:103:11 | IntegerLiteral | | test.py:103:14 | Starred | test.py:103:15 | t | | test.py:107:1 | ExprStmt | test.py:107:1 | Fstring | -| test.py:107:1 | Fstring | test.py:107:1 | Str | +| test.py:107:1 | Fstring | test.py:107:1 | StringLiteral | | test.py:107:1 | Fstring | test.py:107:12 | value | -| test.py:107:1 | Fstring | test.py:107:22 | Str | +| test.py:107:1 | Fstring | test.py:107:22 | StringLiteral | | test.py:108:1 | ExprStmt | test.py:108:1 | Fstring | -| test.py:108:1 | Fstring | test.py:108:1 | Str | +| test.py:108:1 | Fstring | test.py:108:1 | StringLiteral | | test.py:108:1 | Fstring | test.py:108:12 | value | | test.py:108:1 | Fstring | test.py:108:19 | width | | test.py:108:1 | Fstring | test.py:108:27 | precision | -| test.py:108:1 | Fstring | test.py:108:37 | Str | +| test.py:108:1 | Fstring | test.py:108:37 | StringLiteral | | test.py:111:1 | ExprStmt | test.py:111:1 | Fstring | -| test.py:111:1 | Fstring | test.py:111:1 | Str | +| test.py:111:1 | Fstring | test.py:111:1 | StringLiteral | | test.py:111:1 | Fstring | test.py:111:8 | IfExp | -| test.py:111:1 | Fstring | test.py:111:40 | Str | +| test.py:111:1 | Fstring | test.py:111:40 | StringLiteral | | test.py:111:1 | Fstring | test.py:111:58 | cls | -| test.py:111:1 | Fstring | test.py:111:61 | Str | -| test.py:111:8 | IfExp | test.py:111:8 | Str | +| test.py:111:1 | Fstring | test.py:111:61 | StringLiteral | +| test.py:111:8 | IfExp | test.py:111:8 | StringLiteral | | test.py:111:8 | IfExp | test.py:111:18 | Compare | -| test.py:111:8 | IfExp | test.py:111:35 | Str | +| test.py:111:8 | IfExp | test.py:111:35 | StringLiteral | | test.py:111:18 | Compare | test.py:111:18 | alen | | test.py:111:18 | Compare | test.py:111:25 | elen | | test.py:115:1 | ExprStmt | test.py:115:1 | Repr | @@ -353,12 +353,12 @@ | test.py:141:1 | ExprStmt | test.py:141:1 | print() | | test.py:141:1 | print() | test.py:141:1 | print | | test.py:141:1 | print() | test.py:141:7 | Fstring | -| test.py:141:7 | Fstring | test.py:141:7 | Str | -| test.py:141:7 | Fstring | test.py:141:10 | Str | -| test.py:141:7 | Fstring | test.py:141:15 | Str | +| test.py:141:7 | Fstring | test.py:141:7 | StringLiteral | +| test.py:141:7 | Fstring | test.py:141:10 | StringLiteral | +| test.py:141:7 | Fstring | test.py:141:15 | StringLiteral | | test.py:142:1 | ExprStmt | test.py:142:1 | print() | | test.py:142:1 | print() | test.py:142:1 | print | | test.py:142:1 | print() | test.py:142:7 | Fstring | -| test.py:142:7 | Fstring | test.py:142:7 | Str | -| test.py:142:7 | Fstring | test.py:142:10 | Str | -| test.py:142:7 | Fstring | test.py:142:15 | Str | +| test.py:142:7 | Fstring | test.py:142:7 | StringLiteral | +| test.py:142:7 | Fstring | test.py:142:10 | StringLiteral | +| test.py:142:7 | Fstring | test.py:142:15 | StringLiteral | diff --git a/python/ql/test/extractor-tests/long_string/Test.ql b/python/ql/test/extractor-tests/long_string/Test.ql index fd025e1cbc9d..e8dc478c0947 100644 --- a/python/ql/test/extractor-tests/long_string/Test.ql +++ b/python/ql/test/extractor-tests/long_string/Test.ql @@ -1,4 +1,4 @@ import python -from StrConst s +from StringLiteral s select s.getLocation(), s.getText() diff --git a/python/ql/test/extractor-tests/string_concatenation/StrConst.expected b/python/ql/test/extractor-tests/string_concatenation/StrConst.expected index e642d9d12c5f..9589418233e1 100644 --- a/python/ql/test/extractor-tests/string_concatenation/StrConst.expected +++ b/python/ql/test/extractor-tests/string_concatenation/StrConst.expected @@ -1,7 +1,7 @@ -| test.py:1:5:1:15 | Str | a\u00f0 | -| test.py:2:5:2:15 | Str | b\u00f0 | -| test.py:3:5:3:11 | Str | cc | -| test.py:4:5:4:19 | Str | \u00ff\u00ff | -| test.py:5:5:5:16 | Str | e\u00ff | -| test.py:6:5:6:16 | Str | f\u00ff | -| test.py:7:5:7:16 | Str | \u00ffg | +| test.py:1:5:1:15 | StringLiteral | a\u00f0 | +| test.py:2:5:2:15 | StringLiteral | b\u00f0 | +| test.py:3:5:3:11 | StringLiteral | cc | +| test.py:4:5:4:19 | StringLiteral | \u00ff\u00ff | +| test.py:5:5:5:16 | StringLiteral | e\u00ff | +| test.py:6:5:6:16 | StringLiteral | f\u00ff | +| test.py:7:5:7:16 | StringLiteral | \u00ffg | diff --git a/python/ql/test/extractor-tests/string_concatenation/StrConst.ql b/python/ql/test/extractor-tests/string_concatenation/StrConst.ql index 0afdfe408b8e..132ddd7436c6 100644 --- a/python/ql/test/extractor-tests/string_concatenation/StrConst.ql +++ b/python/ql/test/extractor-tests/string_concatenation/StrConst.ql @@ -1,3 +1,3 @@ import python -select any(StrConst s) as s, s.getText() +select any(StringLiteral s) as s, s.getText() diff --git a/python/ql/test/library-tests/ApiGraphs/py3/verifyApiGraphs.ql b/python/ql/test/library-tests/ApiGraphs/py3/verifyApiGraphs.ql index c1f7e8ad5e17..e3308914a57a 100644 --- a/python/ql/test/library-tests/ApiGraphs/py3/verifyApiGraphs.ql +++ b/python/ql/test/library-tests/ApiGraphs/py3/verifyApiGraphs.ql @@ -6,6 +6,6 @@ class CustomEntryPoint extends API::EntryPoint { CustomEntryPoint() { this = "CustomEntryPoint" } override DataFlow::LocalSourceNode getASource() { - result.asExpr().(StrConst).getText() = "magic_string" + result.asExpr().(StringLiteral).getText() = "magic_string" } } diff --git a/python/ql/test/library-tests/ControlFlow/splitting/NodeCount.expected b/python/ql/test/library-tests/ControlFlow/splitting/NodeCount.expected index c1ce91c2e8da..c0f69c87a291 100644 --- a/python/ql/test/library-tests/ControlFlow/splitting/NodeCount.expected +++ b/python/ql/test/library-tests/ControlFlow/splitting/NodeCount.expected @@ -81,22 +81,22 @@ | 65 | limit_splitting1 | test.py:65:8:65:16 | Compare | 1 | | 65 | limit_splitting1 | test.py:65:13:65:16 | None | 1 | | 65 | limit_splitting1 | test.py:65:19:65:19 | a | 1 | -| 65 | limit_splitting1 | test.py:65:23:65:25 | Str | 1 | +| 65 | limit_splitting1 | test.py:65:23:65:25 | StringLiteral | 1 | | 66 | limit_splitting1 | test.py:66:8:66:8 | b | 1 | | 66 | limit_splitting1 | test.py:66:8:66:16 | Compare | 1 | | 66 | limit_splitting1 | test.py:66:13:66:16 | None | 1 | | 66 | limit_splitting1 | test.py:66:19:66:19 | b | 1 | -| 66 | limit_splitting1 | test.py:66:23:66:25 | Str | 1 | +| 66 | limit_splitting1 | test.py:66:23:66:25 | StringLiteral | 1 | | 67 | limit_splitting1 | test.py:67:8:67:8 | c | 1 | | 67 | limit_splitting1 | test.py:67:8:67:16 | Compare | 1 | | 67 | limit_splitting1 | test.py:67:13:67:16 | None | 1 | | 67 | limit_splitting1 | test.py:67:19:67:19 | c | 1 | -| 67 | limit_splitting1 | test.py:67:23:67:25 | Str | 1 | +| 67 | limit_splitting1 | test.py:67:23:67:25 | StringLiteral | 1 | | 68 | limit_splitting1 | test.py:68:8:68:8 | d | 1 | | 68 | limit_splitting1 | test.py:68:8:68:16 | Compare | 1 | | 68 | limit_splitting1 | test.py:68:13:68:16 | None | 1 | | 68 | limit_splitting1 | test.py:68:19:68:19 | d | 1 | -| 68 | limit_splitting1 | test.py:68:23:68:25 | Str | 1 | +| 68 | limit_splitting1 | test.py:68:23:68:25 | StringLiteral | 1 | | 69 | limit_splitting1 | test.py:69:5:69:8 | Pass | 1 | | 77 | limit_splitting2 | test.py:77:22:77:22 | a | 1 | | 77 | limit_splitting2 | test.py:77:24:77:24 | b | 1 | @@ -464,34 +464,34 @@ | 409 | split_on_strings | test.py:409:9:409:18 | might_fail | 1 | | 409 | split_on_strings | test.py:409:9:409:20 | might_fail() | 1 | | 410 | split_on_strings | test.py:410:9:410:9 | x | 1 | -| 410 | split_on_strings | test.py:410:13:410:18 | Str | 1 | +| 410 | split_on_strings | test.py:410:13:410:18 | StringLiteral | 1 | | 411 | split_on_strings | test.py:411:5:411:11 | ExceptStmt | 1 | | 412 | split_on_strings | test.py:412:9:412:9 | x | 1 | -| 412 | split_on_strings | test.py:412:13:412:16 | Str | 1 | +| 412 | split_on_strings | test.py:412:13:412:16 | StringLiteral | 1 | | 414 | split_on_strings | test.py:414:8:414:8 | x | 2 | | 414 | split_on_strings | test.py:414:8:414:16 | Compare | 2 | -| 414 | split_on_strings | test.py:414:13:414:16 | Str | 2 | +| 414 | split_on_strings | test.py:414:13:414:16 | StringLiteral | 2 | | 415 | split_on_strings | test.py:415:9:415:12 | Pass | 2 | | 416 | split_on_strings | test.py:416:5:416:8 | Pass | 2 | | 419 | scipy_stylee | test.py:419:18:419:18 | x | 1 | | 420 | scipy_stylee | test.py:420:5:420:31 | Assert | 2 | | 420 | scipy_stylee | test.py:420:12:420:12 | x | 1 | | 420 | scipy_stylee | test.py:420:12:420:31 | Compare | 1 | -| 420 | scipy_stylee | test.py:420:18:420:20 | Str | 1 | +| 420 | scipy_stylee | test.py:420:18:420:20 | StringLiteral | 1 | | 420 | scipy_stylee | test.py:420:18:420:30 | Tuple | 1 | -| 420 | scipy_stylee | test.py:420:23:420:25 | Str | 1 | -| 420 | scipy_stylee | test.py:420:28:420:30 | Str | 1 | +| 420 | scipy_stylee | test.py:420:23:420:25 | StringLiteral | 1 | +| 420 | scipy_stylee | test.py:420:28:420:30 | StringLiteral | 1 | | 421 | scipy_stylee | test.py:421:8:421:8 | x | 1 | | 421 | scipy_stylee | test.py:421:8:421:15 | Compare | 1 | -| 421 | scipy_stylee | test.py:421:13:421:15 | Str | 1 | +| 421 | scipy_stylee | test.py:421:13:421:15 | StringLiteral | 1 | | 422 | scipy_stylee | test.py:422:9:422:12 | Pass | 1 | | 423 | scipy_stylee | test.py:423:10:423:10 | x | 1 | | 423 | scipy_stylee | test.py:423:10:423:17 | Compare | 1 | -| 423 | scipy_stylee | test.py:423:15:423:17 | Str | 1 | +| 423 | scipy_stylee | test.py:423:15:423:17 | StringLiteral | 1 | | 424 | scipy_stylee | test.py:424:9:424:12 | Pass | 1 | | 425 | scipy_stylee | test.py:425:10:425:10 | x | 1 | | 425 | scipy_stylee | test.py:425:10:425:17 | Compare | 1 | -| 425 | scipy_stylee | test.py:425:15:425:17 | Str | 1 | +| 425 | scipy_stylee | test.py:425:15:425:17 | StringLiteral | 1 | | 426 | scipy_stylee | test.py:426:9:426:12 | Pass | 1 | | 429 | scipy_stylee | test.py:429:9:429:12 | Pass | 1 | | 431 | odasa_6674 | test.py:431:16:431:16 | x | 1 | @@ -519,25 +519,25 @@ | 443 | odasa_6674 | test.py:443:12:443:16 | score | 1 | | 445 | odasa_6625 | test.py:445:16:445:16 | k | 1 | | 446 | odasa_6625 | test.py:446:5:446:9 | value | 1 | -| 446 | odasa_6625 | test.py:446:13:446:16 | Str | 1 | +| 446 | odasa_6625 | test.py:446:13:446:16 | StringLiteral | 1 | | 447 | odasa_6625 | test.py:447:8:447:8 | k | 1 | | 447 | odasa_6625 | test.py:447:8:447:17 | Attribute | 1 | | 447 | odasa_6625 | test.py:447:8:447:25 | Attribute() | 1 | | 447 | odasa_6625 | test.py:447:8:447:47 | BoolExpr | 1 | -| 447 | odasa_6625 | test.py:447:19:447:24 | Str | 1 | +| 447 | odasa_6625 | test.py:447:19:447:24 | StringLiteral | 1 | | 447 | odasa_6625 | test.py:447:30:447:30 | k | 1 | | 447 | odasa_6625 | test.py:447:30:447:39 | Attribute | 1 | | 447 | odasa_6625 | test.py:447:30:447:47 | Attribute() | 1 | -| 447 | odasa_6625 | test.py:447:41:447:46 | Str | 1 | +| 447 | odasa_6625 | test.py:447:41:447:46 | StringLiteral | 1 | | 448 | odasa_6625 | test.py:448:9:448:13 | value | 1 | | 448 | odasa_6625 | test.py:448:17:448:17 | IntegerLiteral | 1 | | 449 | odasa_6625 | test.py:449:8:449:8 | k | 1 | | 449 | odasa_6625 | test.py:449:8:449:18 | Compare | 1 | -| 449 | odasa_6625 | test.py:449:13:449:18 | Str | 1 | +| 449 | odasa_6625 | test.py:449:13:449:18 | StringLiteral | 1 | | 450 | odasa_6625 | test.py:450:9:450:31 | Return | 1 | | 450 | odasa_6625 | test.py:450:16:450:20 | value | 1 | | 450 | odasa_6625 | test.py:450:16:450:31 | BinaryExpr | 1 | -| 450 | odasa_6625 | test.py:450:24:450:31 | Str | 1 | +| 450 | odasa_6625 | test.py:450:24:450:31 | StringLiteral | 1 | | 453 | avoid_redundant_split | test.py:453:27:453:27 | a | 1 | | 454 | avoid_redundant_split | test.py:454:8:454:8 | a | 1 | | 455 | avoid_redundant_split | test.py:455:9:455:9 | x | 1 | diff --git a/python/ql/test/library-tests/ControlFlow/successors/Successors.expected b/python/ql/test/library-tests/ControlFlow/successors/Successors.expected index 9916271920a4..3d55db8a4b89 100644 --- a/python/ql/test/library-tests/ControlFlow/successors/Successors.expected +++ b/python/ql/test/library-tests/ControlFlow/successors/Successors.expected @@ -49,18 +49,18 @@ | test.py:13:13 | Attribute() | test.py:11:5 | Function add | normal | | test.py:13:13 | self | test.py:13:13 | Attribute | normal | | test.py:13:25 | item | test.py:13:13 | Attribute() | normal | -| test.py:15:1 | Class DiGraph | test.py:16:5 | Str | normal | +| test.py:15:1 | Class DiGraph | test.py:16:5 | StringLiteral | normal | | test.py:15:1 | ClassExpr | test.py:0:0 | Module test | exit | | test.py:15:1 | ClassExpr | test.py:15:7 | DiGraph | normal | | test.py:15:7 | DiGraph | test.py:103:17 | DiGraph | normal | | test.py:15:15 | object | test.py:15:1 | ClassExpr | normal | -| test.py:16:5 | Str | test.py:19:31 | Str | normal | +| test.py:16:5 | StringLiteral | test.py:19:31 | StringLiteral | normal | | test.py:19:5 | Function __init__ | test.py:19:18 | self | normal | | test.py:19:5 | FunctionExpr | test.py:19:9 | __init__ | normal | | test.py:19:9 | __init__ | test.py:27:5 | FunctionExpr | normal | | test.py:19:18 | self | test.py:19:24 | name | normal | | test.py:19:24 | name | test.py:20:21 | name | normal | -| test.py:19:31 | Str | test.py:19:5 | FunctionExpr | normal | +| test.py:19:31 | StringLiteral | test.py:19:5 | FunctionExpr | normal | | test.py:20:9 | Attribute | test.py:21:21 | Dict | normal | | test.py:20:9 | self | test.py:20:9 | Attribute | normal | | test.py:20:21 | name | test.py:20:9 | self | normal | @@ -83,8 +83,8 @@ | test.py:27:5 | FunctionExpr | test.py:27:9 | add_node | normal | | test.py:27:9 | add_node | test.py:34:5 | FunctionExpr | normal | | test.py:27:18 | self | test.py:27:24 | n | normal | -| test.py:27:24 | n | test.py:28:9 | Str | normal | -| test.py:28:9 | Str | test.py:29:12 | n | normal | +| test.py:27:24 | n | test.py:28:9 | StringLiteral | normal | +| test.py:28:9 | StringLiteral | test.py:29:12 | n | normal | | test.py:29:12 | Compare | test.py:27:5 | Function add_node | false | | test.py:29:12 | Compare | test.py:27:5 | Function add_node | normal | | test.py:29:12 | Compare | test.py:30:28 | SmallSet | normal | @@ -119,8 +119,8 @@ | test.py:34:9 | add_edge | test.py:47:5 | FunctionExpr | normal | | test.py:34:18 | self | test.py:34:24 | x | normal | | test.py:34:24 | x | test.py:34:27 | y | normal | -| test.py:34:27 | y | test.py:35:9 | Str | normal | -| test.py:35:9 | Str | test.py:37:12 | x | normal | +| test.py:34:27 | y | test.py:35:9 | StringLiteral | normal | +| test.py:35:9 | StringLiteral | test.py:37:12 | x | normal | | test.py:37:12 | Compare | test.py:38:16 | y | normal | | test.py:37:12 | Compare | test.py:38:16 | y | true | | test.py:37:12 | Compare | test.py:41:13 | self | false | @@ -183,11 +183,11 @@ | test.py:48:21 | Attribute | test.py:48:12 | Compare | normal | | test.py:48:21 | self | test.py:48:21 | Attribute | normal | | test.py:49:13 | Raise | test.py:47:5 | Function remove_node | exit | -| test.py:49:19 | ValueError | test.py:49:30 | Str | normal | +| test.py:49:19 | ValueError | test.py:49:30 | StringLiteral | normal | | test.py:49:19 | ValueError() | test.py:47:5 | Function remove_node | exit | | test.py:49:19 | ValueError() | test.py:49:13 | Raise | normal | | test.py:49:30 | BinaryExpr | test.py:49:19 | ValueError() | normal | -| test.py:49:30 | Str | test.py:49:58 | x | normal | +| test.py:49:30 | StringLiteral | test.py:49:58 | x | normal | | test.py:49:58 | x | test.py:49:30 | BinaryExpr | normal | | test.py:50:9 | preds | test.py:51:17 | self | normal | | test.py:50:17 | Attribute | test.py:50:27 | x | normal | @@ -269,8 +269,8 @@ | test.py:63:23 | self | test.py:63:29 | x | normal | | test.py:63:29 | x | test.py:63:32 | y | normal | | test.py:63:32 | y | test.py:63:35 | note | normal | -| test.py:63:35 | note | test.py:64:9 | Str | normal | -| test.py:64:9 | Str | test.py:66:12 | BoolExpr | normal | +| test.py:63:35 | note | test.py:64:9 | StringLiteral | normal | +| test.py:64:9 | StringLiteral | test.py:66:12 | BoolExpr | normal | | test.py:66:12 | BoolExpr | test.py:66:12 | x | normal | | test.py:66:12 | Compare | test.py:66:34 | y | false | | test.py:66:12 | Compare | test.py:66:34 | y | normal | @@ -290,11 +290,11 @@ | test.py:66:43 | self | test.py:66:43 | Attribute | normal | | test.py:66:53 | x | test.py:66:43 | Subscript | normal | | test.py:67:13 | Raise | test.py:63:5 | Function annotate_edge | exit | -| test.py:67:19 | ValueError | test.py:67:30 | Str | normal | +| test.py:67:19 | ValueError | test.py:67:30 | StringLiteral | normal | | test.py:67:19 | ValueError() | test.py:63:5 | Function annotate_edge | exit | | test.py:67:19 | ValueError() | test.py:67:13 | Raise | normal | | test.py:67:30 | BinaryExpr | test.py:67:19 | ValueError() | normal | -| test.py:67:30 | Str | test.py:67:65 | x | normal | +| test.py:67:30 | StringLiteral | test.py:67:65 | x | normal | | test.py:67:65 | Tuple | test.py:67:30 | BinaryExpr | normal | | test.py:67:65 | x | test.py:67:68 | y | normal | | test.py:67:68 | y | test.py:67:65 | Tuple | normal | @@ -311,8 +311,8 @@ | test.py:70:9 | annotate_node | test.py:77:5 | FunctionExpr | normal | | test.py:70:23 | self | test.py:70:29 | x | normal | | test.py:70:29 | x | test.py:70:32 | note | normal | -| test.py:70:32 | note | test.py:71:9 | Str | normal | -| test.py:71:9 | Str | test.py:73:12 | x | normal | +| test.py:70:32 | note | test.py:71:9 | StringLiteral | normal | +| test.py:71:9 | StringLiteral | test.py:73:12 | x | normal | | test.py:73:12 | Compare | test.py:74:19 | ValueError | normal | | test.py:73:12 | Compare | test.py:74:19 | ValueError | true | | test.py:73:12 | Compare | test.py:75:36 | note | false | @@ -321,11 +321,11 @@ | test.py:73:21 | Attribute | test.py:73:12 | Compare | normal | | test.py:73:21 | self | test.py:73:21 | Attribute | normal | | test.py:74:13 | Raise | test.py:70:5 | Function annotate_node | exit | -| test.py:74:19 | ValueError | test.py:74:30 | Str | normal | +| test.py:74:19 | ValueError | test.py:74:30 | StringLiteral | normal | | test.py:74:19 | ValueError() | test.py:70:5 | Function annotate_node | exit | | test.py:74:19 | ValueError() | test.py:74:13 | Raise | normal | | test.py:74:30 | BinaryExpr | test.py:74:19 | ValueError() | normal | -| test.py:74:30 | Str | test.py:74:58 | x | normal | +| test.py:74:30 | StringLiteral | test.py:74:58 | x | normal | | test.py:74:58 | x | test.py:74:30 | BinaryExpr | normal | | test.py:75:9 | Attribute | test.py:75:31 | x | normal | | test.py:75:9 | Subscript | test.py:70:5 | Function annotate_node | exit | @@ -336,8 +336,8 @@ | test.py:77:5 | Function nodes | test.py:77:15 | self | normal | | test.py:77:5 | FunctionExpr | test.py:77:9 | nodes | normal | | test.py:77:9 | nodes | test.py:83:5 | FunctionExpr | normal | -| test.py:77:15 | self | test.py:78:9 | Str | normal | -| test.py:78:9 | Str | test.py:80:21 | self | normal | +| test.py:77:15 | self | test.py:78:9 | StringLiteral | normal | +| test.py:78:9 | StringLiteral | test.py:80:21 | self | normal | | test.py:80:9 | For | test.py:77:5 | Function nodes | normal | | test.py:80:9 | For | test.py:80:13 | node | normal | | test.py:80:13 | node | test.py:81:19 | node | normal | @@ -355,8 +355,8 @@ | test.py:83:5 | Function edges | test.py:83:15 | self | normal | | test.py:83:5 | FunctionExpr | test.py:83:9 | edges | normal | | test.py:83:9 | edges | test.py:92:5 | FunctionExpr | normal | -| test.py:83:15 | self | test.py:84:9 | Str | normal | -| test.py:84:9 | Str | test.py:86:17 | dict | normal | +| test.py:83:15 | self | test.py:84:9 | StringLiteral | normal | +| test.py:84:9 | StringLiteral | test.py:86:17 | dict | normal | | test.py:86:9 | index | test.py:87:18 | self | normal | | test.py:86:17 | dict | test.py:86:41 | enumerate | normal | | test.py:86:17 | dict() | test.py:83:5 | Function edges | exit | @@ -421,8 +421,8 @@ | test.py:92:5 | Function sources | test.py:92:17 | self | normal | | test.py:92:5 | FunctionExpr | test.py:92:9 | sources | normal | | test.py:92:9 | sources | test.py:99:5 | FunctionExpr | normal | -| test.py:92:17 | self | test.py:93:9 | Str | normal | -| test.py:93:9 | Str | test.py:95:21 | self | normal | +| test.py:92:17 | self | test.py:93:9 | StringLiteral | normal | +| test.py:93:9 | StringLiteral | test.py:95:21 | self | normal | | test.py:95:9 | For | test.py:92:5 | Function sources | normal | | test.py:95:9 | For | test.py:95:13 | Tuple | normal | | test.py:95:13 | Tuple | test.py:95:13 | n | normal | @@ -450,12 +450,12 @@ | test.py:100:16 | node | test.py:100:24 | self | normal | | test.py:100:24 | Attribute | test.py:100:16 | Compare | normal | | test.py:100:24 | self | test.py:100:24 | Attribute | normal | -| test.py:103:1 | Class FlowGraph | test.py:104:5 | Str | normal | +| test.py:103:1 | Class FlowGraph | test.py:104:5 | StringLiteral | normal | | test.py:103:1 | ClassExpr | test.py:0:0 | Module test | exit | | test.py:103:1 | ClassExpr | test.py:103:7 | FlowGraph | normal | | test.py:103:7 | FlowGraph | test.py:703:15 | object | normal | | test.py:103:17 | DiGraph | test.py:103:1 | ClassExpr | normal | -| test.py:104:5 | Str | test.py:110:5 | FunctionExpr | normal | +| test.py:104:5 | StringLiteral | test.py:110:5 | FunctionExpr | normal | | test.py:110:5 | Function __init__ | test.py:110:18 | self | normal | | test.py:110:5 | FunctionExpr | test.py:110:9 | __init__ | normal | | test.py:110:9 | __init__ | test.py:118:5 | FunctionExpr | normal | @@ -507,10 +507,10 @@ | test.py:119:60 | Compare | test.py:119:26 | attr | normal | | test.py:119:60 | Compare | test.py:119:26 | attr | true | | test.py:119:60 | Subscript | test.py:119:25 | Function listcomp | exit | -| test.py:119:60 | Subscript | test.py:119:71 | Str | normal | +| test.py:119:60 | Subscript | test.py:119:71 | StringLiteral | normal | | test.py:119:60 | attr | test.py:119:65 | IntegerLiteral | normal | | test.py:119:65 | IntegerLiteral | test.py:119:60 | Subscript | normal | -| test.py:119:71 | Str | test.py:119:60 | Compare | normal | +| test.py:119:71 | StringLiteral | test.py:119:60 | Compare | normal | | test.py:120:9 | For | test.py:118:5 | Function clear_computed | normal | | test.py:120:9 | For | test.py:120:13 | attr | normal | | test.py:120:13 | attr | test.py:121:13 | delattr | normal | @@ -524,34 +524,34 @@ | test.py:123:5 | FunctionExpr | test.py:123:9 | _require | normal | | test.py:123:9 | _require | test.py:129:5 | FunctionExpr | normal | | test.py:123:18 | self | test.py:123:24 | what | normal | -| test.py:123:24 | what | test.py:124:9 | Str | normal | -| test.py:124:9 | Str | test.py:125:12 | hasattr | normal | +| test.py:123:24 | what | test.py:124:9 | StringLiteral | normal | +| test.py:124:9 | StringLiteral | test.py:125:12 | hasattr | normal | | test.py:125:12 | hasattr | test.py:125:20 | self | normal | | test.py:125:12 | hasattr() | test.py:123:5 | Function _require | exit | | test.py:125:12 | hasattr() | test.py:126:13 | Return | normal | | test.py:125:12 | hasattr() | test.py:126:13 | Return | true | | test.py:125:12 | hasattr() | test.py:127:9 | setattr | false | | test.py:125:12 | hasattr() | test.py:127:9 | setattr | normal | -| test.py:125:20 | self | test.py:125:26 | Str | normal | +| test.py:125:20 | self | test.py:125:26 | StringLiteral | normal | | test.py:125:26 | BinaryExpr | test.py:125:12 | hasattr() | normal | -| test.py:125:26 | Str | test.py:125:32 | what | normal | +| test.py:125:26 | StringLiteral | test.py:125:32 | what | normal | | test.py:125:32 | what | test.py:125:26 | BinaryExpr | normal | | test.py:126:13 | Return | test.py:123:5 | Function _require | normal | | test.py:127:9 | setattr | test.py:127:17 | self | normal | | test.py:127:9 | setattr() | test.py:123:5 | Function _require | exit | | test.py:127:9 | setattr() | test.py:123:5 | Function _require | normal | -| test.py:127:17 | self | test.py:127:23 | Str | normal | +| test.py:127:17 | self | test.py:127:23 | StringLiteral | normal | | test.py:127:23 | BinaryExpr | test.py:127:35 | getattr | normal | -| test.py:127:23 | Str | test.py:127:29 | what | normal | +| test.py:127:23 | StringLiteral | test.py:127:29 | what | normal | | test.py:127:29 | what | test.py:127:23 | BinaryExpr | normal | | test.py:127:35 | getattr | test.py:127:43 | self | normal | | test.py:127:35 | getattr() | test.py:123:5 | Function _require | exit | | test.py:127:35 | getattr() | test.py:127:35 | getattr()() | normal | | test.py:127:35 | getattr()() | test.py:123:5 | Function _require | exit | | test.py:127:35 | getattr()() | test.py:127:9 | setattr() | normal | -| test.py:127:43 | self | test.py:127:49 | Str | normal | +| test.py:127:43 | self | test.py:127:49 | StringLiteral | normal | | test.py:127:49 | BinaryExpr | test.py:127:35 | getattr() | normal | -| test.py:127:49 | Str | test.py:127:63 | what | normal | +| test.py:127:49 | StringLiteral | test.py:127:63 | what | normal | | test.py:127:63 | what | test.py:127:49 | BinaryExpr | normal | | test.py:129:5 | Function add_deletion | test.py:129:22 | self | normal | | test.py:129:5 | FunctionExpr | test.py:129:9 | add_deletion | normal | @@ -638,11 +638,11 @@ | test.py:145:5 | FunctionExpr | test.py:145:9 | _compute_depth_first_pre_order | normal | | test.py:145:9 | _compute_depth_first_pre_order | test.py:150:5 | FunctionExpr | normal | | test.py:145:40 | self | test.py:146:9 | self | normal | -| test.py:146:9 | Attribute | test.py:146:23 | Str | normal | +| test.py:146:9 | Attribute | test.py:146:23 | StringLiteral | normal | | test.py:146:9 | Attribute() | test.py:145:5 | Function _compute_depth_first_pre_order | exit | | test.py:146:9 | Attribute() | test.py:147:34 | self | normal | | test.py:146:9 | self | test.py:146:9 | Attribute | normal | -| test.py:146:23 | Str | test.py:146:9 | Attribute() | normal | +| test.py:146:23 | StringLiteral | test.py:146:9 | Attribute() | normal | | test.py:147:9 | reachable | test.py:148:16 | sorted | normal | | test.py:147:21 | .0 | test.py:147:21 | .0 | normal | | test.py:147:21 | .0 | test.py:147:21 | For | normal | @@ -682,11 +682,11 @@ | test.py:150:5 | FunctionExpr | test.py:150:9 | _compute_reachable | normal | | test.py:150:9 | _compute_reachable | test.py:154:5 | FunctionExpr | normal | | test.py:150:28 | self | test.py:151:9 | self | normal | -| test.py:151:9 | Attribute | test.py:151:23 | Str | normal | +| test.py:151:9 | Attribute | test.py:151:23 | StringLiteral | normal | | test.py:151:9 | Attribute() | test.py:150:5 | Function _compute_reachable | exit | | test.py:151:9 | Attribute() | test.py:152:16 | frozenset | normal | | test.py:151:9 | self | test.py:151:9 | Attribute | normal | -| test.py:151:23 | Str | test.py:151:9 | Attribute() | normal | +| test.py:151:23 | StringLiteral | test.py:151:9 | Attribute() | normal | | test.py:152:9 | Return | test.py:150:5 | Function _compute_reachable | normal | | test.py:152:16 | frozenset | test.py:152:26 | self | normal | | test.py:152:16 | frozenset() | test.py:150:5 | Function _compute_reachable | exit | @@ -697,11 +697,11 @@ | test.py:154:5 | FunctionExpr | test.py:154:9 | reachable_nodes | normal | | test.py:154:9 | reachable_nodes | test.py:158:5 | FunctionExpr | normal | | test.py:154:25 | self | test.py:155:9 | self | normal | -| test.py:155:9 | Attribute | test.py:155:23 | Str | normal | +| test.py:155:9 | Attribute | test.py:155:23 | StringLiteral | normal | | test.py:155:9 | Attribute() | test.py:154:5 | Function reachable_nodes | exit | | test.py:155:9 | Attribute() | test.py:156:16 | self | normal | | test.py:155:9 | self | test.py:155:9 | Attribute | normal | -| test.py:155:23 | Str | test.py:155:9 | Attribute() | normal | +| test.py:155:23 | StringLiteral | test.py:155:9 | Attribute() | normal | | test.py:156:9 | Return | test.py:154:5 | Function reachable_nodes | normal | | test.py:156:16 | Attribute | test.py:156:9 | Return | normal | | test.py:156:16 | self | test.py:156:16 | Attribute | normal | @@ -709,11 +709,11 @@ | test.py:158:5 | FunctionExpr | test.py:158:9 | _compute_reversed_depth_first_pre_order | normal | | test.py:158:9 | _compute_reversed_depth_first_pre_order | test.py:162:5 | FunctionExpr | normal | | test.py:158:49 | self | test.py:159:9 | self | normal | -| test.py:159:9 | Attribute | test.py:159:23 | Str | normal | +| test.py:159:9 | Attribute | test.py:159:23 | StringLiteral | normal | | test.py:159:9 | Attribute() | test.py:158:5 | Function _compute_reversed_depth_first_pre_order | exit | | test.py:159:9 | Attribute() | test.py:160:16 | reversed | normal | | test.py:159:9 | self | test.py:159:9 | Attribute | normal | -| test.py:159:23 | Str | test.py:159:9 | Attribute() | normal | +| test.py:159:23 | StringLiteral | test.py:159:9 | Attribute() | normal | | test.py:160:9 | Return | test.py:158:5 | Function _compute_reversed_depth_first_pre_order | normal | | test.py:160:16 | reversed | test.py:160:25 | self | normal | | test.py:160:16 | reversed() | test.py:158:5 | Function _compute_reversed_depth_first_pre_order | exit | @@ -724,16 +724,16 @@ | test.py:162:5 | FunctionExpr | test.py:162:9 | _compute_bb_depth_first_pre_order | normal | | test.py:162:9 | _compute_bb_depth_first_pre_order | test.py:171:5 | FunctionExpr | normal | | test.py:162:43 | self | test.py:163:9 | self | normal | -| test.py:163:9 | Attribute | test.py:163:23 | Str | normal | +| test.py:163:9 | Attribute | test.py:163:23 | StringLiteral | normal | | test.py:163:9 | Attribute() | test.py:162:5 | Function _compute_bb_depth_first_pre_order | exit | | test.py:163:9 | Attribute() | test.py:164:9 | self | normal | | test.py:163:9 | self | test.py:163:9 | Attribute | normal | -| test.py:163:23 | Str | test.py:163:9 | Attribute() | normal | -| test.py:164:9 | Attribute | test.py:164:23 | Str | normal | +| test.py:163:23 | StringLiteral | test.py:163:9 | Attribute() | normal | +| test.py:164:9 | Attribute | test.py:164:23 | StringLiteral | normal | | test.py:164:9 | Attribute() | test.py:162:5 | Function _compute_bb_depth_first_pre_order | exit | | test.py:164:9 | Attribute() | test.py:165:15 | List | normal | | test.py:164:9 | self | test.py:164:9 | Attribute | normal | -| test.py:164:23 | Str | test.py:164:9 | Attribute() | normal | +| test.py:164:23 | StringLiteral | test.py:164:9 | Attribute() | normal | | test.py:165:9 | bbs | test.py:166:18 | self | normal | | test.py:165:15 | List | test.py:165:9 | bbs | normal | | test.py:166:9 | For | test.py:166:13 | n | normal | @@ -759,11 +759,11 @@ | test.py:171:5 | FunctionExpr | test.py:171:9 | _compute_bb_reversed_depth_first_pre_order | normal | | test.py:171:9 | _compute_bb_reversed_depth_first_pre_order | test.py:175:5 | FunctionExpr | normal | | test.py:171:52 | self | test.py:172:9 | self | normal | -| test.py:172:9 | Attribute | test.py:172:23 | Str | normal | +| test.py:172:9 | Attribute | test.py:172:23 | StringLiteral | normal | | test.py:172:9 | Attribute() | test.py:171:5 | Function _compute_bb_reversed_depth_first_pre_order | exit | | test.py:172:9 | Attribute() | test.py:173:16 | reversed | normal | | test.py:172:9 | self | test.py:172:9 | Attribute | normal | -| test.py:172:23 | Str | test.py:172:9 | Attribute() | normal | +| test.py:172:23 | StringLiteral | test.py:172:9 | Attribute() | normal | | test.py:173:9 | Return | test.py:171:5 | Function _compute_bb_reversed_depth_first_pre_order | normal | | test.py:173:16 | reversed | test.py:173:25 | self | normal | | test.py:173:16 | reversed() | test.py:171:5 | Function _compute_bb_reversed_depth_first_pre_order | exit | @@ -773,8 +773,8 @@ | test.py:175:5 | Function _compute_depth_first_pre_order_labels | test.py:175:47 | self | normal | | test.py:175:5 | FunctionExpr | test.py:175:9 | _compute_depth_first_pre_order_labels | normal | | test.py:175:9 | _compute_depth_first_pre_order_labels | test.py:196:5 | FunctionExpr | normal | -| test.py:175:47 | self | test.py:176:9 | Str | normal | -| test.py:176:9 | Str | test.py:177:18 | Dict | normal | +| test.py:175:47 | self | test.py:176:9 | StringLiteral | normal | +| test.py:176:9 | StringLiteral | test.py:177:18 | Dict | normal | | test.py:177:9 | orders | test.py:178:17 | IntegerLiteral | normal | | test.py:177:18 | Dict | test.py:177:9 | orders | normal | | test.py:178:9 | order | test.py:179:28 | self | normal | @@ -865,19 +865,19 @@ | test.py:196:5 | FunctionExpr | test.py:196:9 | _compute_idoms | normal | | test.py:196:9 | _compute_idoms | test.py:227:5 | FunctionExpr | normal | | test.py:196:24 | self | test.py:197:9 | self | normal | -| test.py:197:9 | Attribute | test.py:197:23 | Str | normal | +| test.py:197:9 | Attribute | test.py:197:23 | StringLiteral | normal | | test.py:197:9 | Attribute() | test.py:196:5 | Function _compute_idoms | exit | | test.py:197:9 | Attribute() | test.py:198:17 | Dict | normal | | test.py:197:9 | self | test.py:197:9 | Attribute | normal | -| test.py:197:23 | Str | test.py:197:9 | Attribute() | normal | +| test.py:197:23 | StringLiteral | test.py:197:9 | Attribute() | normal | | test.py:198:9 | idoms | test.py:200:9 | FunctionExpr | normal | | test.py:198:17 | Dict | test.py:198:9 | idoms | normal | | test.py:200:9 | Function idom_intersection | test.py:200:31 | n1 | normal | | test.py:200:9 | FunctionExpr | test.py:200:13 | idom_intersection | normal | | test.py:200:13 | idom_intersection | test.py:210:21 | self | normal | | test.py:200:31 | n1 | test.py:200:35 | n2 | normal | -| test.py:200:35 | n2 | test.py:201:13 | Str | normal | -| test.py:201:13 | Str | test.py:202:22 | self | normal | +| test.py:200:35 | n2 | test.py:201:13 | StringLiteral | normal | +| test.py:201:13 | StringLiteral | test.py:202:22 | self | normal | | test.py:202:13 | orders | test.py:203:13 | While | normal | | test.py:202:22 | Attribute | test.py:202:13 | orders | normal | | test.py:202:22 | self | test.py:202:22 | Attribute | normal | @@ -1014,13 +1014,13 @@ | test.py:227:5 | Function idoms | test.py:227:15 | self | normal | | test.py:227:5 | FunctionExpr | test.py:227:9 | idoms | normal | | test.py:227:9 | idoms | test.py:236:5 | FunctionExpr | normal | -| test.py:227:15 | self | test.py:228:9 | Str | normal | -| test.py:228:9 | Str | test.py:229:9 | self | normal | -| test.py:229:9 | Attribute | test.py:229:23 | Str | normal | +| test.py:227:15 | self | test.py:228:9 | StringLiteral | normal | +| test.py:228:9 | StringLiteral | test.py:229:9 | self | normal | +| test.py:229:9 | Attribute | test.py:229:23 | StringLiteral | normal | | test.py:229:9 | Attribute() | test.py:227:5 | Function idoms | exit | | test.py:229:9 | Attribute() | test.py:230:17 | self | normal | | test.py:229:9 | self | test.py:229:9 | Attribute | normal | -| test.py:229:23 | Str | test.py:229:9 | Attribute() | normal | +| test.py:229:23 | StringLiteral | test.py:229:9 | Attribute() | normal | | test.py:230:9 | idoms | test.py:231:18 | self | normal | | test.py:230:17 | Attribute | test.py:230:9 | idoms | normal | | test.py:230:17 | self | test.py:230:17 | Attribute | normal | @@ -1045,8 +1045,8 @@ | test.py:236:5 | Function _compute_dominance_frontier | test.py:236:37 | self | normal | | test.py:236:5 | FunctionExpr | test.py:236:9 | _compute_dominance_frontier | normal | | test.py:236:9 | _compute_dominance_frontier | test.py:268:5 | FunctionExpr | normal | -| test.py:236:37 | self | test.py:237:9 | Str | normal | -| test.py:237:9 | Str | test.py:240:9 | FunctionExpr | normal | +| test.py:236:37 | self | test.py:237:9 | StringLiteral | normal | +| test.py:237:9 | StringLiteral | test.py:240:9 | FunctionExpr | normal | | test.py:240:9 | Function dominates | test.py:240:23 | dom | normal | | test.py:240:9 | FunctionExpr | test.py:240:13 | dominates | normal | | test.py:240:13 | dominates | test.py:248:9 | self | normal | @@ -1076,11 +1076,11 @@ | test.py:245:24 | next_node | test.py:245:17 | node | normal | | test.py:246:13 | Return | test.py:240:9 | Function dominates | normal | | test.py:246:20 | False | test.py:246:13 | Return | normal | -| test.py:248:9 | Attribute | test.py:248:23 | Str | normal | +| test.py:248:9 | Attribute | test.py:248:23 | StringLiteral | normal | | test.py:248:9 | Attribute() | test.py:236:5 | Function _compute_dominance_frontier | exit | | test.py:248:9 | Attribute() | test.py:249:17 | self | normal | | test.py:248:9 | self | test.py:248:9 | Attribute | normal | -| test.py:248:23 | Str | test.py:248:9 | Attribute() | normal | +| test.py:248:23 | StringLiteral | test.py:248:9 | Attribute() | normal | | test.py:249:9 | idoms | test.py:250:30 | Dict | normal | | test.py:249:17 | Attribute | test.py:249:9 | idoms | normal | | test.py:249:17 | self | test.py:249:17 | Attribute | normal | @@ -1093,11 +1093,11 @@ | test.py:252:20 | _reverse_map() | test.py:236:5 | Function _compute_dominance_frontier | exit | | test.py:252:20 | _reverse_map() | test.py:252:9 | dom_tree | normal | | test.py:252:33 | idoms | test.py:252:20 | _reverse_map() | normal | -| test.py:253:9 | Attribute | test.py:253:23 | Str | normal | +| test.py:253:9 | Attribute | test.py:253:23 | StringLiteral | normal | | test.py:253:9 | Attribute() | test.py:236:5 | Function _compute_dominance_frontier | exit | | test.py:253:9 | Attribute() | test.py:254:21 | self | normal | | test.py:253:9 | self | test.py:253:9 | Attribute | normal | -| test.py:253:23 | Str | test.py:253:9 | Attribute() | normal | +| test.py:253:23 | StringLiteral | test.py:253:9 | Attribute() | normal | | test.py:254:9 | For | test.py:254:13 | node | normal | | test.py:254:9 | For | test.py:266:16 | dominance_frontier | normal | | test.py:254:13 | node | test.py:255:26 | set | normal | @@ -1207,18 +1207,18 @@ | test.py:268:5 | Function _compute_phi_nodes | test.py:268:28 | self | normal | | test.py:268:5 | FunctionExpr | test.py:268:9 | _compute_phi_nodes | normal | | test.py:268:9 | _compute_phi_nodes | test.py:315:5 | FunctionExpr | normal | -| test.py:268:28 | self | test.py:269:9 | Str | normal | -| test.py:269:9 | Str | test.py:273:9 | self | normal | -| test.py:273:9 | Attribute | test.py:273:23 | Str | normal | +| test.py:268:28 | self | test.py:269:9 | StringLiteral | normal | +| test.py:269:9 | StringLiteral | test.py:273:9 | self | normal | +| test.py:273:9 | Attribute | test.py:273:23 | StringLiteral | normal | | test.py:273:9 | Attribute() | test.py:268:5 | Function _compute_phi_nodes | exit | | test.py:273:9 | Attribute() | test.py:274:9 | self | normal | | test.py:273:9 | self | test.py:273:9 | Attribute | normal | -| test.py:273:23 | Str | test.py:273:9 | Attribute() | normal | -| test.py:274:9 | Attribute | test.py:274:23 | Str | normal | +| test.py:273:23 | StringLiteral | test.py:273:9 | Attribute() | normal | +| test.py:274:9 | Attribute | test.py:274:23 | StringLiteral | normal | | test.py:274:9 | Attribute() | test.py:268:5 | Function _compute_phi_nodes | exit | | test.py:274:9 | Attribute() | test.py:275:30 | self | normal | | test.py:274:9 | self | test.py:274:9 | Attribute | normal | -| test.py:274:23 | Str | test.py:274:9 | Attribute() | normal | +| test.py:274:23 | StringLiteral | test.py:274:9 | Attribute() | normal | | test.py:275:9 | dominance_frontier | test.py:276:23 | dict | normal | | test.py:275:30 | Attribute | test.py:275:9 | dominance_frontier | normal | | test.py:275:30 | self | test.py:275:30 | Attribute | normal | @@ -1420,28 +1420,28 @@ | test.py:315:5 | Function _compute_ssa_data | test.py:315:27 | self | normal | | test.py:315:5 | FunctionExpr | test.py:315:9 | _compute_ssa_data | normal | | test.py:315:9 | _compute_ssa_data | test.py:420:5 | FunctionExpr | normal | -| test.py:315:27 | self | test.py:316:9 | Str | normal | -| test.py:316:9 | Str | test.py:318:9 | self | normal | -| test.py:318:9 | Attribute | test.py:318:23 | Str | normal | +| test.py:315:27 | self | test.py:316:9 | StringLiteral | normal | +| test.py:316:9 | StringLiteral | test.py:318:9 | self | normal | +| test.py:318:9 | Attribute | test.py:318:23 | StringLiteral | normal | | test.py:318:9 | Attribute() | test.py:315:5 | Function _compute_ssa_data | exit | | test.py:318:9 | Attribute() | test.py:319:9 | self | normal | | test.py:318:9 | self | test.py:318:9 | Attribute | normal | -| test.py:318:23 | Str | test.py:318:9 | Attribute() | normal | -| test.py:319:9 | Attribute | test.py:319:23 | Str | normal | +| test.py:318:23 | StringLiteral | test.py:318:9 | Attribute() | normal | +| test.py:319:9 | Attribute | test.py:319:23 | StringLiteral | normal | | test.py:319:9 | Attribute() | test.py:315:5 | Function _compute_ssa_data | exit | | test.py:319:9 | Attribute() | test.py:320:9 | self | normal | | test.py:319:9 | self | test.py:319:9 | Attribute | normal | -| test.py:319:23 | Str | test.py:319:9 | Attribute() | normal | -| test.py:320:9 | Attribute | test.py:320:23 | Str | normal | +| test.py:319:23 | StringLiteral | test.py:319:9 | Attribute() | normal | +| test.py:320:9 | Attribute | test.py:320:23 | StringLiteral | normal | | test.py:320:9 | Attribute() | test.py:315:5 | Function _compute_ssa_data | exit | | test.py:320:9 | Attribute() | test.py:321:9 | self | normal | | test.py:320:9 | self | test.py:320:9 | Attribute | normal | -| test.py:320:23 | Str | test.py:320:9 | Attribute() | normal | -| test.py:321:9 | Attribute | test.py:321:23 | Str | normal | +| test.py:320:23 | StringLiteral | test.py:320:9 | Attribute() | normal | +| test.py:321:9 | Attribute | test.py:321:23 | StringLiteral | normal | | test.py:321:9 | Attribute() | test.py:315:5 | Function _compute_ssa_data | exit | | test.py:321:9 | Attribute() | test.py:322:21 | self | normal | | test.py:321:9 | self | test.py:321:9 | Attribute | normal | -| test.py:321:23 | Str | test.py:321:9 | Attribute() | normal | +| test.py:321:23 | StringLiteral | test.py:321:9 | Attribute() | normal | | test.py:322:9 | phi_nodes | test.py:323:29 | Dict | normal | | test.py:322:21 | Attribute | test.py:322:9 | phi_nodes | normal | | test.py:322:21 | self | test.py:322:21 | Attribute | normal | @@ -1473,8 +1473,8 @@ | test.py:332:9 | FunctionExpr | test.py:332:13 | make_ssa_var | normal | | test.py:332:13 | make_ssa_var | test.py:341:19 | self | normal | | test.py:332:26 | variable | test.py:332:36 | node | normal | -| test.py:332:36 | node | test.py:333:13 | Str | normal | -| test.py:333:13 | Str | test.py:334:20 | variable | normal | +| test.py:332:36 | node | test.py:333:13 | StringLiteral | normal | +| test.py:333:13 | StringLiteral | test.py:334:20 | variable | normal | | test.py:334:13 | uid | test.py:335:16 | uid | normal | | test.py:334:20 | Tuple | test.py:334:13 | uid | normal | | test.py:334:20 | variable | test.py:334:30 | node | normal | @@ -1873,13 +1873,13 @@ | test.py:420:5 | Function ssa_variables | test.py:420:23 | self | normal | | test.py:420:5 | FunctionExpr | test.py:420:9 | ssa_variables | normal | | test.py:420:9 | ssa_variables | test.py:425:5 | FunctionExpr | normal | -| test.py:420:23 | self | test.py:421:9 | Str | normal | -| test.py:421:9 | Str | test.py:422:9 | self | normal | -| test.py:422:9 | Attribute | test.py:422:23 | Str | normal | +| test.py:420:23 | self | test.py:421:9 | StringLiteral | normal | +| test.py:421:9 | StringLiteral | test.py:422:9 | self | normal | +| test.py:422:9 | Attribute | test.py:422:23 | StringLiteral | normal | | test.py:422:9 | Attribute() | test.py:420:5 | Function ssa_variables | exit | | test.py:422:9 | Attribute() | test.py:423:16 | self | normal | | test.py:422:9 | self | test.py:422:9 | Attribute | normal | -| test.py:422:23 | Str | test.py:422:9 | Attribute() | normal | +| test.py:422:23 | StringLiteral | test.py:422:9 | Attribute() | normal | | test.py:423:9 | Return | test.py:420:5 | Function ssa_variables | normal | | test.py:423:16 | Attribute | test.py:423:31 | IntegerLiteral | normal | | test.py:423:16 | Subscript | test.py:420:5 | Function ssa_variables | exit | @@ -1961,13 +1961,13 @@ | test.py:441:5 | Function ssa_definitions | test.py:441:25 | self | normal | | test.py:441:5 | FunctionExpr | test.py:441:9 | ssa_definitions | normal | | test.py:441:9 | ssa_definitions | test.py:452:5 | FunctionExpr | normal | -| test.py:441:25 | self | test.py:442:9 | Str | normal | -| test.py:442:9 | Str | test.py:443:9 | self | normal | -| test.py:443:9 | Attribute | test.py:443:23 | Str | normal | +| test.py:441:25 | self | test.py:442:9 | StringLiteral | normal | +| test.py:442:9 | StringLiteral | test.py:443:9 | self | normal | +| test.py:443:9 | Attribute | test.py:443:23 | StringLiteral | normal | | test.py:443:9 | Attribute() | test.py:441:5 | Function ssa_definitions | exit | | test.py:443:9 | Attribute() | test.py:444:21 | self | normal | | test.py:443:9 | self | test.py:443:9 | Attribute | normal | -| test.py:443:23 | Str | test.py:443:9 | Attribute() | normal | +| test.py:443:23 | StringLiteral | test.py:443:9 | Attribute() | normal | | test.py:444:9 | ssa_defns | test.py:445:26 | _reverse_map | normal | | test.py:444:21 | Attribute | test.py:444:36 | IntegerLiteral | normal | | test.py:444:21 | Subscript | test.py:441:5 | Function ssa_definitions | exit | @@ -2018,13 +2018,13 @@ | test.py:452:5 | FunctionExpr | test.py:452:9 | get_ssa_definition | normal | | test.py:452:9 | get_ssa_definition | test.py:458:5 | FunctionExpr | normal | | test.py:452:28 | self | test.py:452:34 | var | normal | -| test.py:452:34 | var | test.py:453:9 | Str | normal | -| test.py:453:9 | Str | test.py:454:9 | self | normal | -| test.py:454:9 | Attribute | test.py:454:23 | Str | normal | +| test.py:452:34 | var | test.py:453:9 | StringLiteral | normal | +| test.py:453:9 | StringLiteral | test.py:454:9 | self | normal | +| test.py:454:9 | Attribute | test.py:454:23 | StringLiteral | normal | | test.py:454:9 | Attribute() | test.py:452:5 | Function get_ssa_definition | exit | | test.py:454:9 | Attribute() | test.py:455:21 | self | normal | | test.py:454:9 | self | test.py:454:9 | Attribute | normal | -| test.py:454:23 | Str | test.py:454:9 | Attribute() | normal | +| test.py:454:23 | StringLiteral | test.py:454:9 | Attribute() | normal | | test.py:455:9 | ssa_defns | test.py:456:16 | ssa_defns | normal | | test.py:455:21 | Attribute | test.py:455:36 | IntegerLiteral | normal | | test.py:455:21 | Subscript | test.py:452:5 | Function get_ssa_definition | exit | @@ -2040,13 +2040,13 @@ | test.py:458:5 | Function ssa_uses | test.py:458:18 | self | normal | | test.py:458:5 | FunctionExpr | test.py:458:9 | ssa_uses | normal | | test.py:458:9 | ssa_uses | test.py:468:5 | FunctionExpr | normal | -| test.py:458:18 | self | test.py:459:9 | Str | normal | -| test.py:459:9 | Str | test.py:460:9 | self | normal | -| test.py:460:9 | Attribute | test.py:460:23 | Str | normal | +| test.py:458:18 | self | test.py:459:9 | StringLiteral | normal | +| test.py:459:9 | StringLiteral | test.py:460:9 | self | normal | +| test.py:460:9 | Attribute | test.py:460:23 | StringLiteral | normal | | test.py:460:9 | Attribute() | test.py:458:5 | Function ssa_uses | exit | | test.py:460:9 | Attribute() | test.py:461:20 | self | normal | | test.py:460:9 | self | test.py:460:9 | Attribute | normal | -| test.py:460:23 | Str | test.py:460:9 | Attribute() | normal | +| test.py:460:23 | StringLiteral | test.py:460:9 | Attribute() | normal | | test.py:461:9 | ssa_uses | test.py:462:18 | self | normal | | test.py:461:20 | Attribute | test.py:461:35 | IntegerLiteral | normal | | test.py:461:20 | Subscript | test.py:458:5 | Function ssa_uses | exit | @@ -2092,13 +2092,13 @@ | test.py:468:5 | FunctionExpr | test.py:468:9 | get_ssa_variables_used | normal | | test.py:468:9 | get_ssa_variables_used | test.py:474:5 | FunctionExpr | normal | | test.py:468:32 | self | test.py:468:38 | node | normal | -| test.py:468:38 | node | test.py:469:9 | Str | normal | -| test.py:469:9 | Str | test.py:470:9 | self | normal | -| test.py:470:9 | Attribute | test.py:470:23 | Str | normal | +| test.py:468:38 | node | test.py:469:9 | StringLiteral | normal | +| test.py:469:9 | StringLiteral | test.py:470:9 | self | normal | +| test.py:470:9 | Attribute | test.py:470:23 | StringLiteral | normal | | test.py:470:9 | Attribute() | test.py:468:5 | Function get_ssa_variables_used | exit | | test.py:470:9 | Attribute() | test.py:471:20 | self | normal | | test.py:470:9 | self | test.py:470:9 | Attribute | normal | -| test.py:470:23 | Str | test.py:470:9 | Attribute() | normal | +| test.py:470:23 | StringLiteral | test.py:470:9 | Attribute() | normal | | test.py:471:9 | ssa_uses | test.py:472:16 | ssa_uses | normal | | test.py:471:20 | Attribute | test.py:471:35 | IntegerLiteral | normal | | test.py:471:20 | Subscript | test.py:468:5 | Function get_ssa_variables_used | exit | @@ -2115,13 +2115,13 @@ | test.py:474:5 | Function ssa_phis | test.py:474:18 | self | normal | | test.py:474:5 | FunctionExpr | test.py:474:9 | ssa_phis | normal | | test.py:474:9 | ssa_phis | test.py:487:5 | FunctionExpr | normal | -| test.py:474:18 | self | test.py:475:9 | Str | normal | -| test.py:475:9 | Str | test.py:476:9 | self | normal | -| test.py:476:9 | Attribute | test.py:476:23 | Str | normal | +| test.py:474:18 | self | test.py:475:9 | StringLiteral | normal | +| test.py:475:9 | StringLiteral | test.py:476:9 | self | normal | +| test.py:476:9 | Attribute | test.py:476:23 | StringLiteral | normal | | test.py:476:9 | Attribute() | test.py:474:5 | Function ssa_phis | exit | | test.py:476:9 | Attribute() | test.py:477:20 | self | normal | | test.py:476:9 | self | test.py:476:9 | Attribute | normal | -| test.py:476:23 | Str | test.py:476:9 | Attribute() | normal | +| test.py:476:23 | StringLiteral | test.py:476:9 | Attribute() | normal | | test.py:477:9 | ssa_phis | test.py:478:20 | self | normal | | test.py:477:20 | Attribute | test.py:477:35 | IntegerLiteral | normal | | test.py:477:20 | Subscript | test.py:474:5 | Function ssa_phis | exit | @@ -2194,8 +2194,8 @@ | test.py:487:5 | Function _compute_bb_heads | test.py:487:27 | self | normal | | test.py:487:5 | FunctionExpr | test.py:487:9 | _compute_bb_heads | normal | | test.py:487:9 | _compute_bb_heads | test.py:496:5 | FunctionExpr | normal | -| test.py:487:27 | self | test.py:488:9 | Str | normal | -| test.py:488:9 | Str | test.py:489:20 | set | normal | +| test.py:487:27 | self | test.py:488:9 | StringLiteral | normal | +| test.py:488:9 | StringLiteral | test.py:489:20 | set | normal | | test.py:489:9 | bb_heads | test.py:490:21 | self | normal | | test.py:489:20 | set | test.py:489:20 | set() | normal | | test.py:489:20 | set() | test.py:487:5 | Function _compute_bb_heads | exit | @@ -2247,13 +2247,13 @@ | test.py:496:5 | Function _compute_basic_blocks | test.py:496:31 | self | normal | | test.py:496:5 | FunctionExpr | test.py:496:9 | _compute_basic_blocks | normal | | test.py:496:9 | _compute_basic_blocks | test.py:508:5 | FunctionExpr | normal | -| test.py:496:31 | self | test.py:497:9 | Str | normal | -| test.py:497:9 | Str | test.py:498:9 | self | normal | -| test.py:498:9 | Attribute | test.py:498:23 | Str | normal | +| test.py:496:31 | self | test.py:497:9 | StringLiteral | normal | +| test.py:497:9 | StringLiteral | test.py:498:9 | self | normal | +| test.py:498:9 | Attribute | test.py:498:23 | StringLiteral | normal | | test.py:498:9 | Attribute() | test.py:496:5 | Function _compute_basic_blocks | exit | | test.py:498:9 | Attribute() | test.py:499:24 | Dict | normal | | test.py:498:9 | self | test.py:498:9 | Attribute | normal | -| test.py:498:23 | Str | test.py:498:9 | Attribute() | normal | +| test.py:498:23 | StringLiteral | test.py:498:9 | Attribute() | normal | | test.py:499:9 | basic_blocks | test.py:500:20 | Dict | normal | | test.py:499:24 | Dict | test.py:499:9 | basic_blocks | normal | | test.py:500:9 | bb_tails | test.py:501:19 | self | normal | @@ -2297,11 +2297,11 @@ | test.py:508:5 | FunctionExpr | test.py:508:9 | get_basic_blocks | normal | | test.py:508:9 | get_basic_blocks | test.py:512:5 | FunctionExpr | normal | | test.py:508:26 | self | test.py:509:9 | self | normal | -| test.py:509:9 | Attribute | test.py:509:23 | Str | normal | +| test.py:509:9 | Attribute | test.py:509:23 | StringLiteral | normal | | test.py:509:9 | Attribute() | test.py:508:5 | Function get_basic_blocks | exit | | test.py:509:9 | Attribute() | test.py:510:16 | self | normal | | test.py:509:9 | self | test.py:509:9 | Attribute | normal | -| test.py:509:23 | Str | test.py:509:9 | Attribute() | normal | +| test.py:509:23 | StringLiteral | test.py:509:9 | Attribute() | normal | | test.py:510:9 | Return | test.py:508:5 | Function get_basic_blocks | normal | | test.py:510:16 | Attribute | test.py:510:9 | Return | normal | | test.py:510:16 | self | test.py:510:16 | Attribute | normal | @@ -2309,11 +2309,11 @@ | test.py:512:5 | FunctionExpr | test.py:512:9 | _compute_bb_succ | normal | | test.py:512:9 | _compute_bb_succ | test.py:519:5 | FunctionExpr | normal | | test.py:512:26 | self | test.py:513:9 | self | normal | -| test.py:513:9 | Attribute | test.py:513:23 | Str | normal | +| test.py:513:9 | Attribute | test.py:513:23 | StringLiteral | normal | | test.py:513:9 | Attribute() | test.py:512:5 | Function _compute_bb_succ | exit | | test.py:513:9 | Attribute() | test.py:514:20 | Dict | normal | | test.py:513:9 | self | test.py:513:9 | Attribute | normal | -| test.py:513:23 | Str | test.py:513:9 | Attribute() | normal | +| test.py:513:23 | StringLiteral | test.py:513:9 | Attribute() | normal | | test.py:514:9 | bb_succs | test.py:515:19 | self | normal | | test.py:514:20 | Dict | test.py:514:9 | bb_succs | normal | | test.py:515:9 | For | test.py:515:13 | bb | normal | @@ -2340,11 +2340,11 @@ | test.py:519:5 | FunctionExpr | test.py:519:9 | _compute_bb_pred | normal | | test.py:519:9 | _compute_bb_pred | test.py:527:5 | FunctionExpr | normal | | test.py:519:26 | self | test.py:520:9 | self | normal | -| test.py:520:9 | Attribute | test.py:520:23 | Str | normal | +| test.py:520:9 | Attribute | test.py:520:23 | StringLiteral | normal | | test.py:520:9 | Attribute() | test.py:519:5 | Function _compute_bb_pred | exit | | test.py:520:9 | Attribute() | test.py:521:20 | Dict | normal | | test.py:520:9 | self | test.py:520:9 | Attribute | normal | -| test.py:520:23 | Str | test.py:520:9 | Attribute() | normal | +| test.py:520:23 | StringLiteral | test.py:520:9 | Attribute() | normal | | test.py:521:9 | bb_preds | test.py:522:19 | self | normal | | test.py:521:20 | Dict | test.py:521:9 | bb_preds | normal | | test.py:522:9 | For | test.py:522:13 | bb | normal | @@ -2388,8 +2388,8 @@ | test.py:527:5 | FunctionExpr | test.py:527:9 | nodes_in_bb | normal | | test.py:527:9 | nodes_in_bb | test.py:540:5 | FunctionExpr | normal | | test.py:527:21 | self | test.py:527:27 | bb | normal | -| test.py:527:27 | bb | test.py:528:9 | Str | normal | -| test.py:528:9 | Str | test.py:529:16 | bb | normal | +| test.py:527:27 | bb | test.py:528:9 | StringLiteral | normal | +| test.py:528:9 | StringLiteral | test.py:529:16 | bb | normal | | test.py:529:9 | node | test.py:530:9 | While | normal | | test.py:529:16 | bb | test.py:529:9 | node | normal | | test.py:530:9 | While | test.py:530:15 | True | normal | @@ -2425,23 +2425,23 @@ | test.py:540:5 | Function _compute_use_all | test.py:540:26 | self | normal | | test.py:540:5 | FunctionExpr | test.py:540:9 | _compute_use_all | normal | | test.py:540:9 | _compute_use_all | test.py:586:5 | FunctionExpr | normal | -| test.py:540:26 | self | test.py:541:9 | Str | normal | -| test.py:541:9 | Str | test.py:546:9 | self | normal | -| test.py:546:9 | Attribute | test.py:546:23 | Str | normal | +| test.py:540:26 | self | test.py:541:9 | StringLiteral | normal | +| test.py:541:9 | StringLiteral | test.py:546:9 | self | normal | +| test.py:546:9 | Attribute | test.py:546:23 | StringLiteral | normal | | test.py:546:9 | Attribute() | test.py:540:5 | Function _compute_use_all | exit | | test.py:546:9 | Attribute() | test.py:547:9 | self | normal | | test.py:546:9 | self | test.py:546:9 | Attribute | normal | -| test.py:546:23 | Str | test.py:546:9 | Attribute() | normal | -| test.py:547:9 | Attribute | test.py:547:23 | Str | normal | +| test.py:546:23 | StringLiteral | test.py:546:9 | Attribute() | normal | +| test.py:547:9 | Attribute | test.py:547:23 | StringLiteral | normal | | test.py:547:9 | Attribute() | test.py:540:5 | Function _compute_use_all | exit | | test.py:547:9 | Attribute() | test.py:548:9 | self | normal | | test.py:547:9 | self | test.py:547:9 | Attribute | normal | -| test.py:547:23 | Str | test.py:547:9 | Attribute() | normal | -| test.py:548:9 | Attribute | test.py:548:23 | Str | normal | +| test.py:547:23 | StringLiteral | test.py:547:9 | Attribute() | normal | +| test.py:548:9 | Attribute | test.py:548:23 | StringLiteral | normal | | test.py:548:9 | Attribute() | test.py:540:5 | Function _compute_use_all | exit | | test.py:548:9 | Attribute() | test.py:549:19 | Dict | normal | | test.py:548:9 | self | test.py:548:9 | Attribute | normal | -| test.py:548:23 | Str | test.py:548:9 | Attribute() | normal | +| test.py:548:23 | StringLiteral | test.py:548:9 | Attribute() | normal | | test.py:549:9 | use_all | test.py:551:9 | FunctionExpr | normal | | test.py:549:19 | Dict | test.py:549:9 | use_all | normal | | test.py:551:9 | Function defined_in_block | test.py:551:30 | bb | normal | @@ -2634,18 +2634,18 @@ | test.py:586:5 | Function _compute_liveness | test.py:586:27 | self | normal | | test.py:586:5 | FunctionExpr | test.py:586:9 | _compute_liveness | normal | | test.py:586:9 | _compute_liveness | test.py:644:5 | FunctionExpr | normal | -| test.py:586:27 | self | test.py:587:9 | Str | normal | -| test.py:587:9 | Str | test.py:592:9 | self | normal | -| test.py:592:9 | Attribute | test.py:592:23 | Str | normal | +| test.py:586:27 | self | test.py:587:9 | StringLiteral | normal | +| test.py:587:9 | StringLiteral | test.py:592:9 | self | normal | +| test.py:592:9 | Attribute | test.py:592:23 | StringLiteral | normal | | test.py:592:9 | Attribute() | test.py:586:5 | Function _compute_liveness | exit | | test.py:592:9 | Attribute() | test.py:593:9 | self | normal | | test.py:592:9 | self | test.py:592:9 | Attribute | normal | -| test.py:592:23 | Str | test.py:592:9 | Attribute() | normal | -| test.py:593:9 | Attribute | test.py:593:23 | Str | normal | +| test.py:592:23 | StringLiteral | test.py:592:9 | Attribute() | normal | +| test.py:593:9 | Attribute | test.py:593:23 | StringLiteral | normal | | test.py:593:9 | Attribute() | test.py:586:5 | Function _compute_liveness | exit | | test.py:593:9 | Attribute() | test.py:595:9 | FunctionExpr | normal | | test.py:593:9 | self | test.py:593:9 | Attribute | normal | -| test.py:593:23 | Str | test.py:593:9 | Attribute() | normal | +| test.py:593:23 | StringLiteral | test.py:593:9 | Attribute() | normal | | test.py:595:9 | Function gen_and_kill_for_block | test.py:595:36 | bb | normal | | test.py:595:9 | FunctionExpr | test.py:595:13 | gen_and_kill_for_block | normal | | test.py:595:13 | gen_and_kill_for_block | test.py:617:9 | FunctionExpr | normal | @@ -2920,11 +2920,11 @@ | test.py:644:5 | FunctionExpr | test.py:644:9 | delete_unreachable_nodes | normal | | test.py:644:9 | delete_unreachable_nodes | test.py:660:5 | FunctionExpr | normal | | test.py:644:34 | self | test.py:645:9 | self | normal | -| test.py:645:9 | Attribute | test.py:645:23 | Str | normal | +| test.py:645:9 | Attribute | test.py:645:23 | StringLiteral | normal | | test.py:645:9 | Attribute() | test.py:644:5 | Function delete_unreachable_nodes | exit | | test.py:645:9 | Attribute() | test.py:646:35 | self | normal | | test.py:645:9 | self | test.py:645:9 | Attribute | normal | -| test.py:645:23 | Str | test.py:645:9 | Attribute() | normal | +| test.py:645:23 | StringLiteral | test.py:645:9 | Attribute() | normal | | test.py:646:9 | unreachable | test.py:647:16 | unreachable | normal | | test.py:646:23 | .0 | test.py:646:23 | .0 | normal | | test.py:646:23 | .0 | test.py:646:23 | For | normal | @@ -3019,11 +3019,11 @@ | test.py:660:9 | dominated_by | test.py:675:5 | FunctionExpr | normal | | test.py:660:22 | self | test.py:660:28 | node | normal | | test.py:660:28 | node | test.py:661:9 | self | normal | -| test.py:661:9 | Attribute | test.py:661:23 | Str | normal | +| test.py:661:9 | Attribute | test.py:661:23 | StringLiteral | normal | | test.py:661:9 | Attribute() | test.py:660:5 | Function dominated_by | exit | | test.py:661:9 | Attribute() | test.py:662:16 | node | normal | | test.py:661:9 | self | test.py:661:9 | Attribute | normal | -| test.py:661:23 | Str | test.py:661:9 | Attribute() | normal | +| test.py:661:23 | StringLiteral | test.py:661:9 | Attribute() | normal | | test.py:662:9 | Assert | test.py:660:5 | Function dominated_by | exit | | test.py:662:9 | Assert | test.py:663:21 | set | normal | | test.py:662:16 | Compare | test.py:662:9 | Assert | normal | @@ -3035,9 +3035,9 @@ | test.py:662:30 | BinaryExpr | test.py:662:9 | Assert | normal | | test.py:662:30 | str | test.py:662:34 | node | normal | | test.py:662:30 | str() | test.py:660:5 | Function dominated_by | exit | -| test.py:662:30 | str() | test.py:662:42 | Str | normal | +| test.py:662:30 | str() | test.py:662:42 | StringLiteral | normal | | test.py:662:34 | node | test.py:662:30 | str() | normal | -| test.py:662:42 | Str | test.py:662:30 | BinaryExpr | normal | +| test.py:662:42 | StringLiteral | test.py:662:30 | BinaryExpr | normal | | test.py:663:9 | dominated | test.py:664:16 | set | normal | | test.py:663:21 | set | test.py:663:26 | node | normal | | test.py:663:21 | set() | test.py:660:5 | Function dominated_by | exit | @@ -3110,11 +3110,11 @@ | test.py:675:28 | self | test.py:675:34 | pre | normal | | test.py:675:34 | pre | test.py:675:39 | post | normal | | test.py:675:39 | post | test.py:676:9 | self | normal | -| test.py:676:9 | Attribute | test.py:676:23 | Str | normal | +| test.py:676:9 | Attribute | test.py:676:23 | StringLiteral | normal | | test.py:676:9 | Attribute() | test.py:675:5 | Function strictly_dominates | exit | | test.py:676:9 | Attribute() | test.py:677:9 | While | normal | | test.py:676:9 | self | test.py:676:9 | Attribute | normal | -| test.py:676:23 | Str | test.py:676:9 | Attribute() | normal | +| test.py:676:23 | StringLiteral | test.py:676:9 | Attribute() | normal | | test.py:677:9 | While | test.py:677:15 | post | normal | | test.py:677:15 | Compare | test.py:678:20 | self | normal | | test.py:677:15 | Compare | test.py:678:20 | self | true | @@ -3145,13 +3145,13 @@ | test.py:683:33 | self | test.py:683:39 | pre | normal | | test.py:683:39 | pre | test.py:683:44 | post | normal | | test.py:683:44 | post | test.py:683:50 | control | normal | -| test.py:683:50 | control | test.py:684:9 | Str | normal | -| test.py:684:9 | Str | test.py:686:9 | self | normal | -| test.py:686:9 | Attribute | test.py:686:23 | Str | normal | +| test.py:683:50 | control | test.py:684:9 | StringLiteral | normal | +| test.py:684:9 | StringLiteral | test.py:686:9 | self | normal | +| test.py:686:9 | Attribute | test.py:686:23 | StringLiteral | normal | | test.py:686:9 | Attribute() | test.py:683:5 | Function reaches_while_dominated | exit | | test.py:686:9 | Attribute() | test.py:687:30 | self | normal | | test.py:686:9 | self | test.py:686:9 | Attribute | normal | -| test.py:686:23 | Str | test.py:686:9 | Attribute() | normal | +| test.py:686:23 | StringLiteral | test.py:686:9 | Attribute() | normal | | test.py:687:9 | dominance_frontier | test.py:688:18 | pre | normal | | test.py:687:30 | Attribute | test.py:687:55 | control | normal | | test.py:687:30 | Subscript | test.py:683:5 | Function reaches_while_dominated | exit | @@ -3214,16 +3214,16 @@ | test.py:699:35 | node | test.py:699:25 | Subscript | normal | | test.py:700:9 | Return | test.py:683:5 | Function reaches_while_dominated | normal | | test.py:700:16 | False | test.py:700:9 | Return | normal | -| test.py:703:1 | Class SSA_Var | test.py:704:5 | Str | normal | +| test.py:703:1 | Class SSA_Var | test.py:704:5 | StringLiteral | normal | | test.py:703:1 | ClassExpr | test.py:0:0 | Module test | exit | | test.py:703:1 | ClassExpr | test.py:703:7 | SSA_Var | normal | | test.py:703:7 | SSA_Var | test.py:716:1 | FunctionExpr | normal | | test.py:703:15 | object | test.py:703:1 | ClassExpr | normal | -| test.py:704:5 | Str | test.py:706:19 | Str | normal | +| test.py:704:5 | StringLiteral | test.py:706:19 | StringLiteral | normal | | test.py:706:5 | __slots__ | test.py:708:5 | FunctionExpr | normal | | test.py:706:17 | List | test.py:706:5 | __slots__ | normal | -| test.py:706:19 | Str | test.py:706:31 | Str | normal | -| test.py:706:31 | Str | test.py:706:17 | List | normal | +| test.py:706:19 | StringLiteral | test.py:706:31 | StringLiteral | normal | +| test.py:706:31 | StringLiteral | test.py:706:17 | List | normal | | test.py:708:5 | Function __init__ | test.py:708:18 | self | normal | | test.py:708:5 | FunctionExpr | test.py:708:9 | __init__ | normal | | test.py:708:9 | __init__ | test.py:712:5 | FunctionExpr | normal | @@ -3239,10 +3239,10 @@ | test.py:712:5 | Function __repr__ | test.py:712:18 | self | normal | | test.py:712:5 | FunctionExpr | test.py:712:9 | __repr__ | normal | | test.py:712:9 | __repr__ | test.py:703:1 | Class SSA_Var | normal | -| test.py:712:18 | self | test.py:713:16 | Str | normal | +| test.py:712:18 | self | test.py:713:16 | StringLiteral | normal | | test.py:713:9 | Return | test.py:712:5 | Function __repr__ | normal | | test.py:713:16 | BinaryExpr | test.py:713:9 | Return | normal | -| test.py:713:16 | Str | test.py:713:37 | self | normal | +| test.py:713:16 | StringLiteral | test.py:713:37 | self | normal | | test.py:713:37 | Attribute | test.py:713:37 | Attribute | normal | | test.py:713:37 | Attribute | test.py:713:55 | self | normal | | test.py:713:37 | Tuple | test.py:713:16 | BinaryExpr | normal | @@ -3252,8 +3252,8 @@ | test.py:716:1 | Function _reverse_map | test.py:716:18 | mapping | normal | | test.py:716:1 | FunctionExpr | test.py:716:5 | _reverse_map | normal | | test.py:716:5 | _reverse_map | test.py:0:0 | Module test | normal | -| test.py:716:18 | mapping | test.py:717:5 | Str | normal | -| test.py:717:5 | Str | test.py:718:15 | Dict | normal | +| test.py:716:18 | mapping | test.py:717:5 | StringLiteral | normal | +| test.py:717:5 | StringLiteral | test.py:718:15 | Dict | normal | | test.py:718:5 | inv_map | test.py:719:17 | mapping | normal | | test.py:718:15 | Dict | test.py:718:5 | inv_map | normal | | test.py:719:5 | For | test.py:719:9 | Tuple | normal | diff --git a/python/ql/test/library-tests/ControlFlow/truefalse/TrueFalseSuccessors.expected b/python/ql/test/library-tests/ControlFlow/truefalse/TrueFalseSuccessors.expected index 90661556c7ed..d5f0de8fc34f 100644 --- a/python/ql/test/library-tests/ControlFlow/truefalse/TrueFalseSuccessors.expected +++ b/python/ql/test/library-tests/ControlFlow/truefalse/TrueFalseSuccessors.expected @@ -8,8 +8,8 @@ | boolops.py | 5 | boolops.py:5:22:5:23 | ControlFlowNode for y1 | ControlFlowNode for z1 | False | | boolops.py | 6 | boolops.py:6:22:6:23 | ControlFlowNode for z1 | ControlFlowNode for UnaryExpr | False | | boolops.py | 6 | boolops.py:6:22:6:23 | ControlFlowNode for z1 | ControlFlowNode for UnaryExpr | True | -| boolops.py | 7 | boolops.py:7:8:11:23 | ControlFlowNode for UnaryExpr | ControlFlowNode for Str | False | -| boolops.py | 7 | boolops.py:7:8:11:23 | ControlFlowNode for UnaryExpr | ControlFlowNode for Str | True | +| boolops.py | 7 | boolops.py:7:8:11:23 | ControlFlowNode for UnaryExpr | ControlFlowNode for StringLiteral | False | +| boolops.py | 7 | boolops.py:7:8:11:23 | ControlFlowNode for UnaryExpr | ControlFlowNode for StringLiteral | True | | boolops.py | 8 | boolops.py:8:12:8:12 | ControlFlowNode for x | ControlFlowNode for BoolExpr | False | | boolops.py | 8 | boolops.py:8:12:8:12 | ControlFlowNode for x | ControlFlowNode for UnaryExpr | True | | boolops.py | 9 | boolops.py:9:15:11:22 | ControlFlowNode for UnaryExpr | ControlFlowNode for UnaryExpr | False | @@ -83,9 +83,9 @@ | true_false_test.py | 85 | true_false_test.py:85:11:85:16 | ControlFlowNode for cond23 | ControlFlowNode for cond24 | True | | true_false_test.py | 85 | true_false_test.py:85:22:85:27 | ControlFlowNode for cond24 | ControlFlowNode for Yield | False | | true_false_test.py | 85 | true_false_test.py:85:22:85:27 | ControlFlowNode for cond24 | ControlFlowNode for cond25 | True | -| true_succ.py | 4 | true_succ.py:4:8:4:15 | ControlFlowNode for filename | ControlFlowNode for Str | False | +| true_succ.py | 4 | true_succ.py:4:8:4:15 | ControlFlowNode for filename | ControlFlowNode for StringLiteral | False | | true_succ.py | 4 | true_succ.py:4:8:4:15 | ControlFlowNode for filename | ControlFlowNode for Try | True | | true_succ.py | 13 | true_succ.py:13:16:13:28 | ControlFlowNode for Compare | ControlFlowNode for Function example | False | -| true_succ.py | 13 | true_succ.py:13:16:13:28 | ControlFlowNode for Compare | ControlFlowNode for Str | False | +| true_succ.py | 13 | true_succ.py:13:16:13:28 | ControlFlowNode for Compare | ControlFlowNode for StringLiteral | False | | true_succ.py | 13 | true_succ.py:13:16:13:28 | ControlFlowNode for Compare | ControlFlowNode for f | True | | true_succ.py | 13 | true_succ.py:13:16:13:28 | ControlFlowNode for Compare | ControlFlowNode for f | True | diff --git a/python/ql/test/library-tests/PointsTo/calls/getArgumentForCall.expected b/python/ql/test/library-tests/PointsTo/calls/getArgumentForCall.expected index c834c72049fd..e1cea7a16395 100644 --- a/python/ql/test/library-tests/PointsTo/calls/getArgumentForCall.expected +++ b/python/ql/test/library-tests/PointsTo/calls/getArgumentForCall.expected @@ -26,8 +26,8 @@ | 42 | ControlFlowNode for Attribute() | Function C.n | 0 | ControlFlowNode for c | | 42 | ControlFlowNode for Attribute() | Function C.n | 1 | ControlFlowNode for IntegerLiteral | | 42 | ControlFlowNode for Attribute() | Method(Function C.n, C()) | 0 | ControlFlowNode for IntegerLiteral | -| 45 | ControlFlowNode for open() | Builtin-function open | 0 | ControlFlowNode for Str | -| 45 | ControlFlowNode for open() | Builtin-function open | 1 | ControlFlowNode for Str | +| 45 | ControlFlowNode for open() | Builtin-function open | 0 | ControlFlowNode for StringLiteral | +| 45 | ControlFlowNode for open() | Builtin-function open | 1 | ControlFlowNode for StringLiteral | | 51 | ControlFlowNode for foo() | Function foo | 0 | ControlFlowNode for IntegerLiteral | | 51 | ControlFlowNode for foo() | Function foo | 1 | ControlFlowNode for IntegerLiteral | | 51 | ControlFlowNode for foo() | Function foo | 2 | ControlFlowNode for IntegerLiteral | diff --git a/python/ql/test/library-tests/PointsTo/calls/getNamedArgumentForCall.expected b/python/ql/test/library-tests/PointsTo/calls/getNamedArgumentForCall.expected index 3df8b4336bf0..5e2c11cc8185 100644 --- a/python/ql/test/library-tests/PointsTo/calls/getNamedArgumentForCall.expected +++ b/python/ql/test/library-tests/PointsTo/calls/getNamedArgumentForCall.expected @@ -23,8 +23,8 @@ | 42 | ControlFlowNode for Attribute() | Function C.n | arg1 | ControlFlowNode for IntegerLiteral | | 42 | ControlFlowNode for Attribute() | Function C.n | self | ControlFlowNode for c | | 42 | ControlFlowNode for Attribute() | Method(Function C.n, C()) | arg1 | ControlFlowNode for IntegerLiteral | -| 46 | ControlFlowNode for open() | Builtin-function open | file | ControlFlowNode for Str | -| 46 | ControlFlowNode for open() | Builtin-function open | mode | ControlFlowNode for Str | +| 46 | ControlFlowNode for open() | Builtin-function open | file | ControlFlowNode for StringLiteral | +| 46 | ControlFlowNode for open() | Builtin-function open | mode | ControlFlowNode for StringLiteral | | 51 | ControlFlowNode for foo() | Function foo | a | ControlFlowNode for IntegerLiteral | | 55 | ControlFlowNode for bar() | Function bar | a | ControlFlowNode for IntegerLiteral | | 55 | ControlFlowNode for bar() | Function bar | b | ControlFlowNode for IntegerLiteral | diff --git a/python/ql/test/library-tests/PointsTo/global/Global.expected b/python/ql/test/library-tests/PointsTo/global/Global.expected index 2ae828efd7ef..cc85bf92946d 100644 --- a/python/ql/test/library-tests/PointsTo/global/Global.expected +++ b/python/ql/test/library-tests/PointsTo/global/Global.expected @@ -17,7 +17,7 @@ | test.py:14 from runtime | test.py:3:5:3:5 | ControlFlowNode for a | int 13 | test.py:14:9:14:10 | ControlFlowNode for IntegerLiteral | | test.py:14 from runtime | test.py:4:5:4:5 | ControlFlowNode for b | bool True | test.py:14:13:14:16 | ControlFlowNode for True | | test.py:15 from runtime | test.py:3:5:3:5 | ControlFlowNode for a | int 14 | test.py:15:9:15:10 | ControlFlowNode for IntegerLiteral | -| test.py:15 from runtime | test.py:4:5:4:5 | ControlFlowNode for b | '' | test.py:15:13:15:14 | ControlFlowNode for Str | +| test.py:15 from runtime | test.py:4:5:4:5 | ControlFlowNode for b | '' | test.py:15:13:15:14 | ControlFlowNode for StringLiteral | | test.py:18 from import | test.py:3:5:3:5 | ControlFlowNode for a | int 21 | test.py:18:5:18:6 | ControlFlowNode for IntegerLiteral | | test.py:18 from import | test.py:4:5:4:5 | ControlFlowNode for b | None | test.py:2:14:2:17 | ControlFlowNode for None | | test.py:19 from import | test.py:3:5:3:5 | ControlFlowNode for a | int 22 | test.py:19:5:19:6 | ControlFlowNode for IntegerLiteral | @@ -25,6 +25,6 @@ | test.py:20 from import | test.py:3:5:3:5 | ControlFlowNode for a | int 23 | test.py:20:5:20:6 | ControlFlowNode for IntegerLiteral | | test.py:20 from import | test.py:4:5:4:5 | ControlFlowNode for b | bool True | test.py:20:9:20:12 | ControlFlowNode for True | | test.py:21 from import | test.py:3:5:3:5 | ControlFlowNode for a | int 24 | test.py:21:5:21:6 | ControlFlowNode for IntegerLiteral | -| test.py:21 from import | test.py:4:5:4:5 | ControlFlowNode for b | '' | test.py:21:9:21:10 | ControlFlowNode for Str | +| test.py:21 from import | test.py:4:5:4:5 | ControlFlowNode for b | '' | test.py:21:9:21:10 | ControlFlowNode for StringLiteral | | test.py:22 from import | test.py:3:5:3:5 | ControlFlowNode for a | int 3 | test.py:22:12:22:12 | ControlFlowNode for IntegerLiteral | | test.py:22 from import | test.py:4:5:4:5 | ControlFlowNode for b | int 7 | test.py:22:7:22:7 | ControlFlowNode for IntegerLiteral | diff --git a/python/ql/test/library-tests/PointsTo/local/LocalPointsTo.expected b/python/ql/test/library-tests/PointsTo/local/LocalPointsTo.expected index 3de409632f15..59d8e22e5fe0 100644 --- a/python/ql/test/library-tests/PointsTo/local/LocalPointsTo.expected +++ b/python/ql/test/library-tests/PointsTo/local/LocalPointsTo.expected @@ -18,5 +18,5 @@ | test.py:58:9:58:9 | ControlFlowNode for z | int 5 | test.py:48:9:48:9 | ControlFlowNode for IntegerLiteral | | test.py:64:9:64:9 | ControlFlowNode for v | int 20 | test.py:62:13:62:14 | ControlFlowNode for IntegerLiteral | | test.py:66:9:66:9 | ControlFlowNode for v | int 10 | test.py:60:13:60:14 | ControlFlowNode for IntegerLiteral | -| test.py:70:5:70:14 | ControlFlowNode for Str | 'a string' | test.py:70:5:70:14 | ControlFlowNode for Str | -| test.py:72:9:72:12 | ControlFlowNode for Str | ':)' | test.py:72:9:72:12 | ControlFlowNode for Str | +| test.py:70:5:70:14 | ControlFlowNode for StringLiteral | 'a string' | test.py:70:5:70:14 | ControlFlowNode for StringLiteral | +| test.py:72:9:72:12 | ControlFlowNode for StringLiteral | ':)' | test.py:72:9:72:12 | ControlFlowNode for StringLiteral | diff --git a/python/ql/test/library-tests/PointsTo/new/Dataflow.expected b/python/ql/test/library-tests/PointsTo/new/Dataflow.expected index aeee23bce728..e4fc03eb291e 100644 --- a/python/ql/test/library-tests/PointsTo/new/Dataflow.expected +++ b/python/ql/test/library-tests/PointsTo/new/Dataflow.expected @@ -447,8 +447,8 @@ | g_class_init.py:34 | __init___0 = FunctionExpr | | g_class_init.py:34 | self_0 = ParameterDefinition | | g_class_init.py:35 | D_2 = ArgumentRefinement(D_1) | -| g_class_init.py:42 | V2_0 = Str | -| g_class_init.py:43 | V3_0 = Str | +| g_class_init.py:42 | V2_0 = StringLiteral | +| g_class_init.py:43 | V3_0 = StringLiteral | | g_class_init.py:45 | E_0 = ClassExpr | | g_class_init.py:46 | V2_1 = ScopeEntryDefinition | | g_class_init.py:46 | V3_1 = ScopeEntryDefinition | @@ -479,7 +479,7 @@ | h_classes.py:0 | thing_0 = ScopeEntryDefinition | | h_classes.py:1 | sys_0 = ImportExpr | | h_classes.py:3 | C_0 = ClassExpr | -| h_classes.py:5 | x_0 = Str | +| h_classes.py:5 | x_0 = StringLiteral | | h_classes.py:7 | __init___0 = FunctionExpr | | h_classes.py:7 | self_0 = ParameterDefinition | | h_classes.py:8 | self_1 = AttributeAssignment 'y'(self_0) | diff --git a/python/ql/test/library-tests/PointsTo/new/PointsToWithContext.expected b/python/ql/test/library-tests/PointsTo/new/PointsToWithContext.expected index dcba4b6c6520..cd1a08a4dac2 100644 --- a/python/ql/test/library-tests/PointsTo/new/PointsToWithContext.expected +++ b/python/ql/test/library-tests/PointsTo/new/PointsToWithContext.expected @@ -34,13 +34,13 @@ | a_simple.py:35 | ControlFlowNode for UnaryExpr | bool False | builtin-class bool | 35 | runtime | | a_simple.py:35 | ControlFlowNode for UnaryExpr | bool True | builtin-class bool | 35 | runtime | | a_simple.py:35 | ControlFlowNode for args | args | builtin-class tuple | 34 | runtime | -| a_simple.py:36 | ControlFlowNode for Str | 'x' | builtin-class str | 36 | runtime | +| a_simple.py:36 | ControlFlowNode for StringLiteral | 'x' | builtin-class str | 36 | runtime | | a_simple.py:36 | ControlFlowNode for UnaryExpr | bool False | builtin-class bool | 36 | runtime | | a_simple.py:36 | ControlFlowNode for UnaryExpr | bool True | builtin-class bool | 36 | runtime | | a_simple.py:36 | ControlFlowNode for kwargs | kwargs | builtin-class dict | 34 | runtime | | a_simple.py:38 | ControlFlowNode for FunctionExpr | Function multi_assign_and_packing | builtin-class function | 38 | import | -| a_simple.py:38 | ControlFlowNode for Str | 'b' | builtin-class str | 38 | import | -| a_simple.py:38 | ControlFlowNode for Str | 'c' | builtin-class str | 38 | import | +| a_simple.py:38 | ControlFlowNode for StringLiteral | 'b' | builtin-class str | 38 | import | +| a_simple.py:38 | ControlFlowNode for StringLiteral | 'c' | builtin-class str | 38 | import | | a_simple.py:38 | ControlFlowNode for multi_assign_and_packing | Function multi_assign_and_packing | builtin-class function | 38 | import | | a_simple.py:39 | ControlFlowNode for IntegerLiteral | int 1 | builtin-class int | 39 | runtime | | a_simple.py:39 | ControlFlowNode for IntegerLiteral | int 2 | builtin-class int | 39 | runtime | @@ -217,7 +217,7 @@ | b_condition.py:105 | ControlFlowNode for a | a | builtin-class tuple | 101 | runtime | | b_condition.py:106 | ControlFlowNode for Exception | builtin-class Exception | builtin-class type | 106 | runtime | | b_condition.py:106 | ControlFlowNode for Exception() | Exception() | builtin-class Exception | 106 | runtime | -| b_condition.py:107 | ControlFlowNode for Str | 'Hello' | builtin-class str | 107 | runtime | +| b_condition.py:107 | ControlFlowNode for StringLiteral | 'Hello' | builtin-class str | 107 | runtime | | b_condition.py:109 | ControlFlowNode for FunctionExpr | Function method_check | builtin-class function | 109 | import | | b_condition.py:109 | ControlFlowNode for method_check | Function method_check | builtin-class function | 109 | import | | e_temporal.py:2 | ControlFlowNode for ImportExpr | Module sys | builtin-class module | 2 | import | @@ -305,9 +305,9 @@ | g_class_init.py:36 | ControlFlowNode for self | self | class D | 34 | runtime | | g_class_init.py:36 | ControlFlowNode for super | builtin-class super | builtin-class type | 36 | runtime | | g_class_init.py:36 | ControlFlowNode for super() | super() | builtin-class super | 36 | runtime | -| g_class_init.py:42 | ControlFlowNode for Str | 'v2' | builtin-class str | 42 | import | +| g_class_init.py:42 | ControlFlowNode for StringLiteral | 'v2' | builtin-class str | 42 | import | | g_class_init.py:42 | ControlFlowNode for V2 | 'v2' | builtin-class str | 42 | import | -| g_class_init.py:43 | ControlFlowNode for Str | 'v3' | builtin-class str | 43 | import | +| g_class_init.py:43 | ControlFlowNode for StringLiteral | 'v3' | builtin-class str | 43 | import | | g_class_init.py:43 | ControlFlowNode for V3 | 'v3' | builtin-class str | 43 | import | | g_class_init.py:45 | ControlFlowNode for ClassExpr | class E | builtin-class type | 45 | import | | g_class_init.py:45 | ControlFlowNode for E | class E | builtin-class type | 45 | import | @@ -331,16 +331,16 @@ | h_classes.py:3 | ControlFlowNode for C | class C | builtin-class type | 3 | import | | h_classes.py:3 | ControlFlowNode for ClassExpr | class C | builtin-class type | 3 | import | | h_classes.py:3 | ControlFlowNode for object | builtin-class object | builtin-class type | 3 | import | -| h_classes.py:5 | ControlFlowNode for Str | 'C_x' | builtin-class str | 5 | import | +| h_classes.py:5 | ControlFlowNode for StringLiteral | 'C_x' | builtin-class str | 5 | import | | h_classes.py:5 | ControlFlowNode for x | 'C_x' | builtin-class str | 5 | import | | h_classes.py:7 | ControlFlowNode for FunctionExpr | Function __init__ | builtin-class function | 7 | import | | h_classes.py:7 | ControlFlowNode for __init__ | Function __init__ | builtin-class function | 7 | import | | h_classes.py:8 | ControlFlowNode for Attribute | 'c_y' | builtin-class str | 8 | code/h_classes.py:10 from import | | h_classes.py:8 | ControlFlowNode for Attribute | 'c_y' | builtin-class str | 8 | code/h_classes.py:15 from runtime | | h_classes.py:8 | ControlFlowNode for Attribute | 'c_y' | builtin-class str | 8 | runtime | -| h_classes.py:8 | ControlFlowNode for Str | 'c_y' | builtin-class str | 8 | code/h_classes.py:10 from import | -| h_classes.py:8 | ControlFlowNode for Str | 'c_y' | builtin-class str | 8 | code/h_classes.py:15 from runtime | -| h_classes.py:8 | ControlFlowNode for Str | 'c_y' | builtin-class str | 8 | runtime | +| h_classes.py:8 | ControlFlowNode for StringLiteral | 'c_y' | builtin-class str | 8 | code/h_classes.py:10 from import | +| h_classes.py:8 | ControlFlowNode for StringLiteral | 'c_y' | builtin-class str | 8 | code/h_classes.py:15 from runtime | +| h_classes.py:8 | ControlFlowNode for StringLiteral | 'c_y' | builtin-class str | 8 | runtime | | h_classes.py:8 | ControlFlowNode for self | self | class C | 7 | runtime | | h_classes.py:10 | ControlFlowNode for C | class C | builtin-class type | 3 | import | | h_classes.py:10 | ControlFlowNode for C() | C() | class C | 10 | import | @@ -425,7 +425,7 @@ | h_classes.py:52 | ControlFlowNode for n | Function n | builtin-class function | 52 | import | | h_classes.py:55 | ControlFlowNode for int | builtin-class int | builtin-class type | 55 | import | | h_classes.py:55 | ControlFlowNode for int() | int() | builtin-class int | 55 | import | -| h_classes.py:56 | ControlFlowNode for Str | '' | builtin-class str | 56 | import | +| h_classes.py:56 | ControlFlowNode for StringLiteral | '' | builtin-class str | 56 | import | | h_classes.py:56 | ControlFlowNode for type | builtin-class type | builtin-class type | 56 | import | | h_classes.py:56 | ControlFlowNode for type() | builtin-class str | builtin-class type | 56 | import | | h_classes.py:56 | ControlFlowNode for type()() | type()() | builtin-class str | 56 | import | @@ -433,7 +433,7 @@ | h_classes.py:57 | ControlFlowNode for list() | list() | builtin-class list | 57 | import | | h_classes.py:58 | ControlFlowNode for dict | builtin-class dict | builtin-class type | 58 | import | | h_classes.py:58 | ControlFlowNode for dict() | dict() | builtin-class dict | 58 | import | -| h_classes.py:59 | ControlFlowNode for Str | 'hi' | builtin-class str | 59 | import | +| h_classes.py:59 | ControlFlowNode for StringLiteral | 'hi' | builtin-class str | 59 | import | | h_classes.py:59 | ControlFlowNode for bool | builtin-class bool | builtin-class type | 59 | import | | h_classes.py:59 | ControlFlowNode for bool() | bool True | builtin-class bool | 59 | import | | h_classes.py:60 | ControlFlowNode for IntegerLiteral | int 0 | builtin-class int | 60 | import | @@ -524,8 +524,8 @@ | k_getsetattr.py:6 | ControlFlowNode for meth1 | Function meth1 | builtin-class function | 6 | import | | k_getsetattr.py:7 | ControlFlowNode for IntegerLiteral | int 0 | builtin-class int | 7 | code/k_getsetattr.py:15 from runtime | | k_getsetattr.py:7 | ControlFlowNode for IntegerLiteral | int 0 | builtin-class int | 7 | runtime | -| k_getsetattr.py:7 | ControlFlowNode for Str | 'a' | builtin-class str | 7 | code/k_getsetattr.py:15 from runtime | -| k_getsetattr.py:7 | ControlFlowNode for Str | 'a' | builtin-class str | 7 | runtime | +| k_getsetattr.py:7 | ControlFlowNode for StringLiteral | 'a' | builtin-class str | 7 | code/k_getsetattr.py:15 from runtime | +| k_getsetattr.py:7 | ControlFlowNode for StringLiteral | 'a' | builtin-class str | 7 | runtime | | k_getsetattr.py:7 | ControlFlowNode for self | self | class C | 6 | runtime | | k_getsetattr.py:7 | ControlFlowNode for self | self | class C | 12 | code/k_getsetattr.py:15 from runtime | | k_getsetattr.py:7 | ControlFlowNode for setattr | Builtin-function setattr | builtin-class builtin_function_or_method | 7 | code/k_getsetattr.py:15 from runtime | @@ -534,24 +534,24 @@ | k_getsetattr.py:7 | ControlFlowNode for setattr() | NoneType None | builtin-class NoneType | 7 | runtime | | k_getsetattr.py:8 | ControlFlowNode for IntegerLiteral | int 1 | builtin-class int | 8 | code/k_getsetattr.py:15 from runtime | | k_getsetattr.py:8 | ControlFlowNode for IntegerLiteral | int 1 | builtin-class int | 8 | runtime | -| k_getsetattr.py:8 | ControlFlowNode for Str | 'b' | builtin-class str | 8 | code/k_getsetattr.py:15 from runtime | -| k_getsetattr.py:8 | ControlFlowNode for Str | 'b' | builtin-class str | 8 | runtime | +| k_getsetattr.py:8 | ControlFlowNode for StringLiteral | 'b' | builtin-class str | 8 | code/k_getsetattr.py:15 from runtime | +| k_getsetattr.py:8 | ControlFlowNode for StringLiteral | 'b' | builtin-class str | 8 | runtime | | k_getsetattr.py:8 | ControlFlowNode for self | self | class C | 6 | runtime | | k_getsetattr.py:8 | ControlFlowNode for self | self | class C | 12 | code/k_getsetattr.py:15 from runtime | | k_getsetattr.py:8 | ControlFlowNode for setattr | Builtin-function setattr | builtin-class builtin_function_or_method | 8 | code/k_getsetattr.py:15 from runtime | | k_getsetattr.py:8 | ControlFlowNode for setattr | Builtin-function setattr | builtin-class builtin_function_or_method | 8 | runtime | | k_getsetattr.py:8 | ControlFlowNode for setattr() | NoneType None | builtin-class NoneType | 8 | code/k_getsetattr.py:15 from runtime | | k_getsetattr.py:8 | ControlFlowNode for setattr() | NoneType None | builtin-class NoneType | 8 | runtime | -| k_getsetattr.py:9 | ControlFlowNode for Str | 'a' | builtin-class str | 9 | code/k_getsetattr.py:15 from runtime | -| k_getsetattr.py:9 | ControlFlowNode for Str | 'a' | builtin-class str | 9 | runtime | +| k_getsetattr.py:9 | ControlFlowNode for StringLiteral | 'a' | builtin-class str | 9 | code/k_getsetattr.py:15 from runtime | +| k_getsetattr.py:9 | ControlFlowNode for StringLiteral | 'a' | builtin-class str | 9 | runtime | | k_getsetattr.py:9 | ControlFlowNode for getattr | Builtin-function getattr | builtin-class builtin_function_or_method | 9 | code/k_getsetattr.py:15 from runtime | | k_getsetattr.py:9 | ControlFlowNode for getattr | Builtin-function getattr | builtin-class builtin_function_or_method | 9 | runtime | | k_getsetattr.py:9 | ControlFlowNode for getattr() | int 0 | builtin-class int | 7 | code/k_getsetattr.py:15 from runtime | | k_getsetattr.py:9 | ControlFlowNode for getattr() | int 0 | builtin-class int | 7 | runtime | | k_getsetattr.py:9 | ControlFlowNode for self | self | class C | 6 | runtime | | k_getsetattr.py:9 | ControlFlowNode for self | self | class C | 12 | code/k_getsetattr.py:15 from runtime | -| k_getsetattr.py:10 | ControlFlowNode for Str | 'c' | builtin-class str | 10 | code/k_getsetattr.py:15 from runtime | -| k_getsetattr.py:10 | ControlFlowNode for Str | 'c' | builtin-class str | 10 | runtime | +| k_getsetattr.py:10 | ControlFlowNode for StringLiteral | 'c' | builtin-class str | 10 | code/k_getsetattr.py:15 from runtime | +| k_getsetattr.py:10 | ControlFlowNode for StringLiteral | 'c' | builtin-class str | 10 | runtime | | k_getsetattr.py:10 | ControlFlowNode for getattr | Builtin-function getattr | builtin-class builtin_function_or_method | 10 | code/k_getsetattr.py:15 from runtime | | k_getsetattr.py:10 | ControlFlowNode for getattr | Builtin-function getattr | builtin-class builtin_function_or_method | 10 | runtime | | k_getsetattr.py:10 | ControlFlowNode for getattr() | int 2 | builtin-class int | 14 | code/k_getsetattr.py:15 from runtime | @@ -560,27 +560,27 @@ | k_getsetattr.py:12 | ControlFlowNode for FunctionExpr | Function meth2 | builtin-class function | 12 | import | | k_getsetattr.py:12 | ControlFlowNode for meth2 | Function meth2 | builtin-class function | 12 | import | | k_getsetattr.py:13 | ControlFlowNode for FloatLiteral | float 7.0 | builtin-class float | 13 | runtime | -| k_getsetattr.py:13 | ControlFlowNode for Str | 'a' | builtin-class str | 13 | runtime | +| k_getsetattr.py:13 | ControlFlowNode for StringLiteral | 'a' | builtin-class str | 13 | runtime | | k_getsetattr.py:13 | ControlFlowNode for self | self | class C | 12 | runtime | | k_getsetattr.py:13 | ControlFlowNode for setattr | Builtin-function setattr | builtin-class builtin_function_or_method | 13 | runtime | | k_getsetattr.py:13 | ControlFlowNode for setattr() | NoneType None | builtin-class NoneType | 13 | runtime | | k_getsetattr.py:14 | ControlFlowNode for IntegerLiteral | int 2 | builtin-class int | 14 | runtime | -| k_getsetattr.py:14 | ControlFlowNode for Str | 'c' | builtin-class str | 14 | runtime | +| k_getsetattr.py:14 | ControlFlowNode for StringLiteral | 'c' | builtin-class str | 14 | runtime | | k_getsetattr.py:14 | ControlFlowNode for self | self | class C | 12 | runtime | | k_getsetattr.py:14 | ControlFlowNode for setattr | Builtin-function setattr | builtin-class builtin_function_or_method | 14 | runtime | | k_getsetattr.py:14 | ControlFlowNode for setattr() | NoneType None | builtin-class NoneType | 14 | runtime | | k_getsetattr.py:15 | ControlFlowNode for Attribute | Attribute | builtin-class method | 15 | runtime | | k_getsetattr.py:15 | ControlFlowNode for Attribute() | NoneType None | builtin-class NoneType | 6 | runtime | | k_getsetattr.py:15 | ControlFlowNode for self | self | class C | 12 | runtime | -| k_getsetattr.py:16 | ControlFlowNode for Str | 'a' | builtin-class str | 16 | runtime | +| k_getsetattr.py:16 | ControlFlowNode for StringLiteral | 'a' | builtin-class str | 16 | runtime | | k_getsetattr.py:16 | ControlFlowNode for getattr | Builtin-function getattr | builtin-class builtin_function_or_method | 16 | runtime | | k_getsetattr.py:16 | ControlFlowNode for getattr() | int 0 | builtin-class int | 7 | runtime | | k_getsetattr.py:16 | ControlFlowNode for self | self | class C | 12 | runtime | -| k_getsetattr.py:17 | ControlFlowNode for Str | 'b' | builtin-class str | 17 | runtime | +| k_getsetattr.py:17 | ControlFlowNode for StringLiteral | 'b' | builtin-class str | 17 | runtime | | k_getsetattr.py:17 | ControlFlowNode for getattr | Builtin-function getattr | builtin-class builtin_function_or_method | 17 | runtime | | k_getsetattr.py:17 | ControlFlowNode for getattr() | int 1 | builtin-class int | 8 | runtime | | k_getsetattr.py:17 | ControlFlowNode for self | self | class C | 12 | runtime | -| k_getsetattr.py:18 | ControlFlowNode for Str | 'c' | builtin-class str | 18 | runtime | +| k_getsetattr.py:18 | ControlFlowNode for StringLiteral | 'c' | builtin-class str | 18 | runtime | | k_getsetattr.py:18 | ControlFlowNode for getattr | Builtin-function getattr | builtin-class builtin_function_or_method | 18 | runtime | | k_getsetattr.py:18 | ControlFlowNode for getattr() | int 2 | builtin-class int | 14 | runtime | | k_getsetattr.py:18 | ControlFlowNode for self | self | class C | 12 | runtime | @@ -616,8 +616,8 @@ | l_calls.py:4 | ControlFlowNode for Attribute | Attribute | builtin-class method | 4 | runtime | | l_calls.py:4 | ControlFlowNode for Attribute() | NoneType None | builtin-class NoneType | 4 | code/l_calls.py:9 from import | | l_calls.py:4 | ControlFlowNode for Attribute() | NoneType None | builtin-class NoneType | 4 | runtime | -| l_calls.py:4 | ControlFlowNode for Str | 'x' | builtin-class str | 4 | code/l_calls.py:9 from import | -| l_calls.py:4 | ControlFlowNode for Str | 'x' | builtin-class str | 4 | runtime | +| l_calls.py:4 | ControlFlowNode for StringLiteral | 'x' | builtin-class str | 4 | code/l_calls.py:9 from import | +| l_calls.py:4 | ControlFlowNode for StringLiteral | 'x' | builtin-class str | 4 | runtime | | l_calls.py:4 | ControlFlowNode for x | List | builtin-class list | 3 | code/l_calls.py:9 from import | | l_calls.py:4 | ControlFlowNode for x | List | builtin-class list | 3 | runtime | | l_calls.py:6 | ControlFlowNode for FunctionExpr | Function bar | builtin-class function | 6 | import | @@ -693,9 +693,9 @@ | l_calls.py:39 | ControlFlowNode for IntegerLiteral | int 3 | builtin-class int | 39 | import | | l_calls.py:39 | ControlFlowNode for IntegerLiteral | int 4 | builtin-class int | 39 | import | | l_calls.py:39 | ControlFlowNode for IntegerLiteral | int 5 | builtin-class int | 39 | import | -| l_calls.py:41 | ControlFlowNode for Str | 'a' | builtin-class str | 41 | import | -| l_calls.py:41 | ControlFlowNode for Str | 'b' | builtin-class str | 41 | import | -| l_calls.py:41 | ControlFlowNode for Str | 'c' | builtin-class str | 41 | import | +| l_calls.py:41 | ControlFlowNode for StringLiteral | 'a' | builtin-class str | 41 | import | +| l_calls.py:41 | ControlFlowNode for StringLiteral | 'b' | builtin-class str | 41 | import | +| l_calls.py:41 | ControlFlowNode for StringLiteral | 'c' | builtin-class str | 41 | import | | l_calls.py:41 | ControlFlowNode for Tuple | Tuple | builtin-class tuple | 41 | import | | l_calls.py:41 | ControlFlowNode for t | Tuple | builtin-class tuple | 41 | import | | l_calls.py:42 | ControlFlowNode for f | Function f | builtin-class function | 29 | import | @@ -738,7 +738,7 @@ | l_calls.py:63 | ControlFlowNode for Attribute | Builtin-method get | builtin-class method_descriptor | 63 | import | | l_calls.py:63 | ControlFlowNode for Dict | Dict | builtin-class dict | 63 | import | | l_calls.py:63 | ControlFlowNode for IntegerLiteral | int 5 | builtin-class int | 63 | import | -| l_calls.py:63 | ControlFlowNode for Str | 'foo' | builtin-class str | 63 | import | +| l_calls.py:63 | ControlFlowNode for StringLiteral | 'foo' | builtin-class str | 63 | import | | l_calls.py:63 | ControlFlowNode for dict | builtin-class dict | builtin-class type | 63 | import | | l_calls.py:64 | ControlFlowNode for a | Builtin-method bit_length | builtin-class method_descriptor | 58 | import | | l_calls.py:64 | ControlFlowNode for b | Attribute() | builtin-class int | 59 | import | @@ -784,7 +784,7 @@ | n_nesting.py:13 | ControlFlowNode for inner | Function inner | builtin-class function | 13 | runtime | | n_nesting.py:15 | ControlFlowNode for Dict | Dict | builtin-class dict | 15 | runtime | | n_nesting.py:15 | ControlFlowNode for attrs | Dict | builtin-class dict | 15 | runtime | -| n_nesting.py:16 | ControlFlowNode for Str | 'inner' | builtin-class str | 16 | runtime | +| n_nesting.py:16 | ControlFlowNode for StringLiteral | 'inner' | builtin-class str | 16 | runtime | | n_nesting.py:16 | ControlFlowNode for inner | Function inner | builtin-class function | 10 | runtime | | n_nesting.py:16 | ControlFlowNode for inner | Function inner | builtin-class function | 13 | runtime | | n_nesting.py:18 | ControlFlowNode for attrs | Dict | builtin-class dict | 15 | runtime | @@ -845,8 +845,8 @@ | p_decorators.py:3 | ControlFlowNode for simple | Function simple | builtin-class function | 3 | import | | p_decorators.py:4 | ControlFlowNode for Attribute | 'Hello' | builtin-class str | 4 | code/p_decorators.py:7 from import | | p_decorators.py:4 | ControlFlowNode for Attribute | 'Hello' | builtin-class str | 4 | runtime | -| p_decorators.py:4 | ControlFlowNode for Str | 'Hello' | builtin-class str | 4 | code/p_decorators.py:7 from import | -| p_decorators.py:4 | ControlFlowNode for Str | 'Hello' | builtin-class str | 4 | runtime | +| p_decorators.py:4 | ControlFlowNode for StringLiteral | 'Hello' | builtin-class str | 4 | code/p_decorators.py:7 from import | +| p_decorators.py:4 | ControlFlowNode for StringLiteral | 'Hello' | builtin-class str | 4 | runtime | | p_decorators.py:4 | ControlFlowNode for func | Function foo | builtin-class function | 8 | code/p_decorators.py:7 from import | | p_decorators.py:5 | ControlFlowNode for func | Function foo | builtin-class function | 8 | code/p_decorators.py:7 from import | | p_decorators.py:7 | ControlFlowNode for simple | Function simple | builtin-class function | 3 | import | @@ -863,7 +863,7 @@ | p_decorators.py:14 | ControlFlowNode for func | Function bar | builtin-class function | 18 | code/p_decorators.py:17 from import | | p_decorators.py:15 | ControlFlowNode for annotate | Function annotate | builtin-class function | 12 | code/p_decorators.py:17 from import | | p_decorators.py:15 | ControlFlowNode for annotate | Function annotate | builtin-class function | 12 | runtime | -| p_decorators.py:17 | ControlFlowNode for Str | 'Hi' | builtin-class str | 17 | import | +| p_decorators.py:17 | ControlFlowNode for StringLiteral | 'Hi' | builtin-class str | 17 | import | | p_decorators.py:17 | ControlFlowNode for complex | Function complex | builtin-class function | 11 | import | | p_decorators.py:17 | ControlFlowNode for complex() | Function annotate | builtin-class function | 12 | import | | p_decorators.py:17 | ControlFlowNode for complex()() | Function bar | builtin-class function | 18 | import | @@ -1106,7 +1106,7 @@ | r_regressions.py:52 | ControlFlowNode for fail | Function fail | builtin-class function | 46 | runtime | | r_regressions.py:52 | ControlFlowNode for fail() | NoneType None | builtin-class NoneType | 46 | runtime | | r_regressions.py:58 | ControlFlowNode for FunctionExpr | Function method_decorator | builtin-class function | 58 | import | -| r_regressions.py:58 | ControlFlowNode for Str | '' | builtin-class str | 58 | import | +| r_regressions.py:58 | ControlFlowNode for StringLiteral | '' | builtin-class str | 58 | import | | r_regressions.py:58 | ControlFlowNode for method_decorator | Function method_decorator | builtin-class function | 58 | import | | r_regressions.py:61 | ControlFlowNode for FunctionExpr | Function _dec | builtin-class function | 61 | code/r_regressions.py:85 from import | | r_regressions.py:61 | ControlFlowNode for FunctionExpr | Function _dec | builtin-class function | 61 | runtime | @@ -1137,7 +1137,7 @@ | r_regressions.py:81 | ControlFlowNode for args | args | builtin-class tuple | 81 | runtime | | r_regressions.py:81 | ControlFlowNode for kwargs | kwargs | builtin-class dict | 81 | runtime | | r_regressions.py:83 | ControlFlowNode for _wrapper | Function _wrapper | builtin-class function | 81 | runtime | -| r_regressions.py:85 | ControlFlowNode for Str | 'method' | builtin-class str | 85 | import | +| r_regressions.py:85 | ControlFlowNode for StringLiteral | 'method' | builtin-class str | 85 | import | | r_regressions.py:85 | ControlFlowNode for deco | Function deco | builtin-class function | 80 | import | | r_regressions.py:85 | ControlFlowNode for method_decorator | Function method_decorator | builtin-class function | 58 | import | | r_regressions.py:85 | ControlFlowNode for method_decorator() | Function _dec | builtin-class function | 61 | import | @@ -1147,8 +1147,8 @@ | r_regressions.py:86 | ControlFlowNode for object | builtin-class object | builtin-class type | 86 | import | | r_regressions.py:87 | ControlFlowNode for FunctionExpr | Function method | builtin-class function | 87 | import | | r_regressions.py:87 | ControlFlowNode for method | Function method | builtin-class function | 87 | import | -| r_regressions.py:88 | ControlFlowNode for Str | 'hello world' | builtin-class str | 88 | code/r_regressions.py:90 from import | -| r_regressions.py:88 | ControlFlowNode for Str | 'hello world' | builtin-class str | 88 | runtime | +| r_regressions.py:88 | ControlFlowNode for StringLiteral | 'hello world' | builtin-class str | 88 | code/r_regressions.py:90 from import | +| r_regressions.py:88 | ControlFlowNode for StringLiteral | 'hello world' | builtin-class str | 88 | runtime | | r_regressions.py:90 | ControlFlowNode for Attribute | Attribute | builtin-class method | 90 | import | | r_regressions.py:90 | ControlFlowNode for Attribute() | 'hello world' | builtin-class str | 88 | import | | r_regressions.py:90 | ControlFlowNode for TestFirst | class TestFirst | builtin-class type | 86 | import | @@ -1160,7 +1160,7 @@ | r_regressions.py:95 | ControlFlowNode for sys | Module sys | builtin-class module | 93 | import | | r_regressions.py:97 | ControlFlowNode for Compare | bool False | builtin-class bool | 97 | import | | r_regressions.py:97 | ControlFlowNode for Compare | bool True | builtin-class bool | 97 | import | -| r_regressions.py:97 | ControlFlowNode for Str | 'time' | builtin-class str | 97 | import | +| r_regressions.py:97 | ControlFlowNode for StringLiteral | 'time' | builtin-class str | 97 | import | | r_regressions.py:97 | ControlFlowNode for _names | tuple object | builtin-class tuple | 95 | import | | r_regressions.py:98 | ControlFlowNode for ImportExpr | Module time | builtin-class module | 98 | import | | r_regressions.py:98 | ControlFlowNode for t | Module time | builtin-class module | 98 | import | diff --git a/python/ql/test/library-tests/PointsTo/new/PointsToWithType.expected b/python/ql/test/library-tests/PointsTo/new/PointsToWithType.expected index 0f90f90dec4b..783237edc9d3 100644 --- a/python/ql/test/library-tests/PointsTo/new/PointsToWithType.expected +++ b/python/ql/test/library-tests/PointsTo/new/PointsToWithType.expected @@ -34,13 +34,13 @@ | a_simple.py:35 | ControlFlowNode for UnaryExpr | bool False | builtin-class bool | 35 | | a_simple.py:35 | ControlFlowNode for UnaryExpr | bool True | builtin-class bool | 35 | | a_simple.py:35 | ControlFlowNode for args | args | builtin-class tuple | 34 | -| a_simple.py:36 | ControlFlowNode for Str | 'x' | builtin-class str | 36 | +| a_simple.py:36 | ControlFlowNode for StringLiteral | 'x' | builtin-class str | 36 | | a_simple.py:36 | ControlFlowNode for UnaryExpr | bool False | builtin-class bool | 36 | | a_simple.py:36 | ControlFlowNode for UnaryExpr | bool True | builtin-class bool | 36 | | a_simple.py:36 | ControlFlowNode for kwargs | kwargs | builtin-class dict | 34 | | a_simple.py:38 | ControlFlowNode for FunctionExpr | Function multi_assign_and_packing | builtin-class function | 38 | -| a_simple.py:38 | ControlFlowNode for Str | 'b' | builtin-class str | 38 | -| a_simple.py:38 | ControlFlowNode for Str | 'c' | builtin-class str | 38 | +| a_simple.py:38 | ControlFlowNode for StringLiteral | 'b' | builtin-class str | 38 | +| a_simple.py:38 | ControlFlowNode for StringLiteral | 'c' | builtin-class str | 38 | | a_simple.py:38 | ControlFlowNode for multi_assign_and_packing | Function multi_assign_and_packing | builtin-class function | 38 | | a_simple.py:39 | ControlFlowNode for IntegerLiteral | int 1 | builtin-class int | 39 | | a_simple.py:39 | ControlFlowNode for IntegerLiteral | int 2 | builtin-class int | 39 | @@ -217,7 +217,7 @@ | b_condition.py:105 | ControlFlowNode for a | a | builtin-class tuple | 101 | | b_condition.py:106 | ControlFlowNode for Exception | builtin-class Exception | builtin-class type | 106 | | b_condition.py:106 | ControlFlowNode for Exception() | Exception() | builtin-class Exception | 106 | -| b_condition.py:107 | ControlFlowNode for Str | 'Hello' | builtin-class str | 107 | +| b_condition.py:107 | ControlFlowNode for StringLiteral | 'Hello' | builtin-class str | 107 | | b_condition.py:109 | ControlFlowNode for FunctionExpr | Function method_check | builtin-class function | 109 | | b_condition.py:109 | ControlFlowNode for method_check | Function method_check | builtin-class function | 109 | | d_globals.py:2 | ControlFlowNode for FunctionExpr | Function j | builtin-class function | 2 | @@ -418,9 +418,9 @@ | g_class_init.py:36 | ControlFlowNode for self | self | class D | 34 | | g_class_init.py:36 | ControlFlowNode for super | builtin-class super | builtin-class type | 36 | | g_class_init.py:36 | ControlFlowNode for super() | super() | builtin-class super | 36 | -| g_class_init.py:42 | ControlFlowNode for Str | 'v2' | builtin-class str | 42 | +| g_class_init.py:42 | ControlFlowNode for StringLiteral | 'v2' | builtin-class str | 42 | | g_class_init.py:42 | ControlFlowNode for V2 | 'v2' | builtin-class str | 42 | -| g_class_init.py:43 | ControlFlowNode for Str | 'v3' | builtin-class str | 43 | +| g_class_init.py:43 | ControlFlowNode for StringLiteral | 'v3' | builtin-class str | 43 | | g_class_init.py:43 | ControlFlowNode for V3 | 'v3' | builtin-class str | 43 | | g_class_init.py:45 | ControlFlowNode for ClassExpr | class E | builtin-class type | 45 | | g_class_init.py:45 | ControlFlowNode for E | class E | builtin-class type | 45 | @@ -444,12 +444,12 @@ | h_classes.py:3 | ControlFlowNode for C | class C | builtin-class type | 3 | | h_classes.py:3 | ControlFlowNode for ClassExpr | class C | builtin-class type | 3 | | h_classes.py:3 | ControlFlowNode for object | builtin-class object | builtin-class type | 3 | -| h_classes.py:5 | ControlFlowNode for Str | 'C_x' | builtin-class str | 5 | +| h_classes.py:5 | ControlFlowNode for StringLiteral | 'C_x' | builtin-class str | 5 | | h_classes.py:5 | ControlFlowNode for x | 'C_x' | builtin-class str | 5 | | h_classes.py:7 | ControlFlowNode for FunctionExpr | Function __init__ | builtin-class function | 7 | | h_classes.py:7 | ControlFlowNode for __init__ | Function __init__ | builtin-class function | 7 | | h_classes.py:8 | ControlFlowNode for Attribute | 'c_y' | builtin-class str | 8 | -| h_classes.py:8 | ControlFlowNode for Str | 'c_y' | builtin-class str | 8 | +| h_classes.py:8 | ControlFlowNode for StringLiteral | 'c_y' | builtin-class str | 8 | | h_classes.py:8 | ControlFlowNode for self | self | class C | 7 | | h_classes.py:10 | ControlFlowNode for C | class C | builtin-class type | 3 | | h_classes.py:10 | ControlFlowNode for C() | C() | class C | 10 | @@ -522,7 +522,7 @@ | h_classes.py:52 | ControlFlowNode for n | Function n | builtin-class function | 52 | | h_classes.py:55 | ControlFlowNode for int | builtin-class int | builtin-class type | 55 | | h_classes.py:55 | ControlFlowNode for int() | int() | builtin-class int | 55 | -| h_classes.py:56 | ControlFlowNode for Str | '' | builtin-class str | 56 | +| h_classes.py:56 | ControlFlowNode for StringLiteral | '' | builtin-class str | 56 | | h_classes.py:56 | ControlFlowNode for type | builtin-class type | builtin-class type | 56 | | h_classes.py:56 | ControlFlowNode for type() | builtin-class str | builtin-class type | 56 | | h_classes.py:56 | ControlFlowNode for type()() | type()() | builtin-class str | 56 | @@ -530,7 +530,7 @@ | h_classes.py:57 | ControlFlowNode for list() | list() | builtin-class list | 57 | | h_classes.py:58 | ControlFlowNode for dict | builtin-class dict | builtin-class type | 58 | | h_classes.py:58 | ControlFlowNode for dict() | dict() | builtin-class dict | 58 | -| h_classes.py:59 | ControlFlowNode for Str | 'hi' | builtin-class str | 59 | +| h_classes.py:59 | ControlFlowNode for StringLiteral | 'hi' | builtin-class str | 59 | | h_classes.py:59 | ControlFlowNode for bool | builtin-class bool | builtin-class type | 59 | | h_classes.py:59 | ControlFlowNode for bool() | bool True | builtin-class bool | 59 | | h_classes.py:60 | ControlFlowNode for IntegerLiteral | int 0 | builtin-class int | 60 | @@ -620,23 +620,23 @@ | k_getsetattr.py:6 | ControlFlowNode for FunctionExpr | Function meth1 | builtin-class function | 6 | | k_getsetattr.py:6 | ControlFlowNode for meth1 | Function meth1 | builtin-class function | 6 | | k_getsetattr.py:7 | ControlFlowNode for IntegerLiteral | int 0 | builtin-class int | 7 | -| k_getsetattr.py:7 | ControlFlowNode for Str | 'a' | builtin-class str | 7 | +| k_getsetattr.py:7 | ControlFlowNode for StringLiteral | 'a' | builtin-class str | 7 | | k_getsetattr.py:7 | ControlFlowNode for self | self | class C | 6 | | k_getsetattr.py:7 | ControlFlowNode for self | self | class C | 12 | | k_getsetattr.py:7 | ControlFlowNode for setattr | Builtin-function setattr | builtin-class builtin_function_or_method | 7 | | k_getsetattr.py:7 | ControlFlowNode for setattr() | NoneType None | builtin-class NoneType | 7 | | k_getsetattr.py:8 | ControlFlowNode for IntegerLiteral | int 1 | builtin-class int | 8 | -| k_getsetattr.py:8 | ControlFlowNode for Str | 'b' | builtin-class str | 8 | +| k_getsetattr.py:8 | ControlFlowNode for StringLiteral | 'b' | builtin-class str | 8 | | k_getsetattr.py:8 | ControlFlowNode for self | self | class C | 6 | | k_getsetattr.py:8 | ControlFlowNode for self | self | class C | 12 | | k_getsetattr.py:8 | ControlFlowNode for setattr | Builtin-function setattr | builtin-class builtin_function_or_method | 8 | | k_getsetattr.py:8 | ControlFlowNode for setattr() | NoneType None | builtin-class NoneType | 8 | -| k_getsetattr.py:9 | ControlFlowNode for Str | 'a' | builtin-class str | 9 | +| k_getsetattr.py:9 | ControlFlowNode for StringLiteral | 'a' | builtin-class str | 9 | | k_getsetattr.py:9 | ControlFlowNode for getattr | Builtin-function getattr | builtin-class builtin_function_or_method | 9 | | k_getsetattr.py:9 | ControlFlowNode for getattr() | int 0 | builtin-class int | 7 | | k_getsetattr.py:9 | ControlFlowNode for self | self | class C | 6 | | k_getsetattr.py:9 | ControlFlowNode for self | self | class C | 12 | -| k_getsetattr.py:10 | ControlFlowNode for Str | 'c' | builtin-class str | 10 | +| k_getsetattr.py:10 | ControlFlowNode for StringLiteral | 'c' | builtin-class str | 10 | | k_getsetattr.py:10 | ControlFlowNode for getattr | Builtin-function getattr | builtin-class builtin_function_or_method | 10 | | k_getsetattr.py:10 | ControlFlowNode for getattr() | int 2 | builtin-class int | 14 | | k_getsetattr.py:10 | ControlFlowNode for self | self | class C | 6 | @@ -644,27 +644,27 @@ | k_getsetattr.py:12 | ControlFlowNode for FunctionExpr | Function meth2 | builtin-class function | 12 | | k_getsetattr.py:12 | ControlFlowNode for meth2 | Function meth2 | builtin-class function | 12 | | k_getsetattr.py:13 | ControlFlowNode for FloatLiteral | float 7.0 | builtin-class float | 13 | -| k_getsetattr.py:13 | ControlFlowNode for Str | 'a' | builtin-class str | 13 | +| k_getsetattr.py:13 | ControlFlowNode for StringLiteral | 'a' | builtin-class str | 13 | | k_getsetattr.py:13 | ControlFlowNode for self | self | class C | 12 | | k_getsetattr.py:13 | ControlFlowNode for setattr | Builtin-function setattr | builtin-class builtin_function_or_method | 13 | | k_getsetattr.py:13 | ControlFlowNode for setattr() | NoneType None | builtin-class NoneType | 13 | | k_getsetattr.py:14 | ControlFlowNode for IntegerLiteral | int 2 | builtin-class int | 14 | -| k_getsetattr.py:14 | ControlFlowNode for Str | 'c' | builtin-class str | 14 | +| k_getsetattr.py:14 | ControlFlowNode for StringLiteral | 'c' | builtin-class str | 14 | | k_getsetattr.py:14 | ControlFlowNode for self | self | class C | 12 | | k_getsetattr.py:14 | ControlFlowNode for setattr | Builtin-function setattr | builtin-class builtin_function_or_method | 14 | | k_getsetattr.py:14 | ControlFlowNode for setattr() | NoneType None | builtin-class NoneType | 14 | | k_getsetattr.py:15 | ControlFlowNode for Attribute | Attribute | builtin-class method | 15 | | k_getsetattr.py:15 | ControlFlowNode for Attribute() | NoneType None | builtin-class NoneType | 6 | | k_getsetattr.py:15 | ControlFlowNode for self | self | class C | 12 | -| k_getsetattr.py:16 | ControlFlowNode for Str | 'a' | builtin-class str | 16 | +| k_getsetattr.py:16 | ControlFlowNode for StringLiteral | 'a' | builtin-class str | 16 | | k_getsetattr.py:16 | ControlFlowNode for getattr | Builtin-function getattr | builtin-class builtin_function_or_method | 16 | | k_getsetattr.py:16 | ControlFlowNode for getattr() | int 0 | builtin-class int | 7 | | k_getsetattr.py:16 | ControlFlowNode for self | self | class C | 12 | -| k_getsetattr.py:17 | ControlFlowNode for Str | 'b' | builtin-class str | 17 | +| k_getsetattr.py:17 | ControlFlowNode for StringLiteral | 'b' | builtin-class str | 17 | | k_getsetattr.py:17 | ControlFlowNode for getattr | Builtin-function getattr | builtin-class builtin_function_or_method | 17 | | k_getsetattr.py:17 | ControlFlowNode for getattr() | int 1 | builtin-class int | 8 | | k_getsetattr.py:17 | ControlFlowNode for self | self | class C | 12 | -| k_getsetattr.py:18 | ControlFlowNode for Str | 'c' | builtin-class str | 18 | +| k_getsetattr.py:18 | ControlFlowNode for StringLiteral | 'c' | builtin-class str | 18 | | k_getsetattr.py:18 | ControlFlowNode for getattr | Builtin-function getattr | builtin-class builtin_function_or_method | 18 | | k_getsetattr.py:18 | ControlFlowNode for getattr() | int 2 | builtin-class int | 14 | | k_getsetattr.py:18 | ControlFlowNode for self | self | class C | 12 | @@ -698,7 +698,7 @@ | l_calls.py:3 | ControlFlowNode for foo | Function foo | builtin-class function | 3 | | l_calls.py:4 | ControlFlowNode for Attribute | Attribute | builtin-class method | 4 | | l_calls.py:4 | ControlFlowNode for Attribute() | NoneType None | builtin-class NoneType | 4 | -| l_calls.py:4 | ControlFlowNode for Str | 'x' | builtin-class str | 4 | +| l_calls.py:4 | ControlFlowNode for StringLiteral | 'x' | builtin-class str | 4 | | l_calls.py:4 | ControlFlowNode for x | List | builtin-class list | 3 | | l_calls.py:6 | ControlFlowNode for FunctionExpr | Function bar | builtin-class function | 6 | | l_calls.py:6 | ControlFlowNode for List | List | builtin-class list | 6 | @@ -766,9 +766,9 @@ | l_calls.py:39 | ControlFlowNode for IntegerLiteral | int 3 | builtin-class int | 39 | | l_calls.py:39 | ControlFlowNode for IntegerLiteral | int 4 | builtin-class int | 39 | | l_calls.py:39 | ControlFlowNode for IntegerLiteral | int 5 | builtin-class int | 39 | -| l_calls.py:41 | ControlFlowNode for Str | 'a' | builtin-class str | 41 | -| l_calls.py:41 | ControlFlowNode for Str | 'b' | builtin-class str | 41 | -| l_calls.py:41 | ControlFlowNode for Str | 'c' | builtin-class str | 41 | +| l_calls.py:41 | ControlFlowNode for StringLiteral | 'a' | builtin-class str | 41 | +| l_calls.py:41 | ControlFlowNode for StringLiteral | 'b' | builtin-class str | 41 | +| l_calls.py:41 | ControlFlowNode for StringLiteral | 'c' | builtin-class str | 41 | | l_calls.py:41 | ControlFlowNode for Tuple | Tuple | builtin-class tuple | 41 | | l_calls.py:41 | ControlFlowNode for t | Tuple | builtin-class tuple | 41 | | l_calls.py:42 | ControlFlowNode for f | Function f | builtin-class function | 29 | @@ -811,7 +811,7 @@ | l_calls.py:63 | ControlFlowNode for Attribute | Builtin-method get | builtin-class method_descriptor | 63 | | l_calls.py:63 | ControlFlowNode for Dict | Dict | builtin-class dict | 63 | | l_calls.py:63 | ControlFlowNode for IntegerLiteral | int 5 | builtin-class int | 63 | -| l_calls.py:63 | ControlFlowNode for Str | 'foo' | builtin-class str | 63 | +| l_calls.py:63 | ControlFlowNode for StringLiteral | 'foo' | builtin-class str | 63 | | l_calls.py:63 | ControlFlowNode for dict | builtin-class dict | builtin-class type | 63 | | l_calls.py:64 | ControlFlowNode for a | Builtin-method bit_length | builtin-class method_descriptor | 58 | | l_calls.py:64 | ControlFlowNode for b | Attribute() | builtin-class int | 59 | diff --git a/python/ql/test/library-tests/PointsTo/new/SSA.expected b/python/ql/test/library-tests/PointsTo/new/SSA.expected index 9914a4eeec7f..2ac1e543dcc8 100644 --- a/python/ql/test/library-tests/PointsTo/new/SSA.expected +++ b/python/ql/test/library-tests/PointsTo/new/SSA.expected @@ -336,8 +336,8 @@ | g_class_init.py:34 | __init___0 = FunctionExpr | Function __init__ | builtin-class function | | g_class_init.py:34 | self_0 = ParameterDefinition | self | class D | | g_class_init.py:35 | D_2 = ArgumentRefinement(D_1) | class D | builtin-class type | -| g_class_init.py:42 | V2_0 = Str | 'v2' | builtin-class str | -| g_class_init.py:43 | V3_0 = Str | 'v3' | builtin-class str | +| g_class_init.py:42 | V2_0 = StringLiteral | 'v2' | builtin-class str | +| g_class_init.py:43 | V3_0 = StringLiteral | 'v3' | builtin-class str | | g_class_init.py:45 | E_0 = ClassExpr | class E | builtin-class type | | g_class_init.py:46 | V2_1 = ScopeEntryDefinition | 'v2' | builtin-class str | | g_class_init.py:46 | V3_1 = ScopeEntryDefinition | 'v3' | builtin-class str | diff --git a/python/ql/test/library-tests/PointsTo/new/Values.expected b/python/ql/test/library-tests/PointsTo/new/Values.expected index 42f9592fc0e4..5466ca854457 100644 --- a/python/ql/test/library-tests/PointsTo/new/Values.expected +++ b/python/ql/test/library-tests/PointsTo/new/Values.expected @@ -19,13 +19,13 @@ | a_simple.py:35 | ControlFlowNode for UnaryExpr | runtime | bool False | builtin-class bool | | a_simple.py:35 | ControlFlowNode for UnaryExpr | runtime | bool True | builtin-class bool | | a_simple.py:35 | ControlFlowNode for args | runtime | instance of tuple | builtin-class tuple | -| a_simple.py:36 | ControlFlowNode for Str | runtime | 'x' | builtin-class str | +| a_simple.py:36 | ControlFlowNode for StringLiteral | runtime | 'x' | builtin-class str | | a_simple.py:36 | ControlFlowNode for UnaryExpr | runtime | bool False | builtin-class bool | | a_simple.py:36 | ControlFlowNode for UnaryExpr | runtime | bool True | builtin-class bool | | a_simple.py:36 | ControlFlowNode for kwargs | runtime | instance of dict | builtin-class dict | | a_simple.py:38 | ControlFlowNode for FunctionExpr | import | Function multi_assign_and_packing | builtin-class function | -| a_simple.py:38 | ControlFlowNode for Str | import | 'b' | builtin-class str | -| a_simple.py:38 | ControlFlowNode for Str | import | 'c' | builtin-class str | +| a_simple.py:38 | ControlFlowNode for StringLiteral | import | 'b' | builtin-class str | +| a_simple.py:38 | ControlFlowNode for StringLiteral | import | 'c' | builtin-class str | | a_simple.py:39 | ControlFlowNode for IntegerLiteral | runtime | int 1 | builtin-class int | | a_simple.py:39 | ControlFlowNode for IntegerLiteral | runtime | int 2 | builtin-class int | | a_simple.py:39 | ControlFlowNode for IntegerLiteral | runtime | int 3 | builtin-class int | @@ -176,7 +176,7 @@ | b_condition.py:105 | ControlFlowNode for a | runtime | instance of tuple | builtin-class tuple | | b_condition.py:106 | ControlFlowNode for Exception | runtime | builtin-class Exception | builtin-class type | | b_condition.py:106 | ControlFlowNode for Exception() | runtime | Exception() | builtin-class Exception | -| b_condition.py:107 | ControlFlowNode for Str | runtime | 'Hello' | builtin-class str | +| b_condition.py:107 | ControlFlowNode for StringLiteral | runtime | 'Hello' | builtin-class str | | b_condition.py:109 | ControlFlowNode for FunctionExpr | import | Function method_check | builtin-class function | | e_temporal.py:2 | ControlFlowNode for ImportExpr | import | Module sys | builtin-class module | | e_temporal.py:4 | ControlFlowNode for FunctionExpr | import | Function f | builtin-class function | @@ -246,8 +246,8 @@ | g_class_init.py:36 | ControlFlowNode for self | runtime | self instance of D | class D | | g_class_init.py:36 | ControlFlowNode for super | runtime | builtin-class super | builtin-class type | | g_class_init.py:36 | ControlFlowNode for super() | runtime | super(class D, self instance of D) | builtin-class super | -| g_class_init.py:42 | ControlFlowNode for Str | import | 'v2' | builtin-class str | -| g_class_init.py:43 | ControlFlowNode for Str | import | 'v3' | builtin-class str | +| g_class_init.py:42 | ControlFlowNode for StringLiteral | import | 'v2' | builtin-class str | +| g_class_init.py:43 | ControlFlowNode for StringLiteral | import | 'v3' | builtin-class str | | g_class_init.py:45 | ControlFlowNode for ClassExpr | import | class E | builtin-class type | | g_class_init.py:45 | ControlFlowNode for object | import | builtin-class object | builtin-class type | | g_class_init.py:46 | ControlFlowNode for FunctionExpr | import | Function E.__init__ | builtin-class function | @@ -263,11 +263,11 @@ | h_classes.py:1 | ControlFlowNode for ImportExpr | import | Module sys | builtin-class module | | h_classes.py:3 | ControlFlowNode for ClassExpr | import | class C | builtin-class type | | h_classes.py:3 | ControlFlowNode for object | import | builtin-class object | builtin-class type | -| h_classes.py:5 | ControlFlowNode for Str | import | 'C_x' | builtin-class str | +| h_classes.py:5 | ControlFlowNode for StringLiteral | import | 'C_x' | builtin-class str | | h_classes.py:7 | ControlFlowNode for FunctionExpr | import | Function C.__init__ | builtin-class function | -| h_classes.py:8 | ControlFlowNode for Str | code/h_classes.py:10 from import | 'c_y' | builtin-class str | -| h_classes.py:8 | ControlFlowNode for Str | code/h_classes.py:15 from runtime | 'c_y' | builtin-class str | -| h_classes.py:8 | ControlFlowNode for Str | runtime | 'c_y' | builtin-class str | +| h_classes.py:8 | ControlFlowNode for StringLiteral | code/h_classes.py:10 from import | 'c_y' | builtin-class str | +| h_classes.py:8 | ControlFlowNode for StringLiteral | code/h_classes.py:15 from runtime | 'c_y' | builtin-class str | +| h_classes.py:8 | ControlFlowNode for StringLiteral | runtime | 'c_y' | builtin-class str | | h_classes.py:8 | ControlFlowNode for self | runtime | self instance of C | class C | | h_classes.py:10 | ControlFlowNode for C | import | class C | builtin-class type | | h_classes.py:10 | ControlFlowNode for C() | import | C() | class C | @@ -333,7 +333,7 @@ | h_classes.py:52 | ControlFlowNode for FunctionExpr | import | Function D.n | builtin-class function | | h_classes.py:55 | ControlFlowNode for int | import | builtin-class int | builtin-class type | | h_classes.py:55 | ControlFlowNode for int() | import | int() | builtin-class int | -| h_classes.py:56 | ControlFlowNode for Str | import | '' | builtin-class str | +| h_classes.py:56 | ControlFlowNode for StringLiteral | import | '' | builtin-class str | | h_classes.py:56 | ControlFlowNode for type | import | builtin-class type | builtin-class type | | h_classes.py:56 | ControlFlowNode for type() | import | builtin-class str | builtin-class type | | h_classes.py:56 | ControlFlowNode for type()() | import | type()() | builtin-class str | @@ -341,7 +341,7 @@ | h_classes.py:57 | ControlFlowNode for list() | import | list() | builtin-class list | | h_classes.py:58 | ControlFlowNode for dict | import | builtin-class dict | builtin-class type | | h_classes.py:58 | ControlFlowNode for dict() | import | dict() | builtin-class dict | -| h_classes.py:59 | ControlFlowNode for Str | import | 'hi' | builtin-class str | +| h_classes.py:59 | ControlFlowNode for StringLiteral | import | 'hi' | builtin-class str | | h_classes.py:59 | ControlFlowNode for bool | import | builtin-class bool | builtin-class type | | h_classes.py:59 | ControlFlowNode for bool() | import | bool True | builtin-class bool | | h_classes.py:60 | ControlFlowNode for IntegerLiteral | import | int 0 | builtin-class int | @@ -409,8 +409,8 @@ | k_getsetattr.py:6 | ControlFlowNode for FunctionExpr | import | Function C.meth1 | builtin-class function | | k_getsetattr.py:7 | ControlFlowNode for IntegerLiteral | code/k_getsetattr.py:15 from runtime | int 0 | builtin-class int | | k_getsetattr.py:7 | ControlFlowNode for IntegerLiteral | runtime | int 0 | builtin-class int | -| k_getsetattr.py:7 | ControlFlowNode for Str | code/k_getsetattr.py:15 from runtime | 'a' | builtin-class str | -| k_getsetattr.py:7 | ControlFlowNode for Str | runtime | 'a' | builtin-class str | +| k_getsetattr.py:7 | ControlFlowNode for StringLiteral | code/k_getsetattr.py:15 from runtime | 'a' | builtin-class str | +| k_getsetattr.py:7 | ControlFlowNode for StringLiteral | runtime | 'a' | builtin-class str | | k_getsetattr.py:7 | ControlFlowNode for self | code/k_getsetattr.py:15 from runtime | self instance of C | class C | | k_getsetattr.py:7 | ControlFlowNode for self | runtime | self instance of C | class C | | k_getsetattr.py:7 | ControlFlowNode for setattr | code/k_getsetattr.py:15 from runtime | Builtin-function setattr | builtin-class builtin_function_or_method | @@ -419,24 +419,24 @@ | k_getsetattr.py:7 | ControlFlowNode for setattr() | runtime | None | builtin-class NoneType | | k_getsetattr.py:8 | ControlFlowNode for IntegerLiteral | code/k_getsetattr.py:15 from runtime | int 1 | builtin-class int | | k_getsetattr.py:8 | ControlFlowNode for IntegerLiteral | runtime | int 1 | builtin-class int | -| k_getsetattr.py:8 | ControlFlowNode for Str | code/k_getsetattr.py:15 from runtime | 'b' | builtin-class str | -| k_getsetattr.py:8 | ControlFlowNode for Str | runtime | 'b' | builtin-class str | +| k_getsetattr.py:8 | ControlFlowNode for StringLiteral | code/k_getsetattr.py:15 from runtime | 'b' | builtin-class str | +| k_getsetattr.py:8 | ControlFlowNode for StringLiteral | runtime | 'b' | builtin-class str | | k_getsetattr.py:8 | ControlFlowNode for self | code/k_getsetattr.py:15 from runtime | self instance of C | class C | | k_getsetattr.py:8 | ControlFlowNode for self | runtime | self instance of C | class C | | k_getsetattr.py:8 | ControlFlowNode for setattr | code/k_getsetattr.py:15 from runtime | Builtin-function setattr | builtin-class builtin_function_or_method | | k_getsetattr.py:8 | ControlFlowNode for setattr | runtime | Builtin-function setattr | builtin-class builtin_function_or_method | | k_getsetattr.py:8 | ControlFlowNode for setattr() | code/k_getsetattr.py:15 from runtime | None | builtin-class NoneType | | k_getsetattr.py:8 | ControlFlowNode for setattr() | runtime | None | builtin-class NoneType | -| k_getsetattr.py:9 | ControlFlowNode for Str | code/k_getsetattr.py:15 from runtime | 'a' | builtin-class str | -| k_getsetattr.py:9 | ControlFlowNode for Str | runtime | 'a' | builtin-class str | +| k_getsetattr.py:9 | ControlFlowNode for StringLiteral | code/k_getsetattr.py:15 from runtime | 'a' | builtin-class str | +| k_getsetattr.py:9 | ControlFlowNode for StringLiteral | runtime | 'a' | builtin-class str | | k_getsetattr.py:9 | ControlFlowNode for getattr | code/k_getsetattr.py:15 from runtime | Builtin-function getattr | builtin-class builtin_function_or_method | | k_getsetattr.py:9 | ControlFlowNode for getattr | runtime | Builtin-function getattr | builtin-class builtin_function_or_method | | k_getsetattr.py:9 | ControlFlowNode for getattr() | code/k_getsetattr.py:15 from runtime | int 0 | builtin-class int | | k_getsetattr.py:9 | ControlFlowNode for getattr() | runtime | int 0 | builtin-class int | | k_getsetattr.py:9 | ControlFlowNode for self | code/k_getsetattr.py:15 from runtime | self instance of C | class C | | k_getsetattr.py:9 | ControlFlowNode for self | runtime | self instance of C | class C | -| k_getsetattr.py:10 | ControlFlowNode for Str | code/k_getsetattr.py:15 from runtime | 'c' | builtin-class str | -| k_getsetattr.py:10 | ControlFlowNode for Str | runtime | 'c' | builtin-class str | +| k_getsetattr.py:10 | ControlFlowNode for StringLiteral | code/k_getsetattr.py:15 from runtime | 'c' | builtin-class str | +| k_getsetattr.py:10 | ControlFlowNode for StringLiteral | runtime | 'c' | builtin-class str | | k_getsetattr.py:10 | ControlFlowNode for getattr | code/k_getsetattr.py:15 from runtime | Builtin-function getattr | builtin-class builtin_function_or_method | | k_getsetattr.py:10 | ControlFlowNode for getattr | runtime | Builtin-function getattr | builtin-class builtin_function_or_method | | k_getsetattr.py:10 | ControlFlowNode for getattr() | code/k_getsetattr.py:15 from runtime | int 2 | builtin-class int | @@ -444,27 +444,27 @@ | k_getsetattr.py:10 | ControlFlowNode for self | runtime | self instance of C | class C | | k_getsetattr.py:12 | ControlFlowNode for FunctionExpr | import | Function C.meth2 | builtin-class function | | k_getsetattr.py:13 | ControlFlowNode for FloatLiteral | runtime | float 7.0 | builtin-class float | -| k_getsetattr.py:13 | ControlFlowNode for Str | runtime | 'a' | builtin-class str | +| k_getsetattr.py:13 | ControlFlowNode for StringLiteral | runtime | 'a' | builtin-class str | | k_getsetattr.py:13 | ControlFlowNode for self | runtime | self instance of C | class C | | k_getsetattr.py:13 | ControlFlowNode for setattr | runtime | Builtin-function setattr | builtin-class builtin_function_or_method | | k_getsetattr.py:13 | ControlFlowNode for setattr() | runtime | None | builtin-class NoneType | | k_getsetattr.py:14 | ControlFlowNode for IntegerLiteral | runtime | int 2 | builtin-class int | -| k_getsetattr.py:14 | ControlFlowNode for Str | runtime | 'c' | builtin-class str | +| k_getsetattr.py:14 | ControlFlowNode for StringLiteral | runtime | 'c' | builtin-class str | | k_getsetattr.py:14 | ControlFlowNode for self | runtime | self instance of C | class C | | k_getsetattr.py:14 | ControlFlowNode for setattr | runtime | Builtin-function setattr | builtin-class builtin_function_or_method | | k_getsetattr.py:14 | ControlFlowNode for setattr() | runtime | None | builtin-class NoneType | | k_getsetattr.py:15 | ControlFlowNode for Attribute | runtime | Method(Function C.meth1, self instance of C) | builtin-class method | | k_getsetattr.py:15 | ControlFlowNode for Attribute() | runtime | None | builtin-class NoneType | | k_getsetattr.py:15 | ControlFlowNode for self | runtime | self instance of C | class C | -| k_getsetattr.py:16 | ControlFlowNode for Str | runtime | 'a' | builtin-class str | +| k_getsetattr.py:16 | ControlFlowNode for StringLiteral | runtime | 'a' | builtin-class str | | k_getsetattr.py:16 | ControlFlowNode for getattr | runtime | Builtin-function getattr | builtin-class builtin_function_or_method | | k_getsetattr.py:16 | ControlFlowNode for getattr() | runtime | int 0 | builtin-class int | | k_getsetattr.py:16 | ControlFlowNode for self | runtime | self instance of C | class C | -| k_getsetattr.py:17 | ControlFlowNode for Str | runtime | 'b' | builtin-class str | +| k_getsetattr.py:17 | ControlFlowNode for StringLiteral | runtime | 'b' | builtin-class str | | k_getsetattr.py:17 | ControlFlowNode for getattr | runtime | Builtin-function getattr | builtin-class builtin_function_or_method | | k_getsetattr.py:17 | ControlFlowNode for getattr() | runtime | int 1 | builtin-class int | | k_getsetattr.py:17 | ControlFlowNode for self | runtime | self instance of C | class C | -| k_getsetattr.py:18 | ControlFlowNode for Str | runtime | 'c' | builtin-class str | +| k_getsetattr.py:18 | ControlFlowNode for StringLiteral | runtime | 'c' | builtin-class str | | k_getsetattr.py:18 | ControlFlowNode for getattr | runtime | Builtin-function getattr | builtin-class builtin_function_or_method | | k_getsetattr.py:18 | ControlFlowNode for getattr() | runtime | int 2 | builtin-class int | | k_getsetattr.py:18 | ControlFlowNode for self | runtime | self instance of C | class C | @@ -492,8 +492,8 @@ | l_calls.py:4 | ControlFlowNode for Attribute | runtime | Method(builtin method append, List) | builtin-class method | | l_calls.py:4 | ControlFlowNode for Attribute() | code/l_calls.py:9 from import | None | builtin-class NoneType | | l_calls.py:4 | ControlFlowNode for Attribute() | runtime | None | builtin-class NoneType | -| l_calls.py:4 | ControlFlowNode for Str | code/l_calls.py:9 from import | 'x' | builtin-class str | -| l_calls.py:4 | ControlFlowNode for Str | runtime | 'x' | builtin-class str | +| l_calls.py:4 | ControlFlowNode for StringLiteral | code/l_calls.py:9 from import | 'x' | builtin-class str | +| l_calls.py:4 | ControlFlowNode for StringLiteral | runtime | 'x' | builtin-class str | | l_calls.py:4 | ControlFlowNode for x | code/l_calls.py:9 from import | List | builtin-class list | | l_calls.py:4 | ControlFlowNode for x | runtime | List | builtin-class list | | l_calls.py:6 | ControlFlowNode for FunctionExpr | import | Function bar | builtin-class function | @@ -558,9 +558,9 @@ | l_calls.py:39 | ControlFlowNode for IntegerLiteral | import | int 3 | builtin-class int | | l_calls.py:39 | ControlFlowNode for IntegerLiteral | import | int 4 | builtin-class int | | l_calls.py:39 | ControlFlowNode for IntegerLiteral | import | int 5 | builtin-class int | -| l_calls.py:41 | ControlFlowNode for Str | import | 'a' | builtin-class str | -| l_calls.py:41 | ControlFlowNode for Str | import | 'b' | builtin-class str | -| l_calls.py:41 | ControlFlowNode for Str | import | 'c' | builtin-class str | +| l_calls.py:41 | ControlFlowNode for StringLiteral | import | 'a' | builtin-class str | +| l_calls.py:41 | ControlFlowNode for StringLiteral | import | 'b' | builtin-class str | +| l_calls.py:41 | ControlFlowNode for StringLiteral | import | 'c' | builtin-class str | | l_calls.py:41 | ControlFlowNode for Tuple | import | ('a', 'b', 'c', ) | builtin-class tuple | | l_calls.py:42 | ControlFlowNode for f | import | Function f | builtin-class function | | l_calls.py:42 | ControlFlowNode for f() | import | ('a', 'b', 'c', ) | builtin-class tuple | @@ -596,7 +596,7 @@ | l_calls.py:63 | ControlFlowNode for Attribute | import | builtin method get | builtin-class method_descriptor | | l_calls.py:63 | ControlFlowNode for Dict | import | Dict | builtin-class dict | | l_calls.py:63 | ControlFlowNode for IntegerLiteral | import | int 5 | builtin-class int | -| l_calls.py:63 | ControlFlowNode for Str | import | 'foo' | builtin-class str | +| l_calls.py:63 | ControlFlowNode for StringLiteral | import | 'foo' | builtin-class str | | l_calls.py:63 | ControlFlowNode for dict | import | builtin-class dict | builtin-class type | | l_calls.py:64 | ControlFlowNode for a | import | builtin method bit_length | builtin-class method_descriptor | | l_calls.py:64 | ControlFlowNode for b | import | instance of int | builtin-class int | @@ -633,7 +633,7 @@ | n_nesting.py:10 | ControlFlowNode for FunctionExpr | runtime | Function foo.inner | builtin-class function | | n_nesting.py:13 | ControlFlowNode for FunctionExpr | runtime | Function foo.inner | builtin-class function | | n_nesting.py:15 | ControlFlowNode for Dict | runtime | Dict | builtin-class dict | -| n_nesting.py:16 | ControlFlowNode for Str | runtime | 'inner' | builtin-class str | +| n_nesting.py:16 | ControlFlowNode for StringLiteral | runtime | 'inner' | builtin-class str | | n_nesting.py:16 | ControlFlowNode for inner | runtime | Function foo.inner | builtin-class function | | n_nesting.py:18 | ControlFlowNode for attrs | runtime | Dict | builtin-class dict | | n_nesting.py:22 | ControlFlowNode for FunctionExpr | import | Function f1 | builtin-class function | @@ -678,8 +678,8 @@ | n_nesting.py:32 | ControlFlowNode for ClassExpr | import | class D | builtin-class type | | n_nesting.py:34 | ControlFlowNode for IntegerLiteral | import | int 1 | builtin-class int | | p_decorators.py:3 | ControlFlowNode for FunctionExpr | import | Function simple | builtin-class function | -| p_decorators.py:4 | ControlFlowNode for Str | code/p_decorators.py:7 from import | 'Hello' | builtin-class str | -| p_decorators.py:4 | ControlFlowNode for Str | runtime | 'Hello' | builtin-class str | +| p_decorators.py:4 | ControlFlowNode for StringLiteral | code/p_decorators.py:7 from import | 'Hello' | builtin-class str | +| p_decorators.py:4 | ControlFlowNode for StringLiteral | runtime | 'Hello' | builtin-class str | | p_decorators.py:4 | ControlFlowNode for func | code/p_decorators.py:7 from import | Function foo | builtin-class function | | p_decorators.py:5 | ControlFlowNode for func | code/p_decorators.py:7 from import | Function foo | builtin-class function | | p_decorators.py:7 | ControlFlowNode for simple | import | Function simple | builtin-class function | @@ -692,7 +692,7 @@ | p_decorators.py:14 | ControlFlowNode for func | code/p_decorators.py:17 from import | Function bar | builtin-class function | | p_decorators.py:15 | ControlFlowNode for annotate | code/p_decorators.py:17 from import | Function complex.annotate | builtin-class function | | p_decorators.py:15 | ControlFlowNode for annotate | runtime | Function complex.annotate | builtin-class function | -| p_decorators.py:17 | ControlFlowNode for Str | import | 'Hi' | builtin-class str | +| p_decorators.py:17 | ControlFlowNode for StringLiteral | import | 'Hi' | builtin-class str | | p_decorators.py:17 | ControlFlowNode for complex | import | Function complex | builtin-class function | | p_decorators.py:17 | ControlFlowNode for complex() | import | Function complex.annotate | builtin-class function | | p_decorators.py:17 | ControlFlowNode for complex()() | import | Function bar | builtin-class function | @@ -887,7 +887,7 @@ | r_regressions.py:52 | ControlFlowNode for fail | runtime | Function fail | builtin-class function | | r_regressions.py:52 | ControlFlowNode for fail() | runtime | None | builtin-class NoneType | | r_regressions.py:58 | ControlFlowNode for FunctionExpr | import | Function method_decorator | builtin-class function | -| r_regressions.py:58 | ControlFlowNode for Str | import | '' | builtin-class str | +| r_regressions.py:58 | ControlFlowNode for StringLiteral | import | '' | builtin-class str | | r_regressions.py:61 | ControlFlowNode for FunctionExpr | code/r_regressions.py:85 from import | Function method_decorator._dec | builtin-class function | | r_regressions.py:61 | ControlFlowNode for FunctionExpr | runtime | Function method_decorator._dec | builtin-class function | | r_regressions.py:62 | ControlFlowNode for isinstance | code/r_regressions.py:85 from import | Builtin-function isinstance | builtin-class builtin_function_or_method | @@ -907,7 +907,7 @@ | r_regressions.py:80 | ControlFlowNode for FunctionExpr | import | Function deco | builtin-class function | | r_regressions.py:81 | ControlFlowNode for FunctionExpr | runtime | Function deco._wrapper | builtin-class function | | r_regressions.py:83 | ControlFlowNode for _wrapper | runtime | Function deco._wrapper | builtin-class function | -| r_regressions.py:85 | ControlFlowNode for Str | import | 'method' | builtin-class str | +| r_regressions.py:85 | ControlFlowNode for StringLiteral | import | 'method' | builtin-class str | | r_regressions.py:85 | ControlFlowNode for deco | import | Function deco | builtin-class function | | r_regressions.py:85 | ControlFlowNode for method_decorator | import | Function method_decorator | builtin-class function | | r_regressions.py:85 | ControlFlowNode for method_decorator() | import | Function method_decorator._dec | builtin-class function | @@ -915,8 +915,8 @@ | r_regressions.py:86 | ControlFlowNode for ClassExpr | import | class TestFirst | builtin-class type | | r_regressions.py:86 | ControlFlowNode for object | import | builtin-class object | builtin-class type | | r_regressions.py:87 | ControlFlowNode for FunctionExpr | import | Function TestFirst.method | builtin-class function | -| r_regressions.py:88 | ControlFlowNode for Str | code/r_regressions.py:90 from import | 'hello world' | builtin-class str | -| r_regressions.py:88 | ControlFlowNode for Str | runtime | 'hello world' | builtin-class str | +| r_regressions.py:88 | ControlFlowNode for StringLiteral | code/r_regressions.py:90 from import | 'hello world' | builtin-class str | +| r_regressions.py:88 | ControlFlowNode for StringLiteral | runtime | 'hello world' | builtin-class str | | r_regressions.py:90 | ControlFlowNode for Attribute | import | Method(Function TestFirst.method, TestFirst()) | builtin-class method | | r_regressions.py:90 | ControlFlowNode for Attribute() | import | 'hello world' | builtin-class str | | r_regressions.py:90 | ControlFlowNode for TestFirst | import | class TestFirst | builtin-class type | @@ -926,7 +926,7 @@ | r_regressions.py:95 | ControlFlowNode for sys | import | Module sys | builtin-class module | | r_regressions.py:97 | ControlFlowNode for Compare | import | bool False | builtin-class bool | | r_regressions.py:97 | ControlFlowNode for Compare | import | bool True | builtin-class bool | -| r_regressions.py:97 | ControlFlowNode for Str | import | 'time' | builtin-class str | +| r_regressions.py:97 | ControlFlowNode for StringLiteral | import | 'time' | builtin-class str | | r_regressions.py:97 | ControlFlowNode for _names | import | (..., ...) | builtin-class tuple | | r_regressions.py:98 | ControlFlowNode for ImportExpr | import | Module time | builtin-class module | | r_regressions.py:100 | ControlFlowNode for C | import | class C | builtin-class type | diff --git a/python/ql/test/library-tests/exprs/strings/Strings.ql b/python/ql/test/library-tests/exprs/strings/Strings.ql index 7d6a697a8ed4..d42c4bc91cd8 100644 --- a/python/ql/test/library-tests/exprs/strings/Strings.ql +++ b/python/ql/test/library-tests/exprs/strings/Strings.ql @@ -1,4 +1,4 @@ import python -from StrConst s +from StringLiteral s select s.getLocation(), s.getPrefix(), s.getText() diff --git a/python/ql/test/library-tests/frameworks/django-orm/CONSISTENCY/DataFlowConsistency.expected b/python/ql/test/library-tests/frameworks/django-orm/CONSISTENCY/DataFlowConsistency.expected index 76acdf6282b0..8160545f7139 100644 --- a/python/ql/test/library-tests/frameworks/django-orm/CONSISTENCY/DataFlowConsistency.expected +++ b/python/ql/test/library-tests/frameworks/django-orm/CONSISTENCY/DataFlowConsistency.expected @@ -7,30 +7,30 @@ storeStepIsLocal | testapp/orm_inheritance.py:76:15:76:20 | ControlFlowNode for SOURCE | testapp/orm_inheritance.py:33:1:33:25 | [orm-model] Class PhysicalBook | Store step does not preserve enclosing callable. | | testapp/orm_inheritance.py:77:27:77:32 | ControlFlowNode for SOURCE | testapp/orm_inheritance.py:33:1:33:25 | [orm-model] Class PhysicalBook | Store step does not preserve enclosing callable. | | testapp/orm_inheritance.py:78:35:78:40 | ControlFlowNode for SOURCE | testapp/orm_inheritance.py:33:1:33:25 | [orm-model] Class PhysicalBook | Store step does not preserve enclosing callable. | -| testapp/orm_inheritance.py:93:15:93:26 | ControlFlowNode for Str | testapp/orm_inheritance.py:29:1:29:25 | [orm-model] Class Book | Store step does not preserve enclosing callable. | -| testapp/orm_inheritance.py:93:15:93:26 | ControlFlowNode for Str | testapp/orm_inheritance.py:38:1:38:18 | [orm-model] Class EBook | Store step does not preserve enclosing callable. | -| testapp/orm_inheritance.py:94:23:94:28 | ControlFlowNode for Str | testapp/orm_inheritance.py:38:1:38:18 | [orm-model] Class EBook | Store step does not preserve enclosing callable. | -| testapp/orm_inheritance.py:95:35:95:40 | ControlFlowNode for Str | testapp/orm_inheritance.py:38:1:38:18 | [orm-model] Class EBook | Store step does not preserve enclosing callable. | +| testapp/orm_inheritance.py:93:15:93:26 | ControlFlowNode for StringLiteral | testapp/orm_inheritance.py:29:1:29:25 | [orm-model] Class Book | Store step does not preserve enclosing callable. | +| testapp/orm_inheritance.py:93:15:93:26 | ControlFlowNode for StringLiteral | testapp/orm_inheritance.py:38:1:38:18 | [orm-model] Class EBook | Store step does not preserve enclosing callable. | +| testapp/orm_inheritance.py:94:23:94:28 | ControlFlowNode for StringLiteral | testapp/orm_inheritance.py:38:1:38:18 | [orm-model] Class EBook | Store step does not preserve enclosing callable. | +| testapp/orm_inheritance.py:95:35:95:40 | ControlFlowNode for StringLiteral | testapp/orm_inheritance.py:38:1:38:18 | [orm-model] Class EBook | Store step does not preserve enclosing callable. | | testapp/orm_inheritance.py:133:15:133:20 | ControlFlowNode for SOURCE | testapp/orm_inheritance.py:117:1:117:33 | [orm-model] Class PolyBook | Store step does not preserve enclosing callable. | | testapp/orm_inheritance.py:167:15:167:20 | ControlFlowNode for SOURCE | testapp/orm_inheritance.py:117:1:117:33 | [orm-model] Class PolyBook | Store step does not preserve enclosing callable. | | testapp/orm_inheritance.py:167:15:167:20 | ControlFlowNode for SOURCE | testapp/orm_inheritance.py:121:1:121:33 | [orm-model] Class PolyPhysicalBook | Store step does not preserve enclosing callable. | | testapp/orm_inheritance.py:168:27:168:32 | ControlFlowNode for SOURCE | testapp/orm_inheritance.py:121:1:121:33 | [orm-model] Class PolyPhysicalBook | Store step does not preserve enclosing callable. | | testapp/orm_inheritance.py:169:35:169:40 | ControlFlowNode for SOURCE | testapp/orm_inheritance.py:121:1:121:33 | [orm-model] Class PolyPhysicalBook | Store step does not preserve enclosing callable. | -| testapp/orm_inheritance.py:183:15:183:26 | ControlFlowNode for Str | testapp/orm_inheritance.py:117:1:117:33 | [orm-model] Class PolyBook | Store step does not preserve enclosing callable. | -| testapp/orm_inheritance.py:183:15:183:26 | ControlFlowNode for Str | testapp/orm_inheritance.py:126:1:126:26 | [orm-model] Class PolyEBook | Store step does not preserve enclosing callable. | -| testapp/orm_inheritance.py:184:23:184:28 | ControlFlowNode for Str | testapp/orm_inheritance.py:126:1:126:26 | [orm-model] Class PolyEBook | Store step does not preserve enclosing callable. | -| testapp/orm_inheritance.py:185:35:185:40 | ControlFlowNode for Str | testapp/orm_inheritance.py:126:1:126:26 | [orm-model] Class PolyEBook | Store step does not preserve enclosing callable. | +| testapp/orm_inheritance.py:183:15:183:26 | ControlFlowNode for StringLiteral | testapp/orm_inheritance.py:117:1:117:33 | [orm-model] Class PolyBook | Store step does not preserve enclosing callable. | +| testapp/orm_inheritance.py:183:15:183:26 | ControlFlowNode for StringLiteral | testapp/orm_inheritance.py:126:1:126:26 | [orm-model] Class PolyEBook | Store step does not preserve enclosing callable. | +| testapp/orm_inheritance.py:184:23:184:28 | ControlFlowNode for StringLiteral | testapp/orm_inheritance.py:126:1:126:26 | [orm-model] Class PolyEBook | Store step does not preserve enclosing callable. | +| testapp/orm_inheritance.py:185:35:185:40 | ControlFlowNode for StringLiteral | testapp/orm_inheritance.py:126:1:126:26 | [orm-model] Class PolyEBook | Store step does not preserve enclosing callable. | | testapp/orm_security_tests.py:15:1:15:27 | [orm-model] Class Person | testapp/orm_security_tests.py:42:23:42:42 | ControlFlowNode for Attribute() | Store step does not preserve enclosing callable. | | testapp/orm_tests.py:115:41:115:46 | ControlFlowNode for SOURCE | testapp/orm_tests.py:110:1:110:30 | [orm-model] Class TestSave5 | Store step does not preserve enclosing callable. | | testapp/orm_tests.py:131:86:131:91 | ControlFlowNode for SOURCE | testapp/orm_tests.py:126:1:126:30 | [orm-model] Class TestSave6 | Store step does not preserve enclosing callable. | | testapp/orm_tests.py:149:89:149:94 | ControlFlowNode for SOURCE | testapp/orm_tests.py:144:1:144:30 | [orm-model] Class TestSave7 | Store step does not preserve enclosing callable. | | testapp/orm_tests.py:161:1:161:30 | [orm-model] Class TestSave8 | testapp/orm_tests.py:168:22:168:44 | ControlFlowNode for Attribute() | Store step does not preserve enclosing callable. | -| testapp/orm_tests.py:165:35:165:39 | ControlFlowNode for Str | testapp/orm_tests.py:161:1:161:30 | [orm-model] Class TestSave8 | Store step does not preserve enclosing callable. | +| testapp/orm_tests.py:165:35:165:39 | ControlFlowNode for StringLiteral | testapp/orm_tests.py:161:1:161:30 | [orm-model] Class TestSave8 | Store step does not preserve enclosing callable. | | testapp/orm_tests.py:168:58:168:63 | ControlFlowNode for SOURCE | testapp/orm_tests.py:161:1:161:30 | [orm-model] Class TestSave8 | Store step does not preserve enclosing callable. | -| testapp/orm_tests.py:184:41:184:45 | ControlFlowNode for Str | testapp/orm_tests.py:177:1:177:30 | [orm-model] Class TestSave9 | Store step does not preserve enclosing callable. | +| testapp/orm_tests.py:184:41:184:45 | ControlFlowNode for StringLiteral | testapp/orm_tests.py:177:1:177:30 | [orm-model] Class TestSave9 | Store step does not preserve enclosing callable. | | testapp/orm_tests.py:185:49:185:51 | ControlFlowNode for obj | testapp/orm_tests.py:180:1:180:44 | [orm-model] Class TestSave9WithForeignKey | Store step does not preserve enclosing callable. | -| testapp/orm_tests.py:212:55:212:59 | ControlFlowNode for Str | testapp/orm_tests.py:206:1:206:35 | [orm-model] Class save10_Comment | Store step does not preserve enclosing callable. | -| testapp/orm_tests.py:239:55:239:59 | ControlFlowNode for Str | testapp/orm_tests.py:233:1:233:35 | [orm-model] Class save11_Comment | Store step does not preserve enclosing callable. | +| testapp/orm_tests.py:212:55:212:59 | ControlFlowNode for StringLiteral | testapp/orm_tests.py:206:1:206:35 | [orm-model] Class save10_Comment | Store step does not preserve enclosing callable. | +| testapp/orm_tests.py:239:55:239:59 | ControlFlowNode for StringLiteral | testapp/orm_tests.py:233:1:233:35 | [orm-model] Class save11_Comment | Store step does not preserve enclosing callable. | | testapp/orm_tests.py:273:1:273:31 | [orm-model] Class TestSave13 | testapp/orm_tests.py:281:12:281:35 | ControlFlowNode for Attribute() | Store step does not preserve enclosing callable. | | testapp/orm_tests.py:294:1:294:29 | [orm-model] Class TestLoad | testapp/orm_tests.py:308:12:308:33 | ControlFlowNode for Attribute() | Store step does not preserve enclosing callable. | | testapp/orm_tests.py:294:1:294:29 | [orm-model] Class TestLoad | testapp/orm_tests.py:314:12:314:33 | ControlFlowNode for Attribute() | Store step does not preserve enclosing callable. | @@ -46,4 +46,4 @@ storeStepIsLocal | testapp/orm_tests.py:294:1:294:29 | [orm-model] Class TestLoad | testapp/orm_tests.py:350:12:350:33 | ControlFlowNode for Attribute() | Store step does not preserve enclosing callable. | | testapp/orm_tests.py:294:1:294:29 | [orm-model] Class TestLoad | testapp/orm_tests.py:356:12:356:33 | ControlFlowNode for Attribute() | Store step does not preserve enclosing callable. | | testapp/orm_tests.py:294:1:294:29 | [orm-model] Class TestLoad | testapp/orm_tests.py:363:9:363:37 | ControlFlowNode for Attribute() | Store step does not preserve enclosing callable. | -| testapp/tests.py:81:33:81:37 | ControlFlowNode for Str | testapp/orm_form_test.py:6:1:6:28 | [orm-model] Class MyModel | Store step does not preserve enclosing callable. | +| testapp/tests.py:81:33:81:37 | ControlFlowNode for StringLiteral | testapp/orm_form_test.py:6:1:6:28 | [orm-model] Class MyModel | Store step does not preserve enclosing callable. | diff --git a/python/ql/test/library-tests/locations/implicit_concatenation/parts.ql b/python/ql/test/library-tests/locations/implicit_concatenation/parts.ql index 992f695663e0..a4c090704d8d 100644 --- a/python/ql/test/library-tests/locations/implicit_concatenation/parts.ql +++ b/python/ql/test/library-tests/locations/implicit_concatenation/parts.ql @@ -1,5 +1,5 @@ import python -from StrConst s, StringPart part, int n +from StringLiteral s, StringPart part, int n where part = s.getImplicitlyConcatenatedPart(n) select s.getLocation().getStartLine(), s.getText(), n, part.getText() diff --git a/python/ql/test/library-tests/locations/implicit_concatenation/test.ql b/python/ql/test/library-tests/locations/implicit_concatenation/test.ql index ca595f53833e..d85e40a7fddd 100644 --- a/python/ql/test/library-tests/locations/implicit_concatenation/test.ql +++ b/python/ql/test/library-tests/locations/implicit_concatenation/test.ql @@ -1,10 +1,10 @@ import python -class ImplicitConcat extends StrConst { +class ImplicitConcat extends StringLiteral { ImplicitConcat() { exists(this.getAnImplicitlyConcatenatedPart()) } } -from StrConst s, boolean isConcat +from StringLiteral s, boolean isConcat where s instanceof ImplicitConcat and isConcat = true or diff --git a/python/ql/test/library-tests/parentheses/Parens.expected b/python/ql/test/library-tests/parentheses/Parens.expected index 4be830e85ae9..1fd6d21d80f1 100644 --- a/python/ql/test/library-tests/parentheses/Parens.expected +++ b/python/ql/test/library-tests/parentheses/Parens.expected @@ -1,8 +1,8 @@ | 26 | a | | 27 | Attribute | | 28 | BinaryExpr | -| 29 | Str | -| 30 | Str | +| 29 | StringLiteral | +| 30 | StringLiteral | | 31 | List | | 32 | Dict | | 33 | Tuple | @@ -17,7 +17,7 @@ | 42 | ListComp | | 43 | SetComp | | 44 | DictComp | -| 45 | Str | +| 45 | StringLiteral | | 46 | BinaryExpr | | 47 | BinaryExpr | | 48 | BinaryExpr | diff --git a/python/ql/test/library-tests/taint/general/printAst.expected b/python/ql/test/library-tests/taint/general/printAst.expected index 9f4914ab69de..8d2970a4fd50 100644 --- a/python/ql/test/library-tests/taint/general/printAst.expected +++ b/python/ql/test/library-tests/taint/general/printAst.expected @@ -17,7 +17,7 @@ nodes | assignment.py:5:8:5:8 | [Name] b | semmle.label | [Name] b | | assignment.py:5:12:5:17 | [Name] SOURCE | semmle.label | [Name] SOURCE | | assignment.py:5:12:5:25 | [Tuple] | semmle.label | [Tuple] | -| assignment.py:5:20:5:25 | [Str] safe | semmle.label | [Str] safe | +| assignment.py:5:20:5:25 | [StringLiteral] safe | semmle.label | [StringLiteral] safe | | assignment.py:6:5:6:8 | [Name] test | semmle.label | [Name] test | | assignment.py:6:5:6:14 | [Call] test(a, b) | semmle.label | [Call] test(a, b) | | assignment.py:6:5:6:14 | [ExprStmt] test(a, b) | semmle.label | [ExprStmt] test(a, b) | @@ -50,9 +50,9 @@ nodes | assignment.py:13:27:13:58 | [Tuple] | semmle.label | [Tuple] | | assignment.py:13:28:13:33 | [Name] SOURCE | semmle.label | [Name] SOURCE | | assignment.py:13:28:13:41 | [Tuple] | semmle.label | [Tuple] | -| assignment.py:13:36:13:41 | [Str] safe | semmle.label | [Str] safe | +| assignment.py:13:36:13:41 | [StringLiteral] safe | semmle.label | [StringLiteral] safe | | assignment.py:13:45:13:50 | [Name] SOURCE | semmle.label | [Name] SOURCE | -| assignment.py:13:53:13:58 | [Str] safe | semmle.label | [Str] safe | +| assignment.py:13:53:13:58 | [StringLiteral] safe | semmle.label | [StringLiteral] safe | | assignment.py:14:5:14:8 | [Name] test | semmle.label | [Name] test | | assignment.py:14:5:14:24 | [Call] test(s1, s2, t1, t2) | semmle.label | [Call] test(s1, s2, t1, t2) | | assignment.py:14:5:14:24 | [ExprStmt] test(s1, s2, t1, t2) | semmle.label | [ExprStmt] test(s1, s2, t1, t2) | @@ -570,7 +570,7 @@ nodes | module.py:4:1:4:4 | [Name] safe | semmle.label | [Name] safe | | module.py:4:1:4:13 | [AssignStmt] safe = safe | semmle.label | [AssignStmt] safe = safe | | module.py:4:1:4:13 | [AssignStmt] safe = safe | semmle.order | 20 | -| module.py:4:8:4:13 | [Str] safe | semmle.label | [Str] safe | +| module.py:4:8:4:13 | [StringLiteral] safe | semmle.label | [StringLiteral] safe | | module.py:6:1:6:21 | [FunctionDef] dangerous_func = function dangerous_func(...) | semmle.label | [FunctionDef] dangerous_func = function dangerous_func(...) | | module.py:6:1:6:21 | [FunctionDef] dangerous_func = function dangerous_func(...) | semmle.order | 21 | | module.py:6:1:6:21 | [FunctionExpr] function dangerous_func(...) | semmle.label | [FunctionExpr] function dangerous_func(...) | @@ -585,7 +585,7 @@ nodes | module.py:11:1:11:5 | [Name] safe2 | semmle.label | [Name] safe2 | | module.py:11:1:11:14 | [AssignStmt] safe2 = safe | semmle.label | [AssignStmt] safe2 = safe | | module.py:11:1:11:14 | [AssignStmt] safe2 = safe | semmle.order | 23 | -| module.py:11:9:11:14 | [Str] safe | semmle.label | [Str] safe | +| module.py:11:9:11:14 | [StringLiteral] safe | semmle.label | [StringLiteral] safe | | rockpaperscissors.py:3:1:3:14 | [FunctionDef] rock = function rock(...) | semmle.label | [FunctionDef] rock = function rock(...) | | rockpaperscissors.py:3:1:3:14 | [FunctionDef] rock = function rock(...) | semmle.order | 24 | | rockpaperscissors.py:3:1:3:14 | [FunctionExpr] function rock(...) | semmle.label | [FunctionExpr] function rock(...) | @@ -593,7 +593,7 @@ nodes | rockpaperscissors.py:3:5:3:8 | [Name] rock | semmle.label | [Name] rock | | rockpaperscissors.py:3:10:3:12 | [Parameter] arg | semmle.label | [Parameter] arg | | rockpaperscissors.py:4:5:4:29 | [ExprStmt] SCISSORS are vulnerable | semmle.label | [ExprStmt] SCISSORS are vulnerable | -| rockpaperscissors.py:4:5:4:29 | [Str] SCISSORS are vulnerable | semmle.label | [Str] SCISSORS are vulnerable | +| rockpaperscissors.py:4:5:4:29 | [StringLiteral] SCISSORS are vulnerable | semmle.label | [StringLiteral] SCISSORS are vulnerable | | rockpaperscissors.py:6:1:6:15 | [FunctionDef] paper = function paper(...) | semmle.label | [FunctionDef] paper = function paper(...) | | rockpaperscissors.py:6:1:6:15 | [FunctionDef] paper = function paper(...) | semmle.order | 25 | | rockpaperscissors.py:6:1:6:15 | [FunctionExpr] function paper(...) | semmle.label | [FunctionExpr] function paper(...) | @@ -601,7 +601,7 @@ nodes | rockpaperscissors.py:6:5:6:9 | [Name] paper | semmle.label | [Name] paper | | rockpaperscissors.py:6:11:6:13 | [Parameter] arg | semmle.label | [Parameter] arg | | rockpaperscissors.py:7:5:7:24 | [ExprStmt] ROCK is vulnerable | semmle.label | [ExprStmt] ROCK is vulnerable | -| rockpaperscissors.py:7:5:7:24 | [Str] ROCK is vulnerable | semmle.label | [Str] ROCK is vulnerable | +| rockpaperscissors.py:7:5:7:24 | [StringLiteral] ROCK is vulnerable | semmle.label | [StringLiteral] ROCK is vulnerable | | rockpaperscissors.py:9:1:9:18 | [FunctionDef] scissors = function scissors(...) | semmle.label | [FunctionDef] scissors = function scissors(...) | | rockpaperscissors.py:9:1:9:18 | [FunctionDef] scissors = function scissors(...) | semmle.order | 26 | | rockpaperscissors.py:9:1:9:18 | [FunctionExpr] function scissors(...) | semmle.label | [FunctionExpr] function scissors(...) | @@ -609,7 +609,7 @@ nodes | rockpaperscissors.py:9:5:9:12 | [Name] scissors | semmle.label | [Name] scissors | | rockpaperscissors.py:9:14:9:16 | [Parameter] arg | semmle.label | [Parameter] arg | | rockpaperscissors.py:10:5:10:25 | [ExprStmt] PAPER is vulnerable | semmle.label | [ExprStmt] PAPER is vulnerable | -| rockpaperscissors.py:10:5:10:25 | [Str] PAPER is vulnerable | semmle.label | [Str] PAPER is vulnerable | +| rockpaperscissors.py:10:5:10:25 | [StringLiteral] PAPER is vulnerable | semmle.label | [StringLiteral] PAPER is vulnerable | | rockpaperscissors.py:12:1:12:12 | [FunctionDef] test1 = function test1(...) | semmle.label | [FunctionDef] test1 = function test1(...) | | rockpaperscissors.py:12:1:12:12 | [FunctionDef] test1 = function test1(...) | semmle.order | 27 | | rockpaperscissors.py:12:1:12:12 | [FunctionExpr] function test1(...) | semmle.label | [FunctionExpr] function test1(...) | @@ -869,7 +869,7 @@ nodes | test.py:28:8:28:11 | [Name] cond | semmle.label | [Name] cond | | test.py:29:9:29:9 | [Name] t | semmle.label | [Name] t | | test.py:29:9:29:18 | [AssignStmt] t = Safe | semmle.label | [AssignStmt] t = Safe | -| test.py:29:13:29:18 | [Str] Safe | semmle.label | [Str] Safe | +| test.py:29:13:29:18 | [StringLiteral] Safe | semmle.label | [StringLiteral] Safe | | test.py:31:9:31:9 | [Name] t | semmle.label | [Name] t | | test.py:31:9:31:18 | [AssignStmt] t = SOURCE | semmle.label | [AssignStmt] t = SOURCE | | test.py:31:13:31:18 | [Name] SOURCE | semmle.label | [Name] SOURCE | @@ -892,7 +892,7 @@ nodes | test.py:37:13:37:18 | [Name] SOURCE | semmle.label | [Name] SOURCE | | test.py:39:9:39:9 | [Name] t | semmle.label | [Name] t | | test.py:39:9:39:18 | [AssignStmt] t = Safe | semmle.label | [AssignStmt] t = Safe | -| test.py:39:13:39:18 | [Str] Safe | semmle.label | [Str] Safe | +| test.py:39:13:39:18 | [StringLiteral] Safe | semmle.label | [StringLiteral] Safe | | test.py:40:5:40:12 | [If] if cond: | semmle.label | [If] if cond: | | test.py:40:8:40:11 | [Name] cond | semmle.label | [Name] cond | | test.py:41:9:41:12 | [Name] SINK | semmle.label | [Name] SINK | @@ -956,7 +956,7 @@ nodes | test.py:59:8:59:11 | [Name] cond | semmle.label | [Name] cond | | test.py:60:9:60:9 | [Name] t | semmle.label | [Name] t | | test.py:60:9:60:19 | [AssignStmt] t = Safe | semmle.label | [AssignStmt] t = Safe | -| test.py:60:14:60:19 | [Str] Safe | semmle.label | [Str] Safe | +| test.py:60:14:60:19 | [StringLiteral] Safe | semmle.label | [StringLiteral] Safe | | test.py:62:9:62:9 | [Name] t | semmle.label | [Name] t | | test.py:62:9:62:18 | [AssignStmt] t = SOURCE | semmle.label | [AssignStmt] t = SOURCE | | test.py:62:13:62:18 | [Name] SOURCE | semmle.label | [Name] SOURCE | @@ -978,7 +978,7 @@ nodes | test.py:67:13:67:18 | [Name] SOURCE | semmle.label | [Name] SOURCE | | test.py:69:9:69:9 | [Name] t | semmle.label | [Name] t | | test.py:69:9:69:18 | [AssignStmt] t = Safe | semmle.label | [AssignStmt] t = Safe | -| test.py:69:13:69:18 | [Str] Safe | semmle.label | [Str] Safe | +| test.py:69:13:69:18 | [StringLiteral] Safe | semmle.label | [StringLiteral] Safe | | test.py:70:5:70:9 | [Name] sink3 | semmle.label | [Name] sink3 | | test.py:70:5:70:18 | [Call] sink3(cond, t) | semmle.label | [Call] sink3(cond, t) | | test.py:70:5:70:18 | [ExprStmt] sink3(cond, t) | semmle.label | [ExprStmt] sink3(cond, t) | @@ -1016,7 +1016,7 @@ nodes | test.py:80:5:80:10 | [Name] test12 | semmle.label | [Name] test12 | | test.py:81:5:81:5 | [Name] t | semmle.label | [Name] t | | test.py:81:5:81:14 | [AssignStmt] t = safe | semmle.label | [AssignStmt] t = safe | -| test.py:81:9:81:14 | [Str] safe | semmle.label | [Str] safe | +| test.py:81:9:81:14 | [StringLiteral] safe | semmle.label | [StringLiteral] safe | | test.py:82:5:82:5 | [Name] t | semmle.label | [Name] t | | test.py:82:5:82:14 | [AssignStmt] t = hub(t) | semmle.label | [AssignStmt] t = hub(t) | | test.py:82:9:82:11 | [Name] hub | semmle.label | [Name] hub | @@ -1292,7 +1292,7 @@ nodes | test.py:169:5:169:5 | [Name] d | semmle.label | [Name] d | | test.py:169:5:169:24 | [AssignStmt] | semmle.label | [AssignStmt] | | test.py:169:9:169:24 | [Dict] | semmle.label | [Dict] | -| test.py:169:10:169:14 | [Str] key | semmle.label | [Str] key | +| test.py:169:10:169:14 | [StringLiteral] key | semmle.label | [StringLiteral] key | | test.py:169:10:169:23 | [KeyValuePair] | semmle.label | [KeyValuePair] | | test.py:169:18:169:23 | [Name] SOURCE | semmle.label | [Name] SOURCE | | test.py:170:5:170:5 | [Name] x | semmle.label | [Name] x | @@ -1316,7 +1316,7 @@ nodes | test.py:173:5:173:18 | [ExprStmt] SINK(...) | semmle.label | [ExprStmt] SINK(...) | | test.py:173:10:173:10 | [Name] y | semmle.label | [Name] y | | test.py:173:10:173:17 | [Subscript] y[key] | semmle.label | [Subscript] y[key] | -| test.py:173:12:173:16 | [Str] key | semmle.label | [Str] key | +| test.py:173:12:173:16 | [StringLiteral] key | semmle.label | [StringLiteral] key | | test.py:174:5:174:6 | [Name] l2 | semmle.label | [Name] l2 | | test.py:174:5:174:16 | [AssignStmt] l2 = list(l) | semmle.label | [AssignStmt] l2 = list(l) | | test.py:174:10:174:13 | [Name] list | semmle.label | [Name] list | @@ -1445,7 +1445,7 @@ nodes | test.py:218:5:218:25 | [If] if tainted == ...: | semmle.label | [If] if tainted == ...: | | test.py:218:8:218:14 | [Name] tainted | semmle.label | [Name] tainted | | test.py:218:8:218:24 | [Compare] tainted == ... | semmle.label | [Compare] tainted == ... | -| test.py:218:19:218:24 | [Str] safe | semmle.label | [Str] safe | +| test.py:218:19:218:24 | [StringLiteral] safe | semmle.label | [StringLiteral] safe | | test.py:219:9:219:12 | [Name] SINK | semmle.label | [Name] SINK | | test.py:219:9:219:21 | [Call] SINK(tainted) | semmle.label | [Call] SINK(tainted) | | test.py:219:9:219:21 | [ExprStmt] SINK(tainted) | semmle.label | [ExprStmt] SINK(tainted) | @@ -1465,7 +1465,7 @@ nodes | test.py:224:5:224:25 | [If] if tainted != ...: | semmle.label | [If] if tainted != ...: | | test.py:224:8:224:14 | [Name] tainted | semmle.label | [Name] tainted | | test.py:224:8:224:24 | [Compare] tainted != ... | semmle.label | [Compare] tainted != ... | -| test.py:224:19:224:24 | [Str] safe | semmle.label | [Str] safe | +| test.py:224:19:224:24 | [StringLiteral] safe | semmle.label | [StringLiteral] safe | | test.py:225:9:225:14 | [Return] | semmle.label | [Return] | | test.py:226:5:226:8 | [Name] SINK | semmle.label | [Name] SINK | | test.py:226:5:226:17 | [Call] SINK(tainted) | semmle.label | [Call] SINK(tainted) | @@ -1527,8 +1527,8 @@ edges | assignment.py:5:5:5:25 | [AssignStmt] | assignment.py:5:12:5:25 | [Tuple] | semmle.order | 2 | | assignment.py:5:12:5:25 | [Tuple] | assignment.py:5:12:5:17 | [Name] SOURCE | semmle.label | 1 | | assignment.py:5:12:5:25 | [Tuple] | assignment.py:5:12:5:17 | [Name] SOURCE | semmle.order | 1 | -| assignment.py:5:12:5:25 | [Tuple] | assignment.py:5:20:5:25 | [Str] safe | semmle.label | 2 | -| assignment.py:5:12:5:25 | [Tuple] | assignment.py:5:20:5:25 | [Str] safe | semmle.order | 2 | +| assignment.py:5:12:5:25 | [Tuple] | assignment.py:5:20:5:25 | [StringLiteral] safe | semmle.label | 2 | +| assignment.py:5:12:5:25 | [Tuple] | assignment.py:5:20:5:25 | [StringLiteral] safe | semmle.order | 2 | | assignment.py:6:5:6:14 | [Call] test(a, b) | assignment.py:6:5:6:8 | [Name] test | semmle.label | 0 | | assignment.py:6:5:6:14 | [Call] test(a, b) | assignment.py:6:5:6:8 | [Name] test | semmle.order | 0 | | assignment.py:6:5:6:14 | [Call] test(a, b) | file://:0:0:0:0 | (arguments) | semmle.label | 1 | @@ -1581,12 +1581,12 @@ edges | assignment.py:13:27:13:58 | [Tuple] | assignment.py:13:28:13:41 | [Tuple] | semmle.order | 1 | | assignment.py:13:27:13:58 | [Tuple] | assignment.py:13:45:13:50 | [Name] SOURCE | semmle.label | 2 | | assignment.py:13:27:13:58 | [Tuple] | assignment.py:13:45:13:50 | [Name] SOURCE | semmle.order | 2 | -| assignment.py:13:27:13:58 | [Tuple] | assignment.py:13:53:13:58 | [Str] safe | semmle.label | 3 | -| assignment.py:13:27:13:58 | [Tuple] | assignment.py:13:53:13:58 | [Str] safe | semmle.order | 3 | +| assignment.py:13:27:13:58 | [Tuple] | assignment.py:13:53:13:58 | [StringLiteral] safe | semmle.label | 3 | +| assignment.py:13:27:13:58 | [Tuple] | assignment.py:13:53:13:58 | [StringLiteral] safe | semmle.order | 3 | | assignment.py:13:28:13:41 | [Tuple] | assignment.py:13:28:13:33 | [Name] SOURCE | semmle.label | 1 | | assignment.py:13:28:13:41 | [Tuple] | assignment.py:13:28:13:33 | [Name] SOURCE | semmle.order | 1 | -| assignment.py:13:28:13:41 | [Tuple] | assignment.py:13:36:13:41 | [Str] safe | semmle.label | 2 | -| assignment.py:13:28:13:41 | [Tuple] | assignment.py:13:36:13:41 | [Str] safe | semmle.order | 2 | +| assignment.py:13:28:13:41 | [Tuple] | assignment.py:13:36:13:41 | [StringLiteral] safe | semmle.label | 2 | +| assignment.py:13:28:13:41 | [Tuple] | assignment.py:13:36:13:41 | [StringLiteral] safe | semmle.order | 2 | | assignment.py:14:5:14:24 | [Call] test(s1, s2, t1, t2) | assignment.py:14:5:14:8 | [Name] test | semmle.label | 0 | | assignment.py:14:5:14:24 | [Call] test(s1, s2, t1, t2) | assignment.py:14:5:14:8 | [Name] test | semmle.order | 0 | | assignment.py:14:5:14:24 | [Call] test(s1, s2, t1, t2) | file://:0:0:0:0 | (arguments) | semmle.label | 1 | @@ -2593,8 +2593,8 @@ edges | module.py:3:1:3:18 | [AssignStmt] dangerous = SOURCE | module.py:3:13:3:18 | [Name] SOURCE | semmle.order | 2 | | module.py:4:1:4:13 | [AssignStmt] safe = safe | module.py:4:1:4:4 | [Name] safe | semmle.label | 1 | | module.py:4:1:4:13 | [AssignStmt] safe = safe | module.py:4:1:4:4 | [Name] safe | semmle.order | 1 | -| module.py:4:1:4:13 | [AssignStmt] safe = safe | module.py:4:8:4:13 | [Str] safe | semmle.label | 2 | -| module.py:4:1:4:13 | [AssignStmt] safe = safe | module.py:4:8:4:13 | [Str] safe | semmle.order | 2 | +| module.py:4:1:4:13 | [AssignStmt] safe = safe | module.py:4:8:4:13 | [StringLiteral] safe | semmle.label | 2 | +| module.py:4:1:4:13 | [AssignStmt] safe = safe | module.py:4:8:4:13 | [StringLiteral] safe | semmle.order | 2 | | module.py:6:1:6:21 | [FunctionDef] dangerous_func = function dangerous_func(...) | module.py:6:1:6:21 | [FunctionExpr] function dangerous_func(...) | semmle.label | 1 | | module.py:6:1:6:21 | [FunctionDef] dangerous_func = function dangerous_func(...) | module.py:6:1:6:21 | [FunctionExpr] function dangerous_func(...) | semmle.order | 1 | | module.py:6:1:6:21 | [FunctionDef] dangerous_func = function dangerous_func(...) | module.py:6:5:6:18 | [Name] dangerous_func | semmle.label | 0 | @@ -2613,8 +2613,8 @@ edges | module.py:10:1:10:14 | [AssignStmt] safe2 = SOURCE | module.py:10:9:10:14 | [Name] SOURCE | semmle.order | 2 | | module.py:11:1:11:14 | [AssignStmt] safe2 = safe | module.py:11:1:11:5 | [Name] safe2 | semmle.label | 1 | | module.py:11:1:11:14 | [AssignStmt] safe2 = safe | module.py:11:1:11:5 | [Name] safe2 | semmle.order | 1 | -| module.py:11:1:11:14 | [AssignStmt] safe2 = safe | module.py:11:9:11:14 | [Str] safe | semmle.label | 2 | -| module.py:11:1:11:14 | [AssignStmt] safe2 = safe | module.py:11:9:11:14 | [Str] safe | semmle.order | 2 | +| module.py:11:1:11:14 | [AssignStmt] safe2 = safe | module.py:11:9:11:14 | [StringLiteral] safe | semmle.label | 2 | +| module.py:11:1:11:14 | [AssignStmt] safe2 = safe | module.py:11:9:11:14 | [StringLiteral] safe | semmle.order | 2 | | rockpaperscissors.py:3:1:3:14 | [FunctionDef] rock = function rock(...) | rockpaperscissors.py:3:1:3:14 | [FunctionExpr] function rock(...) | semmle.label | 1 | | rockpaperscissors.py:3:1:3:14 | [FunctionDef] rock = function rock(...) | rockpaperscissors.py:3:1:3:14 | [FunctionExpr] function rock(...) | semmle.order | 1 | | rockpaperscissors.py:3:1:3:14 | [FunctionDef] rock = function rock(...) | rockpaperscissors.py:3:5:3:8 | [Name] rock | semmle.label | 0 | @@ -2625,8 +2625,8 @@ edges | rockpaperscissors.py:3:1:3:14 | [Function] function rock(...) | file://:0:0:0:0 | (StmtList) body | semmle.order | 4 | | rockpaperscissors.py:3:1:3:14 | [Function] function rock(...) | file://:0:0:0:0 | (parameters) | semmle.label | 0 | | rockpaperscissors.py:3:1:3:14 | [Function] function rock(...) | file://:0:0:0:0 | (parameters) | semmle.order | 0 | -| rockpaperscissors.py:4:5:4:29 | [ExprStmt] SCISSORS are vulnerable | rockpaperscissors.py:4:5:4:29 | [Str] SCISSORS are vulnerable | semmle.label | 1 | -| rockpaperscissors.py:4:5:4:29 | [ExprStmt] SCISSORS are vulnerable | rockpaperscissors.py:4:5:4:29 | [Str] SCISSORS are vulnerable | semmle.order | 1 | +| rockpaperscissors.py:4:5:4:29 | [ExprStmt] SCISSORS are vulnerable | rockpaperscissors.py:4:5:4:29 | [StringLiteral] SCISSORS are vulnerable | semmle.label | 1 | +| rockpaperscissors.py:4:5:4:29 | [ExprStmt] SCISSORS are vulnerable | rockpaperscissors.py:4:5:4:29 | [StringLiteral] SCISSORS are vulnerable | semmle.order | 1 | | rockpaperscissors.py:6:1:6:15 | [FunctionDef] paper = function paper(...) | rockpaperscissors.py:6:1:6:15 | [FunctionExpr] function paper(...) | semmle.label | 1 | | rockpaperscissors.py:6:1:6:15 | [FunctionDef] paper = function paper(...) | rockpaperscissors.py:6:1:6:15 | [FunctionExpr] function paper(...) | semmle.order | 1 | | rockpaperscissors.py:6:1:6:15 | [FunctionDef] paper = function paper(...) | rockpaperscissors.py:6:5:6:9 | [Name] paper | semmle.label | 0 | @@ -2637,8 +2637,8 @@ edges | rockpaperscissors.py:6:1:6:15 | [Function] function paper(...) | file://:0:0:0:0 | (StmtList) body | semmle.order | 4 | | rockpaperscissors.py:6:1:6:15 | [Function] function paper(...) | file://:0:0:0:0 | (parameters) | semmle.label | 0 | | rockpaperscissors.py:6:1:6:15 | [Function] function paper(...) | file://:0:0:0:0 | (parameters) | semmle.order | 0 | -| rockpaperscissors.py:7:5:7:24 | [ExprStmt] ROCK is vulnerable | rockpaperscissors.py:7:5:7:24 | [Str] ROCK is vulnerable | semmle.label | 1 | -| rockpaperscissors.py:7:5:7:24 | [ExprStmt] ROCK is vulnerable | rockpaperscissors.py:7:5:7:24 | [Str] ROCK is vulnerable | semmle.order | 1 | +| rockpaperscissors.py:7:5:7:24 | [ExprStmt] ROCK is vulnerable | rockpaperscissors.py:7:5:7:24 | [StringLiteral] ROCK is vulnerable | semmle.label | 1 | +| rockpaperscissors.py:7:5:7:24 | [ExprStmt] ROCK is vulnerable | rockpaperscissors.py:7:5:7:24 | [StringLiteral] ROCK is vulnerable | semmle.order | 1 | | rockpaperscissors.py:9:1:9:18 | [FunctionDef] scissors = function scissors(...) | rockpaperscissors.py:9:1:9:18 | [FunctionExpr] function scissors(...) | semmle.label | 1 | | rockpaperscissors.py:9:1:9:18 | [FunctionDef] scissors = function scissors(...) | rockpaperscissors.py:9:1:9:18 | [FunctionExpr] function scissors(...) | semmle.order | 1 | | rockpaperscissors.py:9:1:9:18 | [FunctionDef] scissors = function scissors(...) | rockpaperscissors.py:9:5:9:12 | [Name] scissors | semmle.label | 0 | @@ -2649,8 +2649,8 @@ edges | rockpaperscissors.py:9:1:9:18 | [Function] function scissors(...) | file://:0:0:0:0 | (StmtList) body | semmle.order | 4 | | rockpaperscissors.py:9:1:9:18 | [Function] function scissors(...) | file://:0:0:0:0 | (parameters) | semmle.label | 0 | | rockpaperscissors.py:9:1:9:18 | [Function] function scissors(...) | file://:0:0:0:0 | (parameters) | semmle.order | 0 | -| rockpaperscissors.py:10:5:10:25 | [ExprStmt] PAPER is vulnerable | rockpaperscissors.py:10:5:10:25 | [Str] PAPER is vulnerable | semmle.label | 1 | -| rockpaperscissors.py:10:5:10:25 | [ExprStmt] PAPER is vulnerable | rockpaperscissors.py:10:5:10:25 | [Str] PAPER is vulnerable | semmle.order | 1 | +| rockpaperscissors.py:10:5:10:25 | [ExprStmt] PAPER is vulnerable | rockpaperscissors.py:10:5:10:25 | [StringLiteral] PAPER is vulnerable | semmle.label | 1 | +| rockpaperscissors.py:10:5:10:25 | [ExprStmt] PAPER is vulnerable | rockpaperscissors.py:10:5:10:25 | [StringLiteral] PAPER is vulnerable | semmle.order | 1 | | rockpaperscissors.py:12:1:12:12 | [FunctionDef] test1 = function test1(...) | rockpaperscissors.py:12:1:12:12 | [FunctionExpr] function test1(...) | semmle.label | 1 | | rockpaperscissors.py:12:1:12:12 | [FunctionDef] test1 = function test1(...) | rockpaperscissors.py:12:1:12:12 | [FunctionExpr] function test1(...) | semmle.order | 1 | | rockpaperscissors.py:12:1:12:12 | [FunctionDef] test1 = function test1(...) | rockpaperscissors.py:12:5:12:9 | [Name] test1 | semmle.label | 0 | @@ -3115,8 +3115,8 @@ edges | test.py:28:5:28:12 | [If] if cond: | test.py:28:8:28:11 | [Name] cond | semmle.order | 0 | | test.py:29:9:29:18 | [AssignStmt] t = Safe | test.py:29:9:29:9 | [Name] t | semmle.label | 1 | | test.py:29:9:29:18 | [AssignStmt] t = Safe | test.py:29:9:29:9 | [Name] t | semmle.order | 1 | -| test.py:29:9:29:18 | [AssignStmt] t = Safe | test.py:29:13:29:18 | [Str] Safe | semmle.label | 2 | -| test.py:29:9:29:18 | [AssignStmt] t = Safe | test.py:29:13:29:18 | [Str] Safe | semmle.order | 2 | +| test.py:29:9:29:18 | [AssignStmt] t = Safe | test.py:29:13:29:18 | [StringLiteral] Safe | semmle.label | 2 | +| test.py:29:9:29:18 | [AssignStmt] t = Safe | test.py:29:13:29:18 | [StringLiteral] Safe | semmle.order | 2 | | test.py:31:9:31:18 | [AssignStmt] t = SOURCE | test.py:31:9:31:9 | [Name] t | semmle.label | 1 | | test.py:31:9:31:18 | [AssignStmt] t = SOURCE | test.py:31:9:31:9 | [Name] t | semmle.order | 1 | | test.py:31:9:31:18 | [AssignStmt] t = SOURCE | test.py:31:13:31:18 | [Name] SOURCE | semmle.label | 2 | @@ -3153,8 +3153,8 @@ edges | test.py:37:9:37:18 | [AssignStmt] t = SOURCE | test.py:37:13:37:18 | [Name] SOURCE | semmle.order | 2 | | test.py:39:9:39:18 | [AssignStmt] t = Safe | test.py:39:9:39:9 | [Name] t | semmle.label | 1 | | test.py:39:9:39:18 | [AssignStmt] t = Safe | test.py:39:9:39:9 | [Name] t | semmle.order | 1 | -| test.py:39:9:39:18 | [AssignStmt] t = Safe | test.py:39:13:39:18 | [Str] Safe | semmle.label | 2 | -| test.py:39:9:39:18 | [AssignStmt] t = Safe | test.py:39:13:39:18 | [Str] Safe | semmle.order | 2 | +| test.py:39:9:39:18 | [AssignStmt] t = Safe | test.py:39:13:39:18 | [StringLiteral] Safe | semmle.label | 2 | +| test.py:39:9:39:18 | [AssignStmt] t = Safe | test.py:39:13:39:18 | [StringLiteral] Safe | semmle.order | 2 | | test.py:40:5:40:12 | [If] if cond: | file://:0:0:0:0 | (StmtList) body | semmle.label | 2 | | test.py:40:5:40:12 | [If] if cond: | file://:0:0:0:0 | (StmtList) body | semmle.order | 2 | | test.py:40:5:40:12 | [If] if cond: | test.py:40:8:40:11 | [Name] cond | semmle.label | 0 | @@ -3259,8 +3259,8 @@ edges | test.py:59:5:59:12 | [If] if cond: | test.py:59:8:59:11 | [Name] cond | semmle.order | 0 | | test.py:60:9:60:19 | [AssignStmt] t = Safe | test.py:60:9:60:9 | [Name] t | semmle.label | 1 | | test.py:60:9:60:19 | [AssignStmt] t = Safe | test.py:60:9:60:9 | [Name] t | semmle.order | 1 | -| test.py:60:9:60:19 | [AssignStmt] t = Safe | test.py:60:14:60:19 | [Str] Safe | semmle.label | 2 | -| test.py:60:9:60:19 | [AssignStmt] t = Safe | test.py:60:14:60:19 | [Str] Safe | semmle.order | 2 | +| test.py:60:9:60:19 | [AssignStmt] t = Safe | test.py:60:14:60:19 | [StringLiteral] Safe | semmle.label | 2 | +| test.py:60:9:60:19 | [AssignStmt] t = Safe | test.py:60:14:60:19 | [StringLiteral] Safe | semmle.order | 2 | | test.py:62:9:62:18 | [AssignStmt] t = SOURCE | test.py:62:9:62:9 | [Name] t | semmle.label | 1 | | test.py:62:9:62:18 | [AssignStmt] t = SOURCE | test.py:62:9:62:9 | [Name] t | semmle.order | 1 | | test.py:62:9:62:18 | [AssignStmt] t = SOURCE | test.py:62:13:62:18 | [Name] SOURCE | semmle.label | 2 | @@ -3293,8 +3293,8 @@ edges | test.py:67:9:67:18 | [AssignStmt] t = SOURCE | test.py:67:13:67:18 | [Name] SOURCE | semmle.order | 2 | | test.py:69:9:69:18 | [AssignStmt] t = Safe | test.py:69:9:69:9 | [Name] t | semmle.label | 1 | | test.py:69:9:69:18 | [AssignStmt] t = Safe | test.py:69:9:69:9 | [Name] t | semmle.order | 1 | -| test.py:69:9:69:18 | [AssignStmt] t = Safe | test.py:69:13:69:18 | [Str] Safe | semmle.label | 2 | -| test.py:69:9:69:18 | [AssignStmt] t = Safe | test.py:69:13:69:18 | [Str] Safe | semmle.order | 2 | +| test.py:69:9:69:18 | [AssignStmt] t = Safe | test.py:69:13:69:18 | [StringLiteral] Safe | semmle.label | 2 | +| test.py:69:9:69:18 | [AssignStmt] t = Safe | test.py:69:13:69:18 | [StringLiteral] Safe | semmle.order | 2 | | test.py:70:5:70:18 | [Call] sink3(cond, t) | file://:0:0:0:0 | (arguments) | semmle.label | 1 | | test.py:70:5:70:18 | [Call] sink3(cond, t) | file://:0:0:0:0 | (arguments) | semmle.order | 1 | | test.py:70:5:70:18 | [Call] sink3(cond, t) | test.py:70:5:70:9 | [Name] sink3 | semmle.label | 0 | @@ -3353,8 +3353,8 @@ edges | test.py:80:1:80:13 | [Function] function test12(...) | file://:0:0:0:0 | (parameters) | semmle.order | 0 | | test.py:81:5:81:14 | [AssignStmt] t = safe | test.py:81:5:81:5 | [Name] t | semmle.label | 1 | | test.py:81:5:81:14 | [AssignStmt] t = safe | test.py:81:5:81:5 | [Name] t | semmle.order | 1 | -| test.py:81:5:81:14 | [AssignStmt] t = safe | test.py:81:9:81:14 | [Str] safe | semmle.label | 2 | -| test.py:81:5:81:14 | [AssignStmt] t = safe | test.py:81:9:81:14 | [Str] safe | semmle.order | 2 | +| test.py:81:5:81:14 | [AssignStmt] t = safe | test.py:81:9:81:14 | [StringLiteral] safe | semmle.label | 2 | +| test.py:81:5:81:14 | [AssignStmt] t = safe | test.py:81:9:81:14 | [StringLiteral] safe | semmle.order | 2 | | test.py:82:5:82:14 | [AssignStmt] t = hub(t) | test.py:82:5:82:5 | [Name] t | semmle.label | 1 | | test.py:82:5:82:14 | [AssignStmt] t = hub(t) | test.py:82:5:82:5 | [Name] t | semmle.order | 1 | | test.py:82:5:82:14 | [AssignStmt] t = hub(t) | test.py:82:9:82:14 | [Call] hub(t) | semmle.label | 2 | @@ -3819,8 +3819,8 @@ edges | test.py:169:5:169:24 | [AssignStmt] | test.py:169:9:169:24 | [Dict] | semmle.order | 2 | | test.py:169:9:169:24 | [Dict] | test.py:169:10:169:23 | [KeyValuePair] | semmle.label | 1 | | test.py:169:9:169:24 | [Dict] | test.py:169:10:169:23 | [KeyValuePair] | semmle.order | 1 | -| test.py:169:10:169:23 | [KeyValuePair] | test.py:169:10:169:14 | [Str] key | semmle.label | 1 | -| test.py:169:10:169:23 | [KeyValuePair] | test.py:169:10:169:14 | [Str] key | semmle.order | 1 | +| test.py:169:10:169:23 | [KeyValuePair] | test.py:169:10:169:14 | [StringLiteral] key | semmle.label | 1 | +| test.py:169:10:169:23 | [KeyValuePair] | test.py:169:10:169:14 | [StringLiteral] key | semmle.order | 1 | | test.py:169:10:169:23 | [KeyValuePair] | test.py:169:18:169:23 | [Name] SOURCE | semmle.label | 2 | | test.py:169:10:169:23 | [KeyValuePair] | test.py:169:18:169:23 | [Name] SOURCE | semmle.order | 2 | | test.py:170:5:170:12 | [Attribute] x.extend | test.py:170:5:170:5 | [Name] x | semmle.label | 1 | @@ -3857,8 +3857,8 @@ edges | test.py:173:5:173:18 | [ExprStmt] SINK(...) | test.py:173:5:173:18 | [Call] SINK(...) | semmle.order | 1 | | test.py:173:10:173:17 | [Subscript] y[key] | test.py:173:10:173:10 | [Name] y | semmle.label | 1 | | test.py:173:10:173:17 | [Subscript] y[key] | test.py:173:10:173:10 | [Name] y | semmle.order | 1 | -| test.py:173:10:173:17 | [Subscript] y[key] | test.py:173:12:173:16 | [Str] key | semmle.label | 2 | -| test.py:173:10:173:17 | [Subscript] y[key] | test.py:173:12:173:16 | [Str] key | semmle.order | 2 | +| test.py:173:10:173:17 | [Subscript] y[key] | test.py:173:12:173:16 | [StringLiteral] key | semmle.label | 2 | +| test.py:173:10:173:17 | [Subscript] y[key] | test.py:173:12:173:16 | [StringLiteral] key | semmle.order | 2 | | test.py:174:5:174:16 | [AssignStmt] l2 = list(l) | test.py:174:5:174:6 | [Name] l2 | semmle.label | 1 | | test.py:174:5:174:16 | [AssignStmt] l2 = list(l) | test.py:174:5:174:6 | [Name] l2 | semmle.order | 1 | | test.py:174:5:174:16 | [AssignStmt] l2 = list(l) | test.py:174:10:174:16 | [Call] list(l) | semmle.label | 2 | @@ -4081,8 +4081,8 @@ edges | test.py:218:5:218:25 | [If] if tainted == ...: | test.py:218:8:218:24 | [Compare] tainted == ... | semmle.order | 0 | | test.py:218:8:218:24 | [Compare] tainted == ... | test.py:218:8:218:14 | [Name] tainted | semmle.label | 1 | | test.py:218:8:218:24 | [Compare] tainted == ... | test.py:218:8:218:14 | [Name] tainted | semmle.order | 1 | -| test.py:218:8:218:24 | [Compare] tainted == ... | test.py:218:19:218:24 | [Str] safe | semmle.label | 2 | -| test.py:218:8:218:24 | [Compare] tainted == ... | test.py:218:19:218:24 | [Str] safe | semmle.order | 2 | +| test.py:218:8:218:24 | [Compare] tainted == ... | test.py:218:19:218:24 | [StringLiteral] safe | semmle.label | 2 | +| test.py:218:8:218:24 | [Compare] tainted == ... | test.py:218:19:218:24 | [StringLiteral] safe | semmle.order | 2 | | test.py:219:9:219:21 | [Call] SINK(tainted) | file://:0:0:0:0 | (arguments) | semmle.label | 1 | | test.py:219:9:219:21 | [Call] SINK(tainted) | file://:0:0:0:0 | (arguments) | semmle.order | 1 | | test.py:219:9:219:21 | [Call] SINK(tainted) | test.py:219:9:219:12 | [Name] SINK | semmle.label | 0 | @@ -4115,8 +4115,8 @@ edges | test.py:224:5:224:25 | [If] if tainted != ...: | test.py:224:8:224:24 | [Compare] tainted != ... | semmle.order | 0 | | test.py:224:8:224:24 | [Compare] tainted != ... | test.py:224:8:224:14 | [Name] tainted | semmle.label | 1 | | test.py:224:8:224:24 | [Compare] tainted != ... | test.py:224:8:224:14 | [Name] tainted | semmle.order | 1 | -| test.py:224:8:224:24 | [Compare] tainted != ... | test.py:224:19:224:24 | [Str] safe | semmle.label | 2 | -| test.py:224:8:224:24 | [Compare] tainted != ... | test.py:224:19:224:24 | [Str] safe | semmle.order | 2 | +| test.py:224:8:224:24 | [Compare] tainted != ... | test.py:224:19:224:24 | [StringLiteral] safe | semmle.label | 2 | +| test.py:224:8:224:24 | [Compare] tainted != ... | test.py:224:19:224:24 | [StringLiteral] safe | semmle.order | 2 | | test.py:226:5:226:17 | [Call] SINK(tainted) | file://:0:0:0:0 | (arguments) | semmle.label | 1 | | test.py:226:5:226:17 | [Call] SINK(tainted) | file://:0:0:0:0 | (arguments) | semmle.order | 1 | | test.py:226:5:226:17 | [Call] SINK(tainted) | test.py:226:5:226:8 | [Name] SINK | semmle.label | 0 | diff --git a/python/ql/test/query-tests/Expressions/Formatting/MixedExplicitImplicitIn3101Format.expected b/python/ql/test/query-tests/Expressions/Formatting/MixedExplicitImplicitIn3101Format.expected index d055082fe46b..8a58bef522f3 100644 --- a/python/ql/test/query-tests/Expressions/Formatting/MixedExplicitImplicitIn3101Format.expected +++ b/python/ql/test/query-tests/Expressions/Formatting/MixedExplicitImplicitIn3101Format.expected @@ -1,2 +1,2 @@ -| test.py:3:17:3:23 | Str | Formatting string mixes implicitly and explicitly numbered fields. | -| test.py:8:17:8:23 | Str | Formatting string mixes implicitly and explicitly numbered fields. | +| test.py:3:17:3:23 | StringLiteral | Formatting string mixes implicitly and explicitly numbered fields. | +| test.py:8:17:8:23 | StringLiteral | Formatting string mixes implicitly and explicitly numbered fields. | diff --git a/python/ql/test/query-tests/Expressions/Formatting/UnusedArgumentIn3101Format.expected b/python/ql/test/query-tests/Expressions/Formatting/UnusedArgumentIn3101Format.expected index 5dc11d99643c..e5948021bcbf 100644 --- a/python/ql/test/query-tests/Expressions/Formatting/UnusedArgumentIn3101Format.expected +++ b/python/ql/test/query-tests/Expressions/Formatting/UnusedArgumentIn3101Format.expected @@ -1,4 +1,4 @@ -| test.py:29:1:29:50 | Attribute() | Too many arguments for string format. Format $@ requires only 2, but 3 are provided. | test.py:5:20:5:29 | Str | "{0}, {1}" | -| test.py:30:1:30:51 | format() | Too many arguments for string format. Format $@ requires only 2, but 3 are provided. | test.py:10:20:10:29 | Str | "{0}, {1}" | -| test.py:32:1:32:50 | Attribute() | Too many arguments for string format. Format $@ requires only 2, but 3 are provided. | test.py:6:20:6:27 | Str | "{}, {}" | -| test.py:33:1:33:51 | format() | Too many arguments for string format. Format $@ requires only 2, but 3 are provided. | test.py:11:20:11:27 | Str | "{}, {}" | +| test.py:29:1:29:50 | Attribute() | Too many arguments for string format. Format $@ requires only 2, but 3 are provided. | test.py:5:20:5:29 | StringLiteral | "{0}, {1}" | +| test.py:30:1:30:51 | format() | Too many arguments for string format. Format $@ requires only 2, but 3 are provided. | test.py:10:20:10:29 | StringLiteral | "{0}, {1}" | +| test.py:32:1:32:50 | Attribute() | Too many arguments for string format. Format $@ requires only 2, but 3 are provided. | test.py:6:20:6:27 | StringLiteral | "{}, {}" | +| test.py:33:1:33:51 | format() | Too many arguments for string format. Format $@ requires only 2, but 3 are provided. | test.py:11:20:11:27 | StringLiteral | "{}, {}" | diff --git a/python/ql/test/query-tests/Expressions/Formatting/UnusedNamedArgumentIn3101Format.expected b/python/ql/test/query-tests/Expressions/Formatting/UnusedNamedArgumentIn3101Format.expected index 462a9ed39928..00e57b9611ae 100644 --- a/python/ql/test/query-tests/Expressions/Formatting/UnusedNamedArgumentIn3101Format.expected +++ b/python/ql/test/query-tests/Expressions/Formatting/UnusedNamedArgumentIn3101Format.expected @@ -1,11 +1,11 @@ -| test.py:17:1:17:44 | Attribute() | Surplus named argument for string format. An argument named 'world' is provided, but it is not required by $@. | test.py:4:17:4:31 | Str | format "{name!r}, {0}" | -| test.py:18:1:18:45 | format() | Surplus named argument for string format. An argument named 'world' is provided, but it is not required by $@. | test.py:9:17:9:31 | Str | format "{name!r}, {0}" | -| test.py:20:1:20:49 | Attribute() | Surplus named argument for string format. An argument named 'world' is provided, but it is not required by $@. | test.py:4:17:4:31 | Str | format "{name!r}, {0}" | -| test.py:21:1:21:50 | format() | Surplus named argument for string format. An argument named 'world' is provided, but it is not required by $@. | test.py:9:17:9:31 | Str | format "{name!r}, {0}" | -| test.py:45:1:45:35 | format() | Surplus named argument for string format. An argument named 'z' is provided, but it is not required by $@. | test.py:37:14:37:18 | Str | any format used. | -| test.py:45:1:45:35 | format() | Surplus named argument for string format. An argument named 'z' is provided, but it is not required by $@. | test.py:39:14:39:18 | Str | any format used. | -| test.py:46:1:46:34 | Attribute() | Surplus named argument for string format. An argument named 'z' is provided, but it is not required by $@. | test.py:37:14:37:18 | Str | any format used. | -| test.py:46:1:46:34 | Attribute() | Surplus named argument for string format. An argument named 'z' is provided, but it is not required by $@. | test.py:39:14:39:18 | Str | any format used. | -| unknown_format_string.py:9:12:9:30 | Attribute() | Surplus named argument for string format. An argument named 'b' is provided, but it is not required by $@. | unknown_format_string.py:8:15:8:19 | Str | format "{a}" | -| unknown_format_string.py:17:12:17:30 | Attribute() | Surplus named argument for string format. An argument named 'b' is provided, but it is not required by $@. | unknown_format_string.py:16:15:16:19 | Str | format "{a}" | -| unknown_format_string.py:25:12:25:30 | Attribute() | Surplus named argument for string format. An argument named 'b' is provided, but it is not required by $@. | unknown_format_string.py:24:15:24:19 | Str | format "{a}" | +| test.py:17:1:17:44 | Attribute() | Surplus named argument for string format. An argument named 'world' is provided, but it is not required by $@. | test.py:4:17:4:31 | StringLiteral | format "{name!r}, {0}" | +| test.py:18:1:18:45 | format() | Surplus named argument for string format. An argument named 'world' is provided, but it is not required by $@. | test.py:9:17:9:31 | StringLiteral | format "{name!r}, {0}" | +| test.py:20:1:20:49 | Attribute() | Surplus named argument for string format. An argument named 'world' is provided, but it is not required by $@. | test.py:4:17:4:31 | StringLiteral | format "{name!r}, {0}" | +| test.py:21:1:21:50 | format() | Surplus named argument for string format. An argument named 'world' is provided, but it is not required by $@. | test.py:9:17:9:31 | StringLiteral | format "{name!r}, {0}" | +| test.py:45:1:45:35 | format() | Surplus named argument for string format. An argument named 'z' is provided, but it is not required by $@. | test.py:37:14:37:18 | StringLiteral | any format used. | +| test.py:45:1:45:35 | format() | Surplus named argument for string format. An argument named 'z' is provided, but it is not required by $@. | test.py:39:14:39:18 | StringLiteral | any format used. | +| test.py:46:1:46:34 | Attribute() | Surplus named argument for string format. An argument named 'z' is provided, but it is not required by $@. | test.py:37:14:37:18 | StringLiteral | any format used. | +| test.py:46:1:46:34 | Attribute() | Surplus named argument for string format. An argument named 'z' is provided, but it is not required by $@. | test.py:39:14:39:18 | StringLiteral | any format used. | +| unknown_format_string.py:9:12:9:30 | Attribute() | Surplus named argument for string format. An argument named 'b' is provided, but it is not required by $@. | unknown_format_string.py:8:15:8:19 | StringLiteral | format "{a}" | +| unknown_format_string.py:17:12:17:30 | Attribute() | Surplus named argument for string format. An argument named 'b' is provided, but it is not required by $@. | unknown_format_string.py:16:15:16:19 | StringLiteral | format "{a}" | +| unknown_format_string.py:25:12:25:30 | Attribute() | Surplus named argument for string format. An argument named 'b' is provided, but it is not required by $@. | unknown_format_string.py:24:15:24:19 | StringLiteral | format "{a}" | diff --git a/python/ql/test/query-tests/Expressions/Formatting/WrongNameInArgumentsFor3101Format.expected b/python/ql/test/query-tests/Expressions/Formatting/WrongNameInArgumentsFor3101Format.expected index 4daa9bfa12cb..8076c4306599 100644 --- a/python/ql/test/query-tests/Expressions/Formatting/WrongNameInArgumentsFor3101Format.expected +++ b/python/ql/test/query-tests/Expressions/Formatting/WrongNameInArgumentsFor3101Format.expected @@ -1,2 +1,2 @@ -| test.py:17:1:17:44 | Attribute() | Missing named argument for string format. Format $@ requires 'name', but it is omitted. | test.py:4:17:4:31 | Str | "{name!r}, {0}" | -| test.py:18:1:18:45 | format() | Missing named argument for string format. Format $@ requires 'name', but it is omitted. | test.py:9:17:9:31 | Str | "{name!r}, {0}" | +| test.py:17:1:17:44 | Attribute() | Missing named argument for string format. Format $@ requires 'name', but it is omitted. | test.py:4:17:4:31 | StringLiteral | "{name!r}, {0}" | +| test.py:18:1:18:45 | format() | Missing named argument for string format. Format $@ requires 'name', but it is omitted. | test.py:9:17:9:31 | StringLiteral | "{name!r}, {0}" | diff --git a/python/ql/test/query-tests/Expressions/Formatting/WrongNumberArgumentsFor3101Format.expected b/python/ql/test/query-tests/Expressions/Formatting/WrongNumberArgumentsFor3101Format.expected index 188ee7c4da1d..d3debef1f90a 100644 --- a/python/ql/test/query-tests/Expressions/Formatting/WrongNumberArgumentsFor3101Format.expected +++ b/python/ql/test/query-tests/Expressions/Formatting/WrongNumberArgumentsFor3101Format.expected @@ -1,6 +1,6 @@ -| test.py:20:1:20:49 | Attribute() | Too few arguments for string format. Format $@ requires at least 1, but 0 are provided. | test.py:4:17:4:31 | Str | "{name!r}, {0}" | -| test.py:21:1:21:50 | format() | Too few arguments for string format. Format $@ requires at least 1, but 0 are provided. | test.py:9:17:9:31 | Str | "{name!r}, {0}" | -| test.py:23:1:23:32 | Attribute() | Too few arguments for string format. Format $@ requires at least 2, but 1 is provided. | test.py:5:20:5:29 | Str | "{0}, {1}" | -| test.py:24:1:24:33 | format() | Too few arguments for string format. Format $@ requires at least 2, but 1 is provided. | test.py:10:20:10:29 | Str | "{0}, {1}" | -| test.py:26:1:26:32 | Attribute() | Too few arguments for string format. Format $@ requires at least 2, but 1 is provided. | test.py:6:20:6:27 | Str | "{}, {}" | -| test.py:27:1:27:33 | format() | Too few arguments for string format. Format $@ requires at least 2, but 1 is provided. | test.py:11:20:11:27 | Str | "{}, {}" | +| test.py:20:1:20:49 | Attribute() | Too few arguments for string format. Format $@ requires at least 1, but 0 are provided. | test.py:4:17:4:31 | StringLiteral | "{name!r}, {0}" | +| test.py:21:1:21:50 | format() | Too few arguments for string format. Format $@ requires at least 1, but 0 are provided. | test.py:9:17:9:31 | StringLiteral | "{name!r}, {0}" | +| test.py:23:1:23:32 | Attribute() | Too few arguments for string format. Format $@ requires at least 2, but 1 is provided. | test.py:5:20:5:29 | StringLiteral | "{0}, {1}" | +| test.py:24:1:24:33 | format() | Too few arguments for string format. Format $@ requires at least 2, but 1 is provided. | test.py:10:20:10:29 | StringLiteral | "{0}, {1}" | +| test.py:26:1:26:32 | Attribute() | Too few arguments for string format. Format $@ requires at least 2, but 1 is provided. | test.py:6:20:6:27 | StringLiteral | "{}, {}" | +| test.py:27:1:27:33 | format() | Too few arguments for string format. Format $@ requires at least 2, but 1 is provided. | test.py:11:20:11:27 | StringLiteral | "{}, {}" | diff --git a/python/ql/test/query-tests/Expressions/Regex/BackspaceEscape.expected b/python/ql/test/query-tests/Expressions/Regex/BackspaceEscape.expected index 1f9bf778bd3e..62b2e8a6e450 100644 --- a/python/ql/test/query-tests/Expressions/Regex/BackspaceEscape.expected +++ b/python/ql/test/query-tests/Expressions/Regex/BackspaceEscape.expected @@ -1,2 +1,2 @@ -| test.py:17:12:17:22 | Str | Backspace escape in regular expression at offset 1. | -| test.py:19:12:19:28 | Str | Backspace escape in regular expression at offset 8. | +| test.py:17:12:17:22 | StringLiteral | Backspace escape in regular expression at offset 1. | +| test.py:19:12:19:28 | StringLiteral | Backspace escape in regular expression at offset 8. | diff --git a/python/ql/test/query-tests/Expressions/Regex/DuplicateCharacterInSet.expected b/python/ql/test/query-tests/Expressions/Regex/DuplicateCharacterInSet.expected index b72dd63d0426..1ceb4e7b49d4 100644 --- a/python/ql/test/query-tests/Expressions/Regex/DuplicateCharacterInSet.expected +++ b/python/ql/test/query-tests/Expressions/Regex/DuplicateCharacterInSet.expected @@ -1,4 +1,4 @@ -| test.py:46:12:46:18 | Str | This regular expression includes duplicate character 'A' in a set of characters. | -| test.py:47:12:47:19 | Str | This regular expression includes duplicate character '0' in a set of characters. | -| test.py:48:12:48:21 | Str | This regular expression includes duplicate character '-' in a set of characters. | -| test.py:133:17:137:11 | Str | This regular expression includes duplicate character 'e' in a set of characters. | +| test.py:46:12:46:18 | StringLiteral | This regular expression includes duplicate character 'A' in a set of characters. | +| test.py:47:12:47:19 | StringLiteral | This regular expression includes duplicate character '0' in a set of characters. | +| test.py:48:12:48:21 | StringLiteral | This regular expression includes duplicate character '-' in a set of characters. | +| test.py:133:17:137:11 | StringLiteral | This regular expression includes duplicate character 'e' in a set of characters. | diff --git a/python/ql/test/query-tests/Expressions/Regex/MissingPartSpecialGroup.expected b/python/ql/test/query-tests/Expressions/Regex/MissingPartSpecialGroup.expected index e7bbad23899e..1a7c09d15906 100644 --- a/python/ql/test/query-tests/Expressions/Regex/MissingPartSpecialGroup.expected +++ b/python/ql/test/query-tests/Expressions/Regex/MissingPartSpecialGroup.expected @@ -1,2 +1,2 @@ -| test.py:22:12:22:29 | Str | Regular expression is missing '?' in named group. | -| test.py:23:12:23:33 | Str | Regular expression is missing '?' in named group. | +| test.py:22:12:22:29 | StringLiteral | Regular expression is missing '?' in named group. | +| test.py:23:12:23:33 | StringLiteral | Regular expression is missing '?' in named group. | diff --git a/python/ql/test/query-tests/Expressions/Regex/UnmatchableCaret.expected b/python/ql/test/query-tests/Expressions/Regex/UnmatchableCaret.expected index 8b9f409ad848..e59b390c64cb 100644 --- a/python/ql/test/query-tests/Expressions/Regex/UnmatchableCaret.expected +++ b/python/ql/test/query-tests/Expressions/Regex/UnmatchableCaret.expected @@ -1,4 +1,4 @@ -| test.py:4:12:4:19 | Str | This regular expression includes an unmatchable caret at offset 1. | -| test.py:5:12:5:23 | Str | This regular expression includes an unmatchable caret at offset 5. | -| test.py:6:12:6:21 | Str | This regular expression includes an unmatchable caret at offset 2. | -| test.py:79:12:79:27 | Str | This regular expression includes an unmatchable caret at offset 8. | +| test.py:4:12:4:19 | StringLiteral | This regular expression includes an unmatchable caret at offset 1. | +| test.py:5:12:5:23 | StringLiteral | This regular expression includes an unmatchable caret at offset 5. | +| test.py:6:12:6:21 | StringLiteral | This regular expression includes an unmatchable caret at offset 2. | +| test.py:79:12:79:27 | StringLiteral | This regular expression includes an unmatchable caret at offset 8. | diff --git a/python/ql/test/query-tests/Expressions/Regex/UnmatchableDollar.expected b/python/ql/test/query-tests/Expressions/Regex/UnmatchableDollar.expected index f0f93436ce97..9a57f0eda3f0 100644 --- a/python/ql/test/query-tests/Expressions/Regex/UnmatchableDollar.expected +++ b/python/ql/test/query-tests/Expressions/Regex/UnmatchableDollar.expected @@ -1,4 +1,4 @@ -| test.py:29:12:29:19 | Str | This regular expression includes an unmatchable dollar at offset 3. | -| test.py:30:12:30:23 | Str | This regular expression includes an unmatchable dollar at offset 3. | -| test.py:31:12:31:20 | Str | This regular expression includes an unmatchable dollar at offset 2. | -| test.py:80:12:80:26 | Str | This regular expression includes an unmatchable dollar at offset 3. | +| test.py:29:12:29:19 | StringLiteral | This regular expression includes an unmatchable dollar at offset 3. | +| test.py:30:12:30:23 | StringLiteral | This regular expression includes an unmatchable dollar at offset 3. | +| test.py:31:12:31:20 | StringLiteral | This regular expression includes an unmatchable dollar at offset 2. | +| test.py:80:12:80:26 | StringLiteral | This regular expression includes an unmatchable dollar at offset 3. | diff --git a/python/ql/test/query-tests/Expressions/general/DuplicateKeyInDictionaryLiteral.expected b/python/ql/test/query-tests/Expressions/general/DuplicateKeyInDictionaryLiteral.expected index 70673ebc7c73..e68a280eed93 100644 --- a/python/ql/test/query-tests/Expressions/general/DuplicateKeyInDictionaryLiteral.expected +++ b/python/ql/test/query-tests/Expressions/general/DuplicateKeyInDictionaryLiteral.expected @@ -1,2 +1,2 @@ | expressions_test.py:3:14:3:14 | IntegerLiteral | Dictionary key 1 is subsequently $@. | expressions_test.py:4:14:4:14 | IntegerLiteral | overwritten | -| expressions_test.py:5:14:5:17 | Str | Dictionary key 'a' is subsequently $@. | expressions_test.py:6:14:6:17 | Str | overwritten | +| expressions_test.py:5:14:5:17 | StringLiteral | Dictionary key 'a' is subsequently $@. | expressions_test.py:6:14:6:17 | StringLiteral | overwritten | diff --git a/python/ql/test/query-tests/Expressions/general/UnsupportedFormatCharacter.expected b/python/ql/test/query-tests/Expressions/general/UnsupportedFormatCharacter.expected index 0e4fdb3d5654..c27c206c6a87 100644 --- a/python/ql/test/query-tests/Expressions/general/UnsupportedFormatCharacter.expected +++ b/python/ql/test/query-tests/Expressions/general/UnsupportedFormatCharacter.expected @@ -1 +1 @@ -| str_fmt_test.py:8:12:8:16 | Str | Invalid conversion specifier at index 0 of '%Z'. | +| str_fmt_test.py:8:12:8:16 | StringLiteral | Invalid conversion specifier at index 0 of '%Z'. | diff --git a/python/ql/test/query-tests/Expressions/general/WrongNumberArgumentsForFormat.expected b/python/ql/test/query-tests/Expressions/general/WrongNumberArgumentsForFormat.expected index 3e83aa4bb0d8..9a7672b9eae8 100644 --- a/python/ql/test/query-tests/Expressions/general/WrongNumberArgumentsForFormat.expected +++ b/python/ql/test/query-tests/Expressions/general/WrongNumberArgumentsForFormat.expected @@ -1,2 +1,2 @@ -| str_fmt_test.py:11:11:11:34 | BinaryExpr | Wrong number of $@ for string format. Format $@ takes 2, but 3 are provided. | str_fmt_test.py:11:23:11:33 | Tuple | arguments | str_fmt_test.py:11:11:11:18 | Str | %s %s | -| str_fmt_test.py:14:11:14:23 | BinaryExpr | Wrong number of $@ for string format. Format $@ takes 1, but 2 are provided. | str_fmt_test.py:13:13:13:21 | Tuple | arguments | str_fmt_test.py:12:14:12:19 | Str | %hd | +| str_fmt_test.py:11:11:11:34 | BinaryExpr | Wrong number of $@ for string format. Format $@ takes 2, but 3 are provided. | str_fmt_test.py:11:23:11:33 | Tuple | arguments | str_fmt_test.py:11:11:11:18 | StringLiteral | %s %s | +| str_fmt_test.py:14:11:14:23 | BinaryExpr | Wrong number of $@ for string format. Format $@ takes 1, but 2 are provided. | str_fmt_test.py:13:13:13:21 | Tuple | arguments | str_fmt_test.py:12:14:12:19 | StringLiteral | %hd | diff --git a/python/ql/test/query-tests/Expressions/strings/UnintentionalImplicitStringConcatenation.expected b/python/ql/test/query-tests/Expressions/strings/UnintentionalImplicitStringConcatenation.expected index 1b8b1421f80b..a7903eafb811 100644 --- a/python/ql/test/query-tests/Expressions/strings/UnintentionalImplicitStringConcatenation.expected +++ b/python/ql/test/query-tests/Expressions/strings/UnintentionalImplicitStringConcatenation.expected @@ -1,4 +1,4 @@ -| test.py:17:9:18:18 | Str | Implicit string concatenation. Maybe missing a comma? | -| test.py:23:9:24:18 | Str | Implicit string concatenation. Maybe missing a comma? | -| test.py:33:9:34:30 | Str | Implicit string concatenation. Maybe missing a comma? | -| test.py:35:9:36:18 | Str | Implicit string concatenation. Maybe missing a comma? | +| test.py:17:9:18:18 | StringLiteral | Implicit string concatenation. Maybe missing a comma? | +| test.py:23:9:24:18 | StringLiteral | Implicit string concatenation. Maybe missing a comma? | +| test.py:33:9:34:30 | StringLiteral | Implicit string concatenation. Maybe missing a comma? | +| test.py:35:9:36:18 | StringLiteral | Implicit string concatenation. Maybe missing a comma? | diff --git a/python/ql/test/query-tests/Security/CWE-020-IncompleteHostnameRegExp/IncompleteHostnameRegExp.expected b/python/ql/test/query-tests/Security/CWE-020-IncompleteHostnameRegExp/IncompleteHostnameRegExp.expected index 62633237f465..046a00a71940 100644 --- a/python/ql/test/query-tests/Security/CWE-020-IncompleteHostnameRegExp/IncompleteHostnameRegExp.expected +++ b/python/ql/test/query-tests/Security/CWE-020-IncompleteHostnameRegExp/IncompleteHostnameRegExp.expected @@ -1 +1 @@ -| hosttest.py:6:28:6:50 | (www\|beta).example.com/ | This regular expression has an unescaped '.' before 'example.com/', so it might match more hosts than expected. | hosttest.py:6:27:6:51 | ControlFlowNode for Str | here | +| hosttest.py:6:28:6:50 | (www\|beta).example.com/ | This regular expression has an unescaped '.' before 'example.com/', so it might match more hosts than expected. | hosttest.py:6:27:6:51 | ControlFlowNode for StringLiteral | here | diff --git a/python/ql/test/query-tests/Security/CWE-020-IncompleteUrlSubstringSanitization/IncompleteUrlSubstringSanitization.expected b/python/ql/test/query-tests/Security/CWE-020-IncompleteUrlSubstringSanitization/IncompleteUrlSubstringSanitization.expected index 3a70e1df2c25..9be2a1174088 100644 --- a/python/ql/test/query-tests/Security/CWE-020-IncompleteUrlSubstringSanitization/IncompleteUrlSubstringSanitization.expected +++ b/python/ql/test/query-tests/Security/CWE-020-IncompleteUrlSubstringSanitization/IncompleteUrlSubstringSanitization.expected @@ -1,2 +1,2 @@ -| urltest.py:9:8:9:30 | Compare | The string $@ may be at an arbitrary position in the sanitized URL. | urltest.py:9:8:9:20 | Str | example.com | -| urltest.py:15:8:15:37 | Attribute() | The string $@ may be at an arbitrary position in the sanitized URL. | urltest.py:15:24:15:36 | Str | example.com | +| urltest.py:9:8:9:30 | Compare | The string $@ may be at an arbitrary position in the sanitized URL. | urltest.py:9:8:9:20 | StringLiteral | example.com | +| urltest.py:15:8:15:37 | Attribute() | The string $@ may be at an arbitrary position in the sanitized URL. | urltest.py:15:24:15:36 | StringLiteral | example.com | diff --git a/python/ql/test/query-tests/Security/CWE-730-PolynomialReDoS/PolynomialBackTracking.expected b/python/ql/test/query-tests/Security/CWE-730-PolynomialReDoS/PolynomialBackTracking.expected index 5dc8412ba84b..ba97e881e467 100644 --- a/python/ql/test/query-tests/Security/CWE-730-PolynomialReDoS/PolynomialBackTracking.expected +++ b/python/ql/test/query-tests/Security/CWE-730-PolynomialReDoS/PolynomialBackTracking.expected @@ -1,5 +1,5 @@ -| test.py:8:12:8:23 | Str | test.py:8:19:8:21 | \\s+ | Strings with many repetitions of ' ' can start matching anywhere after the start of the preceeding \\s+$ | -| test.py:9:14:9:29 | Str | test.py:9:25:9:27 | \\d+ | Strings starting with '0.9' and with many repetitions of '99' can start matching anywhere after the start of the preceeding \\d+ | -| test.py:11:22:11:33 | Str | test.py:11:29:11:31 | \\s+ | Strings with many repetitions of ' ' can start matching anywhere after the start of the preceeding \\s+$ | -| test.py:18:14:18:25 | Str | test.py:18:21:18:23 | \\s+ | Strings with many repetitions of ' ' can start matching anywhere after the start of the preceeding \\s+$ | -| test.py:20:23:20:274 | Str | test.py:20:271:20:272 | .* | Strings starting with 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC' and with many repetitions of 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC' can start matching anywhere after the start of the preceeding (AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)C.*Y | +| test.py:8:12:8:23 | StringLiteral | test.py:8:19:8:21 | \\s+ | Strings with many repetitions of ' ' can start matching anywhere after the start of the preceeding \\s+$ | +| test.py:9:14:9:29 | StringLiteral | test.py:9:25:9:27 | \\d+ | Strings starting with '0.9' and with many repetitions of '99' can start matching anywhere after the start of the preceeding \\d+ | +| test.py:11:22:11:33 | StringLiteral | test.py:11:29:11:31 | \\s+ | Strings with many repetitions of ' ' can start matching anywhere after the start of the preceeding \\s+$ | +| test.py:18:14:18:25 | StringLiteral | test.py:18:21:18:23 | \\s+ | Strings with many repetitions of ' ' can start matching anywhere after the start of the preceeding \\s+$ | +| test.py:20:23:20:274 | StringLiteral | test.py:20:271:20:272 | .* | Strings starting with 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC' and with many repetitions of 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC' can start matching anywhere after the start of the preceeding (AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)(AA\|BB)C.*Y | diff --git a/python/ql/test/query-tests/Security/CWE-798-HardcodedCredentials/HardcodedCredentials.expected b/python/ql/test/query-tests/Security/CWE-798-HardcodedCredentials/HardcodedCredentials.expected index 5f494e9ba7a4..7fe70dd495b2 100644 --- a/python/ql/test/query-tests/Security/CWE-798-HardcodedCredentials/HardcodedCredentials.expected +++ b/python/ql/test/query-tests/Security/CWE-798-HardcodedCredentials/HardcodedCredentials.expected @@ -1,16 +1,16 @@ edges | test.py:5:1:5:8 | ControlFlowNode for USERNAME | test.py:14:18:14:25 | ControlFlowNode for USERNAME | provenance | | -| test.py:5:12:5:24 | ControlFlowNode for Str | test.py:5:1:5:8 | ControlFlowNode for USERNAME | provenance | | +| test.py:5:12:5:24 | ControlFlowNode for StringLiteral | test.py:5:1:5:8 | ControlFlowNode for USERNAME | provenance | | | test.py:6:1:6:8 | ControlFlowNode for PASSWORD | test.py:15:18:15:25 | ControlFlowNode for PASSWORD | provenance | | -| test.py:6:12:6:25 | ControlFlowNode for Str | test.py:6:1:6:8 | ControlFlowNode for PASSWORD | provenance | | +| test.py:6:12:6:25 | ControlFlowNode for StringLiteral | test.py:6:1:6:8 | ControlFlowNode for PASSWORD | provenance | | nodes | test.py:5:1:5:8 | ControlFlowNode for USERNAME | semmle.label | ControlFlowNode for USERNAME | -| test.py:5:12:5:24 | ControlFlowNode for Str | semmle.label | ControlFlowNode for Str | +| test.py:5:12:5:24 | ControlFlowNode for StringLiteral | semmle.label | ControlFlowNode for StringLiteral | | test.py:6:1:6:8 | ControlFlowNode for PASSWORD | semmle.label | ControlFlowNode for PASSWORD | -| test.py:6:12:6:25 | ControlFlowNode for Str | semmle.label | ControlFlowNode for Str | +| test.py:6:12:6:25 | ControlFlowNode for StringLiteral | semmle.label | ControlFlowNode for StringLiteral | | test.py:14:18:14:25 | ControlFlowNode for USERNAME | semmle.label | ControlFlowNode for USERNAME | | test.py:15:18:15:25 | ControlFlowNode for PASSWORD | semmle.label | ControlFlowNode for PASSWORD | subpaths #select -| test.py:5:12:5:24 | ControlFlowNode for Str | test.py:5:12:5:24 | ControlFlowNode for Str | test.py:14:18:14:25 | ControlFlowNode for USERNAME | This hardcoded value is $@. | test.py:14:18:14:25 | ControlFlowNode for USERNAME | used as credentials | -| test.py:6:12:6:25 | ControlFlowNode for Str | test.py:6:12:6:25 | ControlFlowNode for Str | test.py:15:18:15:25 | ControlFlowNode for PASSWORD | This hardcoded value is $@. | test.py:15:18:15:25 | ControlFlowNode for PASSWORD | used as credentials | +| test.py:5:12:5:24 | ControlFlowNode for StringLiteral | test.py:5:12:5:24 | ControlFlowNode for StringLiteral | test.py:14:18:14:25 | ControlFlowNode for USERNAME | This hardcoded value is $@. | test.py:14:18:14:25 | ControlFlowNode for USERNAME | used as credentials | +| test.py:6:12:6:25 | ControlFlowNode for StringLiteral | test.py:6:12:6:25 | ControlFlowNode for StringLiteral | test.py:15:18:15:25 | ControlFlowNode for PASSWORD | This hardcoded value is $@. | test.py:15:18:15:25 | ControlFlowNode for PASSWORD | used as credentials | diff --git a/python/ql/test/query-tests/Variables/undefined/UndefinedExport.expected b/python/ql/test/query-tests/Variables/undefined/UndefinedExport.expected index d8380b806708..d2749575b60b 100644 --- a/python/ql/test/query-tests/Variables/undefined/UndefinedExport.expected +++ b/python/ql/test/query-tests/Variables/undefined/UndefinedExport.expected @@ -1,2 +1,2 @@ -| decorated_exports.py:3:33:3:45 | Str | The name 'not_defined' is exported by __all__ but is not defined. | -| exports.py:1:57:1:64 | Str | The name 'nosuch' is exported by __all__ but is not defined. | +| decorated_exports.py:3:33:3:45 | StringLiteral | The name 'not_defined' is exported by __all__ but is not defined. | +| exports.py:1:57:1:64 | StringLiteral | The name 'nosuch' is exported by __all__ but is not defined. |