[m-dev.] for review: Aditi [2]

Simon Taylor stayl at cs.mu.OZ.AU
Tue Jul 21 16:46:05 AEST 1998


> On 20-Jul-1998, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
> > > 
> > > > Index: compiler/lambda.m
> > > >                  list__append(ArgModes1, Modes, AllArgModes),
> > > >                  map__apply_to_list(AllArgVars, VarTypes, ArgTypes),
> > > >  
> > > > +                ( 
> > > > +                        % Pass through the aditi markers for 
> > > > +                        % aggregate query closures.
> > > > +                        Detism = nondet,
> > > > +                        check_marker(Markers, aditi)
> > > > +                ->
> > > > +                        LambdaMarkers = Markers
> > > > +                ;
> > > > +                        init_markers(LambdaMarkers)
> > > > +                ),
> > > 
> > > Why only `nondet'?  What about `multi', for example?
> > 
> > I've changed that to `determinism_components(Detism, _, at_most_many)'
> 
> That's an improvement, but I think it is still a bit ad hoc.
> 
> Why do you copy across all the markers, whereas the comment
> only mentions the Aditi markers?
> 
> What happens if an Aditi procedure contains a lambda expression
> that is passed to a Mercury procedure?  In that case, it would
> not be right to mark the lambda expression as Aditi.
> Well, actually that can't happen, but I think the comment
> should document why not.

The current RL code generator won't handle it, but there's no reason
why it shouldn't be allowed when we can interface to Bert's bytecode
interpreter.

We should probably have different types for normal closures and aggregate
query closures to avoid this problem. I'll filter the markers properly and
add an XXX for your other comment.

Simon.



More information about the developers mailing list