Accessing Symbolic State or Path Conditions in CrossHair for Research Use #366
Replies: 1 comment
-
Neat stuff!
CrossHair does internally generate symbolic states, and it's possible to extract these, but there are caveats. You can do something like what's discussed here:
You will have a few challenges here: first, there are often many different ways to model a Python value in SMT, and sometimes (e.g. right now, floats) CrossHair will even try different ways of modeling the same Python type. If you're limiting yourself to integers, this probably isn't a problem however. Second, CrossHair is more attempting to be a smart fuzz tester than a software verification tool and makes design decisions that may be less appropriate for your use case. In particular, nearly anything with a loop will have an infinite number of execution paths, and so you will not be able to exhaustively determine invariants. Please also check out the discussion in this issue and perhaps this one! I can help out if you decide that you want to proceed with some sort of integration - LMK! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I’m working on extending DIG (https://github.com/dynaroars/dig), a tool that uses CIVL to generate invariants for C programs, to support Python analysis. I’m exploring how CrossHair might fit into this pipeline.
I have two main questions:
Does CrossHair internally generate symbolic states over inputs during execution? If so, is there a way to extract or inspect those symbolic states?
Is there a way to obtain path conditions at a specific program point — e.g., by inserting an assert and retrieving the input constraints that reach that point?
Any pointers on how CrossHair handles symbolic state under the hood or where to hook in would be greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions