# Last modified on Fri Jun 9 10:51:56 PDT 1995 by heydon # # Test that a constraint system with a redundant equality constraint # does not crash the solver. # Global variables V1 1 V2 2 V3 3 V4 "Solve result: " V5 "Solve failed!" V6 "\n" # PROC Main() IS (* Code slot 1 *) # VAR a ~ 1, b ~ 2, c ~ 3 IN # a = b AND a = c AND b = c -> # Print("Solve result: "); # Print(Unparse(a)) # | Print("Solve failed!") # END; # Print("\n") # END C1 # # VAR a ~ 1, b ~ 2, c ~ 3 IN .PUSHM3NIL b3 .PUSHG c1 .POPL s1 .PUSHG c2 .POPL s2 .PUSHG c3 .POPL s3 # # a = b AND a = c AND b = c -> .PUSHL s1 .PUSHL s2 .PUSHL s3 .SOLVE u3 u0 u3 b5 u0 u1 b5 u0 u2 b5 u1 u2 .FJUMP s43 .POPL s3 .POPL s2 .POPL s1 # # Print("Solve result: "); .PUSHG c4 .CALLEXT c0 .DECSP b1 # # Print(Unparse(a)) .INCSP b1 .PUSHL s1 .CALLEXT c2 .DECSP b1 .CALLEXT c0 .DECSP b1 .JUMP s12 # # | Print("Solve failed!") .PUSHG c5 .CALLEXT c0 .DECSP b1 # # END; # Print("\n") .PUSHG c6 .CALLEXT c0 .DECSP b1 # END .RET END