{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

n1 - CIS 755 Programming Languages Neelam Soundarajan...

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

View Full Document Right Arrow Icon
CIS 755 Programming Languages Neelam Soundarajan Computer Sc. and Engineering Dreese Lab 579 Tel: 292 1444 Please send corrections by e-mail to [email protected] 1
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
Main Topic : Ways to formally define syntax and semantics of programming languages. Plus: A bit about Programming Methodologies. Tentative Schedule: 1. Attribute Grammars: 2 weeks. 2. Operational Semantics: (including Lisp, inter- preter): 2 weeks. 3. Axiomatic Semantics: 2.5 weeks 4. Operational Semantics (contd.): 0.5 weeks 5. Denotational Semantics: 2 weeks 6. Other? 1 week. 2
Image of page 2
References: 1. Formal specification of programming languages, F.Pagan 2. Formal syntax and semantics of programming languages, Kurtz and Slonnegar. 3. Lisp 1.5 programmer’s manual, McCarthy (and others). Copies of all on closed reserve in the Science / Engineering library. 3
Image of page 3

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

View Full Document Right Arrow Icon
Attribute Grammars References: Pagan (Ch. 2.3), Kurtz (Ch. 3) Context-free conditions can be specified using BNF. Question : How do we specify CS conditions? Answer : Using Attribute grammars. An AG is: a BNF grammar + attributes + rules for evaluating attributes + conditions (to capture the context sensitive re- quirements). 4
Image of page 4
Example: { a n b n c n | n 1 } h ls i ::= h as ih bs ih cs i Cond : Na ( h as i ) = Nb ( h bs i ) = Nc ( h cs i ) h as i ::= a Na ( h as i ) 1 | a h as i 1 Na ( h as i ) Na ( h as i 1 ) + 1 h bs i ::= b Nb ( h bs i ) 1 | b h bs i 1 Nb ( h bs i ) Nb ( h bs i 1 ) + 1 h cs i ::= c Nc ( h cs i ) 1 | c h cs i 1 Nc ( h cs i ) Nc ( h cs i 1 ) + 1 Na is a synthesized attribute of h as i ; Nb a synthesized attribute of h bs i ; and Nc a synthesized attribute of h cs i .
Image of page 5

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

View Full Document Right Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}