Hello, everyone

I got lost on the management of ref<Expr>, my problem is followed:

Now I want to replace a kid of an Expr object with a new Expr, so I
implemented a new method Expr::setKid(int i, ref<Expr> e), which replace
the i-th kid with e. It worked all right at first. But when I want to
update a Expr use its own value, for example, when i is increased with 1, I
want to update the old Expr (i+1) to ((i+1)+1):

(i+1)-------------
(Add w32 1
     (ReadLSB W32 0 i) )      to

((i+1)+1)-------
(Add w32 1
     (Add w32 1
          (ReadLSB W32 0 i) ),

But I got a wrong Expr

N0:(Add w32 1 N0)

Why I can not get the right Expr through function setKid(). It seems that
Expr (i+1) (which was updated) and Expr (i+1) (the new value of i) shared
the same memory, how can I explicitly make these two ref<Expr> have
different memory to solve this question. Thank you!

--------------------------------------------
Qiuping Yi
Institute Of Software
Chinese Academy of Sciences
_______________________________________________
klee-dev mailing list
[email protected]
http://keeda.Stanford.EDU/mailman/listinfo/klee-dev

Reply via email to