two definitions of 'cyclic'? 
Author Message
 two definitions of 'cyclic'?

When discussing cyclical structures, I can see 2 different possible
semantics
with respect to the update function.
Consider the following mutually recursive definitions:

a = (b,3)  -- tuple with first element b, second element 3
b = (a,4)

Now suppose you want to update the first element of b by replacing a
with
a variant of a:
[Note: replacefirst (x,y) z      is defined to be    (z,y)]

c = replacefirst b (replacesecond a 5)
so c is
  ((b,5),4) == (((a,4),5),4) == ((((b,3),4),5),4)

However, a person working with graph structures would like to
be able to produce the effect of this:
a' = (b',5)
b' = (a',4)
c = Update a b == b'

This requires a different type of cyclic structure than the other one
(doesn't it?).  Instead of interpreting the mutual recursion as an
infinite
structure, it would be a finite looping structure.

How would you go about defining such a function as Update (and the
structures it operates on) in a pure lazy language?




Sun, 08 Jun 1997 03:27:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. WeakDict's: addressing CPython's problem with cyclic structures

2. Technical: Definition of ``alyasing''

3. Definition of 'apply' of MDI GUI

4. Definition of 'pickle'

5. A definition for 'foreach'

6. 'manpage'-like CL-Definitions availiable ?

7. 'multiple definitions' with MacOS X

8. Angles don't map nicely to two's complement turns

9. TWO 'HIGH-PRICED' ADA TOO

10. Technical: Definitions of ``Poynter'', ``Shyfting''

11. stream('file','c','seek ='x) problem

 

 
Powered by phpBB® Forum Software