Skip to content

Add support for common proof options #600

Closed
@celinval

Description

@celinval

Requested feature: We would like to allow users to customize rmc behavior for specific proof harnesses by adding attributes to the harnesses themselves. Today, users have to change how they invoke RMC.

Use case:

#[rmc::unwind(value=10)]
#[rmc::expect_failure("<message>")]
fn my_harness() {
    // code
}

Proposal: We should create macro attributes in our rmc_macros crate that allows the user to specify unwind values as well as proof expectations. Our compiler component will any proof harness attribute and dump it to the metadata file introduced in this PR: #668. Then we will use those values to control CBMC (for unwind) and the output results (for expect_failure).

If the user provides --unwind <value> argument, it should have precedence over the attribute.

Tasks breakdown:

  • Add support to rmc::unwind.
  • Add support to rmc::expect_failure.

Metadata

Metadata

Assignees

Labels

T-RFCLabel RFC PRs and IssuesT-UserTag user issues / requests[C] Feature / EnhancementA new feature request or enhancement to an existing feature.

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions