-
Notifications
You must be signed in to change notification settings - Fork 273
[Question] Generate logic equations from C code? #7803
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
Comments
Yes. What format do you want them in? Human readable : use Alternatively, if you want to use the equations directly in your code, you can integrate it as a new back-end and save yourself the work of parsing, building expression representations, etc. I'm sure you already realise this but just for anyone who finds this in the future, what is generated are the equations describing the unrolled / symbolically executed program to a given limit ( |
Thank you for your answer. I only get these results for show-vcc by example: Note: it's a little bit modified version of my c code. |
I feel like I may not understand what you are looking for. What When you say "logic equations" -- what format / semantics are you looking for? |
My goal: I've got "complicated" C-code and I would like to generate the boolean equations. By example, I would like to get the boolean equations of an addition of 2 bytes:
with:
I already know the result (full adder equations):
I suppose that CBMC has these equations just before translate them with Tseytin transformation (I suppose). |
If you want the equations over bits then Does that help? |
The original question has been answered. I am going to close this out, due to a lack of further responses from @PeterMacGonagan Please feel free to re-open, if you wish to discuss this further. |
Thank you very much for your answer. Could you point me where in the code of cbmc the 'SSA' are translated into cnf, please? Thank you in advance. |
The conversion code is in
|
Hello,
Is it possible to obtain the logic equations of a C code with CBMC? If so, how?
Here's an simple example:
From what I've read, goto-instrument would be able to do this, but I haven't found any more information.
Thank you :)
The text was updated successfully, but these errors were encountered: