We now try to represent data structures that look like:

if a and b or c then d

As we already have a representation for ``a and b or c'', this reduces to representing

if a then b

We will make ``then'' an infix operator of arity 2.
Because both subtrees might contain ** and/2** we will need to
make ** then/2** of higher precedence than ** and/2** ---say,1050
and not associative.
Hence:

op(1050,xfx,then).

This means that ``if'' must be a prefix operator. As we do not wish expressions of the form

we must makeif if a

op(1075,fx,if).

We can now represent

as the treeif a and b or c then d

or, as the ** Prolog** term

if(then(and(a,or(b,c)),d))

This ** Prolog** term is difficult to read but unambiguous
while the representation using operators is easy to read
but depends heavily on your understanding the precedences and
associativities involved.
All right if you wrote the code but the code is harder for
someone else to read.

Mon May 24 20:14:48 BST 1999