File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
DynamoDbEncryption/dafny/DynamoDbEncryption/src Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -1223,14 +1223,17 @@ module DynamoDBFilterExpr {
12231223 }
12241224
12251225 // true if target in list
1226- predicate method is_in (target : DDB .AttributeValue, list : seq <StackValue >)
1226+ predicate method is_in (target : DDB .AttributeValue, list : seq <StackValue >, pos : uint64 := 0)
1227+ requires pos as nat <= |list|
1228+ decreases |list| - pos as nat
12271229 {
1228- if |list| == 0 then
1230+ SequenceIsSafeBecauseItIsInMemory (list);
1231+ if |list| as uint64 == pos then
12291232 false
1230- else if GetStr (list[0 ]) == target then
1233+ else if GetStr (list[pos ]) == target then
12311234 true
12321235 else
1233- is_in (target, list[1..] )
1236+ is_in (target, list, pos + 1 )
12341237 }
12351238
12361239 // return string version of attribute
You can’t perform that action at this time.
0 commit comments