Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: model-checking/kani
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: kani-0.37.0
Choose a base ref
...
head repository: model-checking/kani
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: kani-0.38.0
Choose a head ref
  • 13 commits
  • 87 files changed
  • 7 contributors

Commits on Sep 25, 2023

  1. Fix issue 2589 (#2787)

    Co-authored-by: Felipe R. Monteiro <rms.felipe@gmail.com>
    JustusAdam and feliperodri authored Sep 25, 2023
    Configuration menu
    Copy the full SHA
    e95a7bb View commit details
    Browse the repository at this point in the history
  2. Auto label PRs that may require extra checks (#2785)

    Add a new workflow that automatically adds the label "Z-BenchCI" to PRs that touch compiler, toolchain, dependencies and driver files that invoke our dependencies.
    
    I also removed the label from the toolchain update job since this workflow will add the label once the PR is created.
    celinval authored Sep 25, 2023
    Configuration menu
    Copy the full SHA
    6b1a09d View commit details
    Browse the repository at this point in the history

Commits on Sep 26, 2023

  1. Deprecate any_slice (#2789)

    Deprecate kani::slice::any_slice in Kani 0.38.0 (and the related AnySlice struct), and remove it in a later version.
    
    Motivation: The Kani library's `slice::any_slice` API is doing more harm than benefit: it is meant to provide a convenient way for users to generate non-deterministic slices, but its current implementation aims to avoid any unsoundness by making sure that for the non-deterministic slice returned by the API, accessing memory beyond the slice length is flagged as an out-of-bounds access (see #1009 for details). However, in practical scenarios, using it ends up causing memory to blowup for CBMC. Given that users may not care about this type of unsoundness, which is only possible through using a pointer dereference inside an unsafe block (see discussion in #2634). Thus, we should leave it to the user to decide the suitable method for generating slices that fits their verification needs. For example, they can use Kani's alternative API, `any_slice_of_array` that extracts a slice of a non-deterministic start and end from a given array.
    zhassan-aws authored Sep 26, 2023
    Configuration menu
    Copy the full SHA
    8480dc6 View commit details
    Browse the repository at this point in the history

Commits on Sep 27, 2023

  1. Simple Stubbing with Contracts (#2746)

    ### Description of changes: 
    
    Expands the contract features introduced in #2655 by completing the
    checking with stubbing/replacement capabilities.
    
    ### Resolved issues:
    
    Resolves #2621 
    
    ### Related RFC: [0009 Function
    Contracts](https://model-checking.github.io/kani/rfc/rfcs/0009-function-contracts.html)
    
    By submitting this pull request, I confirm that my contribution is made
    under the terms of the Apache 2.0 and MIT licenses.
    
    ---------
    
    Co-authored-by: Celina G. Val <celinval@amazon.com>
    Co-authored-by: Felipe R. Monteiro <rms.felipe@gmail.com>
    3 people authored Sep 27, 2023
    Configuration menu
    Copy the full SHA
    dba1674 View commit details
    Browse the repository at this point in the history

Commits on Sep 29, 2023

  1. Avoid mismatch when generating structs that represent scalar data but…

    … also include ZSTs (#2794)
    
    This change considers another case for the code generation of scalar data.
    In particular, when the expected type is an ADT, we previously
    considered two cases: either there is no field or there is one. But in
    cases where the ADT includes a ZST, the ADT will contain multiple
    fields: one associated to the scalar data, and other fields associated
    to the ZSTs. In those cases, we ended up crashing as in #2680:
    
    ```rust
    error: internal compiler error: Kani unexpectedly panicked at panicked at cprover_bindings/src/goto_program/expr.rs:804:9:
                                    assertion failed: `(left == right)`
                                      left: `2`,
                                     right: `1`: Error in struct_expr; mismatch in number of fields and values.
                                        StructTag("tag-_161424092592971241517604180463813633314")
                                        [Expr { value: IntConstant(0), typ: Unsignedbv { width: 8 }, location: None, size_of_annotation: None }].
    
    thread 'rustc' panicked at cprover_bindings/src/goto_program/expr.rs:804:9:
    assertion failed: `(left == right)`
      left: `2`,
     right: `1`: Error in struct_expr; mismatch in number of fields and values.
    	StructTag("tag-_161424092592971241517604180463813633314")
    	[Expr { value: IntConstant(0), typ: Unsignedbv { width: 8 }, location: None, size_of_annotation: None }]
    ```
    
    With the changes in this PR, that's no longer the case.
    
    Resolves #2364 
    Resolves #2680
    adpaco-aws authored Sep 29, 2023
    Configuration menu
    Copy the full SHA
    a20437a View commit details
    Browse the repository at this point in the history
  2. Update PR template (#2791)

    Change the template to be more concise to address the team's concern that the template was too verbose.
    
    The new template is also cleaner since we are now using the PR description as the base for the commit message.
    ---------
    Co-authored-by: Michael Tautschnig <tautschn@amazon.com>
    Co-authored-by: Zyad Hassan <88045115+zhassan-aws@users.noreply.github.com>
    celinval authored Sep 29, 2023
    Configuration menu
    Copy the full SHA
    ed671fc View commit details
    Browse the repository at this point in the history
  3. Bump CBMC version (#2796)

    Upgrade CBMC version to latest (5.93.0).
    
    Resolves #2650
    zhassan-aws authored Sep 29, 2023
    Configuration menu
    Copy the full SHA
    964f986 View commit details
    Browse the repository at this point in the history

Commits on Oct 2, 2023

  1. Update dependencies (#2797)

    Updated via `cargo update`. No further (manual) updates were suggested
    by `cargo outdated --workspace`.
    tautschnig authored Oct 2, 2023
    Configuration menu
    Copy the full SHA
    ed2df13 View commit details
    Browse the repository at this point in the history

Commits on Oct 3, 2023

  1. Prevent kani crash during setup for first time (#2799)

    > Please ensure your PR description includes the following:
    > 1. A description of how your changes improve Kani.
    > 2. Some context on the problem you are solving.
    > 3. A list of issues that are resolved by this PR.
    > 4. If you had to perform any manual test, please describe them.
    >
    > **Make sure you remove this list from the final PR description.**
    
    By using the `tar` file as a lock mechanism, we can detect incomplete
    setups i.e when both `kani's` working directory and the tar file present
    before setup, we can simply use the local bundle to start setup again.
    
    Resolves #1545 
    
    By submitting this pull request, I confirm that my contribution is made
    under the terms of the Apache 2.0 and MIT licenses.
    jaisnan authored Oct 3, 2023
    Configuration menu
    Copy the full SHA
    62f136c View commit details
    Browse the repository at this point in the history

Commits on Oct 4, 2023

  1. Create concrete playback temp files in source directory (#2804)

    Concrete playback seeks to generate unit tests in the original source
    file. An intermediate temporary file is used to reduce the risk of
    corrupting original source files. Once the temporary file has been
    completely written to, it is to be atomically moved to replace the
    source file. This can only be done on the same file system.
    
    We now create the temporary file in the same source directory as the
    original source file to ensure we are on the same file system. The
    implementation uses NamedTempFile from the tempfile crate, which renders
    our own tempfile implementation redundant.
    
    Tested on Ubuntu 20.04 with /tmp on a different partition (where our
    regression tests would previously fail).
    
    Resolves: #2705
    tautschnig authored Oct 4, 2023
    Configuration menu
    Copy the full SHA
    fb08f3e View commit details
    Browse the repository at this point in the history
  2. Address clippy warnings (#2807)

    Versions of clippy that come with newer toolchains report a large number
    of needless_borrows_for_generic_args. We can address these now so that
    we don't have to make these changes as part of a toolchain update.
    tautschnig authored Oct 4, 2023
    Configuration menu
    Copy the full SHA
    fece7ee View commit details
    Browse the repository at this point in the history

Commits on Oct 5, 2023

  1. Update Rust toolchain to 2023-09-23 (#2806)

    Source changes required by the following upstream commits:
    
    * rust-lang/rust@5a0a1ff0cd move ConstValue into mir
    * rust-lang/rust@ea22adbabd adjust constValue::Slice to work for
    arbitrary slice types
    * rust-lang/rust@c94410c145 rename mir::Constant -> mir::ConstOperand,
    mir::ConstKind -> mir::Const
    
    Fixes: #2784
    tautschnig authored Oct 5, 2023
    Configuration menu
    Copy the full SHA
    7bf5a6d View commit details
    Browse the repository at this point in the history
  2. Bump Kani version to 0.38.0 (#2798)

    Next Kani release. Also includes fixes to changelog formatting.
    tautschnig authored Oct 5, 2023
    Configuration menu
    Copy the full SHA
    6d9575e View commit details
    Browse the repository at this point in the history
Loading