It is valid syntax, but your constraint expression is evaluated like any other expression, with left to right association:
( ( 0 < vari ) < 100 ). Since the result of
( 0 < vari ) can only be 0 or 1 for any value of
vari, your constraint expression is satisfied for any value of
vari. Some tools have verbose solve modes that would show you this.
For ranges or set of values, I recommend using the inside operator (LRM section
18.5.3 Set membership ) instead:
Code:
constraint range { vari inside {[1:99];}