@@ -316,11 +316,15 @@ private module Cached {
316316 entrySsaDefinition ( n )
317317 }
318318
319+ cached
320+ newtype TContentSet =
321+ TSingletonContent ( Content c ) or
322+ TAnyArrayElementContent ( )
323+
319324 cached
320325 newtype TContent =
321326 TKnownArrayElementContent ( int i ) { i in [ 0 .. 10 ] } or
322- TUnknownArrayElementContent ( ) or
323- TAnyArrayElementContent ( )
327+ TUnknownArrayElementContent ( )
324328
325329 /**
326330 * Holds if `e` is an `ExprNode` that may be returned by a call to `c`.
@@ -776,26 +780,20 @@ predicate jumpStep(Node pred, Node succ) {
776780 succ .asExpr ( ) .getExpr ( ) .( ConstantReadAccess ) .getValue ( ) = pred .asExpr ( ) .getExpr ( )
777781}
778782
779- predicate storeStep ( Node node1 , Content c , Node node2 ) {
783+ predicate storeStep ( Node node1 , ContentSet c , Node node2 ) {
780784 FlowSummaryImpl:: Private:: Steps:: summaryStoreStep ( node1 , c , node2 )
781785}
782786
783- predicate readStep ( Node node1 , Content c , Node node2 ) {
784- exists ( Content c0 | FlowSummaryImpl:: Private:: Steps:: summaryReadStep ( node1 , c0 , node2 ) |
785- if c0 = TAnyArrayElementContent ( )
786- then
787- c instanceof TUnknownArrayElementContent or
788- c instanceof TKnownArrayElementContent
789- else c = c0
790- )
787+ predicate readStep ( Node node1 , ContentSet c , Node node2 ) {
788+ FlowSummaryImpl:: Private:: Steps:: summaryReadStep ( node1 , c , node2 )
791789}
792790
793791/**
794792 * Holds if values stored inside content `c` are cleared at node `n`. For example,
795793 * any value stored inside `f` is cleared at the pre-update node associated with `x`
796794 * in `x.f = newValue`.
797795 */
798- predicate clearsContent ( Node n , Content c ) {
796+ predicate clearsContent ( Node n , ContentSet c ) {
799797 FlowSummaryImpl:: Private:: Steps:: summaryClearsContent ( n , c )
800798}
801799
@@ -875,7 +873,7 @@ int accessPathLimit() { result = 5 }
875873 * Holds if access paths with `c` at their head always should be tracked at high
876874 * precision. This disables adaptive access path precision for such access paths.
877875 */
878- predicate forceHighPrecision ( Content c ) { none ( ) }
876+ predicate forceHighPrecision ( Content c ) { c instanceof Content :: ArrayElementContent }
879877
880878/** The unit type. */
881879private newtype TUnit = TMkUnit ( )
0 commit comments