[m-rev.] State variable syntax transformation
Ralph Becket
rafe at cs.mu.OZ.AU
Sat Feb 16 10:28:02 AEDT 2002
Simon Taylor, Thursday, 14 February 2002:
> On 12-Feb-2002, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
> > On 07-Feb-2002, Ralph Becket <rafe at cs.mu.OZ.AU> wrote:
> > > +xform_compound(S,
> > > + functor(atom(","), [P0, Q0], C),
> > > + functor(atom(","), [P, Q ], C),
> > > + VS0, VS
> > > +) :-
> >
> > prog_io_state_vars should be called after the goal has been parsed by
> > prog_io_goal. This will avoid problems if new syntax is added.
> > For example, you haven't handled parallel conjunctions (&).
>
> I've given this some more thought. This problem and the problems
> with lambda expressions mentioned in other messages are caused by
> trying to perform the transformation on a parse tree that isn't
> parsed enough. prog_data__goal isn't parsed enough either (lambda
> expressions aren't parsed until make_hlds). You may want to consider
> doing the state variable transformation as part of make_hlds__transform.
There may be a problem in making the transformation during
make_hlds__transform, namely that the transformation needs to see terms
of the form
p(X, Y, Z, !.IO, !:IO)
not the sequence
Tmp1 = !.IO,
Tmp2 = !:IO,
p(X, Y, Z, Tmp1, Tmp2)
since the important ordering-between-goals property is lost.
I'll have a look into this to see if there's any way around the problem.
- Ralph
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list