3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 17:15:31 +00:00

Improve html pretty printer for RCF package

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2013-01-27 11:24:23 -08:00
parent 77f58269ed
commit 4624919786
8 changed files with 17 additions and 6 deletions

View file

@ -51,7 +51,6 @@ def MkRoots(p, ctx=None):
return r
class RCFNum:
html = False
def __init__(self, num, ctx=None):
# TODO: add support for converting AST numeral values into RCFNum
if isinstance(num, RCFNumObj):
@ -68,10 +67,10 @@ class RCFNum:
return self.ctx.ref()
def __repr__(self):
return Z3_rcf_num_to_string(self.ctx_ref(), self.num, False, RCFNum.html)
return Z3_rcf_num_to_string(self.ctx_ref(), self.num, False, in_html_mode())
def compact_str(self):
return Z3_rcf_num_to_string(self.ctx_ref(), self.num, True, RCFNum.html)
return Z3_rcf_num_to_string(self.ctx_ref(), self.num, True, in_html_mode())
def __add__(self, other):
v = _to_rcfnum(other, self.ctx)