Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRAB error because GMP z_number does not fit into a signed long integer #10

Closed
caballa opened this issue Aug 9, 2017 · 2 comments
Closed

Comments

@caballa
Copy link
Contributor

caballa commented Aug 9, 2017

CRAB ERROR: mpz_class -9223372036854775809 does not fit into a signed long integer

This happens with split-dbm domain. This is a well known limitation since the domain uses for efficiency signed long integer as DBM weights rather than unlimited precision z_number.

Attached a zip file to reproduce the problem:

split-dbm-too-big-weight.zip

@caballa
Copy link
Contributor Author

caballa commented Apr 11, 2018

The solution to avoid this problem is to change in include/crab_domains.hh:

typedef SDBM_impl::DefaultParams<number_t> SplitDBMGraph; typedef SplitDBM<number_t, varname_t, SplitDBMGraph> BASE(split_dbm_domain_t);
with

typedef SDBM_impl::BigNumDefaultParams<number_t> SplitDBMGraph; typedef SplitDBM<number_t, varname_t, SplitDBMGraph> BASE(split_dbm_domain_t);
This will use bignums as graph weights.

@caballa caballa removed the wontfix label Apr 11, 2018
@caballa caballa added the fixed label Sep 20, 2018
@caballa
Copy link
Contributor Author

caballa commented Apr 11, 2019

Since LLVM 5.0 this problem should be gone. First, it seems that Clang/LLVM 5.0 does not produce such a large numbers. Second, we have added an option --crab-enable-bignums which is false by default. If this option is false, the translation from LLVM bitcode to crab havocs any operation whose operand cannot be represented as a signed integer in 64 bits.

@caballa caballa closed this as completed Apr 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant