Actions

Computer science::Semantics

::concepts

Meaning::language    Semantic::semantic    Study::theory    Words::first    Meanings::which    Other::truth

Computer science {{#invoke:main|main}} In computer science, the term semantics refers to the meaning of languages, as opposed to their form (syntax). According to Euzenat, semantics "provides the rules for interpreting the syntax which do not provide the meaning directly but constrains the possible interpretations of what is declared."<ref>Euzenat, Jerome. Ontology Matching. Springer-Verlag Berlin Heidelberg, 2007, p. 36</ref> In other words, semantics is about interpretation of an expression. Additionally, the term is applied to certain types of data structures specifically designed and used for representing information content.

Programming languages

The semantics of programming languages and other languages is an important issue and area of study in computer science. Like the syntax of a language, its semantics can be defined exactly.

For instance, the following statements use different syntaxes, but cause the same instructions to be executed:

Statement Programming languages
x += y C, C++, C#, Java, JavaScript, Perl, PHP, Python, Ruby, etc.
x := x + y Ada, ALGOL, ALGOL 68, BCPL, Dylan, Eiffel, Modula-2, Oberon, OCaml, Object Pascal (Delphi), Pascal, SETL, Simula, Smalltalk, Standard ML, VHDL, etc.
ADD x, y Assembly languages: Intel 8086
LET X = X + Y BASIC: early
x = x + y BASIC: most dialects; Fortran, MATLAB, Lua
Set x = x + y Caché ObjectScript
ADD Y TO X. ABAP
ADD Y TO X GIVING X COBOL
set /a x=x+y Batch
(incf x y) Common Lisp
/x y x add def PostScript

Generally these operations would all perform an arithmetical addition of 'y' to 'x' and store the result in a variable called 'x'.

Various ways have been developed to describe the semantics of programming languages formally, building on mathematical logic:<ref>{{#invoke:citation/CS1|citation |CitationClass=book }} </ref>

  • Operational semantics: The meaning of a construct is specified by the computation it induces when it is executed on a machine. In particular, it is of interest how the effect of a computation is produced.
  • Denotational semantics: Meanings are modelled by mathematical objects that represent the effect of executing the constructs. Thus only the effect is of interest, not how it is obtained.
  • Axiomatic semantics: Specific properties of the effect of executing the constructs are expressed as assertions. Thus there may be aspects of the executions that are ignored.

Semantic models

Terms such as semantic network and semantic data model are used to describe particular types of data model characterized by the use of directed graphs in which the vertices denote concepts or entities in the world, and the arcs denote relationships between them.

The Semantic Web refers to the extension of the World Wide Web via embedding added semantic metadata, using semantic data modelling techniques such as Resource Description Framework (RDF) and Web Ontology Language (OWL).


Semantics sections
Intro  Linguistics  Montague grammar  Dynamic turn in semantics  Prototype theory  Theories in semantics  Computer science  Psychology  See also  References   External links   

Computer science
PREVIOUS: Theories in semanticsNEXT: Psychology
<<>>