Preview

Syntax and Semantics

Good Essays
Open Document
Open Document
2374 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Syntax and Semantics
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

    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
  • 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

    The book says that Semantics refer to the meaning behind a word, and their primary and connotative meanings. One great example from the movie was how Nell called Jerry her "gaw anja," or translated: "guardian angel." She got this from a passage in the bible about a guardian angel swooping down from the heavens. Nell took this as primary meaning of Jerry, coming out of nowhere to be her friend and help her. Jerry took it as the connotative meaning that he is strong, supportive, and helpful. Jerry doubts that he is her "gaw anja" when he could not protect her from the scientists and the court wanting to keep her from being institutionalized for research.…

    • 595 Words
    • 3 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
  • 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
  • Satisfactory Essays

    study notes

    • 262 Words
    • 2 Pages

    semantics and literary criticism I.A. Richards and C.K. Ogden Semantics is the study of word meanings. True I.A. Richards developed the theory of general semantics. False Semantics was also known as semasiology.…

    • 262 Words
    • 2 Pages
    Satisfactory Essays
  • Better Essays

    The sender should consider the components of language when preparing their message. The components of language include phonemes, syntax, semantics, and pragmatics (Thomas Cheesebro, Linda O'Connor, Franciso Rios, University of Phoenix, 2010). The components of language can be used to provide the foundation of the intended message ensuring the message is delivered both appropriately and effectively. “Phonemes represent the sound system of a language and are often the smallest level the language is understood” (Thomas Cheesebro, Linda O'Connor, Franciso Rios, University of Phoenix, 2010). Syntax places the focus on the patterns or structures (including the rules for structure) of a language (Thomas Cheesebro, Linda O'Connor, Franciso Rios, University of Phoenix, 2010). Semantics puts a focus on the meaning of the words (Thomas Cheesebro, Linda O'Connor, Franciso Rios, University of Phoenix, 2010). Pragmatics focuses…

    • 1108 Words
    • 5 Pages
    Better Essays
  • Satisfactory Essays

    Homework CH 1 Java

    • 723 Words
    • 5 Pages

    2. Languages that let you use a vocabulary of descriptive terms, such as read, write, or…

    • 723 Words
    • 5 Pages
    Satisfactory Essays
  • Better Essays

    In logic languages, rules are not defined into great details as in imperative languages. Rules are specified in no particular order, so implementation must use the language to achieve desired results. Based on idea of using logical sentences to represent programs and perform computations. A very common example is Prolog for a logic language.…

    • 1672 Words
    • 7 Pages
    Better Essays
  • Powerful Essays

    Syntax in this instance refers to the computer language used to create a programme; a combination of illegible code (to the untrained eye) which provides the basis and commands for the action of a programme running on a computer. Semantics refers to the study of meaning or the understanding behind the use of language. Searle’s claim was that it is the existence of a brain which gives us our minds and the intelligence which we have, and that no combination of programming language is sufficient enough to contribute meaning to the machine and therein for the machine to understand. His claim was that the apparent understanding of a computer is merely more than a set of programmed codes, allowing the machine to extort answers based on available information. He did not deny that computers could be programmed to perform to act as if they understand and have meaning. In fact he quoted;…

    • 2455 Words
    • 10 Pages
    Powerful 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

    Abortion Is Wrong Essay

    • 1027 Words
    • 5 Pages

    Semantics (an interpretation of the meaning, of a word, sign, sentence,) affect perceptions, but they do not change realities; a baby is a baby no matter what we call her.…

    • 1027 Words
    • 5 Pages
    Good Essays
  • Better Essays

    Supervisor's Manual (Sample)

    • 3580 Words
    • 15 Pages

    MSN Encarta. (2008). semantics - Search Results - MSN Encarta. Retrieved June 25, 2008, from MSN Encarta: http://encarta.msn.com/encnet/refpages/search.aspx?q=semantics…

    • 3580 Words
    • 15 Pages
    Better Essays
  • Satisfactory Essays

    NASA AstronautIn the past twenty years, much time, effort, and money has been expended on designing an unambiguous representation of natural languages to make them accessible to computer processing. These efforts have centered around creating schemata designed to parallel logical relations with relations expressed by the syntax and semantics of natural languages, which are clearly cumbersome and ambiguous in their function as vehicles for the transmission of logical data. Understandably, there is a widespread belief that natural languages are unsuitable for the transmission of many ideas that artificial languages can render with great precision and mathematical rigor.…

    • 568 Words
    • 3 Pages
    Satisfactory 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

Related Topics