-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add options to the kore term pretty printer (#3963)
Add the following options when pretty printing terms: * `decode` - decode symbol labels and strip the `Lbl` prefix * `truncate` - truncate long domain values * `infix` - try to re-assemble infix notation from the holes in label syntax (may not always be correct). For example: ``` ... Uncertain about match with rule. Remainder: #range( Eq#VarB1:SortBytes{} , Eq#VarS2:SortInt{} , Eq#VarW2:SortInt{} ) == buf("32", lookup(VarCONTRACT-FAKEETH_STORAGE:SortMap{}, keccak( buf("32", VarCALLER_ID:SortInt{}) +Bytes "\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL" ))), #range( Eq#VarB1:SortBytes{} , Eq#VarS1:SortInt{} , Eq#VarW1:SortInt{} ) == buf("32", lookup(VarCONTRACT-FAKEETH_STORAGE:SortMap{}, keccak( buf("32", VarCONTRACT_ID:SortInt{}) +Bytes buf("32", keccak( buf("32", VarCALLER_ID:SortInt{}) +Bytes "\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\SOH" )) ))) ``` These can now be passed to the server via the `--pretty-print` flag. E.g. `--pretty-print truncated,decode` will preserve current behaviour (and is set as default when no explicit option is provided) --------- Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: rv-jenkins <admin@runtimeverification.com>
- Loading branch information
1 parent
af1fd21
commit baa73d3
Showing
24 changed files
with
1,195 additions
and
901 deletions.
There are no files selected for viewing
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
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
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
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
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
Oops, something went wrong.