Main article: semantics (computer science)
In computer science, the appellation semantics refers to the acceptation of languages, as against to their anatomy (syntax). According to Euzenat, semantics "provides the rules for interpreting the syntax which do not accommodate the acceptation anon but constrains the accessible interpretations of what is declared."17 In added words, semantics is about estimation of an expression. Additionally, the appellation is activated to assertive types of abstracts structures accurately advised and acclimated for apery advice content.
editProgramming languages
The semantics of programming languages and added languages is an important affair and breadth of abstraction in computer science. Like the syntax of a language, its semantics can be authentic exactly.
For instance, the afterward statements use altered syntaxes, but could cause the aforementioned instructions to be executed:
Statement Programming languages
x += y C, C++, C#, Java, Perl, Python, Ruby, PHP, etc.
x := x + y ALGOL, BCPL, Simula, ALGOL 68, SETL, Pascal, Smalltalk, Modula-2, Ada, Standard ML, OCaml, Eiffel, Object Pascal (Delphi), Oberon, Dylan, VHDL, etc.
ADD x, y Assembly languages: Intel 8086
LET X = X + Y BASIC: early
x = x + y BASIC: a lot of dialects; Fortran, MATLAB
Set x = x + y Caché ObjectScript
ADD Y TO X GIVING X COBOL
(incf x y) Common Lisp
Generally these operations would all accomplish an arithmetical accession of 'y' to 'x' and abundance the aftereffect in a capricious alleged 'x'.
Various means accept been developed to call the semantics of programming languages formally, architecture on algebraic logic:18
Operational semantics: The acceptation of a assemble is defined by the ciphering it induces if it is accomplished on a machine. In particular, it is of absorption how the aftereffect of a ciphering is produced.
Denotational semantics: Meanings are modelled by algebraic altar that represent the aftereffect of active the constructs. Thus alone the aftereffect is of interest, not how it is obtained.
Axiomatic semantics: Specific backdrop of the aftereffect of active the constructs are bidding as assertions. Thus there may be aspects of the executions that are ignored.
editSemantic models
Terms such as semantic arrangement and semantic abstracts archetypal are acclimated to call accurate types of abstracts models characterized by the use of directed graphs in which the vertices denote concepts or entities in the world, and the arcs denote relationships amid them.
The Semantic Web refers to the addendum of the Apple Wide Web via embedding added semantic metadata, application semantic abstracts modelling techniques such as Resource Description Framework (RDF) and Web Ontology Accent (OWL).
No comments:
Post a Comment