Changes between Version 14 and Version 15 of Language


Ignore:
Timestamp:
05/18/23 20:24:14 (3 years ago)
Author:
siegel
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Language

    v14 v15  
    429429The system function `$assert` has the signature
    430430{{{
    431 void $assert(_Bool expr, ...);
     431$system void $assert(_Bool expr, ...);
    432432}}}
    433433It consumes a boolean expression and any number of optional expressions which are used to construct an error message.
     
    447447The system function `$assume` has signature
    448448{{{
    449 void $assume(_Bool expr);
     449$system void $assume(_Bool expr);
    450450}}}
    451451During verification, the given expression is assumed to hold. If this leads to a contradiction on some execution, that execution is simply ignored. It never reports a violation, it only restricts the set of possible executions that will be explored by the verification algorithm.
     
    457457declares `N` and `B` to be integer inputs and restricts consideration to inputs satisfying 1 ≤ `N` ≤ `B`.
    458458
    459 === `$assume_push`
    460 
    461 === `$assume_pop`
     459=== Temporary assumptions: `$assume_push` and `$assume_pop`
     460
     461These functions have signatures:
     462{{{
     463$system void $assume_push(_Bool pred);
     464$system void $assume_pop();
     465}}}
     466In the concrete semantics, `$assume_push` has the same semantics as `$assume`, and `$assume_pop` is a no-op.
     467
     468In the symbolic semantics, they behave as follows: each process maintains a stack of boolean symbolic expressions known as the temporary assumption stack.
     469At any state, the ''effective path condition'' is the conjunction of the permanent path condition , and the conjunction,
     470over all processes ''p'',  of all entries in the temporary assumption stack of ''p''.
     471A call to `$assume_push` pushes a new assumption onto the temporary assumption stack of the process making the call.
     472A call to `$assume_pop` pops the stack of that process.
     473This allows prior assumptions to be removed.
     474This mechanism is consistent with the concrete semantics in that it yields an over-approximation of the set of reachable concrete states.
     475Specifically, removing a clause from the effective path condition can only increase the set of concrete states represented by a symbolic state.
     476This mechanism serves as a "widening operator" (in the sense of abstract interpretation), which enables symbolic execution to converge.
     477
    462478
    463479=== `$choose_int`