Skip to content

Add pyk implication tests to the rpc integration test suite #3997

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

Merged
merged 8 commits into from
Jul 30, 2024

Conversation

goodlyrottenapple
Copy link
Contributor

This is the first step in bringing the booster implication endpoint in line with kore. Most of the .booster-dev responses will eventually be the same/equivalent to the kore responses.

@goodlyrottenapple goodlyrottenapple marked this pull request as ready for review July 26, 2024 15:09
Copy link
Member

@jberthold jberthold left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pre-approving. We should add some more human-readable information.

@@ -0,0 +1,2685 @@
[topCellInitializer{}(LblinitGeneratedTopCell{}()), org'Stop'kframework'Stop'attributes'Stop'Source{}("Source(/private/tmp/pytest-of-sam/pytest-8/popen-gw1/kompiled0/k-files/definition-1.k)")]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should check in the original K file for this.
Ditto for implies2.{k,kore}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are generated via pyk, so not sure how to go about extracting a K definition

@@ -0,0 +1 @@
{"jsonrpc": "2.0", "id": "4428382960-001", "method": "implies", "params": {"antecedent": {"format": "KORE", "version": 1, "term": {"tag": "And", "sort": {"tag": "SortApp", "name": "SortGeneratedTopCell", "args": []}, "patterns": [{"tag": "App", "name": "Lbl'-LT-'generatedTop'-GT-'", "sorts": [], "args": [{"tag": "App", "name": "Lbl'-LT-'T'-GT-'", "sorts": [], "args": [{"tag": "App", "name": "Lbl'-LT-'k'-GT-'", "sorts": [], "args": [{"tag": "App", "name": "kseq", "sorts": [], "args": [{"tag": "App", "name": "inj", "sorts": [{"tag": "SortApp", "name": "SortPgm", "args": []}, {"tag": "SortApp", "name": "SortKItem", "args": []}], "args": [{"tag": "App", "name": "Lblint'UndsSClnUnds'", "sorts": [], "args": [{"tag": "App", "name": "Lbl'UndsCommUnds'", "sorts": [], "args": [{"tag": "DV", "sort": {"tag": "SortApp", "name": "SortId", "args": []}, "value": "$n"}, {"tag": "App", "name": "Lbl'UndsCommUnds'", "sorts": [], "args": [{"tag": "DV", "sort": {"tag": "SortApp", "name": "SortId", "args": []}, "value": "$s"}, {"tag": "App", "name": "Lbl'Stop'List'LBraQuotUndsCommUndsQuotRBra'", "sorts": [], "args": []}]}]}, {"tag": "App", "name": "Lbl'UndsEqlsUndsSCln'", "sorts": [], "args": [{"tag": "DV", "sort": {"tag": "SortApp", "name": "SortId", "args": []}, "value": "$n"}, {"tag": "App", "name": "inj", "sorts": [{"tag": "SortApp", "name": "SortInt", "args": []}, {"tag": "SortApp", "name": "SortAExp", "args": []}], "args": [{"tag": "EVar", "name": "VarX", "sort": {"tag": "SortApp", "name": "SortInt", "args": []}}]}]}]}]}, {"tag": "App", "name": "dotk", "sorts": [], "args": []}]}]}, {"tag": "App", "name": "Lbl'-LT-'state'-GT-'", "sorts": [], "args": [{"tag": "App", "name": "Lbl'Stop'Map", "sorts": [], "args": []}]}]}, {"tag": "EVar", "name": "VarGENERATED'Unds'COUNTER'Unds'CELL", "sort": {"tag": "SortApp", "name": "SortGeneratedCounterCell", "args": []}}]}, {"tag": "And", "sort": {"tag": "SortApp", "name": "SortGeneratedTopCell", "args": []}, "patterns": [{"tag": "Equals", "argSort": {"tag": "SortApp", "name": "SortBool", "args": []}, "sort": {"tag": "SortApp", "name": "SortGeneratedTopCell", "args": []}, "first": {"tag": "DV", "sort": {"tag": "SortApp", "name": "SortBool", "args": []}, "value": "true"}, "second": {"tag": "App", "name": "Lbl'Unds-LT-'Int'Unds'", "sorts": [], "args": [{"tag": "DV", "sort": {"tag": "SortApp", "name": "SortInt", "args": []}, "value": "3"}, {"tag": "EVar", "name": "VarX", "sort": {"tag": "SortApp", "name": "SortInt", "args": []}}]}}, {"tag": "Equals", "argSort": {"tag": "SortApp", "name": "SortBool", "args": []}, "sort": {"tag": "SortApp", "name": "SortGeneratedTopCell", "args": []}, "first": {"tag": "DV", "sort": {"tag": "SortApp", "name": "SortBool", "args": []}, "value": "true"}, "second": {"tag": "App", "name": "Lbl'Unds-LT-'Int'Unds'", "sorts": [], "args": [{"tag": "EVar", "name": "VarX", "sort": {"tag": "SortApp", "name": "SortInt", "args": []}}, {"tag": "DV", "sort": {"tag": "SortApp", "name": "SortInt", "args": []}, "value": "3"}]}}]}]}}, "consequent": {"format": "KORE", "version": 1, "term": {"tag": "Exists", "sort": {"tag": "SortApp", "name": "SortGeneratedTopCell", "args": []}, "var": "VarY", "varSort": {"tag": "SortApp", "name": "SortAExp", "args": []}, "arg": {"tag": "App", "name": "Lbl'-LT-'generatedTop'-GT-'", "sorts": [], "args": [{"tag": "App", "name": "Lbl'-LT-'T'-GT-'", "sorts": [], "args": [{"tag": "App", "name": "Lbl'-LT-'k'-GT-'", "sorts": [], "args": [{"tag": "App", "name": "kseq", "sorts": [], "args": [{"tag": "App", "name": "inj", "sorts": [{"tag": "SortApp", "name": "SortPgm", "args": []}, {"tag": "SortApp", "name": "SortKItem", "args": []}], "args": [{"tag": "App", "name": "Lblint'UndsSClnUnds'", "sorts": [], "args": [{"tag": "App", "name": "Lbl'UndsCommUnds'", "sorts": [], "args": [{"tag": "DV", "sort": {"tag": "SortApp", "name": "SortId", "args": []}, "value": "$n"}, {"tag": "App", "name": "Lbl'UndsCommUnds'", "sorts": [], "args": [{"tag": "DV", "sort": {"tag": "SortApp", "name": "SortId", "args": []}, "value": "$s"}, {"tag": "App", "name": "Lbl'Stop'List'LBraQuotUndsCommUndsQuotRBra'", "sorts": [], "args": []}]}]}, {"tag": "App", "name": "Lbl'UndsEqlsUndsSCln'", "sorts": [], "args": [{"tag": "DV", "sort": {"tag": "SortApp", "name": "SortId", "args": []}, "value": "$n"}, {"tag": "EVar", "name": "VarY", "sort": {"tag": "SortApp", "name": "SortAExp", "args": []}}]}]}]}, {"tag": "App", "name": "dotk", "sorts": [], "args": []}]}]}, {"tag": "App", "name": "Lbl'-LT-'state'-GT-'", "sorts": [], "args": [{"tag": "App", "name": "Lbl'Stop'Map", "sorts": [], "args": []}]}]}, {"tag": "EVar", "name": "VarGENERATED'Unds'COUNTER'Unds'CELL", "sort": {"tag": "SortApp", "name": "SortGeneratedCounterCell", "args": []}}]}}}}}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is quite hard to read, maybe we should check in pretty-printed json?
Or, better, add a README.md file to the directory that contains a short description of what the data is?
For instance, this one here is not an obvious Bottom in the antecedent, what makes it Bottom is X =Int 3 and X <Int 3 in the constraints.

@rv-jenkins rv-jenkins merged commit e5a921f into master Jul 30, 2024
6 checks passed
@rv-jenkins rv-jenkins deleted the sam/implication-rpc-tests branch July 30, 2024 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants