@@ -13,83 +13,29 @@ private module Summaries {
13
13
private import semmle.python.Frameworks
14
14
}
15
15
16
- class SummaryComponent = Impl:: Public :: SummaryComponent ;
16
+ deprecated class SummaryComponent = Impl:: Private :: SummaryComponent ;
17
17
18
18
/** Provides predicates for constructing summary components. */
19
- module SummaryComponent {
20
- private import Impl:: Public:: SummaryComponent as SC
19
+ deprecated module SummaryComponent = Impl:: Private:: SummaryComponent;
21
20
22
- predicate parameter = SC :: parameter / 1 ;
21
+ deprecated class SummaryComponentStack = Impl :: Private :: SummaryComponentStack ;
23
22
24
- predicate argument = SC:: argument / 1 ;
25
-
26
- predicate content = SC:: content / 1 ;
27
-
28
- /** Gets a summary component that represents a list element. */
29
- SummaryComponent listElement ( ) { result = content ( any ( ListElementContent c ) ) }
30
-
31
- /** Gets a summary component that represents a set element. */
32
- SummaryComponent setElement ( ) { result = content ( any ( SetElementContent c ) ) }
33
-
34
- /** Gets a summary component that represents a tuple element. */
35
- SummaryComponent tupleElement ( int index ) {
36
- exists ( TupleElementContent c | c .getIndex ( ) = index and result = content ( c ) )
37
- }
38
-
39
- /** Gets a summary component that represents a dictionary element. */
40
- SummaryComponent dictionaryElement ( string key ) {
41
- exists ( DictionaryElementContent c | c .getKey ( ) = key and result = content ( c ) )
42
- }
43
-
44
- /** Gets a summary component that represents a dictionary element at any key. */
45
- SummaryComponent dictionaryElementAny ( ) { result = content ( any ( DictionaryElementAnyContent c ) ) }
46
-
47
- /** Gets a summary component that represents an attribute element. */
48
- SummaryComponent attribute ( string attr ) {
49
- exists ( AttributeContent c | c .getAttribute ( ) = attr and result = content ( c ) )
50
- }
51
-
52
- /** Gets a summary component that represents the return value of a call. */
53
- SummaryComponent return ( ) { result = SC:: return ( any ( ReturnKind rk ) ) }
54
- }
55
-
56
- class SummaryComponentStack = Impl:: Public:: SummaryComponentStack ;
57
-
58
- /** Provides predicates for constructing stacks of summary components. */
59
- module SummaryComponentStack {
60
- private import Impl:: Public:: SummaryComponentStack as SCS
61
-
62
- predicate singleton = SCS:: singleton / 1 ;
63
-
64
- predicate push = SCS:: push / 2 ;
65
-
66
- predicate argument = SCS:: argument / 1 ;
67
-
68
- /** Gets a singleton stack representing the return value of a call. */
69
- SummaryComponentStack return ( ) { result = singleton ( SummaryComponent:: return ( ) ) }
70
- }
23
+ deprecated module SummaryComponentStack = Impl:: Private:: SummaryComponentStack;
71
24
72
25
/** A callable with a flow summary, identified by a unique string. */
73
26
abstract class SummarizedCallable extends LibraryCallable , Impl:: Public:: SummarizedCallable {
74
27
bindingset [ this ]
75
28
SummarizedCallable ( ) { any ( ) }
76
29
77
30
/**
78
- * Same as
79
- *
80
- * ```ql
81
- * propagatesFlow(
82
- * SummaryComponentStack input, SummaryComponentStack output, boolean preservesValue
83
- * )
84
- * ```
85
- *
86
- * but uses an external (string) representation of the input and output stacks.
31
+ * DEPRECATED: Use `propagatesFlow` instead.
87
32
*/
88
- pragma [ nomagic]
89
- predicate propagatesFlowExt ( string input , string output , boolean preservesValue ) { none ( ) }
33
+ deprecated predicate propagatesFlowExt ( string input , string output , boolean preservesValue ) {
34
+ this .propagatesFlow ( input , output , preservesValue )
35
+ }
90
36
}
91
37
92
- class RequiredSummaryComponentStack = Impl:: Public :: RequiredSummaryComponentStack ;
38
+ deprecated class RequiredSummaryComponentStack = Impl:: Private :: RequiredSummaryComponentStack ;
93
39
94
40
private class SummarizedCallableFromModel extends SummarizedCallable {
95
41
string type ;
@@ -109,7 +55,7 @@ private class SummarizedCallableFromModel extends SummarizedCallable {
109
55
)
110
56
}
111
57
112
- override predicate propagatesFlowExt ( string input , string output , boolean preservesValue ) {
58
+ override predicate propagatesFlow ( string input , string output , boolean preservesValue ) {
113
59
exists ( string kind | ModelOutput:: relevantSummaryModel ( type , path , input , output , kind ) |
114
60
kind = "value" and
115
61
preservesValue = true
0 commit comments