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

feat: get-assignment statement #848

Merged
merged 15 commits into from
Nov 9, 2023
Prev Previous commit
Next Next commit
Placeholder for get_assignments
Stevendeo committed Oct 31, 2023

Verified

This commit was signed with the committer’s verified signature. The key has expired.
tdmorello Tim Morello
commit a6221a48366c5d557f15244b9e8cf06ea6ac7079
26 changes: 21 additions & 5 deletions src/bin/common/solving_loop.ml
Original file line number Diff line number Diff line change
@@ -537,11 +537,13 @@ let main () =
st
)
| ":produce-assignments", Symbol { name = Simple b; _ } ->
begin
match bool_of_string_opt b with
| None -> print_wrn_opt ~name:":verbosity" st_loc "integer" value
| Some b -> Options.set_produce_assignments b
end
let () =
match bool_of_string_opt b with
| None ->
print_wrn_opt ~name:":verbosity" st_loc "integer" value
| Some b ->
Options.set_produce_assignments b
in st
| (":global-declarations"
| ":interactive-mode"
| ":produce-assertions"
@@ -655,6 +657,10 @@ let main () =
unsupported_opt name
in

let handle_get_assignment _ =
failwith "TODO: handle_get_assignment"
in

let handle_stmt :
Frontend.used_context -> State.t ->
_ D_loop.Typer_Pipe.stmt -> State.t =
@@ -783,6 +789,16 @@ let main () =
handle_get_info st kind;
st

| {contents = `Get_assignment; _} ->
if Options.get_produce_assignments () then
handle_get_assignment ()
else
begin
Printer.print_smtlib_err
"Produce assignments disabled; add (set-option :produce-assignment)";
st
end

| {contents = `Other (custom, args); _} ->
handle_custom_statement custom args st