Skip to content

Add --print-internal-representation to goto-instrument #991

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

Merged
merged 1 commit into from
Jun 18, 2017
Merged

Add --print-internal-representation to goto-instrument #991

merged 1 commit into from
Jun 18, 2017

Conversation

karkhaz
Copy link
Collaborator

@karkhaz karkhaz commented Jun 8, 2017

This flag pretty-prints every instruction in the entire program. I use
it to learn about CPROVER's internal representation of particular
constructs, by passing in --print-internal-representation on a one-line
C program.

This flag pretty-prints every instruction in the entire program. I use
it to learn about CPROVER's internal representation of particular
constructs, by passing in --print-internal-representation on a one-line
C program.

CR: https://cr.amazon.com/r/7203184/
@@ -1481,7 +1497,8 @@ void goto_instrument_parse_optionst::help()
" --nondet-static add nondeterministic initialization of variables with static lifetime\n" // NOLINT(*)
" --check-invariant function instruments invariant checking function\n"
" --remove-pointers converts pointer arithmetic to base+offset expressions\n" // NOLINT(*)
" --undefined-function-is-assume-false\n"
// NOLINTNEXTLINE(whitespace/line_length)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please could you remove the line break introduced here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Martin. Not sure what you mean, I didn't introduce a line break, but just added two linter directives since the linter was complaining...

@martin-cs
Copy link
Collaborator

Thanks for this patch. It seems the key difference between this and --show-goto-functions is the use of pretty() for displaying the irepts. Is their a sane way that this functionality could be folded into --show-goto-functions (or maybe --show-symbol-table)?

Copy link
Collaborator Author

@karkhaz karkhaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, good idea. I'll do that, please clarify about the line break.

@@ -1481,7 +1497,8 @@ void goto_instrument_parse_optionst::help()
" --nondet-static add nondeterministic initialization of variables with static lifetime\n" // NOLINT(*)
" --check-invariant function instruments invariant checking function\n"
" --remove-pointers converts pointer arithmetic to base+offset expressions\n" // NOLINT(*)
" --undefined-function-is-assume-false\n"
// NOLINTNEXTLINE(whitespace/line_length)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Martin. Not sure what you mean, I didn't introduce a line break, but just added two linter directives since the linter was complaining...

@kroening kroening merged commit 1b58ff9 into diffblue:master Jun 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants