jagomart
digital resources
picture1_Principles Of Compiler Design Pdf 187677 | Uweek06


 133x       Filetype PDF       File size 0.03 MB       Source: www.cs.iit.edu


File: Principles Of Compiler Design Pdf 187677 | Uweek06
cs4xx introdution to compiler theory cs4xx week 6 reading chapter 6 from principles of compiler design alfred v aho jeffrey d ullman objectives 1 to understand in detail about recursive ...

icon picture PDF Filetype PDF | Posted on 02 Feb 2023 | 2 years ago
Partial capture of text on file.
          
                 CS4XX‐‐ INTRODUTION TO COMPILER THEORY 
                    ‐‐  CS4XX - WEEK 6 
          
         Reading: 
         Chapter 6 from Principles of Compiler Design, Alfred V. Aho & Jeffrey D Ullman 
          
         Objectives: 
         1. To understand in detail about Recursive Evaluators, Space for attribute values at    
         compile time, Assigning spaces at compiler-construction time  . 
         2 .To understand concepts of Type Checking. 
          
         Concepts: 
          1.  Recursive Evaluators-------------------------------------------------------- -------1/2 hour 
          2.  Space for attribute values at compile time---- -- --------------------------------1/2hour 
          3.  Assigning spaces at compiler-construction time---------------------------------1/2 hour 
          4.  Analysis of syntax directed analysis-----------------------------------------------1/2 hour 
          5.  Type systems-- -----------------------------------------------------------------------1/2 hour 
          6.  Specification of a simple type checker--------------------------------------------1/2 hour 
          
         Outlines: 
         1. Syntax directed Translation 
               
         a. Recursive Evaluators 
          Explanation of recursive functions that evaluate attributes as they traverse a parse tree 
          which are constructed from syntax directed definition.      
            o  Left to right traversals – Explains how the grammar can be implemented in a 
             recursive manner and the traversing is done in left to right side. 
            o  Other traversals – Illustrating the power of using manually recursive functions 
             for evaluating the attributes at the node of a parse tree. 
                          CS4XX - WEEK 6 
                                                1 
          
                         b. Space for attribute values at compile time 
                             Consider the compile-time assignment of space for attribute values. 
                                 o  Assigning space for attributes at compile time – Explains how the space is 
                                     allocated for attributes at the compile time. 
                                 o  Avoiding copies – Discussing the different copy rules. 
                      
                      
                          c. Assigning spaces at compiler-construction time 
                             Making copies by using multiple stacks which allows holding all attributes in a 
                             single stack.    
                                 o  Predicting lifetime for grammar – Predicting the lifetime of attributes at 
                                     compiler time construction. 
                                 o  Non overlapping lifetimes – Explaining how the lifetime of two attributes 
                                     do not overlap if their values can be held in a single register. 
                         d. Analysis of syntax directed analysis 
                              o  Recursive evaluation of attributes – Explains the overview of how attributes 
                                  are evaluated recursively. 
                              o  Strongly  noncircular  syntax-directed  definitions  –  Discussing  the 
                                  construction of recursive evaluators for a class of syntax directed definitions. 
                              o  A circularity test – Computing whether any cycles are there in the directed 
                                  graph for syntax-directed definitions. 
                     2. Type checking  
                       Compiler checking the source program for both syntactic and semantic conventions of 
                       the source program. 
                                                                CS4XX - WEEK 6 
                                                                                                                     2 
                      
           a.  Type systems 
             o  Type expressions – Representing the type of language construct using type 
              expressions. Discussing the different definitions of type expressions. 
             o  Type systems – Explaining type systems which is a rule for assigning type 
              expressions to various parts of a program. 
             o  Static  and  dynamic  checking  of  types  –  Overview  of  different  types  of 
              checking which are static and dynamic. 
             o  Error  recovery  –  Discussing  various  error  recovery  procedures  done  by 
              compiler. 
           b.  Specification of a simple type checker  
             o  A simple language – Discussing how type checker works by taking a simple 
              example for a simple language construct. 
             o  Type  checking  expressions  –  How  type  checking  is  performed  in  the 
              expressions. 
             o  Type  checking  of  statements  –  Statements  considered  are  assignment, 
              conditional and while statements. Here we will discuss how type checking is 
              done in these statements. 
             o  Type  checking  of  functions  –  Discussing  how  type  checking  is  done  in 
              functions 
                          CS4XX - WEEK 6 
                                                3 
          
The words contained in this file might help you see if this file matches what you are looking for:

...Csxx introdution to compiler theory week reading chapter from principles of design alfred v aho jeffrey d ullman objectives understand in detail about recursive evaluators space for attribute values at compile time assigning spaces construction concepts type checking hour analysis syntax directed systems specification a simple checker outlines translation explanation functions that evaluate attributes as they traverse parse tree which are constructed definition o left right traversals explains how the grammar can be implemented manner and traversing is done side other illustrating power using manually evaluating node b consider assignment allocated avoiding copies discussing different copy rules c making by multiple stacks allows holding all single stack predicting lifetime non overlapping lifetimes explaining two do not overlap if their held register evaluation overview evaluated recursively strongly noncircular definitions class circularity test computing whether any cycles there gra...

no reviews yet
Please Login to review.