forked from aptos-labs/aptos-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[move-prover] Package integration and dependency cleanup
This PR refines the integration of the Move prover into the CLI/package system as well as the Rust test infrastructure. As a result, dependencies from the move-prover crate into other crates outside of the language tree are also eliminated. The user level documentation is probably the best entrypoint into this work. See [here]() for the updated user guide. It describes how to call and configure the prover via the `package` command, and how to setup tests. One design decision here is to let the package system always verify by default a package as a whole. This is generally faster if the intent is to actually verify all modules in the package, as in tests. When working from the command line one can, however, filter prover targets, for example as in `move package prover -t DiemConfig`. The string after the `-t` works as in cargo test. The diem framework and move-stdlib have been updated to use the new prover test infra via the CLI. The prover unit tests, however, continue to use a customized test approach, because they have different requirementa (exp files etc). This PR introduces breaking changes for Move prover users: - After this PR, anybody calling the prover outside of the move-prover crate should go via the `move package prove` command, as documented in the user guide. - If one calls the prover directly, **it will not longer** pick an environment variable `MOVE_PROVER_CONFIG`. If you need to do this, use `--config $MOVE_PROVER_CONFIG` explicitly. (But one really only needs to do this for running prover unit tests in the move-prover tree; see below) For prover developers, the following changes: - Running cargo test in `move-prover` does not longer test diem-framework or move-stdlib. Use `tools/check_pr.sh` to run all relevant Move tests. - Tests in `move-prover/tests/sources` cannot depend longer on anything else than the Move stdlib. - Checkout the updated [tests/README.md]() for running the prover on sources in the test tree. The PR contains a lot of .exp changes in the move-prover/tests tree. This is because the console output has changed, because Diem dependencies have been removed, and the .cvc4_exp files where out of date wrt from a PR last week (they are not run in CI). Closes: aptos-labs#9844
- Loading branch information
1 parent
674b619
commit 18d058a
Showing
91 changed files
with
957 additions
and
837 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Copyright (c) The Diem Core Contributors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
use move_cli::package::prover::ProverTest; | ||
|
||
#[test] | ||
fn prove_core() { | ||
ProverTest::create("core").run() | ||
} | ||
|
||
#[test] | ||
fn prove_experimental() { | ||
ProverTest::create("experimental").run() | ||
} | ||
|
||
#[test] | ||
fn prove_dpn() { | ||
ProverTest::create("DPN").run() | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.