-
Notifications
You must be signed in to change notification settings - Fork 153
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
Minimize JSON output by dropping unused attributes #3568
Merged
Merged
Conversation
This file contains 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
9256311
to
bbecbb8
Compare
radumereuta
approved these changes
Aug 10, 2023
5 tasks
Closed
rv-jenkins
pushed a commit
to runtimeverification/pyk
that referenced
this pull request
Feb 28, 2024
While working on some larger KCFG/CTermSymbolic refactors/cleanups (https://github.com/runtimeverification/pyk/issues/918 and https://github.com/runtimeverification/pyk/issues/919), several smaller changes came up, which are in this PR. - When inserting `CTerm` into the KCFG, we used to process it to remove source locations from the term. But since runtimeverification/k#3568, we no longer have attributes on `KInner`. So that processing routine is removed from `Node` insertion, and the routine `remove_source_attributes` is removed from `kast/manip.py` as well as it's not used. - A feature of `KCFG.successors`, `KCFG.predecessors`, and `KCFG.reachable_nodes`, where the user could select which types of edges to traverse, is removed. This feature is not used anywhere, and only had a single test (which is now removed). - It's enforced that subclasses of `KCFG.Successor` must implement the `to_dict` method. - All methods of `CTermSymbolic` have the `module_name: str | None` parameter added to them, and passed through to the RPC server. - Methods `CTermSymbolic.{simplify,assume_defined}` are refactored to amke use of existing `CTermSymbolic.kast_simplify` method. - Several unused methods in `kast/manip.py` are removed, `omit_large_tokens`, `remove_constraint_clauses_for`, and `remove_constraints_for`. --------- Co-authored-by: devops <[email protected]>
Baltoli
pushed a commit
that referenced
this pull request
Apr 9, 2024
While working on some larger KCFG/CTermSymbolic refactors/cleanups (https://github.com/runtimeverification/pyk/issues/918 and https://github.com/runtimeverification/pyk/issues/919), several smaller changes came up, which are in this PR. - When inserting `CTerm` into the KCFG, we used to process it to remove source locations from the term. But since #3568, we no longer have attributes on `KInner`. So that processing routine is removed from `Node` insertion, and the routine `remove_source_attributes` is removed from `kast/manip.py` as well as it's not used. - A feature of `KCFG.successors`, `KCFG.predecessors`, and `KCFG.reachable_nodes`, where the user could select which types of edges to traverse, is removed. This feature is not used anywhere, and only had a single test (which is now removed). - It's enforced that subclasses of `KCFG.Successor` must implement the `to_dict` method. - All methods of `CTermSymbolic` have the `module_name: str | None` parameter added to them, and passed through to the RPC server. - Methods `CTermSymbolic.{simplify,assume_defined}` are refactored to amke use of existing `CTermSymbolic.kast_simplify` method. - Several unused methods in `kast/manip.py` are removed, `omit_large_tokens`, `remove_constraint_clauses_for`, and `remove_constraints_for`. --------- Co-authored-by: devops <[email protected]>
Baltoli
pushed a commit
that referenced
this pull request
Apr 9, 2024
…everification/pyk#926) While working on some larger KCFG/CTermSymbolic refactors/cleanups (https://github.com/runtimeverification/pyk/issues/918 and https://github.com/runtimeverification/pyk/issues/919), several smaller changes came up, which are in this PR. - When inserting `CTerm` into the KCFG, we used to process it to remove source locations from the term. But since #3568, we no longer have attributes on `KInner`. So that processing routine is removed from `Node` insertion, and the routine `remove_source_attributes` is removed from `kast/manip.py` as well as it's not used. - A feature of `KCFG.successors`, `KCFG.predecessors`, and `KCFG.reachable_nodes`, where the user could select which types of edges to traverse, is removed. This feature is not used anywhere, and only had a single test (which is now removed). - It's enforced that subclasses of `KCFG.Successor` must implement the `to_dict` method. - All methods of `CTermSymbolic` have the `module_name: str | None` parameter added to them, and passed through to the RPC server. - Methods `CTermSymbolic.{simplify,assume_defined}` are refactored to amke use of existing `CTermSymbolic.kast_simplify` method. - Several unused methods in `kast/manip.py` are removed, `omit_large_tokens`, `remove_constraint_clauses_for`, and `remove_constraints_for`. --------- Co-authored-by: devops <[email protected]>
Baltoli
pushed a commit
that referenced
this pull request
Apr 9, 2024
…everification/pyk#926) While working on some larger KCFG/CTermSymbolic refactors/cleanups (https://github.com/runtimeverification/pyk/issues/918 and https://github.com/runtimeverification/pyk/issues/919), several smaller changes came up, which are in this PR. - When inserting `CTerm` into the KCFG, we used to process it to remove source locations from the term. But since #3568, we no longer have attributes on `KInner`. So that processing routine is removed from `Node` insertion, and the routine `remove_source_attributes` is removed from `kast/manip.py` as well as it's not used. - A feature of `KCFG.successors`, `KCFG.predecessors`, and `KCFG.reachable_nodes`, where the user could select which types of edges to traverse, is removed. This feature is not used anywhere, and only had a single test (which is now removed). - It's enforced that subclasses of `KCFG.Successor` must implement the `to_dict` method. - All methods of `CTermSymbolic` have the `module_name: str | None` parameter added to them, and passed through to the RPC server. - Methods `CTermSymbolic.{simplify,assume_defined}` are refactored to amke use of existing `CTermSymbolic.kast_simplify` method. - Several unused methods in `kast/manip.py` are removed, `omit_large_tokens`, `remove_constraint_clauses_for`, and `remove_constraints_for`. --------- Co-authored-by: devops <[email protected]>
Baltoli
pushed a commit
that referenced
this pull request
Apr 10, 2024
…everification/pyk#926) While working on some larger KCFG/CTermSymbolic refactors/cleanups (https://github.com/runtimeverification/pyk/issues/918 and https://github.com/runtimeverification/pyk/issues/919), several smaller changes came up, which are in this PR. - When inserting `CTerm` into the KCFG, we used to process it to remove source locations from the term. But since #3568, we no longer have attributes on `KInner`. So that processing routine is removed from `Node` insertion, and the routine `remove_source_attributes` is removed from `kast/manip.py` as well as it's not used. - A feature of `KCFG.successors`, `KCFG.predecessors`, and `KCFG.reachable_nodes`, where the user could select which types of edges to traverse, is removed. This feature is not used anywhere, and only had a single test (which is now removed). - It's enforced that subclasses of `KCFG.Successor` must implement the `to_dict` method. - All methods of `CTermSymbolic` have the `module_name: str | None` parameter added to them, and passed through to the RPC server. - Methods `CTermSymbolic.{simplify,assume_defined}` are refactored to amke use of existing `CTermSymbolic.kast_simplify` method. - Several unused methods in `kast/manip.py` are removed, `omit_large_tokens`, `remove_constraint_clauses_for`, and `remove_constraints_for`. --------- Co-authored-by: devops <[email protected]>
Baltoli
pushed a commit
that referenced
this pull request
Apr 10, 2024
…everification/pyk#926) While working on some larger KCFG/CTermSymbolic refactors/cleanups (https://github.com/runtimeverification/pyk/issues/918 and https://github.com/runtimeverification/pyk/issues/919), several smaller changes came up, which are in this PR. - When inserting `CTerm` into the KCFG, we used to process it to remove source locations from the term. But since #3568, we no longer have attributes on `KInner`. So that processing routine is removed from `Node` insertion, and the routine `remove_source_attributes` is removed from `kast/manip.py` as well as it's not used. - A feature of `KCFG.successors`, `KCFG.predecessors`, and `KCFG.reachable_nodes`, where the user could select which types of edges to traverse, is removed. This feature is not used anywhere, and only had a single test (which is now removed). - It's enforced that subclasses of `KCFG.Successor` must implement the `to_dict` method. - All methods of `CTermSymbolic` have the `module_name: str | None` parameter added to them, and passed through to the RPC server. - Methods `CTermSymbolic.{simplify,assume_defined}` are refactored to amke use of existing `CTermSymbolic.kast_simplify` method. - Several unused methods in `kast/manip.py` are removed, `omit_large_tokens`, `remove_constraint_clauses_for`, and `remove_constraints_for`. --------- Co-authored-by: devops <[email protected]>
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.
Part of: #3540
This PR minimizes the JSON output of definitions dramatically by doing three things:
This should speed up definition loading time for KEVM a bit, it dropped the overall definition size in
compiled.json
from 22MB => 9MB.