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
Denotational semantics
(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!
===Denotational semantics of state=== State (such as a heap) and simple [[imperative programming|imperative features]] can be straightforwardly modeled in the denotational semantics described above. The key idea is to consider a command as a partial function on some domain of states. The meaning of "{{code|1=x:=3}}" is then the function that takes a state to the state with {{code|3}} assigned to {{code|x}}. The sequencing operator "{{code|;}}" is denoted by composition of functions. Fixed-point constructions are then used to give a semantics to looping constructs, such as "{{code|while}}". Things become more difficult in modelling programs with local variables. One approach is to no longer work with domains, but instead to interpret types as [[functor]]s from some category of worlds to a category of domains. Programs are then denoted by [[natural transformation|natural]] continuous functions between these functors.<ref>[[Peter W. O'Hearn]], John Power, [[Robert D. Tennent]], Makoto Takeyama. Syntactic control of interference revisited. ''Electron. Notes Theor. Comput. Sci.'' 1. 1995.</ref><ref>Frank J. Oles. ''A Category-Theoretic Approach to the Semantics of Programming''. PhD thesis, [[Syracuse University]], New York, USA. 1982.</ref>
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)