-
Notifications
You must be signed in to change notification settings - Fork 10
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
Conversation
@@ -7,7 +7,7 @@ | |||
"type": "git", | |||
"url": "https://github.com/model-checking/kani-vscode-extension" | |||
}, | |||
"version": "0.0.2", | |||
"version": "0.0.4", |
There was a problem hiding this comment.
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') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs a comment.
There was a problem hiding this comment.
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, '']; |
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
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]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
Closing this draft PR. While some refactoring is required in the command running module, this is not the way to go about it. |
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
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.