******************************************************************************
*									     *
*				 comments				     *
*									     *
*		Written by: Pierre Flener (20 May 1996)			     *
*									     *
******************************************************************************

Program ::= list-of Clause

Clause ::= if(Head,Body)

Head ::= `compound Prolog-term whose arguments are distinct variables'

Body, Goal ::= Conjunction

Conjunction ::= true | Literal | and(Conjunction,Conjunction)

FlatConjunction ::= true | Literal | and(Literal,FlatConjunction)

Literal ::= Atom | neg(Atom)

Atom ::= `compound Prolog-term'

SOatom ::= '$atom'(Atom)

Term ::= `Prolog-term'

Terms ::= list-of Term


*** Let there always be exactly one (simple) IP.		***
*** Let  y (>=0) be the number of RPs,				***
***  and z (>=0) be the number of APs.				***
*** Let hx (>=0) be the number of heads of the IP,		***
***  and t (>=1) be the number of tails of the IP.		***

ParamTypes ::= list-of (Name:Type)

Name, String ::= `Prolog-string'

Type ::= atom | int | nat | term | list(Type)

Hints ::= hints(IPname,RPnames,APnames,DecRinst)

IPname ::= Name

RPnames ::= list-of Name			% of length y

APnames ::= list-of Name			% of length z

DecRinst ::= String

Infos ::= list-of Info

Info ::= info(IPinfo,RPinfos,APinfos,DecRinfo,Arity,DSargs,DPCargs,FormVars)

IPinfo ::= pi(Position,Name,Type)

RPinfos ::= list-of pi(Position,Name,Type)	% of length y

APinfos ::= list-of pi(Position,Name,Type)	% of length z

Position ::= 1 | 2 | ... | 1+y+z

DecRinfo ::= decRinfo(FlatConjunction,HeadInfos,TailInfos)

HeadInfos ::= list-of pi(_,Name,Type)		% of length hx

TailInfos ::= list-of pi(_,Name,Type)		% of length t

Arity = 1+y+z

DSargs = [X,Y1,...,Yy,Z1,...,Zz]

DPCargs = [HX1,...,HXhx,TY#,...,TY$,Y1,...,Yy,Z1,...,Zz]

FormVars = formVars(y,z,hx,t)

DSex, DPCex = [FlatConjunction|Terms]

Clique ::= clique(Positions,MSG)

Positions ::= increasing-list-of natural-number

MSG ::= Term

DSmode = mode(y,z)

DPCmode = mode(y,z,hx,t)
