Goose  Diff

Differences From Artifact [5a7b8a35a1]:

  • File bs/verify/value.cpp — part of check-in [5e72e8e08c] at 2019-10-09 19:21:29 on branch trunk — Some renaming for consistency and to match commonly used names for those things. (user: achavasse size: 8055)

To Artifact [972de79d66]:

  • File bs/verify/value.cpp — part of check-in [e33c4ea6c1] at 2019-11-08 11:48:03 on branch trunk — Verifier: check assertions with z3 immediately instead of postponing it until we have built the entire formula for the function. (user: achavasse size: 8159)

197
198
199
200
201
202
203

204
205
206

207
208
209
210
211
212
213
197
198
199
200
201
202
203
204
205
206

207
208
209
210
211
212
213
214







+


-
+







    optional< z3::expr > BuildZ3Op( Builder& b, const SLE& instr )
    {
        return BuildZ3BinExpr( b, instr, []( auto&& lhs, auto&& rhs ) { return lhs <= rhs; } );
    }

    optional< z3::expr > BuildZ3Op( Builder& b, const Assert& instr )
    {
        // TODO: refactor the return value here to be able to indicate failure versus "nothing to do"
        auto cond = BuildZ3ExprFromValue( b, instr.cond() );
        if( cond )
            b.addAssertion( *cond, instr.cond().locationId() );
            b.checkAssertion( *cond, instr.cond().locationId() );
        return nullopt;
    }

    optional< z3::expr > BuildZ3Op( Builder& b, const Placeholder& instr )
    {
        const auto* expr = b.retrievePlaceholder( instr.name() );
        if( expr )