-
Notifications
You must be signed in to change notification settings - Fork 13
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
Concrete floats #89
Concrete floats #89
Conversation
Will fix #5 when merged. |
@kquick, This isn't quite ready to merge yet, but I'm interested in your thoughts about the new kind of tests I've been working on (CF https://github.com/GaloisInc/what4/blob/concrete-floats/what4/test/TestTemplate.hs). Currently they're focused on the floating-point operations, but there's no particular reason the templates idea couldn't be extended to most or all of the main what4 interface. |
6edf9e9
to
9b266a3
Compare
based on the `libBF` representation. Change the `GroundValue` type for floating point values to use `BigFloat`. Still TOOD: constant folding in the expression builder, ground evaluation, hashing and (maybe?) abstract domains.
produces a bunch of failures related to evaluating floating-point values, which indicate what work needs to be done in the ground evaluation module.
and test that expression constant folding agrees with ground evaluation.
…ator computes a value for an expression, the solver can prove the expression must have that value. This complements the previous solver test, which showed that the solver computes the same value in a computed satisfying model. This complementary test proves that the value we compute is the _only_ value this term may take on, which demonstrates that we are not computing any underspecified values.
This provides support for floating-point values that hide their precision at the type level, similar to how the `SWord` module hides the width of bitvectors.
9b266a3
to
0de69f1
Compare
Use the
libBF
library to implement concrete floating-point ground evaluation and constant folding.This is especially a tricky area to get right, so I've implemented a new testing technique using "expression templates." These are fragments of syntax containing variables at base types. We can enumerate an interesting collection of these templates and use them to generate test cases. For each test case, we will chose random concrete values for the variables and evaluate the syntax in a variety of ways and test that they agree. In particular, we can ask solvers to act as computational oracles and verify that our ground evaluation agrees with their theory.