Skip to content

Commit 7d617a3

Browse files
committed
Remove visualize since it has been removed in Kani
1 parent 2e4b108 commit 7d617a3

File tree

8 files changed

+8
-306
lines changed

8 files changed

+8
-306
lines changed

docs/dev-documentation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
### Build from Source
22

3-
The Kani extension is built using NPM and nodejs. Here is the [NPM install guide](https://nodejs.dev/en/learn/how-to-install-nodejs/)
3+
The Kani extension is built using NPM and nodejs. Here is the [NPM install guide](https://nodejs.org/en/download)
44
for steps on installing it on your operating system.
55

66
You will also need to install `make` on your machine using `apt-get install build-essential` or `brew install make`.

docs/user-guide.md

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ This guide provides the various workflows that you can use to verify and debug y
1111
- [Generate a counterexample unit test](#generate-a-counterexample-unit-test)
1212
- [Run Kani-generated unit test](#run-kani-generated-unit-test)
1313
- [Debug a Kani-generated unit test](#debug-kani-generated-unit-test)
14-
- [View trace report](#view-trace-report)
15-
- [Generate trace report](#generate-trace-report)
16-
- [View trace report in window](#view-trace-report-in-window)
1714
- [Kani output logging](#kani-output-logging)
1815
- [View full Kani output](#view-full-kani-output)
1916
- [Coverage information](#coverage-information)
@@ -32,11 +29,9 @@ This is how the VSCode window looks like when you click on the panel:
3229

3330
You can then run your harnesses using the harness tree view by clicking the play button beside the harness that was automatically picked up by the Kani VSCode Extension.
3431
Once you run the harness using the extension, you are shown an error message if the verification fails.
35-
You are then presented with two options:
36-
1. [Generate the report for the harness](#view-trace-report)
37-
2. [Run concrete playback to generate unit tests](#use-concrete-playback-to-debug-a-kani-harness).
32+
You are then presented with the option to
33+
[run concrete playback to generate unit tests](#use-concrete-playback-to-debug-a-kani-harness).
3834

39-
We are going to describe the flows in detail in their respective sections, but explain the concrete playback feature first.
4035

4136
![Image: run harness.gif](../resources/screenshots/run-proof.gif)
4237

@@ -70,22 +65,6 @@ By setting breakpoints and clicking the `Debug Test (Kani)` button, you are take
7065
You can then use the debugger controller to step through, into, out of, replay and also change values on the trace panel on the left for interactive debugging.
7166

7267

73-
### View trace report
74-
75-
#### Generate trace report
76-
77-
By clicking the `Generate report for (your harness)` option in the error banner, you can view the trace for the harness in an HTML report.
78-
79-
![Generate Report](../resources/screenshots/generate-report.png)
80-
81-
#### View trace report in window
82-
83-
You can click on the `Preview in Editor` button to view the HTML trace within VSCode.
84-
It should look like this:
85-
86-
![View Report](../resources/screenshots/view-report.png)
87-
88-
8968
### Kani output logging
9069

9170
#### View full Kani output
-1.28 MB
Binary file not shown.
-1.23 MB
Binary file not shown.

src/extension.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import { callConcretePlayback } from './ui/concrete-playback/concretePlayback';
2121
import { runKaniPlayback } from './ui/concrete-playback/kaniPlayback';
2222
import CoverageConfig from './ui/coverage/config';
2323
import { CoverageRenderer, runCodeCoverageAction } from './ui/coverage/coverageInfo';
24-
import { callViewerReport } from './ui/reportView/callReport';
2524
import { showInformationMessage } from './ui/showMessage';
2625
import { SourceCodeParser } from './ui/sourceCodeParser';
2726
import { startWatchingWorkspace } from './ui/watchWorkspace';
@@ -181,15 +180,7 @@ export async function activate(context: vscode.ExtensionContext): Promise<void>
181180
showInformationMessage('Kani.runcargoKani');
182181
});
183182

184-
// Register the run viewer report command
185-
const runningViewerReport = vscode.commands.registerCommand(
186-
'Kani.runViewerReport',
187-
async (harnessArgs) => {
188-
callViewerReport('Kani.runViewerReport', harnessArgs);
189-
},
190-
);
191-
192-
// Register the run viewer report command
183+
// Register the concrete playback command
193184
const runningConcretePlayback = vscode.commands.registerCommand(
194185
'Kani.runConcretePlayback',
195186
async (harnessArgs) => {
@@ -277,7 +268,6 @@ export async function activate(context: vscode.ExtensionContext): Promise<void>
277268

278269
context.subscriptions.push(runKani);
279270
context.subscriptions.push(runcargoKani);
280-
context.subscriptions.push(runningViewerReport);
281271
context.subscriptions.push(runningConcretePlayback);
282272
context.subscriptions.push(providerDisposable);
283273
context.subscriptions.push(

src/test-tree/createTests.ts

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -443,34 +443,14 @@ class FailedCase extends TestCase {
443443
}
444444

445445
handleFailure(): TestMessage {
446-
const failureMessage: MarkdownString = this.appendLink(this.failed_checks);
447-
const finalFailureMessage: MarkdownString = this.appendConcretePlaybackLink(failureMessage);
446+
const finalFailureMessage: MarkdownString = this.appendConcretePlaybackLink(this.failed_checks);
448447
const messageWithLink = new TestMessage(finalFailureMessage);
449448
return messageWithLink;
450449
}
451450

452451
// Add link and present to the user as the diff message
453-
appendLink(failedChecks: string): MarkdownString {
452+
appendConcretePlaybackLink(failedChecks: string): MarkdownString {
454453
const sample: MarkdownString = this.makeMarkdown(failedChecks);
455-
// vscode.commands.executeCommand('Kani.runViewerReport', this.harness_name);
456-
const args = [
457-
{
458-
harnessName: this.harness_name,
459-
harnessFile: this.file_name,
460-
harnessType: this.proof_boolean,
461-
},
462-
];
463-
const stageCommandUri = Uri.parse(
464-
`command:Kani.runViewerReport?${encodeURIComponent(JSON.stringify(args))}`,
465-
);
466-
sample.appendMarkdown(`[Generate report for ${this.harness_name}](${stageCommandUri})`);
467-
468-
return sample;
469-
}
470-
471-
// Add link and present to the user as the diff message
472-
appendConcretePlaybackLink(sample: MarkdownString): MarkdownString {
473-
sample.appendMarkdown('<br>');
474454
const args = [
475455
{
476456
harnessName: this.harness_name,

src/ui/concrete-playback/concretePlayback.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import GlobalConfig from '../../globalConfig';
1111
import { CommandArgs, getPackageName, getRootDir, splitCommand } from '../../utils';
1212

1313
/**
14-
* Call the visualize flag on the harness and render the html page
14+
* Call the concrete playback feature in Kani.
1515
*
1616
* @param commandURI - vscode command that is being executed
1717
* @param harnessObj - metadata about the harness
@@ -37,7 +37,7 @@ export async function callConcretePlayback(harnessObj: {
3737
finalCommand = `${responseObject}`;
3838
}
3939

40-
// Wait for the the visualize command to finish generating the report
40+
// Wait for the the playback command to finish
4141
executePlaybackCommand(finalCommand);
4242
}
4343

src/ui/reportView/callReport.ts

Lines changed: 0 additions & 247 deletions
This file was deleted.

0 commit comments

Comments
 (0)