@@ -13,83 +13,29 @@ private module Summaries {
1313 private import semmle.python.Frameworks
1414}
1515
16- class SummaryComponent = Impl:: Public :: SummaryComponent ;
16+ deprecated class SummaryComponent = Impl:: Private :: SummaryComponent ;
1717
1818/** Provides predicates for constructing summary components. */
19- module SummaryComponent {
20- private import Impl:: Public:: SummaryComponent as SC
19+ deprecated module SummaryComponent = Impl:: Private:: SummaryComponent;
2120
22- predicate parameter = SC :: parameter / 1 ;
21+ deprecated class SummaryComponentStack = Impl :: Private :: SummaryComponentStack ;
2322
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;
7124
7225/** A callable with a flow summary, identified by a unique string. */
7326abstract class SummarizedCallable extends LibraryCallable , Impl:: Public:: SummarizedCallable {
7427 bindingset [ this ]
7528 SummarizedCallable ( ) { any ( ) }
7629
7730 /**
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.
8732 */
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+ }
9036}
9137
92- class RequiredSummaryComponentStack = Impl:: Public :: RequiredSummaryComponentStack ;
38+ deprecated class RequiredSummaryComponentStack = Impl:: Private :: RequiredSummaryComponentStack ;
9339
9440private class SummarizedCallableFromModel extends SummarizedCallable {
9541 string type ;
@@ -109,7 +55,7 @@ private class SummarizedCallableFromModel extends SummarizedCallable {
10955 )
11056 }
11157
112- override predicate propagatesFlowExt ( string input , string output , boolean preservesValue ) {
58+ override predicate propagatesFlow ( string input , string output , boolean preservesValue ) {
11359 exists ( string kind | ModelOutput:: relevantSummaryModel ( type , path , input , output , kind ) |
11460 kind = "value" and
11561 preservesValue = true
0 commit comments