However, this causes typechecking to fail due to invalid z3 syntax. The parentheses around domX and domY are unnecessary for this (although should be used when the dump is normally used by the iverilog compiler).
Therefore, we should use a unique "dump" function for when printing z3 constraints, or add an optional to the dump function that says which output syntax to use.
SecVerilog uses the built-in iVerilog
dump(ostream&out)
functions to generate z3 constraints.However this can lead to some bugs, e.g.:
With a lattice where
Domain domX
is the label of x andDomain domY
is the label of y, generates the constraint:However, this causes typechecking to fail due to invalid z3 syntax. The parentheses around
domX
anddomY
are unnecessary for this (although should be used when the dump is normally used by the iverilog compiler).Therefore, we should use a unique "dump" function for when printing z3 constraints, or add an optional to the dump function that says which output syntax to use.