[Aldor-l] [Aldor-combinat-devel] Should this "parser" work?

Martin Rubey martin.rubey at univie.ac.at
Sat Oct 28 18:09:27 EDT 2006


Dear Christian,

sorry to bother you once more...

"Christian Aistleitner" <tmgisi at gmx.at> writes:

> Hello,
> 
> On Thu, 26 Oct 2006 23:33:47 +0200, Martin Rubey  <martin.rubey at univie.ac.at>
> wrote:

> > In the present case of the "grammar" function, I guess that the second
> > "speciality" -- name constancy -- is satisfied. In our case, T is
> > evaluate(parse(p.i), res).  Am I right that "the scope in which T occurs"
> > is simply "evaluate(parse(p.i), res)" itself? Or is it the whole body of E?
> 
> I tend to read things differently.  I agree that T is “evaluate(parse(p.i),
> res)”. However, I'd interprete “scope” in a wider sense. Namely “everywhere
> you use T”. And you indirectly use T quite a lot. Especially, you return it
> as element of a List when exiting from grammar.  But I am far from convinced
> that I am right here.  However, from my feeling the kind of “being constant”
> I just described, is what I deem necessary.

Yes, ok, I think you are right there. However, res is only modified (in your
sense) within grammar. Outside I don't access it anymore.

So this bit boils down to the question: what does constancy mean. In fact, AUG
is quite explicit here:

The names appearing in an expression in type context may be

* defined via "=="
* imported via "import", or
* function parameters which are nowhere updated.

So, I guess, res.i := something is not allowed.

However, I'd say that the more important question is, whether it *should* be
allowed or not. It doesn't really make sense to have such a beautiful language
imposing conditions that actually restrict it's applicability.

I really hope that the current situation changes, i.e., that Aldor becomes free
and that people who are interested can work on an Aldor 2, which is a little
less restrictive...

Do you agree? Or do you think that the current restrictions are
necessery/sensible? If the latter is really the case, then I'd think there
should be a different way to function grammar with the same (proposed)
semantics as the current implementation, that does conform to the Aldor
language.

Well, you said already:

> From my perspective, there is no bullet proof solution.  And that's the bad
> thing for the Aldor-Combinat project.
> 
> However, there is an implementation. And your implementation is as robust as
> possible -- at least with the current tools we have.

So that's yet another reason for having a free Aldor, or a reimplementation, if
necessary. 

BTW, did you look at Ralf's code for defining series recursively? I wouldn't be
surprised if similar difficulties as here would arise with respect to
"standard" conformance...

All the best and thanks for your analysis,

Martin





More information about the Aldor-l mailing list