[clean-list] strong root normal form

Erik Zuurbier EZuurbier@Abz.nl
Wed, 9 Oct 2002 16:51:07 +0200


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C26FA3.4CBA37E0
Content-Type: text/plain

Hi,

I am at a point where I want to understand the concept of 'strong root
normal form'. There are too many programs in which I turn lets into strict
lets and stumble upon a version that appears to work as I had expected. But
I don't understand what's happening. 

The Clean documentation says:

"A pattern partially matches a graph if firstly the symbol of the root of
the pattern equals the symbol of the root of the graph and secondly in
positions where symbols in the pattern are not syntactically equal to
symbols in the graph, the corresponding sub-graph is a redex or the
sub-graph itself is partially matching a rule. A graph is in strong root
normal form if the graph does not partially match any rule. It is decidable
whether or not a graph is in strong root normal form. A graph in strong root
normal form does not partially match any rule, so it is also in root normal
form.

The default reduction strategy used in CLEAN is the functional reduction
strategy. Reducing graphs ac-cording to this strategy resembles very much
the way execution proceeds in other lazy functional languages: in the
standard lambda calculus semantics the functional strategy corresponds to
normal order reduction. On graph rewrite rules the functional strategy
proceeds as follows: if there are several rewrite rules for a particular
function, the rules are tried in textual order; patterns are tested from
left to right; evaluation to strong root normal form of arguments is forced
when an actual argument is matched against a corresponding non-variable part
of the pattern. A formal definition of this strategy can be found in (Toyama
et al., 1991)."

Well, to be honest, I understand not a word of this. Does anybody have some
examples of expressions which are or are not in SRNF and why?

Regards Erik Zuurbier


------_=_NextPart_001_01C26FA3.4CBA37E0
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">



strong root normal form



Hi,

I am at a point where I want to = understand the concept of 'strong root normal form'. There are too many = programs in which I turn lets into strict lets and stumble upon a = version that appears to work as I had expected. But I don't understand = what's happening.

The Clean documentation says:

"A = pattern partially matches a graph if firstly the symbol of the = root of the pattern equals the symbol of the root of the graph and = secondly in positions where symbols in the pattern are not = syntactically equal to symbols in the graph, the corresponding = sub-graph is a redex or the sub-graph itself is partially matching a = rule. A graph is in strong root normal form if the = graph does not partially match any rule. It is decidable whether or = not a graph is in strong root normal form. A graph in strong root = normal form does not partially match any rule, so it is also in root = normal form.

The default reduction strategy used in = CLEAN is the functional = reduction strategy. Reducing graphs = ac-cording to this strategy resembles very much the way execution = proceeds in other lazy functional languages: in the standard lambda = calculus semantics the functional strategy corresponds to normal order = reduction. On graph rewrite rules the functional strategy proceeds as = follows: if there are several rewrite rules for a particular function, = the rules are tried in textual order; patterns are tested from left to = right; evaluation to strong root normal form of arguments is forced = when an actual argument is matched against a corresponding non-variable = part of the pattern. A formal definition of this strategy can be found = in (Toyama et al., 1991)."

Well, to be honest, I understand not a = word of this. Does anybody have some examples of expressions which are = or are not in SRNF and why?

Regards Erik Zuurbier

------_=_NextPart_001_01C26FA3.4CBA37E0--