1. A method for assigning random values to a set of random variables, the method comprising: receiving a set of constraints, wherein each constraint is defined over one or more random variables from the set of random variables; generating a circuit model based on the set of constraints, wherein assignable values for at least one node in the circuit model are represented in multiple value systems; and assigning, by using one or more computers, random values to the set of random variables based on the circuit model.