COMP4403 - Sem 1 2008 - St Lucia - Internal

Authenticated View
Printed: 29 April 2008, 09:40AM
This printed course profile is valid at the date and time specified above. The course profile may be subject to change during the semester – the online version is the authoritative version.

1. General Course Information

1.1 Course Details

Course Code: COMP4403 Course Title: Compilers and Interpreters
Coordinating Unit: School of Information Technology and Electrical Engineering
Semester: Semester 1, 2008    Mode: Internal
Level: Undergraduate
Location: St Lucia
Number of Units: 2    Contact Hours Per Week: 3L1T
Pre-Requisites: COMP2502 or COMP3506
Recommended Pre-Requisites: CSSE1000
Incompatible: COMP3401 or COMP7402 or CS320 or CS324
Course Description: Compiler modules; programming language specifications; lexical analysis, parsing - recursive descent & table driven; static semantics - symbol tables & attribute grammars; error handling; introduction to code generation & optimisation; compiler generators.
Assumed Background: Prerequisite: COMP2502 or COMP3506
A compiler is a substantial program and the software engineering techniques taught in COMP3506 (COMP2502) and its prerequisites (e.g., CSSE2002) are needed in developing such a tool. The assignments in this course involve modifying reasonably large, complex software and require sound programming skills. Extensive programming experience, in particular in Java, is assumed knowledge.

A sound knowledge of data structures is required for an understanding of the appropriate data structures to use for internal structures in a language processor such as the symbol table. Some knowledge of how basic data structures such as arrays and records are implemented at the machine level is expected from the COMP3506/2502 prerequisite.

Recommended: CSSE1000 or COMP2302 or 2300 or 1300
A basic knowledge of machine and assembly language programming is required for an understanding of the code generation phase of the compiler.

1.2 Course Introduction

The invention of (high-level) programming languages in the 1950s was one of the most significant advances for making computers easier to use --- compare writing programs in machine or assembly language with, say, Java. Implementing programming languages was a major challenge taken on in the 1960s and 1970s that led to the development of modern day compilers and the theory and practice that we will study in this course.

A programming language is implemented by either a compiler or interpreter. These are themselves both just (rather sophisticated) programs. A compiler implements a programming language by translating a high-level program (e.g., a Java program represented simply as a text file (which is itself represented as a stream of characters (which are represented by bits))) to a machine-level program (represented as a sequence of machine instructions (e.g., Pentium machine instructions (that are themselves represented as bits))). [Aside: you have to be able to handle lots of nesting in this course.]

The tasks undertaken by a compiler can be divided into


The generated machine code can then be executed on the target machine to run the program. Due to time constraints within the course we don't spend a lot of time on code optimisation.

An interpreter is a simpler (and usually less efficient) way of implementing a programming language. It acts in the same way as a compiler in the early phases, but does not have a code generation phase. Instead it directly interprets its internal representation of the program. The main advantage of interpreters over compilers is that they do not depend on the target machine, and hence are more portable than compilers. Interpreters are used for simple languages, like operating system command shells, where the overheads of generating machine code outweigh the slower execution time of the interpreted program, or for very high-level languages (e.g., functional and logic programming languages) where the individual operations are so powerful that the execution-time cost of interpretation over compilation is not all that significant. In this course we focus on compiling to a simple interpreted stack machine (similar to the Java Virtual Machine (JVM)).

The language recognition phases of compilers are common to many applications of computers that involve a language of some form. For example, a web broswer recognises a document written in the Hyper Text Markup Language (HTML) and interprets it by generating a display of the document on the screen.

Early compilers were hand-crafted programs designed to implement a particular language. However, in the late 1960s it was recognised that many of the aspects of writing a compiler were not dependent on the particular programming language being compiled. In particular, the early phases of recognising a program and creating an abstract representation of it were dependent mainly on the grammar of the language. The result was the creation of compiler generators (parser generators really). A compiler generator is yet another program that accepts a description of a programming language (in the form of a grammar for the language) and generates a program, that is the compiler for that language. Modern compiler generators are often implemented as suites of cooperating tools that generate compiler components from a range of notations, each of which specifies a different aspect of a language (and its implementation). These activities include not only parsing the input according to a grammar, but also error checking and even code generation.

1.3 Course Staff

