Solving Order for Multiple Implication Operator

Recently there have been posts about Multiple Operators in same Constraint .

All the posts I read had operators with Associativity Left to Right , so I decided to try an example with

associativity Right to Left ( via Implication Operator )

Consider an expression with Implication Operator ::


  expression1 -> expression2  is  Equivalent to ::
 (  !expression1 || expression2 )
 

In a class with multiple Implication Operator ::



  class Main ;

    rand bit [2:0] a , b , c ;

    constraint MULTI_IMPLI { ( a == 0 ) -> ( b == 1 ) -> ( c == 2 ) ; }

 endclass 


 

[Q1] How is the Constraint Solved ? Is there even a Constraint on a , b and c ?

[Q2] What inline Constraint ( for a , b and c ) would cause randomization to fail ?

In reply to Have_A_Doubt:

I think you are confusing solving order, with evaluation order. Solving order only affects the probability of choosing particular solutions. You are asking about evaluation order, which has to do with precedence of applying operators and does effect which solutions are valid.

Right to Left association means the → operator on the right has higher precedence than the one on the left. Note that equality == has higher precedence than implication, so the parentheses you have are nonessential.

If we convert the expression
a == 0 → b == 1 → c == 1
to its boolean equivalent, we get

a != 0  ||  b != 1  || c == 2

So the only solutions that would not be valid are a==0, b==1, and c==0,1,3,4,5,6, or 7