Skip to content
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

Serialize the unknown predicate as JSON on DecidePredicateUnknown #3694

Merged
merged 4 commits into from
Nov 16, 2023

Conversation

geo2a
Copy link
Collaborator

@geo2a geo2a commented Nov 15, 2023

This PR changes the JSON RPC handler for DecidePredicateUnknown.

Before we pretty-printed (ugly-printed, let's be honest) the predicate and returned that as the "data" field of the JSON RPC error. Now we conjunct the predicates and side conditions, serialize the conjunction as JSON and return that as "data".

This will solve two sources of paper cuts when using Kontrol:

  • the server won't spam stderr with incomprehensible Kore output when encountering difficult predicates
  • pyk/kontrol can handle server errors with "code": 5, "message":"Smt solver error better, for example by pretty-printing the JSON predicate into surface K or tool-specific representation.

@geo2a geo2a requested review from goodlyrottenapple and jberthold and removed request for goodlyrottenapple November 16, 2023 08:33
@geo2a geo2a merged commit b00503f into master Nov 16, 2023
@geo2a geo2a deleted the geoegy/prettier-unknown branch November 16, 2023 09:22
geo2a added a commit that referenced this pull request Nov 16, 2023
#3695)

Follow-up for #3694.

Knowing which rule caused `DecidePredicateUnknown` is useful, but seeing
the Kore of the predicate in the logs is not, since we now have it in
the response anyway.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants