evaluation


How am I misunderstanding call-by-need evaluation?


First of all, I never studied these things or anything, so I may be asking very silly questions, which I am sorry for, but please go easy on me :)
I'm playing around with implementing lambda calculus, with call-by-need evaluation. I'm trying to follow this paper on the subject, where the relevant bit seems to be the natural semantics described on page 28.
Anyway, what I don't understand about this evaluation strategy is that, as far as I understand, the actual substitution only happens when evaluating variables. Abstractions evaluate to themselves, as these are the values, and applications only add new entries to the cache.
But given that, how exactly one go about evaluating a term like
(λx.λy.x y) λa.a
According to the natural semantics, described in the linked paper, the first evaluation step would be to add the entry x -> λa.a to the cache, and evaluate the body of the abstraction on the lhs of the application, which is λy.x y. But this is a value, so the evaluation ends. At which point we have a term that is not closed, and a non-empty heap. While we know exactly that this term should evaluate to λy.(λa.a) y.
What am I misunderstanding? How does this work in languages that actually use this evaluation strategy?
Your reduction is right. The point is that the call by need strategy addressed in that paper is only a weak strategy, in the sense that it will never reduce under a lambda expression. This is evident in Fig.1, where the expression \x.M is a value.
At the end of the reduction, if you want to obtain a lambda term explicitly, you still need to unwind the cache (frequently called environment in the literature), that amounts to substitute the associations in the cache inside your term:
λy.x y [x -> λa.a] = λy.(λa.a) y
as expected.

Related Links

SyntaxNet evaluation metrics
How am I misunderstanding call-by-need evaluation?
Math notation understanding
What criterias do you look for in a WAF (web application firewall)?
Predictionio evaluation fails with Text Classification template
Evaluation of APL direct functions
Modelica Evaluation Order
how compilers evaluate mathematical expressions? [closed]
What does “top-level evaluation” mean?
Boolean expression evaluation with a given context
Is relying on short-circuit evaluation good design? [closed]
Objectively evaluating new GUI toolkits
what are evaluation techniques for HCI projects (without involving users, or psychologist)?
Evaluating developers [closed]
Options to Common Criteria
What are some useful criteria for deciding on which software package to go for?

Categories

HOME
oauth-2.0
joomla
optimization
kendo-ui
typo3
cors
service
readdir
cryengine
lithium
pandoc
ms-application-insights
facebook-sharer
distinct
email-attachments
comma
fastreport
appsettings
nsoperation
css-float
views
orange
beacon
caldav
single-page-application
onclicklistener
aws-iot
procedural-generation
quality-center
aws-certificate-manager
inspec
formtastic
angular-schema-form
kundera
recreate
postgresql-9.6
favorites
webclient
fastadapter
javax
motherboard
blueimp
file-descriptor
android-graphview
glide-image-library
pyexcel
uitextview
risc
chrome-custom-tabs
geminabox
nao-robot
skype-bots
node-java
boost-regex
multi-targeting
cedar-bdd
firebase-job-dispatcher
universe
access-violation
disconnect
gdi
radar-chart
android-progressbar
salesforce-service-cloud
factorization
firefox-os
wonderware
android-contentresolver
android-facebook
commercetools
bootstrap-tabs
tinymce-plugins
stderr
system.diagnostics
beagleboard
service-broker
qxorm
apache-pivot
conditional-comments
livescript
ios-enterprise
parallel-port
switchpreference
webshim
jsmpp
sigma-grid-control
new-operator
fastcgi-mono-server
kuka-krl
vbaccelerator
logo-lang
mobile-robots
kendo-window
kohana-orm
xrandr
azure-scheduler
qmainwindow
inflate
openafs
shapado
certificate-revocation
php-gettext
django-admin-tools
cgaffinetransform
digg
xpolog
qvariant
meego-harmattan
html5-animation
arraycollection
dynamic-scope
pkcs#7
mdd
expander
httpbrowsercapabilities

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App