You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The predicate seems to be difficult to prove for SPARK currently. Previously, the code was duplicated for each field using a case statement, which helped proof but increased code size. This was recently replaced by a for loop:
for F in Field loop
if Fld = F then
Ctx.Cursors (Successor (Ctx, Fld)) := (State => S_Invalid, Predecessor => Fld);
end if;
end loop;
For SPARK, this is somewhat similar to the case statement, as the loop is unrolled and we get each case separately. However the loop unrolling has a threshold of 20. For any message with more than 20 fields, the loop is not unrolled and proof breaks down (it would require a loop invariant). This happens in SPDM code (message Alg_Struct).
The text was updated successfully, but these errors were encountered:
The naive solution would be using the loop only in cases where there are at most 20 fields, and the previous approach otherwise. Is there a better solution?
The
Verify
function as generated by Recordflux contains this code:The predicate seems to be difficult to prove for SPARK currently. Previously, the code was duplicated for each field using a case statement, which helped proof but increased code size. This was recently replaced by a for loop:
For SPARK, this is somewhat similar to the case statement, as the loop is unrolled and we get each case separately. However the loop unrolling has a threshold of 20. For any message with more than 20 fields, the loop is not unrolled and proof breaks down (it would require a loop invariant). This happens in SPDM code (message Alg_Struct).
The text was updated successfully, but these errors were encountered: