this.isPred = (returnDecl==null);
if (returnDecl==null) returnDecl = ExprConstant.FALSE;
if (returnDecl.mult==0 && returnDecl.type.arity()==1) returnDecl = ExprUnary.Op.ONEOF.make(null, returnDecl);
this.returnDecl = returnDecl;
this.body = body;
if (body.mult!=0) throw new ErrorSyntax(body.span(), "Multiplicity expression not allowed here.");
this.decls = ConstList.make(decls);
for(int n=count(), i=0; i<n; i++)
for(int j=i+1; j<n; j++)
if (get(i)==get(j))
throw new ErrorSyntax(get(j).span(),
"The same variable cannot appear more than once in a predicate/function's parameter list.");
for(Decl d: this.decls) if (d.expr!=null && d.expr.hasCall())
throw new ErrorSyntax(d.expr.span(), "Parameter declaration cannot contain predicate/function calls.");
if (returnDecl.hasCall())
throw new ErrorSyntax(returnDecl.span(), "Return type declaration cannot contain predicate/function calls.");
}