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

Removes redundant re-running of kani process #60

Closed
wants to merge 2 commits into from

Conversation

jaisnan
Copy link
Contributor

@jaisnan jaisnan commented May 10, 2023

Description of changes:

The extension's process for running Kani runs Kani twice (for cases where there's a failure). Once for getting the overall verification result, and then for getting the output of Kani. Now, the process does not re-run for failed cases and simply returns the output and the result at the same time.

Resolved issues:

Resolves #43

Checklist

  • Each commit message has a non-empty body, explaining why the change was made
  • Methods or procedures are documented
  • Regression or unit tests are included, or existing tests cover the modified code
  • My PR is restricted to a single feature or bugfix

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.

@@ -7,7 +7,7 @@
"type": "git",
"url": "https://github.com/model-checking/kani-vscode-extension"
},
"version": "0.0.2",
"version": "0.0.4",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't go here.

@@ -21,7 +21,18 @@ export async function runKaniHarnessInterface(harnessName: string, args?: number
harnessCommand = `${KaniConstants.CargoKaniExecutableName} ${KaniArguments.harnessFlag} ${harnessName} ${KaniArguments.unwindFlag} ${args}`;
}
const kaniOutput = await catchOutput(harnessCommand);
return kaniOutput;
if (typeof kaniOutput == 'number') {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs a comment.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can be refactored into another function.

) {
return kaniOutput;
} else {
return [5, ''];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

???

@@ -212,20 +212,25 @@ export class TestCase {
async run(item: vscode.TestItem, options: vscode.TestRun): Promise<void> {
const start: number = Date.now();
if (this.proof_boolean) {
const actual: number = await this.evaluate(
const actualResult: any = await this.evaluate(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a verification result? What does actual mean here?

this.file_name,
this.harness_name,
this.harness_unwind_value,
);

const actual = actualResult[0];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

@jaisnan
Copy link
Contributor Author

jaisnan commented Nov 30, 2023

Closing this draft PR. While some refactoring is required in the command running module, this is not the way to go about it.

@jaisnan jaisnan closed this Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Running proofs using the vscode extension is slow
2 participants