generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 134
Make --gen-c-runnable produce runnable C code
#334
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
danielsn
merged 82 commits into
model-checking:main-154-2021-08-17
from
vecchiot-aws:gen-c-transformer
Aug 20, 2021
Merged
Make --gen-c-runnable produce runnable C code
#334
danielsn
merged 82 commits into
model-checking:main-154-2021-08-17
from
vecchiot-aws:gen-c-transformer
Aug 20, 2021
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66a89f2 to
9d47f16
Compare
Contributor
Author
|
To fix:
|
3ddef96 to
7d74812
Compare
Contributor
Author
|
Simplified version of |
14ad0a3 to
d2a31b3
Compare
a4ee58c to
e19c3d6
Compare
Contributor
Author
|
Changes:
|
1ee7132 to
db93ae4
Compare
96bd761 to
f252de7
Compare
0ab3bd6 to
b564618
Compare
f006144 to
3130749
Compare
danielsn
suggested changes
Aug 19, 2021
compiler/rustc_codegen_llvm/src/gotoc/cbmc/goto_program/symbol_table.rs
Outdated
Show resolved
Hide resolved
...ustc_codegen_llvm/src/gotoc/cbmc/goto_program/symtab_transformer/gen_c_transformer/common.rs
Outdated
Show resolved
Hide resolved
...ustc_codegen_llvm/src/gotoc/cbmc/goto_program/symtab_transformer/gen_c_transformer/common.rs
Outdated
Show resolved
Hide resolved
...ustc_codegen_llvm/src/gotoc/cbmc/goto_program/symtab_transformer/gen_c_transformer/common.rs
Outdated
Show resolved
Hide resolved
...en_llvm/src/gotoc/cbmc/goto_program/symtab_transformer/gen_c_transformer/expr_transformer.rs
Outdated
Show resolved
Hide resolved
d3f43fe to
a446058
Compare
danielsn
reviewed
Aug 20, 2021
...en_llvm/src/gotoc/cbmc/goto_program/symtab_transformer/gen_c_transformer/name_transformer.rs
Outdated
Show resolved
Hide resolved
vecchiot-aws
commented
Aug 20, 2021
...en_llvm/src/gotoc/cbmc/goto_program/symtab_transformer/gen_c_transformer/expr_transformer.rs
Outdated
Show resolved
Hide resolved
vecchiot-aws
commented
Aug 20, 2021
...en_llvm/src/gotoc/cbmc/goto_program/symtab_transformer/gen_c_transformer/expr_transformer.rs
Outdated
Show resolved
Hide resolved
414f788 to
769215d
Compare
danielsn
approved these changes
Aug 20, 2021
adpaco-aws
pushed a commit
that referenced
this pull request
Aug 24, 2021
tedinski
pushed a commit
to tedinski/rmc
that referenced
this pull request
Apr 26, 2022
tedinski
pushed a commit
that referenced
this pull request
Apr 27, 2022
carolynzech
pushed a commit
to carolynzech/kani
that referenced
this pull request
May 14, 2025
This function was added in model-checking#334; all its callers are gone now.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of changes:
A PR introducing a
--gen-c-runnableflag which produces a runnable C program from the compiled goto program. The existing--gen-cflag acts as a starting point, but there are a few issues listed in #237 that prevent the generated C file from compiling.The change builds off of the visitor pattern introduced by #321, creating a symbol table transformer that normalizes identifiers and perform some extra processing on the symbol table.
(Replaces #317.)
Resolved issues:
Partially resolves #237 (possibly fully after more changes.)
Call-outs:
Todo:
nondet_<k>()functions.nondet_<k>()functions from a sample trace.overflowsrc/test/cbmc/FatPointers/boxtrait.cTesting:
How is this change tested? Existing regression suite.
Is this a refactor change? No.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.