Course Coordinator:  Ian Hayes
Phone: 3365 2386     Email: ianh@itee.uq.edu.au Homepage: www.itee.uq.edu.au/~ianh
Campus: St Lucia Building: General Purpose South (Map)   Room: 326
Consultation: General questions about course content or assignments can be posted to the course newsgroup (uq.itee.comp4403), or discussed at tutorials. Consultation times will be published on the course web page. Additional consulting times will be made available near assignment deadlines.


1.4 Timetable

Timetables are available on mySI-net.

2. Aims, Objectives & Graduate Attributes

2.1 Course Aims

This course studies how compilers and compiler generators are implemented. Along the way we learn an a lot about programming languages, their grammars, what they really mean, how they are implemented, and how to structure large programs.

2.2 Learning Objectives

After successfully completing this course you should be able to:


1. KNOWLEDGE OUTCOMES
1.1  Understand the structure of a compiler in terms of lexical analysis, parsing, static semantic analysis and code generation.
1.2  Understand the theory of lexical analysis of programming languages (i.e., recognising keywords, numbers, variable names, operators, etc.) using regular expressions and finite state machines, and apply the theory in practice.
1.3  Understand and apply the theory of parsing of (programming language) grammars (i.e., recognising the structure of programs in terms of procedures, statements and expressions, etc) using (top-down), recursive-descent parsing and (bottom-up) shift/reduce parsing.
1.4  Understand the static semantics of programming languages (i.e., handling variable, type and procedure declarations and analysing the type correctness of programs) and develop static semantic analysers using either structured symbol tables or attribute grammars.
1.5  Understand the runtime organisation of memory using stacks for procedure calls and local variable allocation, and heaps for dynamic memory allocation ("new" in Java).
1.6  Understand and apply strategies for generating machine code for programming language expressions, control structures, and procedure/method calls.

2. SKILLS OUTCOMES
2.1  Have a better understanding of how to structure and program large systems.
2.2  Use compiler generation tools to generate lexical analysers (from regular expressions), parsers (from grammars), and static semantic analysis components (from attribute grammars).

2.3. Graduate Attributes

Successfully completing this course will contribute to the recognition of your attainment of the following UQ (Undergrad Pass) graduate attributes:

GRADUATE ATTRIBUTELEARNING OBJECTIVES
A. IN-DEPTH KNOWLEDGE OF THE FIELD OF STUDY
A1. A comprehensive and well-founded knowledge in the field of study.1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 2.1, 2.2
A4. An understanding of how other disciplines relate to the field of study.1.3
A5. An international perspective on the field of study. 
B. EFFECTIVE COMMUNICATION
B1. The ability to collect, analyse and organise information and ideas and to convey those ideas clearly and fluently, in both written and spoken forms.1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 2.1, 2.2
B2. The ability to interact effectively with others in order to work towards a common outcome. 
B3. The ability to select and use the appropriate level, style and means of communication.1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 2.1, 2.2
B4. The ability to engage effectively and appropriately with information and communication technologies.1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 2.1, 2.2
C. INDEPENDENCE AND CREATIVITY
C1. The ability to work and learn independently.1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 2.1, 2.2
C3. The ability to generate ideas and adapt innovatively to changing environments.1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 2.1, 2.2
C4. The ability to identify problems, create solutions, innovate and improve current practices.1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 2.1, 2.2
D. CRITICAL JUDGEMENT
D1. The ability to define and analyse problems.1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 2.1, 2.2
D2. The ability to apply critical reasoning to issues through independent thought and informed judgement.1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 2.1, 2.2
D3. The ability to evaluate opinions, make decisions and to reflect critically on the justifications for decisions.1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 2.1, 2.2
E. ETHICAL AND SOCIAL UNDERSTANDING
E1. An understanding of social and civic responsibility. 
E2. An appreciation of the philosophical and social contexts of a discipline.1.1, 2.1
E4. A knowledge and respect of ethics and ethical standards in relation to a major area of study. 
E5. A knowledge of other cultures and times and an appreciation of cultural diversity. 

Successfully completing this course will contribute to the recognition of your attainment of the following Engineers Australia graduate attributes:

