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

New features and improvements #216

Draft
wants to merge 83 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 60 commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
8c56c94
small changes
cedihegi Oct 23, 2022
9fa5ae6
small fix
cedihegi Oct 23, 2022
6141e56
invoking prusti correctly now
cedihegi Oct 23, 2022
ef1402b
just slight adjustements according to changes in prusti-dev
cedihegi Nov 8, 2022
4ebe83c
parsing IDE Info and passing the flag, for some reason just passing a…
cedihegi Nov 11, 2022
51adf3d
working codelenses and codeactions
cedihegi Nov 21, 2022
d0615eb
not sure what I changed, rebase this at some point :)
cedihegi Dec 4, 2022
cfc86b5
Fixing problems such as IdeInfo only saving information for one file …
cedihegi Dec 5, 2022
3984ed3
IDE info is now persistent across files, i.e. when
cedihegi Dec 7, 2022
9dc4347
starting to refactor
cedihegi Dec 10, 2022
0d69e03
adjusted what happens on save, on open, etc, better behavior when col…
cedihegi Dec 19, 2022
9dc3a83
initial quantifier inlays working
Jan 3, 2023
9b3125d
various changes, now able to query signatures for extern specifications
cedihegi Jan 5, 2023
d86e81c
adjusted ide-info
cedihegi Jan 9, 2023
5e7011f
Add hovering and splitting by function that caused the quantifier ins…
Jan 31, 2023
eca362e
refactoring, error handling, and some fixes
cedihegi Feb 5, 2023
4dda223
new snippets
cedihegi Feb 5, 2023
dde8a60
Displaying checkmarks next to methods.
cedihegi Feb 8, 2023
f7fe789
Merge remote-tracking branch 'cedric/proto' into quant
Feb 8, 2023
5f2aa6a
WIP: refactored large portions and parse verification info, some bug …
cedihegi Feb 11, 2023
805c450
failed and successful verifications are now displayed correctly
cedihegi Feb 11, 2023
707bd46
Displaying verification time and whether results were cached now work…
cedihegi Feb 12, 2023
e71bd1a
Avoid parsing all messages 3 times :)
cedihegi Feb 12, 2023
e9b63d9
Add compilation and verification error differentiation. Do not show a…
Feb 12, 2023
3f707d6
Merge remote-tracking branch 'cedric/proto' into quant
Feb 12, 2023
75fac62
Some formatting + documenting
cedihegi Feb 13, 2023
df461c8
Reworked underlying data structure for many features, now they all se…
cedihegi Feb 13, 2023
ca999e0
Cleaned up some unnecessary logs
cedihegi Feb 13, 2023
3d37f65
Merge remote-tracking branch 'joseph/quant' into proto
cedihegi Feb 15, 2023
b85e0c7
fixed minor bug
cedihegi Feb 15, 2023
104e6e5
Filtering fake errors out again
cedihegi Feb 15, 2023
08a1b09
Show QuantifierChosenTriggersMessage. Needs refactoring.
Feb 15, 2023
2a85c05
Merge remote-tracking branch 'cedric/proto' into quant
Feb 15, 2023
aafe787
Now reading EncodingInfo from prusti-dev so peek feature can be used …
cedihegi Feb 16, 2023
8963526
The gotoDefinition to view contracts feature is now optional
cedihegi Feb 16, 2023
08b5530
WIP: refactor everything, not much done yet
Feb 16, 2023
3240872
WIP: Refactoring, async reporting of results. Compiles but not at all…
Feb 19, 2023
5eabb63
minor corrections
cedihegi Feb 20, 2023
a907de4
WIP
Feb 21, 2023
5864411
resolved merge conflicts
cedihegi Feb 21, 2023
3ee0009
Rename compile script
Feb 21, 2023
b22e313
Merge Cedric's merge!
Feb 21, 2023
cdde172
Change the way the output is handled.
Feb 21, 2023
eda6186
Make viper message showing configurable.
Feb 21, 2023
c397082
Repaired Codelenses
cedihegi Feb 21, 2023
7c28971
Merge remote-tracking branch 'joseph/quant' into proto
cedihegi Feb 21, 2023
5edac67
Gutter icons working and goto definition will show contract again
cedihegi Feb 21, 2023
959110b
VerificationResults are re-rendered when changing tabs + small adjust…
cedihegi Feb 21, 2023
ddee515
Changed casing. Untested, because my setup is not working
Feb 22, 2023
414ba6e
Fixed path-problems for crates, so they are working again for
cedihegi Feb 22, 2023
bd6d3e5
Switch to camelCase everywhere. Refactor message stuff (is it better …
Feb 22, 2023
4b77270
Remove trailing whitespaces.
Feb 22, 2023
abbb155
WIP: Make quantifiers work for crates.
Feb 24, 2023
1e0123a
Make subprocess output separate, invalidate QI/QCT
Feb 26, 2023
2882480
Document methods, rename file, and improve behavior when opening files
cedihegi Feb 26, 2023
ee5e6ac
Merge remote-tracking branch 'cedric/proto' into quant
Feb 27, 2023
8739c07
Check version before passing new flags and refactor / document / improve
cedihegi Feb 28, 2023
d53fbe4
Provide way to clear files affected by compilation
Mar 1, 2023
0258d4f
Merge remote-tracking branch 'upstream/master'
cedihegi Mar 1, 2023
f04c3bd
Resolve warnings and better naming
cedihegi Mar 1, 2023
74fe0d9
Remove most linter warnings
cedihegi Mar 1, 2023
8b9365b
Remove linter errors and warnings, except for some unused variable wa…
cedihegi Mar 1, 2023
8de5d2c
Merge remote-tracking branch 'upstream/master'
cedihegi Mar 2, 2023
ac9c2a6
Change linter rules to allow unused arguments if starting with unders…
cedihegi Mar 2, 2023
e832a22
Handle SkipVerification argument for older prusti versions
cedihegi Mar 4, 2023
9cbc2ae
Bump version number to 0.12.0
Mar 4, 2023
07e263d
Add better synchronization
Mar 4, 2023
86b7f21
Fix linter error
Mar 4, 2023
367cb0d
Fix synchronization, explicitly add 2 env vars
Mar 5, 2023
56350e0
Adjust environment variable to change in prusti-dev and small fix
cedihegi Mar 5, 2023
8ec2df6
Add more logging messages to find reason for failing CI
cedihegi Mar 5, 2023
55fd637
Debug CI by adding a timer between opening and verifying
cedihegi Mar 5, 2023
9bb29f4
Take out timeout for further debugging
cedihegi Mar 5, 2023
5d338da
Display a better decoration message when verification fails
cedihegi Mar 6, 2023
265afbf
Change text for codeLens of selective verification
cedihegi Mar 6, 2023
7fae6eb
Add the newly needed env flags to the server
Mar 6, 2023
8e664a7
Another attempt to resolve the timing problems with OnOpen
cedihegi Mar 6, 2023
9ff32e7
Merge branch 'master' of github.com:cedihegi/prusti-assistant
cedihegi Mar 6, 2023
aea6a5f
Fix linter errors and uninstall / remove unused library 'mutex'
cedihegi Mar 6, 2023
bcbb897
New pledges and add new configuration options to README
cedihegi Mar 6, 2023
2daf308
Improve quantifier markdown strings
Mar 7, 2023
80ab5d7
Adjust the quantifier reporting frequency
Mar 7, 2023
4992db2
Make the Z3 smt.qi.profile_freq configurable
Mar 8, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32,706 changes: 16,279 additions & 16,427 deletions package-lock.json

Large diffs are not rendered by default.

452 changes: 243 additions & 209 deletions package.json

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions recompile.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

npm run compile

code --extensionDevelopmentPath=/home/juppi/prgs/prusti-assistant /home/juppi/docs/ETH/HS22/PrustiAssistant/examples/ --disable-extensions
cedihegi marked this conversation as resolved.
Show resolved Hide resolved

1 change: 1 addition & 0 deletions resources/icons/check-circle-fat.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions resources/icons/check-circle.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions resources/icons/check-square-fat.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions resources/icons/check-square.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions resources/icons/help-circle-fat.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions resources/icons/help-circle.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions resources/icons/loader-fat.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions resources/icons/loader.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions resources/icons/x-circle-fat.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions resources/icons/x-circle.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions resources/icons/x-square-fat.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions resources/icons/x-square.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions snippets/specs.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,26 @@
"body_invariant!(${1:true});"
],
"description": "Insert body_invariant!(...);"
},
"pure": {
"prefix": "pure",
"body": [
"#[pure]"
],
"description": "Insert #[pure]"
},
"trusted": {
"prefix": "trusted",
"body": [
"#[trusted]"
],
"description": "Insert #[trusted]"
},
"externSpec": {
"prefix": "extern_spec",
"body": [
"#[extern_spec($1)]"
],
"description": "Insert #[extern_spec(...)]"
}
}
8 changes: 8 additions & 0 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,11 @@ export function extraCargoPrustiArgs(): string[] {
export function extraPrustiServerArgs(): string[] {
return config().get("extraPrustiServerArgs", []);
}

export function contractsAsDefinitions(): boolean {
return config().get("contractsAsDefinitions", false);
}

export function reportViperMessages(): boolean {
return config().get("reportViperMessages", true);
}
16 changes: 12 additions & 4 deletions src/dependencies/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { PrustiLocation } from "./PrustiLocation";
import { prustiTools } from "./prustiTools";

export let prusti: PrustiLocation | undefined;
export let prustiSemanticVersion: string = "0.0.0";
export async function installDependencies(context: vscode.ExtensionContext, shouldUpdate: boolean, verificationStatus: vscode.StatusBarItem): Promise<void> {
try {
util.log(`${shouldUpdate ? "Updating" : "Installing"} Prusti dependencies...`);
Expand Down Expand Up @@ -49,12 +50,10 @@ export async function installDependencies(context: vscode.ExtensionContext, shou
prusti.rustToolchainFile(),
);
} catch (err) {
util.userError(
`Error installing Prusti. Please restart the IDE to retry. Details: ${err}`,
true, verificationStatus
);
util.userError(`Error installing Prusti: ${err}`, true, verificationStatus);
throw err;
} finally {
await updatePrustiSemVersion();
await server.restart(context, verificationStatus);
}
}
Expand All @@ -72,3 +71,12 @@ export async function prustiVersion(): Promise<string> {
}
return version;
}

export async function updatePrustiSemVersion() {
let version = await prustiVersion();
// version will have the form Prusti version: 0.x.x, commit 234..hash..
let result = version.split(" ")[2].slice(0, -1);
util.log("Setting prustiVersion to " + result);
prustiSemanticVersion = result;
}

Loading