[m-dev.] for review: Aditi update doc extract

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Jul 6 17:02:05 AEST 1999


On 06-Jul-1999, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
> 
> > If I have a `det' base relation, does it make any sense to do insertions
> > or deletions on it?  Modifications make sense, but I think any insertions
> > (except perhaps inserting tuples that are already present) or deletions
> > will always violate the declared determinism, won't they?
> 
> Yes.

In that case, would it be a good idea for the compiler to report
an error or warning if you attempt to do that?

> > >      aditi_insert(PREDNAME(VAR1, VAR2, ...), DB0, DB).
> > >      
> > >      aditi_insert(FUNCNAME(VAR1, VAR2, ...) = RETVAR, DB0, DB).
> > > 
> > You should state here what `PREDNAME', `FUNCNAME', `VAR1', `VAR2', ...,
> > `RETVAR', `DB0', and `DB' are.
>  
> I've added a list of naming conventions to the "Aditi update notes" section.
...
> > The examples are inconsistent with the documentation, which implies that
> > the arguments here must be variables.
> 
> I've changed `Var' to `Arg'.

The naming conventions you added did not state what `Arg' means.

>     It is currently up to the application to ensure that any
> +modifications do not violate the determinism of a base relation.
> +Updates of relations with unique B-tree indexes are checked to ensure
> +that a key is not given multiple values. The transaction will abort if
> +this occurs.

I suggest adding "If any modification does violate the determinism of
a base relation, then the behaviour is undefined." after the first sentence,
and inserting "However, " before the second sentence.

> +   The following naming conventions are used in the specification of
> +the Aditi update syntax:

I'm not completely happy with this approach for specifying the syntax,
because it is not entirely consistent with the style used elsewhere.
I have to go now so I will explain in detail later.

> +   * `CLOSURE' is a term which has a higher-order type.

s/term/data-term/

> +   * Variables named `DBN' are `aditi__state' variables.  When occuring
> +     as a pair at the end of an argument list, they have mode
> +     `aditi_di, aditi_uo'.

I suggest changing that first sentence to

	`DB0', `DB1', ..., `DB' are variables of type `aditi__state'.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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