GRADUATE ATTRIBUTELEARNING OBJECTIVES
1. Ability to apply knowledge of basic science and engineering fundamentals1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 2.1, 2.2
2. Ability to communicate effectively, not only with engineers, but also with the community at large1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 2.1, 2.2
3. In-depth technical competence in at least one engineering discipline1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 2.1, 2.2
4. Ability to undertake problem identification, formulation and solution1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 2.1, 2.2
5. Ability to utilise a systems approach to design and operational performance1.1, 2.1, 2.2
6. Ability to function effectively as an individual and in multi-disciplinary and multi-cultural teams, with the capacity to be a team leader or manager as well as an effective team member 
7. Understanding of the social, cultural, global and environmental responsibilities of the professional engineer, and for the need for sustainable development 
8. Understanding of the principles of sustainable design and development 
9. Understanding of and commitment to professional and ethical responsibilities 
10. Expectation and capacity to undertake life-long learning1.1, 2.1

3. Learning Resources

3.1 Required Resources

Class handouts will be available from the course web page http://www.itee.uq.edu.au/~comp4403. URL
 
The course newsgroup is uq.itee.comp4403. This group is available on both the University and School news servers (news.uq.edu.au and news.itee.uq.edu.au).

Important notices regarding the course will be announced on the newsgroup. You are expected to read these notices regularly (at least once a week, and more often near assignment deadlines).

The newsgroup can be used by students to post questions or comments to a wide audience. The teaching staff will monitor the group on a regular basis. Please be respectful to your fellow students and staff when using the news group. When asking questions about assignments it is important that you do not make public your (partial) solution. You can email both the lecturer and tutor instead.

The news group is archived at http://www.itee.uq.edu.au/cgi-bin/fetch?newsgroup=uq.itee.comp4403.
URL
 
Louden, K.C., Compiler Construction - Principles and Practice, PWS Publishing, 1997.  
 

3.2 Recommended Resources

Michael L. Scott, Programming Language Pragmatics, Second Edition, Morgan Kaufmann, 2005.  
 
Aho, A.V., Sethi, R. and Ullman, J.D., Compilers: Principles, Techniques, and Tools, Addison-Wesley, 1986.  
 
Waite, W.M. and Goos, G., Compiler Construction, Springer-Verlag, 1984.  
 
Muchnick, S.S., Advanced Compiler Design and Implementation, Morgan Kaufmann, 1997.  
 

3.3 University Learning Resources

