Incremental#23
Open
Jabe03 wants to merge 19 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the Kind2 Java API to consume Kind 2’s incremental JSON stream (-ijson) and expose incremental result updates via a listener callback, enabling downstream consumers (e.g., the LSP) to react as each JSON object arrives.
Changes:
- Switch Kind 2 invocation to
-ijsonand parse output incrementally withJsonStreamParser, optionally notifying aResultListener. - Extend
Resultwith incremental parsing (initializeInc) plus a finalization step (closeInitialization) instead of parsing the entire JSON array at once. - Add a new
ResultListenerinterface for incremental update callbacks.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 12 comments.
| File | Description |
|---|---|
| src/main/java/edu/uiowa/cs/clc/kind2/results/Result.java | Stores JSON as a JsonArray and adds incremental parsing/finalization paths. |
| src/main/java/edu/uiowa/cs/clc/kind2/api/ResultListener.java | Introduces a callback interface for incremental result updates. |
| src/main/java/edu/uiowa/cs/clc/kind2/api/Kind2Api.java | Switches to -ijson, incrementally parses JSON output, and wires in listener notifications. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+302
to
+305
| if (/*init condition */ this.json == null){ | ||
| this.json = new JsonArray(); | ||
| } | ||
| this.json.add(jsonElement); |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Update Java API to use the new
-ijsonoption of the Kind 2 executable and process each new object as it is printed by Kind 2.Added the ResultListener class which fires each time the API recieves a new Kind 2 object. This is used to pass the information to the LSP incrementally.
This change requires the changes in the LSP and Kind 2 OCaml PRs.