Skip to content
Merged
Changes from all commits
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
7 changes: 7 additions & 0 deletions chb/invariants/XConstant.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,13 @@ def mk_instance(xd: "FnXprDictionary", value: bool) -> XConstant:
index = xd.index_xcst(["bc"], [1 if value else 0])
return xd.xcst(index)

def to_json_result(self) -> JSONResult:
content: Dict[str, Any] = {}
content["value"] = self.args[0] == 1
content["kind"] = "bcst"
content["txtrep"] = str(self)
return JSONResult("xconstant", content, "ok")

def __str__(self) -> str:
return "true" if self.is_true else 'false'

Expand Down