Re: If you were to implement the original relation algebra language...

From: Joe \ <joe_at_bftsi0.UUCP>
Date: Thu, 20 Nov 2003 11:54:27 -0800
Message-ID: <1069358101.863664_at_news-1.nethere.net>


"Amund Trovåg" <amundAndHereEndethMyName_at_removeINOLIKESPAMYOUSEEtexassibir.com> wrote in message <news:3FBD12DB.40205_at_removeINOLIKESPAMYOUSEEtexassibir.com>...

> Would precedence have a lot to say for optimization?
>
> I am currently working on doing just this, creating the grammar file
> from BNF to JavaCC(a program that makes Java parser files for me, based
> on a grammar).
>
> I am not certain whether project should have precedence over the other
> operators, as this might create trouble when combined with e.g. selection.
>
> Any thoughts, comments or tips on how the grammar should be structured
> with regard to this?

Punt and require parentheses? It shouldn't impede optimization, and a functional notation for those of us with "standard" keyboards will all but demand it:

 URL:http://www.cs.rochester.edu/users/faculty/nelson/courses/csc_173/relations/algebra.html

You might be able to get away with R1 + R2 for union, R1 - R2 for set difference, R1 * R2 for kernel panic: out of swap, etc., but you should encourage parentheses here too, because R1 - (R1 - R2) isn't the same as (R1 - R1) - R2.

--
Joe Foster <mailto:jlfoster%40znet.com>  "Regged" again? <http://www.xenu.net/>
WARNING: I cannot be held responsible for the above        They're   coming  to
because  my cats have  apparently  learned to type.        take me away, ha ha!
Received on Thu Nov 20 2003 - 20:54:27 CET

Original text of this message