[klee-dev] Generate a negative constant expression

Nowack, Martin m.nowack at imperial.ac.uk
Mon Oct 21 16:47:34 BST 2019


Hi,

In your case, use the `ConstantExpr::alloc()` method that takes an `llvm::APInt` as argument.
There are several `APInt` constructors that allow to create arbitrary signed/unsigned integers (e.g. http://llvm.org/doxygen/classllvm_1_1APInt.html#a6286f2ba84c5ad11f4a90d57cb1dd293).

Best,
Martin

On 19. Oct 2019, at 03:16, Zhongqiu Gao <zhongqiu_gao at 126.com<mailto:zhongqiu_gao at 126.com>> wrote:

Hi,
I am trying to do some concrete execution by adding a constraint to a path. I check the api of ConstantExpr::create(), and its argument should be an unsigned number. Is there a way to create a negative constant expression?

Thanks,
Zhongqiu Gao



_______________________________________________
klee-dev mailing list
klee-dev at imperial.ac.uk<mailto:klee-dev at imperial.ac.uk>
https://mailman.ic.ac.uk/mailman/listinfo/klee-dev

-------------- next part --------------
HTML attachment scrubbed and removed


More information about the klee-dev mailing list