You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How should we give addresses/identities to choices in forward and inverse execution of a function.
The origins of this problem are in reconciling a parameter generating function with a parametric inverse. That is, suppose we have a function like
function f(x, y)
a = x + y
b = a / y
end
We want to be able to:
Construct the pdf of f that will produce parameter values for the two operationrs
Construct the pi of f and use those parameters with it. Hence, we need some kind of way to say that some value corresponds to the parameter used in +.
In straight line programs this is not an issue. It only becomes problematic when we have recursion and nested functions. The reason it becomes problematic is that the structural position of a statement does not uniquely identify the thing we're trying to identify.
A few questions:
What exactly are we trying to identify or address
Do we need to do this at all?
What are we trying to identify
Problem with Control
The problem is that for any particular st
Consider:
function f2(n)
a =1
i =1while i < n
a += g(a)
i +=1end
a
end
If we enter this function from the inverse direction and enter the while loop essentially from the inverse direction, we don't know what iteration we are on. But if our addressing scheme is assigning values to statements we need in some sense to know what iteration we're on, which is too much to ask.
Alternative
g(x) = x^2
function f1(a, n, i)
if i >= n
a
else
a_ = g(a) + a
f1(a_, n, i + 1)
end
end
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
How should we give addresses/identities to choices in forward and inverse execution of a function.
The origins of this problem are in reconciling a parameter generating function with a parametric inverse. That is, suppose we have a function like
We want to be able to:
fthat will produce parameter values for the two operationrsfand use those parameters with it. Hence, we need some kind of way to say that some value corresponds to the parameter used in+.In straight line programs this is not an issue. It only becomes problematic when we have recursion and nested functions. The reason it becomes problematic is that the structural position of a statement does not uniquely identify the thing we're trying to identify.
A few questions:
What are we trying to identify
Problem with Control
The problem is that for any particular st
Consider:
If we enter this function from the inverse direction and enter the while loop essentially from the inverse direction, we don't know what iteration we are on. But if our addressing scheme is assigning values to statements we need in some sense to know what iteration we're on, which is too much to ask.
Alternative
Beta Was this translation helpful? Give feedback.
All reactions