-
Notifications
You must be signed in to change notification settings - Fork 143
Add --export-json for structured verification results
#4472
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
Open
yimingyinqwqq
wants to merge
73
commits into
model-checking:main
Choose a base branch
from
yimingyinqwqq:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 68 commits
Commits
Show all changes
73 commits
Select commit
Hold shift + click to select a range
3c8324d
add new json struture
ConnorJKY 87efbe2
add detailed info for harnesses in json handler
ConnorJKY 4c21c65
feat: finish phase2 prototype on harness_runner
yimingyinqwqq 2351326
feat: add harness that fail fast to json handler and refactor logic t…
yimingyinqwqq e7fa713
Phase 3: Summary and Timing
jingfei-xu edc5550
Error Details + Property Details
jingfei-xu 7b08e18
Move harness info to match the result; add version number and timeline
ConnorJKY 5346c86
Merge remote-tracking branch 'origin/feat/json-handler' into feat/jso…
ConnorJKY cacdb7b
Move harness info to match the result; add version number and timeline
ConnorJKY f6d23e6
Error Details and Property Analysis
jingfei-xu f89bb7f
refactor existing json handler code to frontend folder
yimingyinqwqq c628621
Restore util.rs and refactor schema logic into frontend/schema_utils.rs
yimingyinqwqq 3822a14
Extend frontend util function for project and export run metadata; Re…
ConnorJKY 0591837
finish json schma implementation of verification_results
yimingyinqwqq 961591c
Update metadata of target, contract in schema
ConnorJKY 74bb569
Merge remote-tracking branch 'origin/feat/json-handler' into feat/jso…
ConnorJKY d432b8d
chore: Remove build artifacts from first-steps-v1/target
yimingyinqwqq 6f3e506
Merge branch 'feat/json-handler' of https://github.com/yimingyinqwqq/…
yimingyinqwqq 068e721
chore: Remove print lines and extract functions in kani-driver harnes…
yimingyinqwqq 6747d35
chore: Remove unnecessary time information in main
yimingyinqwqq a2e7757
chore: Update s2n-quic submodule to match main branch
yimingyinqwqq 29f8c18
Update schema_utils.rs - Structure for any tool's output
ShrivyasShrivyas b0b12cb
All CBMC changes
ShrivyasShrivyas 162ea19
removed unnecessary methods
ShrivyasShrivyas 94199fc
chore: format the code
yimingyinqwqq 13db7d9
fix: revert version back to 0.65.0
yimingyinqwqq 9a1deb3
chore: add example text for better commenting
yimingyinqwqq b169a7a
chore: remove s2n-quic submodule
yimingyinqwqq f5913e6
Revert "chore: Update s2n-quic submodule to match main branch"
yimingyinqwqq f9df1e4
chore: Update s2n-quic submodule to match main
yimingyinqwqq b560dc9
Roll back s2n-quic submodule to commit 26e2402
yimingyinqwqq 947664b
Updated cbmc with original code and removed comments
ShrivyasShrivyas bb4a2a2
test: update regression test to support json handler
yimingyinqwqq 9715a9c
fix: incoporate optional field in json schema when json not fail
yimingyinqwqq 0cfaa00
chore: add json-handler rfc documentation
yimingyinqwqq d18aef7
Unit Tests for schema_utils
ShrivyasShrivyas 83437d1
Merge branch 'feat/json-handler' of https://github.com/yimingyinqwqq/…
ShrivyasShrivyas e2d609a
chore: format unit tests
yimingyinqwqq ed8f985
Merge branch 'main' into feat/json-handler
yimingyinqwqq e077296
fix: fix unclose parenthesis
yimingyinqwqq 99faa80
fix: resolve cbmc conflicts and remove unused import in main
yimingyinqwqq dc00668
chore: remove old json files
yimingyinqwqq ab5500d
Merge pull request #2 from yimingyinqwqq/feat/json-handler
yimingyinqwqq c035d82
Merge branch 'model-checking:main' into main
yimingyinqwqq ffd5565
Merge branch 'model-checking:main' into main
yimingyinqwqq f49b382
Merge branch 'model-checking:main' into main
yimingyinqwqq 4537df2
fix: format frontend code and fix json file not found error
yimingyinqwqq 0bfae8b
Merge pull request #5 from yimingyinqwqq/feat/json-handler
yimingyinqwqq 664a644
fix: update cbmc for minimal changes, delete redundant changes
yimingyinqwqq e9dc6cf
fix: revert to previous commit
yimingyinqwqq 0879d35
Merge pull request #6 from yimingyinqwqq/feat/json-handler
yimingyinqwqq 4943397
Merge branch 'model-checking:main' into main
yimingyinqwqq d6ed20c
Add Kani MCP Server for Amazon Q integration
jingfei-xu 9e9d46a
Add Kani MCP server and Amazon Q complete implementation
jingfei-xu f7f2575
Amazon Q CLI Integration
jingfei-xu d00d94e
Amazon Q latest integration (Amazon Q CLI)
jingfei-xu fe39541
Code Format Cleanup
jingfei-xu 71bff51
Comments fixed
jingfei-xu fb10f35
Comments fixed: delete irrelevant files
ConnorJKY c0e58c8
Merge pull request #7 from yimingyinqwqq/mcp
ConnorJKY dca6c70
chore: update kani format on cbmc
yimingyinqwqq 30382bb
Revert "Update: MCP Integration with Amazon Q CLI"
ConnorJKY 7bd13c2
Merge pull request #8 from yimingyinqwqq/revert-7-mcp
ConnorJKY be0777a
Merge branch 'model-checking:main' into main
yimingyinqwqq 678cabd
chore: add copyright to frontend module
yimingyinqwqq dc0a507
Merge pull request #9 from yimingyinqwqq/feat/json-handler
yimingyinqwqq f8f1a46
ci: fix copyright and clippy check
yimingyinqwqq 064fbd6
Merge pull request #10 from yimingyinqwqq/feat/json-handler
yimingyinqwqq 8b6609c
Update rfc/src/rfcs/0015-json-handler.md
yimingyinqwqq 4dfd0d0
Update kani-driver/src/args/mod.rs
yimingyinqwqq a3dd5e0
doc: enhance ui and error documentation
yimingyinqwqq 7a554ce
Merge branch 'model-checking:main' into main
yimingyinqwqq 4e8a986
Merge branch 'main' into main
feliperodri File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| // Copyright Kani Contributors | ||
| // SPDX-License-Identifier: Apache-2.0 OR MIT | ||
|
|
||
| use serde_json::{Value, json}; | ||
| use std::path::PathBuf; | ||
|
|
||
| /// A handler for building and exporting JSON data structures. | ||
| /// | ||
| /// `JsonHandler` provides a convenient interface for constructing JSON objects, | ||
| /// adding key-value pairs, appending to arrays, and exporting the final result | ||
| /// to a file. | ||
| pub struct JsonHandler { | ||
| /// The JSON data being constructed. | ||
| pub(crate) data: Value, | ||
| /// Optional path where the JSON data will be exported. | ||
| export_path: Option<PathBuf>, | ||
| } | ||
|
|
||
| impl JsonHandler { | ||
| /// Creates a new `JsonHandler` with an optional export path. | ||
| /// If `export_path` is `None`, calls to `export()` will be no-ops. | ||
| pub fn new(export_path: Option<PathBuf>) -> Self { | ||
| Self { data: json!({}), export_path } | ||
| } | ||
|
|
||
| /// Adds or updates a key-value pair in the JSON object. | ||
| /// If the key already exists, its value will be overwritten. | ||
| pub fn add_item(&mut self, key: &str, value: Value) { | ||
| self.data[key] = value; | ||
| } | ||
|
|
||
| /// Appends a value to the array at the specified key. | ||
| /// Creates a new array if the key doesn't exist or is null. | ||
| /// Panics if the key exists but is not an array or null. | ||
| pub fn add_harness_detail(&mut self, key: &str, value: Value) { | ||
| if self.data[key].is_null() { | ||
| self.data[key] = json!([]); | ||
| } | ||
| self.data[key].as_array_mut().unwrap().push(value); | ||
| } | ||
|
|
||
| /// Exports the JSON data to the configured file path with pretty-printing. | ||
| /// Returns an error if the file cannot be written. | ||
| pub fn export(&self) -> Result<(), std::io::Error> { | ||
| if let Some(path) = &self.export_path { | ||
| std::fs::write(path, serde_json::to_string_pretty(&self.data)?) | ||
| } else { | ||
| Ok(()) | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| // Copyright Kani Contributors | ||
| // SPDX-License-Identifier: Apache-2.0 OR MIT | ||
|
|
||
| //! Frontend module for handling different output formats and JSON generation | ||
| //! This module separates the JSON handling logic from the main verification logic | ||
|
|
||
| pub mod json_handler; | ||
| pub mod schema_utils; | ||
|
|
||
| pub use json_handler::JsonHandler; | ||
| pub use schema_utils::*; | ||
|
|
||
| #[cfg(test)] | ||
| mod tests; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.