Access to required and recommended resources, plus past central exam papers, is available at the UQ Library website (http://library.uq.edu.au/search/r?SEARCH=COMP4403).

The University offers a range of resources and services to support student learning. Details are available on the myServices website (https://student.my.uq.edu.au/).

3.4 School of Information Technology and Electrical Engineering Learning Resources

Students enrolled at St Lucia who wish to retain a hard copy of this profile can use the free print quota provided each semester to students enrolled in courses in the School of Information Technology & Electrical Engineering. For information on how to use this print quota, see the School Policy on Student Photocopying and Printing (St Lucia) (http://www.itee.uq.edu.au/about_ITEE/policies/copy-print.html). Students enrolled at the Ipswich campus will either be provided with a hard copy or given directions in class on how to obtain a free copy.

ITEE course websites can be found at http://www.itee.uq.edu.au/~COURSECODE. Many ITEE courses also have Usenet newsgroups, named uq.itee.COURSECODE. Instructions for accessing newsgroups are available at http://studenthelp.itee.uq.edu.au/faq/1stYearFAQ.html#accessnews.

3.5 Other Learning Resources & Information

A summary of what has actually been covered in the course so far will be available in http://www.itee.uq.edu.au/~comp4403/sofar/index.html.

The course will involve the use of the undergraduate Unix computer facilities and the Java compiler and runtime environment. It is assumed that you are already familiar with these resources. In addition, the course will use the Java-CUP compiler generator and JFlex lexical analyzer generator, that runs on the School's Unix computer facilities. Instruction on how to use these compiler generation tools will be provided in the course.

Documentation for Java-CUP and JFlex will be available from the course web page.

Documentation on the use of the School's computing facilities can be found at http://studenthelp.itee.uq.edu.au.

4. Teaching & Learning Activities

4.1 Learning Activities

Date
Activity
Learning Objectives
25 Feb 08 00:00 - 29 Feb 08 00:00
Course overview (Lecture): phases of a compiler
Readings/Ref: Handouts (Language syntax, Machine instructions); Louden (Sect. 1.1-5);
1.1, 2.1
27 Feb 08 00:00 - 29 May 08 00:00
Code generation (Lecture): Code generation for a stack machine. Code generation for expressions, control structures, and procedure calls. Code optimisation.
Readings/Ref: Handouts (Machine Instructions, Abstract syntax tree, Stack machine interpreter); Louden (Chap. 8);
1.5, 1.6
3 Mar 08 00:00 - 7 Mar 08 00:00
Language definition (Lecture): Definition of the syntax of programming languages using context-free grammars and regular expressions.
Readings/Ref: Louden (3.1-6, 3.7 but for PL0);
1.2, 1.3
10 Mar 08 00:00 - 14 Mar 08 00:00
Recursive descent parsing (Lecture): Implementing a parser for an Extended Backus-Naur Form (EBNF) grammar using recursive methods, one for each non-terminal symbol in the grammar. Handling syntax error recovery. Detailed discussion of the parser used in assignment 1.
Readings/Ref: Handouts (Assignment 1 compiler); Louden (4.1, 4.4-5 but for PL0);
1.3, 2.1
17 Mar 08 00:00 - 21 Mar 08 00:00
Assignment 1 compiler (Lecture): Detailed discussion of the recursive descent parser used in assignment 1, including parsing, syntax error recovery, static semantics (checking the types of variables, etc.), abstract syntax tree construction and code generation.
Readings/Ref: Handouts (Assignment 1 files for the Parser and Abstract syntax tree);
1.1, 1.3, 1.4, 1.5, 1.6, 2.1
24 Mar 08 00:00 - 1 Apr 08 00:00
Grammars and LL(1) parsing (Lecture): Rewriting grammars to avoid left factors and left recursion (so that they are suitable for recursive descent parsing). First and follow sets. LL(1) grammars and parsing.
Readings/Ref: Louden (4.2-4.3);
1.3
2 Apr 08 00:00 - 2 May 08 00:00
Bottom-up parsing (Lecture): Shift/reduce parsing. LR(0) parsing. Assignment 2 compiler using parser generator tool. Parsing conflicts. Operator precedence and associativity. LR(1) parsing. LALR(1) parsing.
Readings/Ref: Handouts (Assignment 2 compiler); Louden (5.1-4, 5.5-7 but for assignment 2 compiler);
1.3
7 Apr 08 00:00 - 9 May 08 00:00
Static semantic analysis (Lecture): The structure of the identifier tables. Representing programming languages types. Representing nested scopes and handling declarations.
Using attribute grammars to specify static semantics.
Readings/Ref: Handouts (Symbol table from assignment compilers); Louden (6.1, 6.3-4, 6.5 but for PL0);
1.4
12 May 08 00:00 - 16 May 08 00:00
Runtime organisation (Lecture): Stack-based runtime organisation for handling procedure calls and local variable allocation. Parameter passing mechanisms. Heap organisation for dynamically allocated variables. Representing objects and classes.
Readings/Ref: Louden (Chap. 7);
1.5
19 May 08 - 23 May 08
Scanning (Lecture): Regular expressions. Deterministic finite automata (DFA). Nondeterministic finite automata (NFA). Coverting regular expressions into NFAs and NFAs into DFAs. Scanner for PL0.
Readings/Ref: Louden (2.1-4, 2.5-6 but using JFlex);
1.2
26 May 08 00:00 - 30 May 08 00:00
Course Summary (Lecture): An overview of what has been covered in the course, and how it relates to the final examination.
Readings/Ref: Handouts (Couse summary and Examination overview); Louden ;
1.1, 1.2, 1.3, 1.4, 1.5, 1.6

4.2 Other Teaching and Learning Activities Information

There are three hours of lectures per week. These will present the material covered in the course and some will be used to give details of the compilers that you will have to modify in the assignments.

The tutorial exercises form an extremely important part of the course. The tutorials provide the basis from which you can attempt the assignments and cover questions similar to those in the final examination. They are an essential part of the learning process in this course.

5. Assessment

5.1 Assessment Summary

This is a summary of the assessment in the course. For detailed information on each assessment, see 5.5 Assessment Detail below.

Assessment Task
Due Date
Weighting
Learning Objectives
Computer-based Assessment
Assignment 1
17 Mar 08 00:00 - 4 Apr 08 09:00
20%
1.1, 1.3, 1.4, 1.5, 1.6, 2.1
Computer-based Assessment
Assignment 2
7 Apr 08 00:00 - 2 May 08 09:00
20%
1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 2.1, 2.2
Computer-based Assessment
Assignment 3
5 May 08 00:00 - 23 May 08 09:00
20%
1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 2.1, 2.2
Exam - during Exam Period (Central)
Final Examination
Examination Period
40%
1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 2.1

5.2 Course Grading


Grade 1, Fail: Fails to demonstrate most or all of the basic requirements of the course: MARK < 20% (see the end of this section for a definition of MARK)

      The minimum percentage required for a grade of 1 is: 0%

Grade 2, Fail: Demonstrates clear deficiencies in understanding and applying fundamental concepts; communicates information or ideas in ways that are frequently incomplete or confusing and give little attention to the conventions of the discipline: MARK >= 20%

Grade 3, Fail: Demonstrates superficial or partial or faulty understanding of the fundamental concepts of the field of study and limited ability to apply these concepts; presents undeveloped or inappropriate or unsupported arguments; communicates information or ideas with lack of clarity and inconsistent adherence to the conventions of the discipline: MARK >= 45% and Exam >= 40%

Grade 4, Pass: Demonstrates adequate understanding and application of the fundamental concepts of the field of study; develops routine arguments or decisions and provides acceptable justification; communicates information and ideas adequately in terms of the conventions of the discipline: MARK >= 50% and Exam >= 45%

Grade 5, Credit: Demonstrates substantial understanding of fundamental concepts of the field of study and ability to apply these concepts in a variety of contexts; develops or adapts convincing arguments and provides coherent justification; communicates information and ideas clearly and fluently in terms of the conventions of the discipline: MARK >= 65% and Exam >= 60%

Grade 6, Distinction: As for 5, with frequent evidence of originality in defining and analysing issues or problems and in creating solutions; uses a level, style and means of communication appropriate to the discipline and the audience: MARK >= 75% and Exam >= 70%

Grade 7, High Distinction: As for 6, with consistent evidence of substantial originality and insight in identifying, generating and communicating competing arguments, perspectives or problem solving approaches; critically evaluates problems, their solutions and implications: MARK >= 85% and Exam >= 80%

Other Requirements & Comments : The assessment consists of three assignments and a final examination. You must complete all three assignments and the final examination.
MARK = 0.2*A1 + 0.2*A2 + 0.2*A3 +0.4*Exam
At the discretion of the course coordinator, final grades may be scaled upwards, but not downwards.
Note that the percentage breakdowns for assessment differ for COMP4403 and COMP7402.

5.3 Late Submission

A penalty of 5% of the maximum mark for an assignment will be deducted for each day late. A weekend counts as one day for these purposes (i.e., if the assignment is due 9am Friday and you submit it just before 9am Monday that counts as two days late).

Requests for extensions should be directed to the course co-ordinator and should be accompanied by suitable documentation, e.g., medical certificates. As we plan to hand back assignments about 1 week after submission, requests for extension will not be accepted more than one week late.

5.4 Other Assessment Information

Assignments will be returned via the tutorial sessions, usually one week after the assignment deadline.

5.5 Assessment Detail


Assignment 1
Type: Computer-based Assessment
Learning Objectives Assessed: 1.1, 1.3, 1.4, 1.5, 1.6, 2.1
Due Date:
         17 Mar 08 00:00 - 4 Apr 08 09:00
Weight: 20%
Task Description: Extending a recursive descent compiler.
This assignment involves extending a compiler written in Java using recursive descent parsing to handle additional language features. Full details of the language extensions and files for the compiler will be provided via the course web page.
Criteria & Marking: Your assignment will be assessed according to the following criteria: elegance of approach, ease of understanding of code, and correctness of your implementation. Your implementation will be automatically tested and hence it is important that you do not modify parts of the compiler other than those stated in the assignment handout.
Submission: The assignments will be collected electronically via the the School's computing facilities. Details of how to submit assignments are included in the assignment handouts.

Your assignment submission must be accompanied by a declaration that your submission is your original work.

Assignment 2
Type: Computer-based Assessment
Learning Objectives Assessed: 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 2.1, 2.2
Due Date:
         7 Apr 08 00:00 - 2 May 08 09:00
Weight: 20%
Task Description: Extending a compiler using a parser generator.
This assignment involves extending a compiler written using a parser generator and the lexical analyzer generator to handle additional language features.
Criteria & Marking: Your assignment will be assessed according to the following criteria: elegance of approach, ease of understanding of code, and correctness of your implementation. Your implementation will be automatically tested and hence it is important that you do not modify parts of the compiler other than those stated in the assignment handout.
Submission: The assignments will be collected electronically via the the School's computing facilities. Details of how to submit assignments are included in the assignment handouts.

Your assignment submission must be accompanied by a declaration that your submission is your original work.

Assignment 3
Type: Computer-based Assessment
Learning Objectives Assessed: 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 2.1, 2.2
Due Date:
         5 May 08 00:00 - 23 May 08 09:00
Weight: 20%
Task Description: This assignment involves extending a compiler to handle more advanced language features.
Criteria & Marking: Your assignment will be assessed according to the following criteria: elegance of approach, ease of understanding of code, and correctness of your implementation. Your implementation will be automatically tested and hence it is important that you do not modify parts of the compiler other than those stated in the assignment handout.
Submission: The assignments will be collected electronically via the the School's computing facilities. Details of how to submit assignments are included in the assignment handouts.

Your assignment submission must be accompanied by a declaration that your submission is your original work.

Final Examination
Type: Exam - during Exam Period (Central)
Learning Objectives Assessed: 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 2.1
Due Date:
         Examination Period
Weight: 40%
Perusal: 10 minutes
Duration: 120 minutes
Format: Short answer, Problem solving
Task Description: The final examination is not open book but you may bring in one A4-size page crib sheet
  • it may be written on both sides
  • it may be hand written
  • if machine produced it must be a minimum of 10 point font size
Further details on the examination content will be provided at the end of semester and will be available from the course web page.
Criteria & Marking: Answers will be assessed for correctness, elegance of approach, and ease of understanding.

6. Policies & Guidelines

 
This section contains the details of and links to the most relevant policies and course guidelines. For further details on University Policies please visit myAdvisor and the University Handbook of Policies and Procedures.

6.1 Assessment Related Policies and Guidelines

University Policies & Guidelines

An overview of the University’s assessment-related policies can be found on myAdvisor (http://www.uq.edu.au/myadvisor/index.html?page=2910).

Academic Integrity
It is the University's task to encourage ethical scholarship and to inform students and staff about the institutional standards of academic behaviour expected of them in learning, teaching and research. Students have a responsibility to maintain the highest standards of academic integrity in their work. Students must not cheat in examinations or other forms of assessment and must ensure they do not plagiarise.

Plagiarism
The University has adopted the following definition of plagiarism:

Plagiarism is the act of misrepresenting as one's own original work the ideas, interpretations, words or creative works of another. These include published and unpublished documents, designs, music, sounds, images, photographs, computer codes and ideas gained through working in a group. These ideas, interpretations, words or works may be found in print and/or electronic media.

Students are encouraged to read the UQ Academic Integrity and Plagiarism policy (http://www.uq.edu.au/hupp/index.html?page=25128) which makes a comprehensive statement about the University's approach to plagiarism, including the approved use of plagiarism detection software, the consequences of plagiarism and the principles associated with preventing plagiarism.

Feedback on Assessment
Feedback is essential to effective learning and students can expect to receive appropriate and timely feedback on all assessment. For a detailed explanation of the feedback you are entitled to, you should consult the policy on Student Access to Feedback on Assessment. (http://www.uq.edu.au/hupp/index.html?page=25114&pid=25075)

As a student you have a responsibility to incorporate feedback into your learning; make use of the assessment criteria that you are given; be aware of the rules, policies and other documents related to assessment; and provide teachers with feedback on their assessment practices.

There are certain steps you can take if you feel your result does not reflect your performance. Please refer to the myAdvisor web site. (http://www.uq.edu.au/myadvisor/index.html?page=2953&pid=2910)

Feedback in this Course

Tutorial exercises form an important part of developing your skills in applying the course material, and participation in tutorials provides weekly feedback on your progress. The tutorial exercises are good preparation for both the assignments and the final examination.

The assignments provide individual feedback on your understanding of the course material. Feedback on your assignments will be provided when they are returned during tutorials.

School of Information Technology and Electrical Engineering Assessment Guidelines

Misconduct

Further to the statement on academic integrity and plagiarism above, students are required to read and understand the ITEE policy on Student Misconduct (http://www.itee.uq.edu.au/about_ITEE/policies/student-misconduct.html).

Late Arrival or Non-attendance at Examinations

The policy and procedure for late arrival or non-attendance at centrally controlled examinations is set out in the University's Examinations policy (HUPP 3.30.5), sections 8 and 10.2.

The way in which late arrival at a School-controlled examination is dealt with will be at the discretion of the course coordinator, who may be guided by the policy for centrally controlled exams.

In the case that a student requests a special exam for a School-controlled exam, the request will be considered and, if allowed, the timing shall be determined by the course coordinator, in consultation with the School's Chief Examiner where necessary, and in accordance with HUPP 3.30.5. Unless otherwise indicated in the Course Profile, applications must be made in writing to the Head of School no later than one week after the exam. Late applications will not be accepted.
 
Examination Feedback
 
In addition to the advice above, students wishing to view examination answer scripts and/or question papers should consult with the School office (Room 217, General Purpose South Building [78], St Lucia; Room 218, Building 1, Ipswich) regarding arrangements. The ITEE policy on exam script viewing is available at http://study.itee.uq.edu.au/current_students/exam_script_viewing.html.

Supplementary Assessment

If you fail this course you may be eligible for supplementary assessment - see the general award rules and/or your program rules for details. You should note that even though you may be eligible for supplementary assessment under these rules, in some circumstances there may be no practical assessment that can be offered to allow you to meet the minimum passing requirements. These circumstances may include failure based on:
  • group or team based assessment;
  • attendance or class participation requirements;
  • laboratory-based assessment, where laboratories can't practically be made available after classes have finished;
  • project or thesis-based assessment, where a significant period of time would be required to undertake supplementary assessment;
  • progressive assessment, where subsequent assessment items build on earlier assessment items; or
  • multiple assessment items, where it is impractical to offer multiple supplementary assessment items.
If the course coordinator determines that there is no practical supplementary assessment that can be offered to allow you to improve your grade, then you will not be offered supplementary assessment and your grade will remain unchanged.

6.2 Other Policies and Guidelines

University Policies and Guidelines

Placement Courses
Students on a placement course – also known as a work placement, internship, industry study, industry experience, clinical practice, clinical placement, practical work, practicum, fieldwork, teaching practice – should refer to the University policy, Placement Courses (http://www.uq.edu.au/hupp/index.html?page=25120&pid=25075) for detailed information.
 
Working with Children
Students whose studies include a professional/work placement, internship, clinical practice, teaching practice or other similar activity which involves them in regular contact with children should refer to the University policy, Working with Children Check - "blue card" (http://www.uq.edu.au/hupp/index.html?page=25004&pid=24963) to find out how to apply for a ‘blue card’.
 
Students with a Disability
Any student with a disability who may require alternative academic arrangements, including assessment, in the course/program is encouraged to seek advice at the commencement of the semester from a Disability Adviser at Student Support Services. Refer to the University policy, Students with a Disability (Disability Action Plan) (http://www.uq.edu.au/hupp/index.html?page=25122&pid=25075) and to the policy on Special Arrangements for Examinations for Students with a Disability (http://www.uq.edu.au/hupp/index.html?page=25111&pid=25075

Where an adjustment is made to an accredited program, it is the responsibility of the relevant Faculty to liaise with professional and registration bodies regarding the acceptability of the change/s.  

Occupational Health and Safety
Undergraduate Students (http://www.uq.edu.au/hupp/index.html?page=25055&pid=25015) and Postgraduate Students (http://www.uq.edu.au/hupp/index.html?page=25057&pid=25015) should be familiar with the University policies on occupational health and safety in the laboratory.

Other School of Information Technology and Electrical Engineering Guidelines

Ethical Clearance
If your course involves assignment or project work involving human subjects or human-related materials, you must investigate the need for ethical clearance and obtain it when required. Information on ethical clearance can be found at http://www.uq.edu.au/research/orps/index.html?page=5064&pid=5256.

Learning Summary

 

Below is a table showing the relationship between the learning objectives for this course and the broader graduate attributes developed, the learning activities used to develop each objective and the assessment task used to assess each objective.

Learning Objectives

After successfully completing this course you should be able to:

1. KNOWLEDGE OUTCOMES
1.1  Understand the structure of a compiler in terms of lexical analysis, parsing, static semantic analysis and code generation.
1.2  Understand the theory of lexical analysis of programming languages (i.e., recognising keywords, numbers, variable names, operators, etc.) using regular expressions and finite state machines, and apply the theory in practice.
1.3  Understand and apply the theory of parsing of (programming language) grammars (i.e., recognising the structure of programs in terms of procedures, statements and expressions, etc) using (top-down), recursive-descent parsing and (bottom-up) shift/reduce parsing.
1.4  Understand the static semantics of programming languages (i.e., handling variable, type and procedure declarations and analysing the type correctness of programs) and develop static semantic analysers using either structured symbol tables or attribute grammars.
1.5  Understand the runtime organisation of memory using stacks for procedure calls and local variable allocation, and heaps for dynamic memory allocation ("new" in Java).
1.6  Understand and apply strategies for generating machine code for programming language expressions, control structures, and procedure/method calls.
2. SKILLS OUTCOMES
2.1  Have a better understanding of how to structure and program large systems.
2.2  Use compiler generation tools to generate lexical analysers (from regular expressions), parsers (from grammars), and static semantic analysis components (from attribute grammars).


Assessment & Learning Activities

  Learning Objectives
  1.1 1.2 1.3 1.4 1.5 1.6 2.1 2.2
Learning Activities
Course overview (Lecture)
selected
         
selected
 
Code generation (Lecture)        
selected
selected
   
Language definition (Lecture)  
selected
selected
         
Recursive descent parsing (Lecture)    
selected
     
selected
 
Assignment 1 compiler (Lecture)
selected
 
selected
selected
selected
selected
selected
 
Grammars and LL(1) parsing (Lecture)    
selected
         
Bottom-up parsing (Lecture)    
selected
         
Static semantic analysis (Lecture)      
selected
       
Runtime organisation (Lecture)        
selected
     
Scanning (Lecture)  
selected
           
Course Summary (Lecture)
selected
selected
selected
selected
selected
selected
   
Assessment Tasks
Assignment 1
selected
 
selected
selected
selected
selected
selected
 
Assignment 2
selected
selected
selected
selected
selected
selected
selected
selected
Assignment 3
selected
selected
selected
selected
selected
selected
selected
selected
Final Examination
selected
selected
selected
selected
selected
selected
selected
 

Graduate Attributes

Successfully completing this course will contribute to the recognition of your attainment of the following UQ (Undergrad Pass) graduate attributes:

  Learning Objectives
  1.1 1.2 1.3 1.4 1.5 1.6 2.1 2.2
Graduate Attributes
A IN-DEPTH KNOWLEDGE OF THE FIELD OF STUDY
A1. A comprehensive and well-founded knowledge in the field of study.
selected
selected
selected
selected
selected
selected
selected
selected
A4. An understanding of how other disciplines relate to the field of study.    
selected
         
A5. An international perspective on the field of study.                
B EFFECTIVE COMMUNICATION
B1. The ability to collect, analyse and organise information and ideas and to convey those ideas clearly and fluently, in both written and spoken forms.
selected
selected
selected
selected
selected
selected
selected
selected
B2. The ability to interact effectively with others in order to work towards a common outcome.                
B3. The ability to select and use the appropriate level, style and means of communication.
selected
selected
selected
selected
selected
selected
selected
selected
B4. The ability to engage effectively and appropriately with information and communication technologies.
selected
selected
selected
selected
selected
selected
selected
selected
C INDEPENDENCE AND CREATIVITY
C1. The ability to work and learn independently.
selected
selected
selected
selected
selected
selected
selected
selected
C3. The ability to generate ideas and adapt innovatively to changing environments.
selected
selected
selected
selected
selected
selected
selected
selected
C4. The ability to identify problems, create solutions, innovate and improve current practices.
selected
selected
selected
selected