Skip to content
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

fix bit logic operators #395

Conversation

zhassan-aws
Copy link
Contributor

Description of changes:

Describe RMC's current behavior and how your code changes that behavior. If there are no issues this PR is resolving, explain why this change is necessary.

Resolved issues:

Resolves #ISSUE-NUMBER

Call-outs:

Testing:

  • How is this change tested?

  • Is this a refactor change?

Checklist

  • Each commit message has a non-empty body, explaining why the change was made
  • Methods or procedures are documented
  • Regression or unit tests are included, or existing tests cover the modified code
  • My PR is restricted to a single feature or bugfix

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.

danielsn and others added 30 commits July 26, 2021 14:32
* Squash warnings: remove final use of insert_unchecked

* wWe only use ensure_global_var as an expr, so make it return that

* cleanup how codegen_alloc_in_memory generates global vars
* Special case fat-ptr to fat-ptr casts

* Fix issues in rvalue computation related to ADT fat pointers

* Assign statements now always type-check. Remove the special casing for when they didn't
* Add RMC workflow file for GitHub Actions

* Add multiple setup scripts used by workflow

* Improvements for Actions worflow and setup scripts
This is a temporary workaround for the vtable duplicate field issue (#30).
Since we can detect this case at translation time, we mark the vtable as
ill-formed. This is checked at proof-time so any code that relies on using an
ill-formed vtable function will fail.

Co-authored-by: Daniel Schwartz-Narbonne <[email protected]>
…ng#79)

* Add a couple of missing tests (nondet. vectors, offset)

* Add `test_offset_str` to BinOp_Offset test

* Add assertions in `NondetVectors` test

Co-authored-by: Daniel Schwartz-Narbonne <[email protected]>
…hecking#88)

* Complete and replace the unsized pointer cast implementation

* Respond to code review of unsized pointer cast implementation

Co-authored-by: Mark R. Tuttle <[email protected]>
* Update README.md
* Split off a separate DEVELOPER-GUIDE
Co-authored-by: Daniel Schwartz-Narbonne <[email protected]>
* Allow cast of any pointer to cast to a trait pointer

Also:
* Add predicates `use_*_pointer(mir_type)` to use mir pointer metadata
  to identify the correct type of pointer to a mir type.
* Use predicates `use_*_pointer(mir_type)` in fat pointer construction

Resolves model-checking#83

Co-authored-by: Mark R. Tuttle <[email protected]>
Also:
* Correctly cast before dereferencing a thin pointer to a flexible
  struct
* Correct search for trait type in adt (ignore primitive types and
  pointers)
* Correct the choice between thin and fat pointers in codegen_fat_ptr
  and codegen_ty_ref (and rewrite to use mir pointer metadata)

Co-authored-by: Mark R. Tuttle <[email protected]>
)

* Correct fat pointer generation by codegen_rvalue_ref

Also restore the SizeAndAlignOfDst regression that now passes.

* Respond to code review on correct fat pointer in codegen rvalue ref

Co-authored-by: Mark R. Tuttle <[email protected]>
)

* Workaround for issue model-checking#95

* Print types in assert statement

Co-authored-by: Nathan Chong <[email protected]>
bdalrhm and others added 27 commits July 26, 2021 14:34
* Add support for multiple expected failures.

* Check for expected failures on RMC's output instead of test file.

* Address concerns.
…ing#320)

* Fix codegen local for Fn::call and FnMut::call_mut

* Review comments

* Whitesapce

* Typo
* Use `--unwinding-assertions` flag by default

* Scan CBMC output and make recommendations (unwinding)

* Use `--no-default-flags` in Leibniz's test to avoid failure

* Split checks into groups. Add flags for groups. Print flags.

* Allow dry runs for rmc and cargo-rmc

* Add starter-kit checks and fix tests

* Add expected test for dry-run feature

* Dry-run: Emulate running proc. instead of just printing

* Add explanations for checks disabled. Other minor fixes.

* Order. Rename. Cover flags.
* Define dependencies with an array

Among other things, this will allow us to comment on them in the future.

* Add missing (non-CI) dependency

Running setup scripts on the default Ubuntu AMI results in this error message:

```
  sudo python3 -m pip install --upgrade cbmc_viewer-2.5-py3-none-any.whl
/usr/bin/python3: No module named pip
```

This fixes the issue.

* Use the downloaded file, if already downloaded

wget has a default behavior that causes downloads like this to get new
unexpected filenames if the file already exists.

The switch to curl is simply personal preference.

* swap back to wget

* keep deps in alpha order for now
* Added --c-lib flag to rmc and cargo-rmc.

* Added rmc test for extern C files.

* Added cargo-rmc example for extern C files.

* PR fixes.

* Fixups after rebase.

* PR fixes.
* Emit an error message when rmc-rustc fails

* indicate what was missing in rmc-rustc error message
…ard. (model-checking#325)

* Extract examples from The Rust Reference and display their results in a terminal dashboard.

* Address PR comments.

* Clarify comment.

* Replace `rfind` with `rsplitn`.
Adds a recursive visitor pattern which can be used to transform goto symbol tables, as well as a default (identity transform) implementation.
* Use `x.py` to build and run the dashboard.

* Stop looking for copyright notice in markdown files.

Co-authored-by: Adrian Palacios <73246657 [email protected]>
…-checking#353)

* Differentiate between check, codegen, and verification errors.

* Fix typo.

* Rename tests.

* Address concerns.

* Remove unnecessary code and fix typos.
…el-checking#352)

Use vtable index passed at call site to resolve functions

Co-authored-by: Daniel Schwartz-Narbonne <[email protected]>
* support simd_extract intrinsic

* support simd_insert intrinsic

* move insert/extract tests to their own tile

* extract codegen_intrinsic_simd_insert

Co-authored-by: Adrian Palacios <73246657 [email protected]>
…thod) (model-checking#361)

* Refactor for alloc_id iterators

* Access scalar pointer values via `into_parts`

* Trait compile fixes

* Vtable field name workaround

* Remove `unused doc comment` warning
* Rearranges common flags between `rmc` and `cargo rmc` into groups in a shared file to allow better organization and easier changes in the future. 
 * Adds help strings to all of the flags to explain their purpose.
…hecking#363)

* Copy options from the rust code blocks in the markdown files.

* Fix typos and add comments.
…l-checking#335)

Correct vtable shim self type (add fixme for other cases)

Co-authored-by: Daniel Schwartz-Narbonne <[email protected]>
* Support gen-symbols.

* Support allow-cbmc-verification-failure
@zhassan-aws zhassan-aws closed this Aug 6, 2021
@zhassan-aws zhassan-aws deleted the fix-bit-logic-operators branch January 6, 2023 17:44
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.

Update CBMC version check to 5.30 in rmc-regression.sh
9 participants