[m-dev.] Typecheck assertions

Peter Ross petdr at cs.mu.OZ.AU
Sat Jul 3 19:40:22 AEST 1999


On 03-Jul-1999, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> On 02-Jul-1999, Peter Ross <petdr at cs.mu.OZ.AU> wrote:
> > 
> > If you have an assertion of the form
> > 
> > :- assertion 
> >         (
> >                 (some [AB] (app(A, B, AB), app(AB, C, ABC)))
> >         <=>
> >                 (some [BC] (app(B, C, BC), app(A, BC, ABC)))
> >         ).
> > 
> > Is the following the best way to typecheck these assertions?
> > 
> > Create a new pred in the form:
> > 
> > assertion_a :-
> >         some [A,B,C,ABC] (
> >                 (some [AB] (app(A, B, AB), app(AB, C, ABC)))
> >         <=>
> >                 (some [BC] (app(B, C, BC), app(A, BC, ABC)))
> >         ).
> > and then typecheck that.
> 
> Shouldn't that be `all [A,B,C,ABC]' rather than `some [A,B,C,ABC]'?
> 
Yes it should, thinking error.

> That general approach would certainly work.
> It seems like a fairly good approach.
> 
> > How hard will it be to generate meaningful error messages this way?
> 
> Quite easy.  Basically you'd just need to change hlds_out__write_pred_id.
> 
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list