-
Notifications
You must be signed in to change notification settings - Fork 33
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
Support for the check_sat statement in Dolmen frontend #594
Conversation
This doesn't seem to work?
|
You have to use my PR on dolmen also. |
Ah, would have been good to mention. Gbury/dolmen#140 Looking at the code for the |
I applied the modifications :) |
Is this compatible with the last changes to Gbury/dolmen#140? If so, please resolve the conflicts and I will take a look. |
@Halbaroth Can you please resolve the conflicts with the |
a0989fe
to
241a40b
Compare
It's ready :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me with some minor changes, I'd say let's wait on #630 to make them and merge however.
@@ -50,10 +50,6 @@ In other word, `cut` and `check` allow to test if intermediate goals can be prov | |||
<cut_declaration> ::= 'cut' <expr> | |||
``` | |||
|
|||
## `check_valid` | |||
|
|||
This keyword is an alias for `goal`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RIP
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We remove check_valid right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! RIP = Requiescat In Pace, I was semi-humorously paying respect to its short life :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:D very short! I know what RIP means by the way XD
loc; | ||
} | ||
| `Solve _ -> failwith "not yet supported" | ||
| _ -> assert false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this case is needed, OCaml should be able to infer that contents
has type [ `Solve of _ list * _ list ]
(there is no "this match case is unused" because with the match it gets inferred as [> `Solve of _list * _list]
instead, it is a known limitation of polymorphic variants).
contents; | ||
loc; | ||
} | ||
| `Solve _ -> failwith "not yet supported" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| `Solve _ -> failwith "not yet supported" | |
| `Solve _ -> failwith "Only `(check-sat)` with no arguments is supported." |
match contents with | ||
| `Solve ([], []) -> | ||
let contents = | ||
`Solve ([], [DStd.Expr.Term.(of_cst Const._false)]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not a very big fan of passing the general form of `Solve
to D_cnf.make
, and then have D_cnf.make
ignore some of the solves.
I think it would be better to keep `Goal` in `D_cnf.make` (see what I did in #630 ) and have a new constructor (maybe
`Check``?) for the check-sat case.
Rebased and cleaned version of OCamlPro#594.
Rebased and cleaned version of OCamlPro#594.
Rebased and cleaned version of OCamlPro#594.
Rebased and cleaned version of #594.
The model PR add a new statement in the native language that is not present in Dolmen.
Do not merge before the PR Gbury/dolmen#140 is released.