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

Add proper support for :named smtlib annotations #199

Merged
merged 5 commits into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions doc/tuto.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ let test file =
(* We can loop over the parsed statements to generated the typed statements *)
let final_state, rev_typed_stmts =
List.fold_left (fun (state, acc) parsed_stmt ->
let state, typed_stmt = Typer.check state parsed_stmt in
(state, typed_stmt :: acc)
let state, typed_stmts = Typer.check state parsed_stmt in
(state, List.rev_append typed_stmts acc)
Gbury marked this conversation as resolved.
Show resolved Hide resolved
) (state, []) parsed_statements
in
let typed_stmts = List.rev rev_typed_stmts in
Expand Down
4 changes: 2 additions & 2 deletions doc/type.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ let state =
let () =
let final_state, rev_typed_stmts =
List.fold_left (fun (state, acc) parsed_stmt ->
let state, typed_stmt = Typer.check state parsed_stmt in
(state, typed_stmt :: acc)
let state, typed_stmts = Typer.check state parsed_stmt in
(state, List.rev_append typed_stmts acc)
) (state, []) parsed
in
let typed_stmts = List.rev rev_typed_stmts in
Expand Down
15 changes: 9 additions & 6 deletions src/bin/main.ml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,15 @@ let debug_parsed_pipe st c =
Dolmen.Std.Statement.print c;
st, c

let debug_typed_pipe st stmt =
if Loop.State.get Loop.State.debug st then
Format.eprintf "[logic][typed][%a] @[<hov>%a@]@\n@."
Dolmen.Std.Loc.print_compact stmt.Loop.Typer_Pipe.loc
Loop.Typer_Pipe.print stmt;
st, stmt
let debug_typed_pipe st stmts =
if Loop.State.get Loop.State.debug st then begin
List.iter (fun stmt ->
Format.eprintf "[logic][typed][%a] @[<hov>%a@]@\n"
Dolmen.Std.Loc.print_compact stmt.Loop.Typer_Pipe.loc
Loop.Typer_Pipe.print stmt) stmts;
Format.eprintf "@.";
end;
st, stmts


(* Run dolmen (regular use) *)
Expand Down
Loading