boolean.pl : Boolean handler with labeling
Boolean handler for and, or, xor, neg, and imp (implication) with labeling and halfadder and fulladder.

How to use:
The following constraints are handled:
boolean(A) A is boolean: A=0 or A=1
and(A,B,C) logical conjunction: C=A and B
or(A,B,C) logical disjunction: C=A or B
xor(A,B,C) logical exclusive-or: C=A xor B
neg(A,B) logical negation: B=not A
imp(A,B) logical implication: not A or B=true
labeling(A) label variable A

Program: Change the code, then submit!

Console: Enter query or select example from below, then submit and wait for answer!

 Select example query: (Clear query) and(0,1,A), xor(1,1,B). neg(A,A). or(A,B,0), and(A,B,C), neg(C,D). neg(A,B), or(A,B,C). neg(A,B), or(A,B,C), labeling. and(X,Y,Z),(X=1;X=0;X=Y). imp(A,B), imp(B,A). neg(A,B), imp(A,B). and(A,B,C), or(A,B,D), imp(C,D). and(A,B,C), or(A,B,D), imp(C,D), labeling. and(A,B,C), or(A,B,D), imp(D,C), labeling. half_adder(A0,B0,S0,C1), full_adder(A1,B1,C1,S1,C2), full_adder(A2,B2,C2,S2,C3), full_adder(A3,B3,C3,S3,C), A3=1,A2=0,A1=0,A0=1, B3=0,B2=1,B1=1,B0=1.

WebCHR help - CHR Website - (c) Copyrights Martin Kaeser Uni Ulm 2007