Giter Club home page Giter Club logo

prusti-assistant's Introduction

Prusti Assistant

Latest published version for VS Code Latest published version for Open VSX Status of the "test and publish" job Test coverage status Sonarcloud quality gate status

This Visual Studio Code extension provides interactive IDE features for verifying Rust programs with the Prusti verifier.

For advanced use cases, consider switching to the command-line version of Prusti.

Screenshot

An example of how verification errors are reported by the extension:

Screenshot

Requirements

In order to use this extension, please install the following components:

If anything fails, check the "Troubleshooting" section below. Note that macOS running on M1 is currently not supported by this extension.

First Usage

  1. Install the requirements (listed above) and restart the IDE.
    • This will ensure that programs like rustup are in the program path used by the IDE.
  2. Install the "Prusti Assistant" extension.
  3. Open a Rust file to activate the extension.
    • At its first activation, this extension will automatically download Prusti and install the required Rust toolchain.
  4. Click on the "Prusti" button in the status bar.
    • Alternativelly, you can run the Prusti: verify the current crate or file command.
    • If the program is in a folder with a Cargo.toml file, Prusti will verify the crate in which the file is contained.
    • If no Cargo.toml file can be found in a parent folder of the workspace, Prusti will verify the file as a standalone Rust program. No Cargo dependencies are allowed in this mode.
  5. Follow the progress from the status bar.
    • You should see a "Verifying crate [folder name]" or "Verifying file [name]" message while Prusti is running.
  6. The result of the verification is reported in the status bar and in the "Problems" tab.
    • You can open the "Problems" tab by clicking on Prusti's status bar.
    • Be aware that the "Problems" tab is shared by all extensions. If you are not sure which extension generated which error, try disabling other extensions. (Related VS Code issue: #51103.)

To update Prusti, run the command Prusti: update verifier in the command palette.

If anything fails, check the "Troubleshooting" section below.

Features

Commands

This extension provides the following commands:

  • Prusti: verify the current crate or file to verify a Rust program. Clicking the "Prusti" button in the status bar runs this command.
  • Prusti: update verifier to update Prusti.
  • Prusti: show version to show the version of Prusti.
  • Prusti: restart Prusti server to restart the Prusti server used by the extension.
  • Prusti: clear diagnostics to clear all diagnostics generated by the extension.

Configuration

The main configuration options used by this extension are the following:

  • prusti-assistant.verifyOnSave: Specifies if programs should be verified on save.
  • prusti-assistant.verifyOnOpen: Specifies if programs should be verified when opened.
  • prusti-assistant.checkForUpdates: Specifies if Prusti should check for updates at startup.
  • prusti-assistant.javaHome: Specifies the path of the Java home folder. Leave empty to auto-detect it.
  • prusti-assistant.prustiVersion: Allows to choose between the latest published Prusti version (the default), a fixed release specified as a GitHub tag (see the list of releases), or a local build of Prusti.

Inline Code Diagnostics

This extension automatically provides inline diagnostics for Prusti errors.

Snippets

Basic code-completion snippets are provided for Prusti annotations.

Verification cache

By default, Prusti transparently caches verification requests. To clear the cache, it's enough to restart the Prusti server with the commands described above.

Prusti verification flags

The verification flags of Prusti can be configured in a Prusti.toml file. Its location should be the following:

  • When verifying a standalone Rust file, Prusti.toml should be placed in the same folder of the verified file.
  • When verifying a Rust crate, Prusti.toml should be placed in the innermost folder that (1) contains a Cargo.toml file and (2) transitively contains the current active file in the IDE.

In addition, due to a technical limitation the Prusti server reads its configuration flags from the Prusti.toml placed in the root of the IDE workspace (i.e. the navigation panel on the left). When modifying this file, it is necessary to manually restart the server. The server uses only a few of Prusti's flags, mainly to configure the verification cache and to decide whether to dump Viper files for debugging.

To check whether Prusti picked up the Prusti.toml that you wrote, try writing make_prusti_crash=true in it (or any other nonexistent configuration flag). When doing so, the IDE should report that Prusti crashed.

The list of the supported Prusti flags is available here, in Prusti's developer guide. Note that by setting these flags in the wrong way it is possible to get incorrect verification results. Many flags only exist of debugging reasons and to provide workarounds in selected cases.

Troubleshooting

If Prusti fails to run, you can inspect Prusti's log from VS Code (View -> Output -> Prusti Assistant) and see if one of the following solutions applies to you.

Problem Solution
On Windows, Visual Studio is installed but the rustup installer still complains that the Microsoft C++ build tools are missing. When asked which workloads to install in Visual Studio make sure "C++ build tools" is selected and that the Windows 10 SDK and the English language pack components are included. If the problem persists, check this Microsoft guide and this Rust guide. Then, restart the IDE.
The JVM is installed, but the extension cannot auto-detect it. Open the settings of the IDE, search for "Prusti-assistant: Java Home" and manually set the path of the Java home folder. Alternatively, make sure that the JAVA_HOME environment variable is set in your OS. Then, restart the IDE.
Prusti crashes mentioning "Unexpected output of Z3" in the log. Prusti is using an incompatible Z3 version. Make sure that the Z3_EXE environment variable is unset in your OS and in the settings of the extension. Then, restart the IDE.
error[E0514]: found crate 'cfg_if' compiled by an incompatible version of rustc There is a conflict between Prusti and a previous Cargo compilation. Run cargo clean or manually delete the target folder. Then, rerun Prusti.
error: the 'cargo' binary, normally provided by the 'cargo' component, is not applicable to the 'nightly-2021-09-20-x86_64-unknown-linux-gnu' toolchain
or
error[E0463]: can't find crate for std
or
error[E0463]: can't find crate for core
The Rust toolchain installed by Rustup is probably corrupted (see issue rustup/#2417). Uninstall the nightly toolchain mentioned in the error (or all installed nightly toolchains). Then, rerun Prusti.
error: no override and no default toolchain set Rustup has probably been installed without the default toolchain. Install it, then rerun Prusti.
libssl.so.1.1: cannot open shared object file: No such file or directory on Ubuntu 22.04 Ubuntu 22.04 deprecated libssl1.1 and moved to libssl3. Consider this solution as a temporary workaround to install libssl1.1, or compile Prusti from source code to make it use libssl3.
On macOS running on an M1 chip, the extension doesn't work and the log contains messages such as incompatible architecture (have (arm64), need (x86_64)). We currently don't release precompiled arm64 binaries for macOS. Until we do so, the only option is to compile Prusti from source code.

Thanks to @Pointerbender, @michaelpaper, @fcoury, @Gadiguibou, @djc for their help in reporting, debugging and solving many of these issues!

In case you still experience difficulties or encounter bugs while using Prusti Assistant, please open an issue or contact us in the Zulip chat.

prusti-assistant's People

Contributors

aurel300 avatar cedihegi avatar dependabot-preview[bot] avatar dependabot[bot] avatar fpoli avatar hkalbasi avatar jonasalaif avatar juliand665 avatar mooman219 avatar viper-admin avatar zgrannan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

prusti-assistant's Issues

Install Prusti offline

Steps to reprodce:

  1. open some rust file in vscode
  2. vscode shows "Installing Prusti"
  3. and it never finishes

The problem is partly my network and proxy settings, which does not work very well the default installation script.

It would be nice if one can download and install prusti manually and then configure it in vscode offline.

I tried building prusti and putting path/to/prusti-dev/target/release in "Local Prusti Path" but it seems to be simply ignored without any diagnostics.

Verification of crates

Currently, the extension can only verify programs that can be compiled with a simple rustc <program.rs> call. So, just standalone Rust files with no Cargo dependencies. However, the code to support verification of crates from the extension is already there. The missing steps are:

  • Add a VS Code command and a button to start the verification of a crate.
    • Regarding the button, it would be nice to replace the current "Verify with Prusti" button with something like a dropdown menu that lets to choose between "Verify standalone program with Prusti" and "Verify crate with Prusti".
  • Add tests that run the "verify crate" command on a collection of crates (including: empty crate, crate with dependencies, non-compiling crate).

Incorrect Error Reporting when Verifying Project containing Cargo Workspace

Having a Rust project with a workspace and a subcrate, i.e., in Cargo.toml:

[workspace]
members = ["subcrate"]

Running verification with the Cargo.toml of the workspace in focus works as expected, but clicking Verify with Prusti when a file of the subcrate is in focus, will lead to incorrect error reporting by Prusti-Assistant:

Error when running from Cargo.toml:

lib.rs subcrate\src
[Prusti Verification Error] ...

Incorrect error when running on lib.rs directly:

lib.rs subcrate\subcrate\src
[Prusti Verification Error] ...

Clicking on the error will attempt to open the file subcrate/subcrate/src/lib.rs, which doesn't exist.

Running Cargo-Prusti from a terminal gives the same error message when running it from the outer or inner crate, which might be the cause for the problem in Prusti-Assistant:

error: [Prusti: verification error] the asserted expression might not hold
 --> subcrate/src/lib.rs:4:20
  |
4 |     prusti_assert!(x == 10);
  |                    ^^^^^^^
  |

Fix tests

It seems that the JSON encoding of diagnostics recently changed. This makes the tests fail. An example (CI run):

      + expected - actual

       [
         {
           "message": "[unused_variables] unused variable: `unused`."
           "range": {
      -      "_end": {
      -        "_character": 14
      -        "_line": 1
      +      "c": {
      +        "c": 1
      +        "e": 8
             }
      -      "_start": {
      -        "_character": 8
      -        "_line": 1
      +      "e": {
      +        "c": 1
      +        "e": 14
             }
           }
           "relatedInformation": [
             {
               "location": {
                 "range": {
      -            "_end": {
      -              "_character": 14
      -              "_line": 1
      +            "c": {
      +              "c": 1
      +              "e": 8
                   }
      -            "_start": {
      -              "_character": 8
      -              "_line": 1
      +            "e": {
      +              "c": 1
      +              "e": 14
                   }
                 }
                 "uri": {
                   "_formatted": [null]
--
             }
             {
               "location": {
                 "range": {
      -            "_end": {
      -              "_character": 14
      -              "_line": 1
      +            "c": {
      +              "c": 1
      +              "e": 8
                   }
      -            "_start": {
      -              "_character": 8
      -              "_line": 1
      +            "e": {
      +              "c": 1
      +              "e": 14
                   }
                 }

Test all reported diagnostics, not just those in a particular file

A current limitation of the test suite is that it only checks the diagnostics reported on a single file:

const diagnostics = vscode.languages.getDiagnostics(document.uri);

This has some limitations:

  • We cannot check error messages of crates composed of multiple source code files.
  • Due to issues such as viperproject/prusti-dev#1446 it is possible that Prusti reports error messages whose position is not contained in the code being verified, but we cannot test anything about this.
  • When the verification fails due to an error message reported on one of the external files, the output of the test suite does not show the error message that caused the failure. This makes it difficult to debug why a test is failing. An example is #226.

To solve what above, the test suite should do its checks using getDiagnostics(): [Uri, Diagnostic[]][] to get all reported diagnostics instead of the current getDiagnostics(resource: Uri): Diagnostic[].

Detected conflict: libcompiler_builtins-8b33f9cbbc9652fe.rlib

Something in the LatestDev relese seems broken:

Run verification...
Prusti Assistant: run '/home/fpoli/.config/Code/User/globalStorage/viper-admin.prusti-assistant/prustiTools/LatestDev/prusti/prusti-rustc --crate-type=lib --error-format=json --edition=2018 /home/fpoli/src/prusti/snippets/20210601_140653.rs'

Output from '/home/fpoli/.config/Code/User/globalStorage/viper-admin.prusti-assistant/prustiTools/LatestDev/prusti/prusti-rustc --crate-type=lib --error-format=json --edition=2018 /home/fpoli/src/prusti/snippets/20210601_140653.rs'
┌──── Begin stdout ────┐
info: syncing channel updates for 'nightly-2021-05-11-x86_64-unknown-linux-gnu'
info: latest update on 2021-05-11, rust version 1.54.0-nightly (79e50bf77 2021-05-10)
info: downloading component 'rustc'
info: downloading component 'cargo'
info: downloading component 'rust-std'
info: downloading component 'rust-docs'
info: downloading component 'rustfmt'
info: downloading component 'clippy'
info: removing previous version of component 'rustc'
warning: during uninstall component rustc was not found
info: removing previous version of component 'cargo'
warning: during uninstall component cargo was not found
info: removing previous version of component 'rust-std'
warning: during uninstall component rust-std was not found
info: removing previous version of component 'rust-docs'
warning: during uninstall component rust-docs was not found
info: removing previous version of component 'rustfmt'
warning: during uninstall component rustfmt was not found
info: removing previous version of component 'clippy'
warning: during uninstall component clippy was not found
info: installing component 'rustc'
info: using up to 500.0 MiB of RAM to unpack components
info: installing component 'cargo'
info: installing component 'rust-std'
info: rolling back changes
error: failed to install component: 'rust-std-x86_64-unknown-linux-gnu', detected conflict: '"lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-8b33f9cbbc9652fe.rlib"'
error: backtrace:
error:    0: error_chain::backtrace::imp::InternalBacktrace::new
   1: rustup::dist::component::transaction::ChangedItem::dest_abs_path
   2: <rustup::dist::component::package::DirectoryPackage as rustup::dist::component::package::Package>::install
   3: <rustup::dist::component::package::TarGzPackage as rustup::dist::component::package::Package>::install
   4: rustup::dist::manifestation::Manifestation::update
   5: rustup::dist::dist::update_from_dist_
   6: rustup::install::InstallMethod::install
   7: rustup::toolchain::DistributableToolchain::install_from_dist
   8: rustup::config::Cfg::find_or_install_override_toolchain_or_default
   9: rustup_init::main
  10: std::sys_common::backtrace::__rust_begin_short_backtrace
  11: main
  12: __libc_start_main
  13: <unknown>


└──── End stdout ──────┘
┌──── Begin stderr ────┐
/home/fpoli/.config/Code/User/globalStorage/viper-admin.prusti-assistant/prustiTools/LatestDev/prusti/prusti-driver: error while loading shared libraries: librustc_driver-bcac88c1fda1187d.so: cannot open shared object file: No such file or directory

└──── End stderr ──────┘
Render diagnostics: file:///home/fpoli/src/prusti/snippets/20210601_140653.rs, [object Object]

Check Prusti updates at startup

When starting the extension, it would be useful to check if there are new Prusti binaries to download, in which case the extension should display an "Update now" button.

Note that updating the Prusti binaries happens independently from updating the Prusti-assistant extension. An alternative option is to hardcode the Prusti version in each version of Prusti-assistant, publishing new versions of the extension more often.

Make the PATH configurable

Currently, rustup needs to be in the PATH used by VS Code. This is not flexible enough for some use cases. See the comment here.

For improved flexibility, we could add an optional configuration field specifying the PATH to be used in place of the one available to VS Code. When such field is empty, Prusti Assitant should still use VS Code's PATH as it currently does.
It is necessary to configure the full PATH instead of just rustup's path, because Prusti internally searches for rustup in the PATH that we pass via Prusti Assistant.

Relevant source files:

`Prusti: update verifier` fails when running multiple instances of VSCode

The command Prusti: update verifier in VSCode fails if you have multiple instances of VSCode running with Prusti.
Prusti seems to have prusti-server.exe and prusti-server-driver.exe running once per VSCode instance, but the update command only stops the server started by the current instance.
image

Open VSX Listing: Signing the Publisher Agreement

Thank you for being part of the Open VSX community by adding your extensions to the Open VSX Registry. Please note that the service was recently transferred to the Eclipse Foundation and urgent action on your part is needed so we can continue to list your extensions. To ensure uninterrupted service, please sign the Eclipse Publisher Agreement as soon as possible.

Regrettably, if not soon, your extensions will be delisted and will no longer appear on the site nor be available via the API. If you sign at a later date, your extensions will then be re-activated. The signing process is explained in the Wiki (steps 1 and 2).

Please also note that all extensions MUST have a license in order to be listed.

Claiming ownership of the namespace for your extension(s): We also recommend you do this. To find out how to do this, see:
https://github.com/eclipse/openvsx/wiki/Namespace-Access

Useful links:
Eclipse Publisher Agreement
Eclipse Foundation Open VSX Registry Frequently Asked Questions (FAQ)

More details are in these recent blog posts:
https://blogs.eclipse.org/post/brian-king/open-vsx-registry-under-new-management
https://blogs.eclipse.org/post/brian-king/new-era-open-vsx-registry

Today, there’s growing momentum around open source tools and technologies that support Visual Studio (VS) Code extensions. Leading global organizations are adopting these tools and technologies. This momentum has spurred demand for a marketplace without restrictions and limitations. Thanks for joining us on this journey as we continue to build the Open VSX community.
We look forward to continued innovation from you in 2021!

Show Prusti version

The IDE should clearly show which Prusti version (release tag, at least) is being used.

For example, a "Prusti: show version" command that reports the following message, where v-2022-02-15-1638 and 11350d4... can be links to the appropriate github pages.

Build channel: LatestDev
Prusti release: v-2022-02-15-1638
Prusti commit: 11350d44c86cfa8d25a21fdf64eac82fe9032c37

Additionally, or as an alternative, the message should report the first line in the log of PRUSTI_LOG=info prusti-rustc --crate-type=lib some_empty_file.rs:

Prusti version: commit 11350d4 2022-02-15 14:00:55 UTC, built on 2022-02-16 10:14:05 UTC

Absolute error path reported as relative

Prusti-Assistant doesn't handle absolute error paths correctly. An error on a file reported on an absolute path /a/b/c is rendered as if the path was ./a/b/c.

The bug is probably on the following line. When joining, we should first check if file_name is alredy an absolute path.

primaryFilePath = path.join(rootPath, primaryCallSiteSpans[0].file_name);

I noticed this while reproducing the issue in viperproject/prusti-dev#1493.

Failures of CI

From time to time CI fails with one of the following errors

  • "Prusti might run slower than usual because the Prusti server is not running. Prusti server is unrecorevable. Prusti server stopped working. Please restart the IDE." → Probably there is some data race in the async functions. To reproduce and debug.
  • "HTTPError: Response code 403 (rate limit exceeded)" on MacOS → The Github API has a rate limit. The GITHUB_TOKEN provided in CI should be used to avoid the limit.
  • "Error: Timeout of 600000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/Users/runner/work/prusti-assistant/prusti-assistant/out/test/extension.test.js)", usually on MacOS

Error message when the extension is not ready yet

When a user tries to run a command like prusti-assistant.verify before the extension has been fully initialized, nothing happens and no error message is shown. This is confusing for the user.

We could improve the experience by registering early in activate() a dummy function for all the commands. The dummy function should just show a message that asks the user to wait for the full initialization of the extension.

Show list of commands on hover.

It is now possible to show a list of commands when hovering over a status bar item:
image

It would be nice to use this with Prusti Assistant.

Prusti Assistant broken on MacOS

error description: for any of the VSCode Prusti commands, i get the error

Command 'Prusti: [command]' resulted in an error [...]
(command '[extended command name]' not found)

os info: MacOS BigSur MBPro "13 2018, VSCode 1.52

Publish to open-vsx.org

I use VSCodium which uses the open-vsx.org extension registry.
Currently prusti-assistant is only available in the Visual Studio Marketplace.
I propose additionally publishing the extension to open-vsx.org.
Maybe this guide helps.

Save before verification

The extension does not save a file before running Prusti, so it is possible that the verified program does not correspond to the program shown in the IDE. This causes all the error messages to be misplaced.

One option to fix this is to save the verified program before running Prusti.

Check exit code

The Viper IDE took its spawn function from this repository. In the process, they did some nice changes, among with a check of the exist code of the spawned process: viperproject/viper-ide#357. We should port the same check to this repository.

Relevant code:

export function spawn(
cmd: string,
args?: string[] | undefined,
{ options, onStdout, onStderr }: {
options?: childProcess.SpawnOptionsWithoutStdio;
onStdout?: ((data: string) => void);
onStderr?: ((data: string) => void);
} = {},
destructors?: Set<KillFunction>,
): Promise<Output> {
const description = `${cmd} ${args?.join(" ") ?? ""}`;
log(`Run command '${description}'`);
let stdout = "";
let stderr = "";
const start = process.hrtime();
const proc = childProcess.spawn(cmd, args, options);
const status: { killed: boolean } = { killed: false };
log(`Spawned PID: ${proc.pid}`);
// Register destructor
function killProc() {
if (!status.killed) {
status.killed = true;
// TODO: Try with SIGTERM before.
treeKill(proc.pid, "SIGKILL", (err) => {
if (err) {
log(`Failed to kill process tree of ${proc.pid}: ${err}`);
const succeeded = proc.kill("SIGKILL");
if (!succeeded) {
log(`Failed to kill process ${proc}.`);
}
} else {
log(`Process ${proc.pid} has been killed successfully.`);
}
});
} else {
log(`Process ${proc.pid} has already been killed.`);
}
}
if (destructors) {
destructors.add(killProc);
}
proc.stdout.on("data", (data) => {
stdout += data;
try {
onStdout?.(data);
} catch (e) {
log(`error in stdout handler for '${description}': ${e}`);
}
});
proc.stderr.on("data", (data) => {
stderr += data;
try {
onStderr?.(data);
} catch (e) {
log(`error in stderr handler for '${description}': ${e}`);
}
});
function printOutput(duration: Duration, code: number | null, signal: NodeJS.Signals | null) {
const durationSecMsg = (duration[0] + duration[1] / 1e9).toFixed(1);
log(`Output from '${description}' (${durationSecMsg}s):`);
log("┌──── Begin stdout ────┐");
log(stdout);
log("└──── End stdout ──────┘");
log("┌──── Begin stderr ────┐");
log(stderr);
log("└──── End stderr ──────┘");
log(`Exit code ${code}, signal ${signal}.`);
}
return new Promise((resolve, reject) => {
proc.on("close", (code, signal) => {
const duration = process.hrtime(start);
printOutput(duration, code, signal);
if (destructors) {
destructors.delete(killProc);
}
resolve({ stdout, stderr, code, signal, duration });
});
proc.on("error", (err) => {
const duration = process.hrtime(start);
printOutput(duration, null, null);
log(`Error: ${err}`);
if (destructors) {
destructors.delete(killProc);
}
reject(err);
});
});
}

Migration to GitHub Viper releases broke the PrustiDev channel

The upgrade to the GitHub Viper releases changed the name of a folder in the release zip and thus broke the PrustiDev channel of prusti-assistant. This is the cause of the failing CI tests. To fix it, it should be enough to remove the VIPER_HOME, VIPER_EXE and BOOGIE_EXE environment variables from the code of the IDE, because Prusti (prusti-launch) will automatically discover them.

To implement the fix it should be enough to delete:

Undefined number of warnings in the status bar

When verifying the program

fn main() {}

the number of warnings reported in in the status bar is wrong:

Verification of fail 'program.rs' succeeded with undefined warnings.
                                                 ^^^^^^^^^

Expected message:

Verification of fail 'program.rs' succeeded with 1 warning.

Check Java and Rustup versions on startup

As described in the readme, the extension currently requires Java >=12 Java >=11 and Rustup >=1.23. It would be useful to check these versions at startup, as part of the prerequisite checks, reporting an useful error message in case Java/Rustup is not up to date.

Feel free to ask for more information if you are interested in working on this!

Malformed specification error for pre/post conditions.

I am trying to get Prusti running on VSCode on a Mac. While following this tutorial, the following code segment from it gave an error.

extern crate prusti_contracts;
use prusti_contracts::*;

#[ensures(result >= a && result >= b)]
#[ensures(result == a || result == b)]
fn max(a: i32, b: i32) -> i32 {
    if a > b {
        a
    } else {
        b
    }
}

The error message was as follows.
스크린샷 2021-01-27 오전 4 27 37

I have updated Prusti with the Prust: update dependencies command, but the results were the same. Any possible fix?
Specs:
Hardware: MacBook Air (Retina, 13-inch, 2020), Intel Core i5
OS: Big Sur 11.1
Prusti: 0.5.5
Java: 15.0.1
Rustc: 1.49.0
Rustup: 1.23.1

Confusing "unable to open <crate>: File is a directory" error

If cargo-prusti panics while verifying a crate, this IDE extension reports an error diagnostics that points to a folder. If the user clicks on that diagnostics, the IDE reports an "unable to open : File is a directory" error message, which might be confusing.

image
(Thanks to @HKalbasi for raising this issue!)

This behavior is a trade-off. If Prusti crashes, we want to list a position-less error in the list of verification errors, but VSCode's API doesn't really allow that.

Allow configuring the server

Currently there is no easy way of sending configuration flags to the Prusti server. It would be useful to allow that, to enable for example the DUMP_VIPER_PROGRAM flag that dumps a valid Viper program to disk.

Prusti Assistant cannot find rustup on MacOS

It seems that on MacOS Prusti Assistant complains that it cannot run Rustup. Launching VSCode from a terminal everything works fine, which suggests that in some cases VSCode is launched in a way that doesn't add rustup to the program path.

Somehow, the rust-analyzer and other extensions don't have this issue. It would be useful to find out how they run rustup.

"Update dependencies" command missing.

The current book says to run the Update Dependencies command for the VSCode extension, but it doesn't exist.

There is Update verifier but unfortunately it gives an error:

image

(I'm using Windows in case you couldn't tell.)

Extension version is v0.11.2

Allow configuring verification mode

It might be nice to add two of the settings that are currently env/TOML only.

  • "check overflows" - same effect as PRUSTI_CHECK_OVERFLOWS=true (on by default)
  • "check panics" - same effect as PRUSTI_CHECK_PANICS=true (on by default)

Support for macOS arm64

On macOS arm64:

  • The prerequisite checks don't terminate.
  • Prusti Assistant downloads and tries to use the Prusti artifacts that were compiled for x86.
    • Normally macOS manages to emulate the x86 architecture (at a performance cost), but in the case of Prusti that emulation doesn't work because it doesn't support the dynamic library of the JNI.

See viperproject/prusti-dev#1193

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.