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: nicer output #209

Merged
merged 10 commits into from
Oct 20, 2023
5 changes: 3 additions & 2 deletions src/halmos/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from .utils import (
create_solver,
hexify,
stringify,
indent_text,
NamedTimer,
yellow,
Expand Down Expand Up @@ -1066,14 +1067,14 @@ def select(var):
return name.startswith("p_") or name.startswith("halmos_")

select_model = filter(select, model) if not print_full_model else model
return {str(decl): hexify(model[decl]) for decl in select_model}
return {str(decl): stringify(str(decl), model[decl]) for decl in select_model}


def render_model(model: UnionType[str, StrModel]) -> str:
if isinstance(model, str):
return model

formatted = [f"\n {decl} = {hexify(val)}" for decl, val in model.items()]
formatted = [f"\n {decl} = {val}" for decl, val in model.items()]
return "".join(sorted(formatted)) if formatted else "∅"


Expand Down
Loading
Loading