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
Semantics (computer science)
(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!
==Approaches== There are many approaches to formal semantics; these belong to three major classes: * '''[[Denotational semantics]]''',<ref name=Schmidt1986>{{cite book |author-first=David A.|author-last=Schmidt |title=Denotational Semantics: A Methodology for Language Development |publisher=William C. Brown Publishers |date=1986 |isbn=9780205104505}}</ref> whereby each phrase in the language is interpreted as a ''[[denotation (semiotics)|denotation]]'', i.e. a conceptual meaning that can be thought of abstractly. Such denotations are often mathematical objects inhabiting a mathematical space, but it is not a requirement that they should be so. As a practical necessity, denotations are described using some form of mathematical notation, which can in turn be formalized as a denotational metalanguage. For example, denotational semantics of [[functional programming language|functional languages]] often translate the language into [[domain theory]]. Denotational semantic descriptions can also serve as compositional translations from a programming language into the denotational metalanguage and used as a basis for designing [[compiler]]s. * '''[[Operational semantics]]''',<ref name=Plotkin1981>{{cite report |author-link=Gordon Plotkin|first=Gordon D.|last=Plotkin |title=A structural approach to operational semantics |series=Technical Report DAIMI FN-19 |publisher=Computer Science Department, [[Aarhus University]] |date=1981}}</ref> whereby the execution of the language is described directly (rather than by translation). Operational semantics loosely corresponds to [[interpreter (computing)|interpretation]], although again the "implementation language" of the interpreter is generally a mathematical formalism. Operational semantics may define an [[abstract machine]] (such as the [[SECD machine]]), and give meaning to phrases by describing the transitions they induce on states of the machine. Alternatively, as with the pure [[lambda calculus]], operational semantics can be defined via syntactic transformations on phrases of the language itself; * '''[[Axiomatic semantics]]''',<ref name=Goguen77>{{cite journal |author1-link=Joseph Goguen|author1-first=Joseph A.|author1-last=Goguen |author2-first=James W.|author2-last=Thatcher |author3-first=Eric G.|author3-last=Wagner |author4-first=Jesse B.|author4-last=Wright |title=Initial algebra semantics and continuous algebras |journal=[[Journal of the ACM]] |volume=24 |issue=1 |date=1977 |pages=68β95 |doi=10.1145/321992.321997|s2cid=11060837 |doi-access=free }}</ref> whereby one gives meaning to phrases by describing the ''[[axiom]]s'' that apply to them. Axiomatic semantics makes no distinction between a phrase's meaning and the logical formulas that describe it; its meaning ''is'' exactly what can be proven about it in some logic. The canonical example of axiomatic semantics is [[Hoare logic]]. Apart from the choice between denotational, operational, or axiomatic approaches, most variations in formal semantic systems arise from the choice of supporting mathematical formalism.{{cn|date=April 2024}}
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)