Syntax and Semantics

Good Essays
Semantics

In programming language theory, semantics is the field concerned with the rigorous mathematical study of the meaning of programming languages. It does so by evaluating the meaning of syntactically legal strings defined by a specific programming language, showing the computation involved. In such a case that the evaluation would be of syntactically illegal strings, the result would be non-computation. Semantics describes the processes a computer follows when executing a program in that specific language. This can be shown by describing the relationship between the input and output of a program, or an explanation of how the program will execute on a certain platform, hence creating a model of computation.

Semantics reveals the meaning of syntactically valid strings in a language. For natural languages, this means correlating sentences and phrases with the objects, thoughts, and feelings of our experiences. For programming languages, semantics describes the behavior that a computer follows when executing a program in the language. We might disclose this behavior by describing the relationship between the input and output of a program or by a step-by-step explanation of how a program will execute on a real or an abstract machine.

Semantics is concerned with the interpretation or understanding of programs and how to predict the outcome of program execution. The semantics of a programming language describe the relation between the syntax and the model of computation. Semantics can be thought of as a function which maps syntactical constructs to the computational model.

This approach is called syntax-directed semantics
There are several widely used techniques ( algebraic, axiomatic, denotational, operational, and translation) for the description of the semantics of programming languages.
• Algebraic semantics describe the meaning of a program by defining an algebra. The algebraic relationships and operations are described by axioms and equations.

You May Also Find These Documents Helpful

  • Good Essays

    Compter Science

    • 819 Words
    • 4 Pages

    Programming statements in a low-level language will be close to natural language and will use standard mathematical notation.…

    • 819 Words
    • 4 Pages
    Good Essays
  • Good Essays

    pt1420 exam review

    • 738 Words
    • 3 Pages

    The words that make up a high level programming language are known as what? Keywords…

    • 738 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    Semantics and Meaning

    • 743 Words
    • 3 Pages

    Semantics: a branch of theoretical linguistics, that deals with the meanings of words and sentences.…

    • 743 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    Geometry Outline

    • 2859 Words
    • 12 Pages

    Definitions: Statements that give meaning to new terms that will be used in a system.…

    • 2859 Words
    • 12 Pages
    Good Essays
  • Good Essays

    Semantics (as the study of meaning) is central to the study of communication; and as communication becomes more and more a crucial factor in social organization, the need to understand it becomes more and more pressing.…

    • 1872 Words
    • 8 Pages
    Good Essays
  • Satisfactory Essays

    Now, the way people communicate with computers is not directly by the language that the computer understands (machine language), but instead a set of instructions have to be written in a different language that specializes in writing programs such as C++ or Visual Basic. These types of languages at the same time have to be translated into machine language either through compilers or interpreters. Compilers translate all the source codes (C++, Visual Basic, etc. language) in a program to machine language before it’s executed. Then after that the compiled program (in this case machine language) is executed by the Central Process Unit (CPU). At this time the machine language can be used every time the program is run unless the source code changes, in which then the machine language should be recompiled. Like compilers, interpreters also translate the source code into machine language, but they only translate each line of the code as it is executed. Difference is also that every time the program is run each line must be translated again. Which in comparison to compilers, interpreters are much…

    • 322 Words
    • 2 Pages
    Satisfactory Essays
  • Better Essays

    Symbolic Logic

    • 7518 Words
    • 29 Pages

    Mathematical logic is often divided into the fields of set theory, model theory, recursion theory, and proof theory. These areas share basic results on logic, particularly first-order logic, and definability. In computer science (particularly in the ACM Classification) mathematical logic encompasses additional topics not detailed in this article; see logic in computer science for those.…

    • 7518 Words
    • 29 Pages
    Better Essays
  • Powerful Essays

    homonymy and polysemy

    • 4500 Words
    • 18 Pages

    Semantics is the scientific study of meaning in language and deals with a lot of complex subjects, such as utterances and sentences, reference, sense relation or lexical ambiguity. Semantics often appears in other disciplines, for example in philosophy, anthropology, psychology and communication theory and it is closely connected with pragmatics. As already mentioned the study of meaning is the main point in semantics. It is well known that meaning is an ordinary English word, which like most other words can be used in a number of different ways, but this is rather a very simple view on this matter. Actually, we distinguish two different kinds of meaning, the speaker meaning and the sentence or word meaning. The former expresses what a speaker intends to convey by using a piece of language, the latter what exactly the sentence or a single word means.…

    • 4500 Words
    • 18 Pages
    Powerful Essays
  • Better Essays

    Before we go further, we should understand the definition of the word “metalanguage” since it might be new for some of us. Metalanguage is the language that is used to present, name and describe terminological information, the language of a particular field name in an entry, e,g. "synonym" is the English name of the data field, that contains synonyms to main entry terms. To make it simpler, metalanguage is a language that can be used to describe languages. Then, we already know that semantic is the study of meaning in language. So, semantic metalanguage is theory and a practical, meaning-based approach to linguistic analysis. The leading proponents of the theory are Anna Wierzbicka at the Australian National University who originated the theory in the early 1970s (Wierzbicka 1972), and Cliff Goddard at Australia 'sUniversity of New England (Goddard & Wierzbicka 1994, 2002). It is…

    • 1124 Words
    • 5 Pages
    Better Essays
  • Good Essays

    translation

    • 603 Words
    • 3 Pages

    Semantic Translation: Semantic translation takes advantage of semantics that associate meaning with individual data elements in one dictionary to create an equivalent meaning in a second system.…

    • 603 Words
    • 3 Pages
    Good Essays
  • Powerful Essays

    SEMANTICS: The set of rules by which we derive meaning from morphemes, words, and sentences in a given language; also, the study of meaning.…

    • 1113 Words
    • 5 Pages
    Powerful Essays
  • Good Essays

    Syntax

    • 268 Words
    • 2 Pages

    Syntax is the grammatical tool that deals with how sentences are put together and the relationship between words. It is a very methodical and logical sequence, ensuring that sentences are put together using subject, verb and object and that the words in the sentence all have agreement, so that the correct forms of words are used.…

    • 268 Words
    • 2 Pages
    Good Essays
  • Powerful Essays

    -Semantics= tells us the meaning of individual words and how words combine to convey larger meanings…

    • 10440 Words
    • 42 Pages
    Powerful Essays
  • Good Essays

    Algorithms and Flowcharts

    • 738 Words
    • 3 Pages

    The term algorithm is often used to refer to the logic of a program It is a step-by step description of how to arrive at the solution of the given problem. It may be formally defined as a sequence of instructions, designed in a manner that, if the instructions are executed in the specified sequence, the desired results will be obtained. In order to qualify as an algorithm, a sequence of instructions must possess the following characteristics:…

    • 738 Words
    • 3 Pages
    Good Essays
  • Good Essays

    The final building block of language is grammar. Grammar is the rules of language that specify how phonemes, morphemes, words and phrases should be combined to meaningfully express thoughts. Grammar also governs how to use various classes of words and their inflections. Grammar is made up of syntax and semantics. Syntax is the grammatical rules that specify in what order the words and phrases should be arranged in a sentence to convey meaning. By the time one is able to read, his or her syntactical sense is highly developed. This makes it sound like even sentences composed of unfit words makes sense because it follows proper syntax. Syntax is different in every language. For example, English speaking people say adjectives before nouns and many other languages say the adjective after the noun. Semantics are the meaning or study of meaning derived from morphemes, words and…

    • 377 Words
    • 2 Pages
    Good Essays