PyVSC evaluates the constraints to arrive at a domain bounding for each variable. In cases where the domain is subdivided into several small disjoint regions by branching constraints (eg if/else), the distribution of results is far from ideal.
@vsc.rand_obj
class disjoint_c(object):
def __init__(self):
self.a = vsc.rand_uint8_t()
self.c = vsc.rand_bit_t()
@vsc.constraint
def disjoint_c(self):
with vsc.if_then(self.c):
self.a <= 10
with vsc.else_then:
self.a >= 250
Ideally, solutions would be evenly distributed across 0..10 and 250..255. Instead, they will cluster according to solver bias.
Collecting richer bounding information would enable the distribution to be more uniform.
PyVSC evaluates the constraints to arrive at a domain bounding for each variable. In cases where the domain is subdivided into several small disjoint regions by branching constraints (eg if/else), the distribution of results is far from ideal.
Ideally, solutions would be evenly distributed across 0..10 and 250..255. Instead, they will cluster according to solver bias.
Collecting richer bounding information would enable the distribution to be more uniform.