Copyright  © – Sudharsan Iyengar

 

Prolog Program:         CS-415                        Spring 2023                            Due: 5/07/23

 

 

A Boolean expression is of the form – in Prolog List

 

            [and, a, b, c, d]            or [and, [or, b, c], [not, a], [and, c, d]] – or any combination thereof – a,b,c,d are propositions.

 

Truth set is given in the form – in Prolog List

 

            [[a, t], [b, f], [c, t], [d, t]]                    where a is true, b is false, c is true and d is true.

 

Write Prolog predicate evalb – which takes in a Boolean expression as described above, and a (sufficient) truth set as described above, and binds the value of the evaluated Boolean expression to the last parameter.