Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Functional > Re: Looking for...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 3 Topic 2787 of 2842
Post > Topic >>

Re: Looking for references on a set of expression transformation

by Anton Salikhmetov <salikhmetov@[EMAIL PROTECTED] > Mar 6, 2008 at 03:23 PM

On Mar 4, 12:52=A0am, Anton Salikhmetov <salikhme...@[EMAIL PROTECTED]
> wrote:
> Hello,
>
> I'm wondering if the rules described below can be found in existing
> literature. In what follows we use the "=3D" sign to indicate that both
> sides of the equation can be beta-reduced to one and the same term.
>
> Classic definition of the beta reduction is well-known:
>
> (\x. M A) -> M[x :=3D A]. (*)
>
> Here substitution is determined by the following four rules:
>
> i) x[x :=3D A] =3D A;
> ii) y[x :=3D A] =3D y;
> iii) (\y. M)[x :=3D A] =3D \y. M[x :=3D A];
> iv) (M N)[x :=3D A] =3D (M[x :=3D A] N[x :=3D A]).
>
> One can observe that
>
> (\x. x A) =3D A, (1)
>
> and
>
> (\x. y A) =3D y. (2)
>
> Further, due to (*)
>
> (\x. \y. M A) -> (\y. M)[x :=3D A] =3D \y. M[x :=3D A] <- \y. (\x. M A),
>
> hence
>
> (\x. \y. M A) =3D \y. (\x. M A). (3)
>
> Finally, using (*) one can write
>
> (\x. (M N) A) -> (M N)[x :=3D A] =3D (M[x :=3D A] N[x :=3D A]) <- ((\x.
M =
A)
> (\x. N A)),
>
> hence
>
> (\x. (M N) A) =3D ((\x. M A) (\x. N A)). (4)
>
> Usage of the rules (1)-(4) could simplify construction of a machine
> for automated evaluation of lambda expressions: if each of the above
> rules is applied within one clock cycle, then after every cycle the
> memory will contain a valid expression.
>
> I will be very grateful for any information about where this or a
> similar approach to reduction of lambda expressions was considered in
> the literature.

It appears that this set of rules is not good when the classic
"leftmost outermost" reduction strategy is used.

Let us apply the rules (1)-(4) to the following lambda expression:

\a. \b. \a a b -(rule 3)->

\b. (\a. a a) b -(rule 4)->

(\b. \a. a b) (\b. a b) -(rule 3)->

\a. (\b. a b) (\b. a b) -(rule 4)->

\a. \b. a (\b. a b) (\a. b (\b. a b)) -(rule 3)->

=2E..

It is easy to see that the expression grows indefinitely at further
application of the rules, and the normal form is never reached. This
is because the third rule creates "parasitic" redexes.

Perhaps, there exists another reduction strategy that gives the normal
form for any reducible expression and is "compatible" with these
rules. I would be very grateful for any ideas on how such a strategy
could be discovered.




 3 Posts in Topic:
Looking for references on a set of expression transformation rul
Anton Salikhmetov <sal  2008-03-03 13:52:20 
Re: Looking for references on a set of expression transformation
Anton Salikhmetov <sal  2008-03-06 15:23:29 
Re: Looking for references on a set of expression transformation
Anton Salikhmetov <sal  2008-03-10 17:33:02 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat May 17 7:19:40 CDT 2008.