Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science
|
|
|
- Erick Wright
- 9 years ago
- Views:
Transcription
1 Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.035, Spring 2010 Handout Semantic Analysis Project Tuesday, Feb 16 DUE: Monday, Mar 1 Extend your compiler to find, report, and recover from semantic errors in Decaf programs. Most semantic errors can be checked by testing the rules enumerated in the section Semantic Rules of Decaf Spec. These rules are repeated in this handout as well. However, you should read Decaf Spec in its entirety to make sure that your compiler catches all semantic errors implied by the language definition. We have attempted to provide a precise statement of the semantic rules. If you feel some semantic rule in the language definition may have multiple interpretations, you should work with the interpretation that sounds most reasonable to you and clearly list your assumptions in your project documentation. This part of the project includes the following tasks: 1. Createahigh-levelintermediaterepresentation(IR)tree. Youcandothiseitherbyinstructing ANTLR to create one for you, adding actions to your grammar to build a tree, or walking a generic ANTLR tree and building a tree on the way. The problem of designing an IR will be discussed in the lectures; some hints are given in the final section of this handout. When running in debug mode, your driver should pretty-print the constructed IR tree in some easily-readable form suitable for debugging. 2. Build symbol tables for the es. (A symbol table is an environment, i.e. a mapping from identifiers to semantic objects such as variable declarations. Environments are structured hierarchically, in parallel with source-level constructs, such as -bodies, method-bodies, loop-bodies, etc.) 3. Perform all semantic checks by traversing the IR and accessing the symbol tables. Note: the run-time checks are not required for this assignment. What to Hand In Follow the directions given in project overview handout when writing up your project. Your design documentation should include a description of how your IR and symbol table structures are organized, as well as a discussion of your design for performing the semantic checks. Each group will be assigned an athena group and shared space in the course locker. Each group must place their completed submission at: Groups may use: /mit/6.035/group/group/submit/group-semantics.tar.gz /mit/6.035/group/group/ as a place to collaborate and share code. It is recommended that you use revision control and place your repositories in this shared space. Submitted tarballs should have the following structure: * Athena is MIT's UNIX-based computing environment. OCW does not provide access to it.
2 GROUPNAME-semantics.tar.gz -- GROUPNAME-semantics -- AUTHORS (list of students in your group, one per line) -- code... (full source code, can build by running ant ) -- doc... (write-up, described in project overview handout) -- dist -- Compiler.jar (compiled output, for automated testing) You should be able to run your compiler from the command line with: java -jar dist/compiler.jar -target inter <filename> The resulting output to the terminal should be a report of all errors encountered while compiling the file. Your compiler should give reasonable and specific error messages (with line and column numbers and identifier names) for all errors detected. It should avoid reporting multiple error messages for the same error. For example, if y has not been declared in the assignment statement x=y+1;, the compiler should report only one error message for y, rather than one error message for y, another error message for the +, and yet another error message for the assignment. After you implement the static semantic checker, your compiler should be able to detect and report all static (i.e., compile-time) errors in any input Decaf program, including lexical and syntax errors detected by previous phases of the compiler. In addition, your compiler should not report any messages for valid Decaf programs. However, we do not expect you to avoid reporting spurious error messages that get triggered by error recovery. It is possible that your compiler might mistakenly report spurious semantic errors in some cases depending on the effectiveness of your parser s syntactic error recovery. As mentioned, your compiler should have a debug mode in which the IR and symbol table data structures constructed by your compiler are printed in some form. This can be run from the command line by java -jar dist/compiler.jar -target inter -debug <filename> Test Cases The test cases provided for this project are in: /mit/6.035/provided/semantics/ Read the comments in the test cases to see what we expect your compiler to do. Points will be awarded based on how well your compiler performs on these and hidden tests cases. Complete documentation is also required for full credit. 2
3 Grading Script As with the previous project, we are providing you with the grading script we will use to test your code (except for the write-up). This script only shows you results for the public test cases. The script can be found on athena in the course locker: The script takes your tarball as the only arg: /mit/6.035/provided/gradingscripts/p2grader.py /mit/6.035/provided/gradingscripts/p2grader.py GROUPNAME-parser.tar.gz Or it works on the extracted directory: /mit/6.035/provided/gradingscripts/p2grader.py GROUPNAME-parser/ Please test your submission against this script. It may help you debug your code and it will help make the grading process go more smoothly. Semantic Rules These rules place additional constraints on the set of valid Decaf programs besides the constraints implied by the grammar. A program that is grammatically well-formed and does not violate any of the following rules is called a legal program. A robust compiler will explicitly check each of these rules, and will generate an error message describing each violation it is able to find. A robust compiler will generate at least one error message for each illegal program, but will generate no errors for a legal program. 1. No identifier is declared twice in the same scope. 2. No identifier is used before it is declared. 3. The program contains a definition for a method called main that has no parameters (note that since execution starts at method main, any methods defined after main will never be executed). 4. The int literal in an array declaration must be greater than The number and types of arguments in a method call must be the same as the number and types of the formals, i.e., the signatures must be identical. 6. If a method call is used as an expression, the method must return a result. 7. A return statement must not have a return value unless it appears in the body of a method that is declared to return a value. 8. The expression in a return statement must have the same type as the declared result type of the enclosing method definition. 9. An id used as a location must name a declared local/global variable or formal parameter. 3
4 10. For all locations of the form id [ expr ] (a) id must be an array variable, and (b) the type of expr must be int. 11. The expr in an if statement must have type boolean. 12. The operands of arith op s and rel op s must have type int. 13. The operands of eq op s must have the same type, either int or boolean. 14. The operands of cond op s and the operand of logical not (!) must have type boolean. 15. The location and the expr in an assignment, location = expr, must have the same type. 16. The location andthe expr in anincrementing/decrementingassignment, location += expr and location -= expr, must be of type int. 17. The initial expr and the ending expr of for must have type int. 18. All break and continue statements must be contained within the body of a for. Implementation Suggestions You will need to declare es for each of the nodes in your IR. In many places, the hierarchy ofir node es will resemblethelanguagegrammar. For example, apartofyourinheritance tree might look like this (where indentation represents inheritance): abstract Ir abstract abstract abstract abstract. IrExpression IrLiteral IrIntLiteral IrBooleanLiteral IrCallExpr IrMethodCallExpr IrCalloutExpr IrBinopExpr IrStatement IrAssignStmt IrPlusAssignStmt IrBreakStmt IrContinueStmt IrIfStmt IrForStmt IrReturnStmt IrInvokeStmt IrBlock IrClassDecl IrMemberDecl IrMethodDecl IrFieldDecl 4
5 .. IrVarDecl IrType Classes such as these implement the abstract syntax tree of the input program. In its simplest form, each is simply a tuple of its subtrees, for example: public IrBinopExpr extends IrExpression { private final int operator; private final IrExpression lhs; + private final IrExpression rhs; / \ } lhs rhs or: public IrAssignStmt extends IrStatement { := private final IrLocation lhs; / \ private final IrExpression rhs; lhs rhs } In addition, you ll need to define es for the semantic entities of the program, which represent abstract properties (e.g. expression types, method signatures, descriptors, etc.) and to establish the correspondences between them. Some examples: every expression has a type; every variable declaration introduces a variable; every block defines a scope. Many of these properties are derived by recursive traversals over the tree. As far as possible, you should try to make instances of the the symbol es canonical, so that they may be compared using reference equality. You are strongly advised to design these es with care, employing good software-engineering practice and documenting them, as you will be living with them for the next few months! All error messages should be accompanied by the filename, line and column number of the token most relevant to the error message (use your judgement here). This means that, when building your abstract-syntax tree (or AST), you must ensure that each IR node contains sufficient information for you to determine its line number at some later time. It is not appropriate to throw an exception when encountering an error in the input: doing so would lead to a design in which at most one error message is reported for each run of the compiler. A good front-end saves the user time by reporting multiple errors before stopping, allowing the programmer to make several corrections before having to restart compilation. Semantic checking should be done top-down. While the type-checking component of semantic checking can be done in bottom-up fashion, other kinds of checks (for example, detecting uses of undefined variables) can not. There are two ways of achieving this. The first is to make use of parser actions in the middle of productions. This approach may require less code but can be more complex, because more work needs to be done directly within the ANTLR infrastructure. A cleaner approach is to invoke your semantic checker on a complete AST after parsing has finished. The pseudocode for block in this approach would resemble this: 5
6 void checkblock(envstack envs, Block b) { envs.push(new Env()); foreach s in b.statements checkstatement(envs, s); envs.pop(); } In this pseudocode, a new environment is created and pushed on the environment stack, the body of the block is then checked in the context of this environment stack, and then the new environment is discarded when the end of the block is reached. The semantic check can thus be expressed as a visitor (which should be familiar from Design Patterns or 6.170) over the AST. (Since code generation, certain optimizations, and prettyprinting can also be naturally expressed as visitors, we recommend this approach for a cleaner implementation.) The treatment of negative integer literals requires some care. Recall from the previous handout that negative integer literals are in fact two separate tokens: the positive integer literal and a preceding -. Whenever your top-down semantic checker finds a unary minus operator, it should check if its operand is a positive integer literal, and if so, replace the subtree (both nodes) by a single, negative integer literal. 6
7 MIT OpenCourseWare Computer Language Engineering Spring 2010 For information about citing these materials or our Terms of Use, visit:
Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science
Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.035, Spring 2013 Handout Scanner-Parser Project Thursday, Feb 7 DUE: Wednesday, Feb 20, 9:00 pm This project
Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science
Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.035, Fall 2005 Handout 7 Scanner Parser Project Wednesday, September 7 DUE: Wednesday, September 21 This
Lecture 9. Semantic Analysis Scoping and Symbol Table
Lecture 9. Semantic Analysis Scoping and Symbol Table Wei Le 2015.10 Outline Semantic analysis Scoping The Role of Symbol Table Implementing a Symbol Table Semantic Analysis Parser builds abstract syntax
Scoping (Readings 7.1,7.4,7.6) Parameter passing methods (7.5) Building symbol tables (7.6)
Semantic Analysis Scoping (Readings 7.1,7.4,7.6) Static Dynamic Parameter passing methods (7.5) Building symbol tables (7.6) How to use them to find multiply-declared and undeclared variables Type checking
Syntaktická analýza. Ján Šturc. Zima 208
Syntaktická analýza Ján Šturc Zima 208 Position of a Parser in the Compiler Model 2 The parser The task of the parser is to check syntax The syntax-directed translation stage in the compiler s front-end
Static vs. Dynamic. Lecture 10: Static Semantics Overview 1. Typical Semantic Errors: Java, C++ Typical Tasks of the Semantic Analyzer
Lecture 10: Static Semantics Overview 1 Lexical analysis Produces tokens Detects & eliminates illegal tokens Parsing Produces trees Detects & eliminates ill-formed parse trees Static semantic analysis
Java Application Developer Certificate Program Competencies
Java Application Developer Certificate Program Competencies After completing the following units, you will be able to: Basic Programming Logic Explain the steps involved in the program development cycle
C Compiler Targeting the Java Virtual Machine
C Compiler Targeting the Java Virtual Machine Jack Pien Senior Honors Thesis (Advisor: Javed A. Aslam) Dartmouth College Computer Science Technical Report PCS-TR98-334 May 30, 1998 Abstract One of the
Programming Assignment II Due Date: See online CISC 672 schedule Individual Assignment
Programming Assignment II Due Date: See online CISC 672 schedule Individual Assignment 1 Overview Programming assignments II V will direct you to design and build a compiler for Cool. Each assignment will
Parsing Technology and its role in Legacy Modernization. A Metaware White Paper
Parsing Technology and its role in Legacy Modernization A Metaware White Paper 1 INTRODUCTION In the two last decades there has been an explosion of interest in software tools that can automate key tasks
COMP 356 Programming Language Structures Notes for Chapter 4 of Concepts of Programming Languages Scanning and Parsing
COMP 356 Programming Language Structures Notes for Chapter 4 of Concepts of Programming Languages Scanning and Parsing The scanner (or lexical analyzer) of a compiler processes the source program, recognizing
1 Introduction. 2 An Interpreter. 2.1 Handling Source Code
1 Introduction The purpose of this assignment is to write an interpreter for a small subset of the Lisp programming language. The interpreter should be able to perform simple arithmetic and comparisons
CS143 Handout 18 Summer 2012 July 16 th, 2012 Semantic Analysis
CS143 Handout 18 Summer 2012 July 16 th, 2012 Semantic Analysis What Is Semantic Analysis? Parsing only verifies that the program consists of tokens arranged in a syntactically valid combination. Now we
Compiler I: Syntax Analysis Human Thought
Course map Compiler I: Syntax Analysis Human Thought Abstract design Chapters 9, 12 H.L. Language & Operating Sys. Compiler Chapters 10-11 Virtual Machine Software hierarchy Translator Chapters 7-8 Assembly
Semantic Analysis: Types and Type Checking
Semantic Analysis Semantic Analysis: Types and Type Checking CS 471 October 10, 2007 Source code Lexical Analysis tokens Syntactic Analysis AST Semantic Analysis AST Intermediate Code Gen lexical errors
Master of Sciences in Informatics Engineering Programming Paradigms 2005/2006. Final Examination. January 24 th, 2006
Master of Sciences in Informatics Engineering Programming Paradigms 2005/2006 Final Examination January 24 th, 2006 NAME: Please read all instructions carefully before start answering. The exam will be
Object-Oriented Design Lecture 4 CSU 370 Fall 2007 (Pucella) Tuesday, Sep 18, 2007
Object-Oriented Design Lecture 4 CSU 370 Fall 2007 (Pucella) Tuesday, Sep 18, 2007 The Java Type System By now, you have seen a fair amount of Java. Time to study in more depth the foundations of the language,
Name: Class: Date: 9. The compiler ignores all comments they are there strictly for the convenience of anyone reading the program.
Name: Class: Date: Exam #1 - Prep True/False Indicate whether the statement is true or false. 1. Programming is the process of writing a computer program in a language that the computer can respond to
language 1 (source) compiler language 2 (target) Figure 1: Compiling a program
CS 2112 Lecture 27 Interpreters, compilers, and the Java Virtual Machine 1 May 2012 Lecturer: Andrew Myers 1 Interpreters vs. compilers There are two strategies for obtaining runnable code from a program
Advanced compiler construction. General course information. Teacher & assistant. Course goals. Evaluation. Grading scheme. Michel Schinz 2007 03 16
Advanced compiler construction Michel Schinz 2007 03 16 General course information Teacher & assistant Course goals Teacher: Michel Schinz [email protected] Assistant: Iulian Dragos INR 321, 368 64
C++ INTERVIEW QUESTIONS
C++ INTERVIEW QUESTIONS http://www.tutorialspoint.com/cplusplus/cpp_interview_questions.htm Copyright tutorialspoint.com Dear readers, these C++ Interview Questions have been designed specially to get
Debugging. Common Semantic Errors ESE112. Java Library. It is highly unlikely that you will write code that will work on the first go
Debugging ESE112 Java Programming: API, Psuedo-Code, Scope It is highly unlikely that you will write code that will work on the first go Bugs or errors Syntax Fixable if you learn to read compiler error
Dynamic Programming Problem Set Partial Solution CMPSC 465
Dynamic Programming Problem Set Partial Solution CMPSC 465 I ve annotated this document with partial solutions to problems written more like a test solution. (I remind you again, though, that a formal
How to make the computer understand? Lecture 15: Putting it all together. Example (Output assembly code) Example (input program) Anatomy of a Computer
How to make the computer understand? Fall 2005 Lecture 15: Putting it all together From parsing to code generation Write a program using a programming language Microprocessors talk in assembly language
Introduction. Compiler Design CSE 504. Overview. Programming problems are easier to solve in high-level languages
Introduction Compiler esign CSE 504 1 Overview 2 3 Phases of Translation ast modifled: Mon Jan 28 2013 at 17:19:57 EST Version: 1.5 23:45:54 2013/01/28 Compiled at 11:48 on 2015/01/28 Compiler esign Introduction
The Cool Reference Manual
The Cool Reference Manual Contents 1 Introduction 3 2 Getting Started 3 3 Classes 4 3.1 Features.............................................. 4 3.2 Inheritance............................................
Intermediate Code. Intermediate Code Generation
Intermediate Code CS 5300 - SJAllan Intermediate Code 1 Intermediate Code Generation The front end of a compiler translates a source program into an intermediate representation Details of the back end
Rigorous Software Development CSCI-GA 3033-009
Rigorous Software Development CSCI-GA 3033-009 Instructor: Thomas Wies Spring 2013 Lecture 5 Disclaimer. These notes are derived from notes originally developed by Joseph Kiniry, Gary Leavens, Erik Poll,
Compiler Construction
Compiler Construction Lecture 1 - An Overview 2003 Robert M. Siegfried All rights reserved A few basic definitions Translate - v, a.to turn into one s own language or another. b. to transform or turn from
Programming Project 1: Lexical Analyzer (Scanner)
CS 331 Compilers Fall 2015 Programming Project 1: Lexical Analyzer (Scanner) Prof. Szajda Due Tuesday, September 15, 11:59:59 pm 1 Overview of the Programming Project Programming projects I IV will direct
Stack Allocation. Run-Time Data Structures. Static Structures
Run-Time Data Structures Stack Allocation Static Structures For static structures, a fixed address is used throughout execution. This is the oldest and simplest memory organization. In current compilers,
1.00 Lecture 1. Course information Course staff (TA, instructor names on syllabus/faq): 2 instructors, 4 TAs, 2 Lab TAs, graders
1.00 Lecture 1 Course Overview Introduction to Java Reading for next time: Big Java: 1.1-1.7 Course information Course staff (TA, instructor names on syllabus/faq): 2 instructors, 4 TAs, 2 Lab TAs, graders
Handout 1. Introduction to Java programming language. Java primitive types and operations. Reading keyboard Input using class Scanner.
Handout 1 CS603 Object-Oriented Programming Fall 15 Page 1 of 11 Handout 1 Introduction to Java programming language. Java primitive types and operations. Reading keyboard Input using class Scanner. Java
Programming Languages
Programming Languages Programming languages bridge the gap between people and machines; for that matter, they also bridge the gap among people who would like to share algorithms in a way that immediately
The C Programming Language course syllabus associate level
TECHNOLOGIES The C Programming Language course syllabus associate level Course description The course fully covers the basics of programming in the C programming language and demonstrates fundamental programming
Scanning and parsing. Topics. Announcements Pick a partner by Monday Makeup lecture will be on Monday August 29th at 3pm
Scanning and Parsing Announcements Pick a partner by Monday Makeup lecture will be on Monday August 29th at 3pm Today Outline of planned topics for course Overall structure of a compiler Lexical analysis
Using Eclipse CDT/PTP for Static Analysis
PTP User-Developer Workshop Sept 18-20, 2012 Using Eclipse CDT/PTP for Static Analysis Beth R. Tibbitts IBM STG [email protected] "This material is based upon work supported by the Defense Advanced Research
The Mjølner BETA system
FakePart I FakePartTitle Software development environments CHAPTER 2 The Mjølner BETA system Peter Andersen, Lars Bak, Søren Brandt, Jørgen Lindskov Knudsen, Ole Lehrmann Madsen, Kim Jensen Møller, Claus
ProfBuilder: A Package for Rapidly Building Java Execution Profilers Brian F. Cooper, Han B. Lee, and Benjamin G. Zorn
ProfBuilder: A Package for Rapidly Building Java Execution Profilers Brian F. Cooper, Han B. Lee, and Benjamin G. Zorn Department of Computer Science Campus Box 430 University of Colorado Boulder, CO 80309-0430
Yacc: Yet Another Compiler-Compiler
Stephen C. Johnson ABSTRACT Computer program input generally has some structure in fact, every computer program that does input can be thought of as defining an input language which it accepts. An input
Project 2: Bejeweled
Project 2: Bejeweled Project Objective: Post: Tuesday March 26, 2013. Due: 11:59PM, Monday April 15, 2013 1. master the process of completing a programming project in UNIX. 2. get familiar with command
Glossary of Object Oriented Terms
Appendix E Glossary of Object Oriented Terms abstract class: A class primarily intended to define an instance, but can not be instantiated without additional methods. abstract data type: An abstraction
A Grammar for the C- Programming Language (Version S16) March 12, 2016
A Grammar for the C- Programming Language (Version S16) 1 Introduction March 12, 2016 This is a grammar for this semester s C- programming language. This language is very similar to C and has a lot of
Massachusetts Institute of Technology 6.005: Elements of Software Construction Fall 2011 Quiz 1 October 14, 2011. Instructions
Massachusetts Institute of Technology 6.005: Elements of Software Construction Fall 2011 Quiz 1 October 14, 2011 Name: Athena* User Name: Instructions This quiz is 50 minutes long. It contains 1 pages
Database Programming with PL/SQL: Learning Objectives
Database Programming with PL/SQL: Learning Objectives This course covers PL/SQL, a procedural language extension to SQL. Through an innovative project-based approach, students learn procedural logic constructs
Programming Languages CIS 443
Course Objectives Programming Languages CIS 443 0.1 Lexical analysis Syntax Semantics Functional programming Variable lifetime and scoping Parameter passing Object-oriented programming Continuations Exception
Embedded Systems. Review of ANSI C Topics. A Review of ANSI C and Considerations for Embedded C Programming. Basic features of C
Embedded Systems A Review of ANSI C and Considerations for Embedded C Programming Dr. Jeff Jackson Lecture 2-1 Review of ANSI C Topics Basic features of C C fundamentals Basic data types Expressions Selection
Compilers. Introduction to Compilers. Lecture 1. Spring term. Mick O Donnell: [email protected] Alfonso Ortega: alfonso.ortega@uam.
Compilers Spring term Mick O Donnell: [email protected] Alfonso Ortega: [email protected] Lecture 1 to Compilers 1 Topic 1: What is a Compiler? 3 What is a Compiler? A compiler is a computer
Intel Assembler. Project administration. Non-standard project. Project administration: Repository
Lecture 14 Project, Assembler and Exam Source code Compiler phases and program representations Frontend Lexical analysis (scanning) Backend Immediate code generation Today Project Emma Söderberg Revised
MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.
Exam Name MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question. 1) The JDK command to compile a class in the file Test.java is A) java Test.java B) java
Flex/Bison Tutorial. Aaron Myles Landwehr [email protected] CAPSL 2/17/2012
Flex/Bison Tutorial Aaron Myles Landwehr [email protected] 1 GENERAL COMPILER OVERVIEW 2 Compiler Overview Frontend Middle-end Backend Lexer / Scanner Parser Semantic Analyzer Optimizers Code Generator
Java Generation from UML Models specified with Alf Annotations
Université de Franche-Comté Supervisers : Fabien Peureux, Isabelle Jacques Java Generation from UML Models specified with Alf Annotations Supervised project report Alexandre Vernotte Jean-Marie Gauthier
Symbol Tables. Introduction
Symbol Tables Introduction A compiler needs to collect and use information about the names appearing in the source program. This information is entered into a data structure called a symbol table. The
03 - Lexical Analysis
03 - Lexical Analysis First, let s see a simplified overview of the compilation process: source code file (sequence of char) Step 2: parsing (syntax analysis) arse Tree Step 1: scanning (lexical analysis)
Redesign and Enhancement of the Katja System
Redesign and Enhancement of the Katja System Internal Report No. 354/06 Patrick Michel October 30, 2006 Contents 1 Introduction 5 2 Redesigning the Katja System 5 2.1 Architecture and Control Flow..................
Lab Experience 17. Programming Language Translation
Lab Experience 17 Programming Language Translation Objectives Gain insight into the translation process for converting one virtual machine to another See the process by which an assembler translates assembly
How To Write A Test Engine For A Microsoft Microsoft Web Browser (Php) For A Web Browser For A Non-Procedural Reason)
Praspel: A Specification Language for Contract-Driven Testing in PHP Ivan Enderlin Frédéric Dadeau Alain Giorgetti Abdallah Ben Othman October 27th, 2011 Meetings: LTP MTVV Ivan Enderlin, Frédéric Dadeau,
Likewise, we have contradictions: formulas that can only be false, e.g. (p p).
CHAPTER 4. STATEMENT LOGIC 59 The rightmost column of this truth table contains instances of T and instances of F. Notice that there are no degrees of contingency. If both values are possible, the formula
ANTLR - Introduction. Overview of Lecture 4. ANTLR Introduction (1) ANTLR Introduction (2) Introduction
Overview of Lecture 4 www.antlr.org (ANother Tool for Language Recognition) Introduction VB HC4 Vertalerbouw HC4 http://fmt.cs.utwente.nl/courses/vertalerbouw/! 3.x by Example! Calc a simple calculator
I. INTRODUCTION. International Journal of Computer Science Trends and Technology (IJCST) Volume 3 Issue 2, Mar-Apr 2015
RESEARCH ARTICLE An Exception Monitoring Using Java Jyoti Kumari, Sanjula Singh, Ankur Saxena Amity University Sector 125 Noida Uttar Pradesh India OPEN ACCESS ABSTRACT Many programmers do not check for
An Eclipse Plug-In for Visualizing Java Code Dependencies on Relational Databases
An Eclipse Plug-In for Visualizing Java Code Dependencies on Relational Databases Paul L. Bergstein, Priyanka Gariba, Vaibhavi Pisolkar, and Sheetal Subbanwad Dept. of Computer and Information Science,
ARIZONA CTE CAREER PREPARATION STANDARDS & MEASUREMENT CRITERIA SOFTWARE DEVELOPMENT, 15.1200.40
SOFTWARE DEVELOPMENT, 15.1200.40 1.0 APPLY PROBLEM-SOLVING AND CRITICAL THINKING SKILLS TO INFORMATION TECHNOLOGY 1.1 Describe methods and considerations for prioritizing and scheduling software development
Designing with Exceptions. CSE219, Computer Science III Stony Brook University http://www.cs.stonybrook.edu/~cse219
Designing with Exceptions CSE219, Computer Science III Stony Brook University http://www.cs.stonybrook.edu/~cse219 Testing vs. Debugging Testing Coding Does the code work properly YES NO 2 Debugging Testing
Textual Modeling Languages
Textual Modeling Languages Slides 4-31 and 38-40 of this lecture are reused from the Model Engineering course at TU Vienna with the kind permission of Prof. Gerti Kappel (head of the Business Informatics
Integrating VoltDB with Hadoop
The NewSQL database you ll never outgrow Integrating with Hadoop Hadoop is an open source framework for managing and manipulating massive volumes of data. is an database for handling high velocity data.
Standard for Software Component Testing
Standard for Software Component Testing Working Draft 3.4 Date: 27 April 2001 produced by the British Computer Society Specialist Interest Group in Software Testing (BCS SIGIST) Copyright Notice This document
Java Basics: Data Types, Variables, and Loops
Java Basics: Data Types, Variables, and Loops If debugging is the process of removing software bugs, then programming must be the process of putting them in. - Edsger Dijkstra Plan for the Day Variables
Antlr ANother TutoRiaL
Antlr ANother TutoRiaL Karl Stroetmann March 29, 2007 Contents 1 Introduction 1 2 Implementing a Simple Scanner 1 A Parser for Arithmetic Expressions 4 Symbolic Differentiation 6 5 Conclusion 10 1 Introduction
UIL Computer Science for Dummies by Jake Warren and works from Mr. Fleming
UIL Computer Science for Dummies by Jake Warren and works from Mr. Fleming 1 2 Foreword First of all, this book isn t really for dummies. I wrote it for myself and other kids who are on the team. Everything
GENERIC and GIMPLE: A New Tree Representation for Entire Functions
GENERIC and GIMPLE: A New Tree Representation for Entire Functions Jason Merrill Red Hat, Inc. [email protected] 1 Abstract The tree SSA project requires a tree representation of functions for the optimizers
Software Testing. Definition: Testing is a process of executing a program with data, with the sole intention of finding errors in the program.
Software Testing Definition: Testing is a process of executing a program with data, with the sole intention of finding errors in the program. Testing can only reveal the presence of errors and not the
Managing Variability in Software Architectures 1 Felix Bachmann*
Managing Variability in Software Architectures Felix Bachmann* Carnegie Bosch Institute Carnegie Mellon University Pittsburgh, Pa 523, USA [email protected] Len Bass Software Engineering Institute Carnegie
Bottom-Up Parsing. An Introductory Example
Bottom-Up Parsing Bottom-up parsing is more general than top-down parsing Just as efficient Builds on ideas in top-down parsing Bottom-up is the preferred method in practice Reading: Section 4.5 An Introductory
Bitrix Site Manager 4.1. User Guide
Bitrix Site Manager 4.1 User Guide 2 Contents REGISTRATION AND AUTHORISATION...3 SITE SECTIONS...5 Creating a section...6 Changing the section properties...8 SITE PAGES...9 Creating a page...10 Editing
Tutorial on C Language Programming
Tutorial on C Language Programming Teodor Rus [email protected] The University of Iowa, Department of Computer Science Introduction to System Software p.1/64 Tutorial on C programming C program structure:
CS412/CS413. Introduction to Compilers Tim Teitelbaum. Lecture 20: Stack Frames 7 March 08
CS412/CS413 Introduction to Compilers Tim Teitelbaum Lecture 20: Stack Frames 7 March 08 CS 412/413 Spring 2008 Introduction to Compilers 1 Where We Are Source code if (b == 0) a = b; Low-level IR code
TypeScript for C# developers. Making JavaScript manageable
TypeScript for C# developers Making JavaScript manageable Agenda What is TypeScript OO in TypeScript Closure Generics Iterators Asynchronous programming Modularisation Debugging TypeScript 2 What is TypeScript
Programming Languages
Programming Languages Qing Yi Course web site: www.cs.utsa.edu/~qingyi/cs3723 cs3723 1 A little about myself Qing Yi Ph.D. Rice University, USA. Assistant Professor, Department of Computer Science Office:
A TOOL FOR DATA STRUCTURE VISUALIZATION AND USER-DEFINED ALGORITHM ANIMATION
A TOOL FOR DATA STRUCTURE VISUALIZATION AND USER-DEFINED ALGORITHM ANIMATION Tao Chen 1, Tarek Sobh 2 Abstract -- In this paper, a software application that features the visualization of commonly used
Spring,2015. Apache Hive BY NATIA MAMAIASHVILI, LASHA AMASHUKELI & ALEKO CHAKHVASHVILI SUPERVAIZOR: PROF. NODAR MOMTSELIDZE
Spring,2015 Apache Hive BY NATIA MAMAIASHVILI, LASHA AMASHUKELI & ALEKO CHAKHVASHVILI SUPERVAIZOR: PROF. NODAR MOMTSELIDZE Contents: Briefly About Big Data Management What is hive? Hive Architecture Working
The previous chapter provided a definition of the semantics of a programming
Chapter 7 TRANSLATIONAL SEMANTICS The previous chapter provided a definition of the semantics of a programming language in terms of the programming language itself. The primary example was based on a Lisp
COMP 110 Prasun Dewan 1
COMP 110 Prasun Dewan 1 12. Conditionals Real-life algorithms seldom do the same thing each time they are executed. For instance, our plan for studying this chapter may be to read it in the park, if it
Chapter 8: Bags and Sets
Chapter 8: Bags and Sets In the stack and the queue abstractions, the order that elements are placed into the container is important, because the order elements are removed is related to the order in which
Memory Allocation. Static Allocation. Dynamic Allocation. Memory Management. Dynamic Allocation. Dynamic Storage Allocation
Dynamic Storage Allocation CS 44 Operating Systems Fall 5 Presented By Vibha Prasad Memory Allocation Static Allocation (fixed in size) Sometimes we create data structures that are fixed and don t need
Inside the Java Virtual Machine
CS1Bh Practical 2 Inside the Java Virtual Machine This is an individual practical exercise which requires you to submit some files electronically. A system which measures software similarity will be used
COSC 1020 3.0 Introduction to Computer Science I Section A, Summer 2005. Question Out of Mark A Total 16. B-1 7 B-2 4 B-3 4 B-4 4 B Total 19
Term Test #2 COSC 1020 3.0 Introduction to Computer Science I Section A, Summer 2005 Family Name: Given Name(s): Student Number: Question Out of Mark A Total 16 B-1 7 B-2 4 B-3 4 B-4 4 B Total 19 C-1 4
Java Interfaces. Recall: A List Interface. Another Java Interface Example. Interface Notes. Why an interface construct? Interfaces & Java Types
Interfaces & Java Types Lecture 10 CS211 Fall 2005 Java Interfaces So far, we have mostly talked about interfaces informally, in the English sense of the word An interface describes how a client interacts
Ontology Model-based Static Analysis on Java Programs
Ontology Model-based Static Analysis on Java Programs Lian Yu 1, Jun Zhou, Yue Yi, Ping Li, Qianxiang Wang School of Software and Microelectronics, Peking University, Beijing, 102600, PRC Abstract 1 Typical
KITES TECHNOLOGY COURSE MODULE (C, C++, DS)
KITES TECHNOLOGY 360 Degree Solution www.kitestechnology.com/academy.php [email protected] [email protected] Contact: - 8961334776 9433759247 9830639522.NET JAVA WEB DESIGN PHP SQL, PL/SQL
AP Computer Science Java Subset
APPENDIX A AP Computer Science Java Subset The AP Java subset is intended to outline the features of Java that may appear on the AP Computer Science A Exam. The AP Java subset is NOT intended as an overall
Theory of Compilation
Theory of Compilation JLex, CUP tools CS Department, Haifa University Nov, 2010 By Bilal Saleh 1 Outlines JLex & CUP tutorials and Links JLex & CUP interoperability Structure of JLex specification JLex
arrays C Programming Language - Arrays
arrays So far, we have been using only scalar variables scalar meaning a variable with a single value But many things require a set of related values coordinates or vectors require 3 (or 2, or 4, or more)
Guide to Performance and Tuning: Query Performance and Sampled Selectivity
Guide to Performance and Tuning: Query Performance and Sampled Selectivity A feature of Oracle Rdb By Claude Proteau Oracle Rdb Relational Technology Group Oracle Corporation 1 Oracle Rdb Journal Sampled
Technical paper review. Program visualization and explanation for novice C programmers by Matthew Heinsen Egan and Chris McDonald.
Technical paper review Program visualization and explanation for novice C programmers by Matthew Heinsen Egan and Chris McDonald Garvit Pahal Indian Institute of Technology, Kanpur October 28, 2014 Garvit
Perl in a nutshell. First CGI Script and Perl. Creating a Link to a Script. print Function. Parsing Data 4/27/2009. First CGI Script and Perl
First CGI Script and Perl Perl in a nutshell Prof. Rasley shebang line tells the operating system where the Perl interpreter is located necessary on UNIX comment line ignored by the Perl interpreter End
The Java Series. Java Essentials I What is Java? Basic Language Constructs. Java Essentials I. What is Java?. Basic Language Constructs Slide 1
The Java Series Java Essentials I What is Java? Basic Language Constructs Slide 1 What is Java? A general purpose Object Oriented programming language. Created by Sun Microsystems. It s a general purpose
