First version AIMA chapter 8 (knowledge base) exercise 8.3 prolog programming
1. I am doing exercise 8.3. It is as follows:
Encode the description of the 4-bit adder in figure 8.10 and pose the
queries to verify that it is in fact correct.
My question is how to translate the following sentences into prolog
1. All t, (Signal(t) = On or Signal(t) = Off ) ^ (On is not Off).
2. All t, (Signal(t) = 1 or Signal(t) = 0 )
3. All x, Type(x) = Adder <==> Signal(Out(1,x)) = ( Signal(In(1,x))
+ Signal(In(2,x)) + Signal(In(3,x)) )/2 ^ Signal(Out(1,x)) = (Signal
(In(1,x)) + Signal(In(2,x)) + Signal(In(3,x))) mod 2)
4. For logic term ("Type(X) = Adder") should be translated into
prolog fact "Type(X,Adder)" or not?
Finally, I use "amzi! prolog" for exercise. Is it a good choice or
Thank you for your attention.