{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

2syntax - Formal Specications of Programming Languages...

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
CSci 5106: Programming Languages Syntax Descriptions Gopalan Nadathur Department of Computer Science and Engineering University of Minnesota Lectures in Fall 2010 Gopalan Nadathur Syntax Descriptions Formal Specifications of Programming Languages Clear and complete descriptions of programming languages are needed for a variety of reasons: as precursors to implementations to ensure consistency between different implementations to examine and understand the implications of design decisions to communicate with language users Such descriptions must treat two aspects: syntax and semantics Gopalan Nadathur Syntax Descriptions Role of Syntax and Semantics Syntax descriptions serve two purposes they identify the well-formed expressions of the language they analyze these expressions into their meaningful components and their interrelationships E.g., consider the difference between accepting 2 + 3 * 4 and attributing a structure to the expression Semantics clarifies the meaning of well-formed expressions E.g., we still need to know what to evaluate the expression 2 + 3 * 4 to even after it has been assigned a structure Syntax is important even for semantics: compositional semantics is based on syntactic structure Gopalan Nadathur Syntax Descriptions General Comments About Semantics Some issues that need to be considered in describing semantics Who is the description meant for? for users of the language for implementors for people building verifiers and reasoners What methodology should be used for the description? Some approaches that have been used denotational semantics (see Tennent’s paper) axiomatic semantics (see Hoare’s and Floyd’s papers) operational semantics informal descriptions accompanying syntax descriptions A rich area of research: designing new methods and extending old ones to cover new requirements Gopalan Nadathur Syntax Descriptions
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
General Comments About Syntax We will think of syntax as more about describing structure than simply circumscribing language In particular, the following kinds of questions will be important: What grammar is used to analyze expressions? How easily does the analysis lead to an abstract rendition of syntax? In this course, we will look at syntax treatments systematically, but not at semantics treatments We will, however, talk of semantics sporadically For those interested: Chapter 13 has some discussion of semantics methods Gopalan Nadathur Syntax Descriptions Abstract Syntax This is a view of syntax that gives importance to identifying the meanigful components of an expression their interrelationships in the expression For example consider the English sentences John likes Jane and John is liked by Jane In this view of syntax, both correspond to like john jane or like(john,jane) i.e. , to a relationship between the operator like and the operands john and jane Note that this is still about syntax and not about semantics However, it is about an abstract view of syntax and hence called abstract syntax Gopalan Nadathur Syntax Descriptions
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern