c++ - expr substitution segmentation fault 'type error' -


i use z3 c++ api. create copy exprs in expr_vector1 , store them in new expr_vector2 , call

        for(unsigned j = 0; j < exprs_vector1.size();++j){             expr v = exprs_vector1[j];             uint32_t size; // initialized somehow.              std::stringstream name;             name << v <<"_"<< i;             expr var(ctx);             if(v.is_bool())                 var = sctx->ctx.bool_const(name.str().c_str());             else if(v.is_bv())                 var = sctx->ctx.bv_const(name.str().c_str(), size);             exprs_vector2.push_back(var);              }            formula.substitute( expr_vactor1, expr_vector2); // line causes error 

but z3 exception message "type error". note these 2 vector have same size , expressions correspondingly have same sort , exprs kind of bool or bitvector. can't guess reason of event. contents of vector1 :

|popcnt::i!0@1#1_1|

and in vector2 have :

|\|popcnt::i!0@1#1_1\|_1|

both of above expressions sort of bitvector32.

the formula doesn't have expressions of expr_vector1, can reason of exception?


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -