Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Expression (mathematics)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==== Rewriting ==== Expressions can be computed by means of an ''[[evaluation strategy]].''<ref>{{cite book |last1=Araki |first1=Shota |url=https://books.google.com/books?id=MFMCCwAAQBAJ&pg=PA1 |title=Theory and Practice of Computation |last2=Nishizaki |first2=Shin-ya |date=November 2014 |isbn=978-981-4612-87-6 |page=1 |chapter=Call-by-name evaluation of RPC and RMI calculi |doi=10.1142/9789814612883_0001 |access-date=21 August 2021}}</ref> To illustrate, executing a function call <code>f(a,b)</code> may first evaluate the arguments <code>a</code> and <code>b</code>, store the results in [[Reference (computer science)|references]] or memory locations <code>ref_a</code> and <code>ref_b</code>, then evaluate the function's body with those references passed in. This gives the function the ability to look up the original argument values passed in through dereferencing the parameters (some languages use specific operators to perform this), to modify them via [[Assignment (computer science)|assignment]] as if they were local variables, and to return values via the references. This is the call-by-reference evaluation strategy.<ref>{{cite book |author1=Daniel P. Friedman |title=Essentials of Programming Languages |author2=Mitchell Wand |date=2008 |publisher=[[MIT Press|The MIT Press]] |isbn=978-0262062794 |edition=third |location=Cambridge, MA}}</ref> Evaluation strategy is part of the semantics of the programming language definition. Some languages, such as [[PureScript]], have variants with different evaluation strategies. Some [[declarative language]]s, such as [[Datalog]], support multiple evaluation strategies. Some languages define a [[calling convention]]. In [[rewriting]], a [[reduction strategy]] or rewriting strategy is a relation specifying a rewrite for each object or term, compatible with a given reduction relation. A rewriting strategy specifies, out of all the reducible subterms ([[redex]]es), which one should be reduced (''contracted'') within a term. One of the most common systems involves [[lambda calculus]].
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)