here is a function definition: hypot x y -> d: square x -> x2 square y -> y2 add x2 y2 -> d2 sqrt d2 -> d or: hypot x y -> d: square x -> x2 square y -> y2 add x2 y2 -> d2 square d <- d2 here is a corresponding relational definition: hypot x y <-> d: square x <-> x2 square y <-> y2 add x2 y2 <-> d2 square d <-> d2 here is a relational definition of gcd: gcd a b -> c: if a == 0: c = b a.1 = a b.1 = b if b.n == 0: c = a.n else: add n 1 -> n+1 a.n+1 = b.n a.n % b.n -> b.n+1 here is a recursive gcd: gcd a b -> c: if a == 0: c = b if b == 0: c = a a' = b b' <- a % b gcd a' b' -> c can refer to a binding itself rather than the value with `a' instead of a, e.g. a = 1 `a' in register 1 and can refer to the value of a binding with ,a. , e.g.: a = 1 b = `a' c = ,b. (now c = a = 1) notation for this is perhaps not good... can have complex-looking names e.g. `n + 1' can be a binding name. # need to use a queue / deque for the sequences so can release variables # That aren't needed any more (a[0] and b[0] once have calc'd a[1] and b[1], for example) # This is a BETTER model than the assignment model for this case at least. # for time / signal / net event based programs, can make an `ideal' model and # then approximate it using a simulator, like numerical integration, ... ??? For sampling something that changes over time, could do something like this... if enter_pressed.t: sample.(n.t) = signal.t n.(t+1) = n.t + 1 if enter_pressed.t: sample.n = signal.t n' = n + 1 then n = n' I like this; we separate instants by `then' or, maybe a `,' ? if enter_pressed.t: sample.n = signal.t n' = n + 1 , n = n' But this isn't quite right, we need to declare that the n' is the same in both instants. if enter_pressed.t: sample.n = signal.t n' = n + 1 , n' n = n' or in this simple case: if enter_pressed.t: sample.n = signal.t n := n + 1 we could have an `always' context to express constraints that should continue to hold as opposed to instantaneous relationships or relationships between variables and constants (comparatively constants, step functions over time!). where (t+1) represents the next instant (i.e. a change that occurs at the current time), and n.(t+2) will equal n.(t+1) in the absence of further assignment... this is a `step function' over time... ??? a b 135 90 90 45 45 45 45 0 rule(prereq => qw()); in OO/ message passing, to _request_ something, pass the request and a `callback' (channel to where the response should be sent). Should be able to cancel requests too, or at least automatically ignore responses if the recipient is not there any more (so can timeout, exceptions, try multiple alternative servers at once, etc).