Oct 26, 2005 CDT DOM Roadmap Doug Schaefer. Parser History  CDT 1.0 ► JavaCC based parser  Used to populate CModel and Structure Compare ► ctags based.

Slides:



Advertisements
Similar presentations
Extending Eclipse CDT for Remote Target Debugging Thomas Fletcher Director, Automotive Engineering Services QNX Software Systems.
Advertisements

Eclipse Rational CDT Update February 5 th, Solid Palette Gradient Palette I Gradient Palette II APPLYING THESE COLORS Click on the.
Module 13: Performance Tuning. Overview Performance tuning methodologies Instance level Database level Application level Overview of tools and techniques.
Microsoft® Access® 2010 Training
Translator Architecture Code Generator ParserTokenizer string of characters (source code) string of tokens abstract program string of integers (object.
Advanced Database Discussion B Trees. Motivation for B-Trees So far we have assumed that we can store an entire data structure in main memory What if.
Paper by: A. Balmin, T. Eliaz, J. Hornibrook, L. Lim, G. M. Lohman, D. Simmen, M. Wang, C. Zhang Slides and Presentation By: Justin Weaver.
Yu-Chen Kuo1 Chapter 1 Introduction to Compiling.
6/12/2015Prof. Hilfinger CS164 Lecture 111 Bottom-Up Parsing Lecture (From slides by G. Necula & R. Bodik)
Tutorial 16 Working with Dynamic Content and Styles.
Trees. 2 Definition of a tree A tree is like a binary tree, except that a node may have any number of children Depending on the needs of the program,
1 SWE Introduction to Software Engineering Lecture 22 – Architectural Design (Chapter 13)
Preferences in Eclipse 3.0 Present by Kun-Tse Wu.
ISBN Chapter 4 Lexical and Syntax Analysis The Parsing Problem Recursive-Descent Parsing.
Register Allocation (via graph coloring)
Trees. Definition of a tree A tree is like a binary tree, except that a node may have any number of children –Depending on the needs of the program, the.
Chapter 3 Program translation1 Chapt. 3 Language Translation Syntax and Semantics Translation phases Formal translation models.
Stimulating reuse with an automated active code search tool Júlio Lins – André Santos (Advisor) –
CSC 8310 Programming Languages Meeting 2 September 2/3, 2014.
Introduction To Databases IDIA 618 Fall 2014 Bridget M. Blodgett.
Conceptual Architecture of PostgreSQL PopSQL Andrew Heard, Daniel Basilio, Eril Berkok, Julia Canella, Mark Fischer, Misiu Godfrey.
Symbol Table (  ) Contents Map identifiers to the symbol with relevant information about the identifier All information is derived from syntax tree -
HTML 5 New Standardization of HTML. I NTRODUCTION HTML5 is The New HTML Standard, New Elements New Attributes Full CSS3 Support Video and Audio 2D/3D.
1. 2 What’s New in NetBeans IDE What is NetBeans IDE?  Ready to use out of the box  Support for latest Java specifications & standards  Other.
Abstract Syntax Trees Lecture 14 Wed, Mar 3, 2004.
An Extension to XML Schema for Structured Data Processing Presented by: Jacky Ma Date: 10 April 2002.
Elements of Computing Systems, Nisan & Schocken, MIT Press, Chapter 6: Assembler slide 1www.idc.ac.il/tecs Assembler Elements of Computing.
Chapter 1 Introduction Dr. Frank Lee. 1.1 Why Study Compiler? To write more efficient code in a high-level language To provide solid foundation in parsing.
1 History of compiler development 1953 IBM develops the 701 EDPM (Electronic Data Processing Machine), the first general purpose computer, built as a “defense.
1 CS 430 Database Theory Winter 2005 Lecture 17: Objects, XML, and DBMSs.
IBM Software Group ® CDT DOM Proposal Title slide Doug Schaefer IBM Tech Lead, Eclipse CDT December 2004.
Lesson 3 CDT301 – Compiler Theory, Spring 2011 Teacher: Linus Källberg.
1 Compiler Construction (CS-636) Muhammad Bilal Bashir UIIT, Rawalpindi.
© 2006 by «Author»; made available under the EPL v1.0 | Date | Other Information, if necessary Doug Schaefer My plans/dreams for C# in CDT.
ECE450 - Software Engineering II1 ECE450 – Software Engineering II Today: Design Patterns IX Interpreter, Mediator, Template Method recap.
10/28/20151 Operating Systems Design (CS 423) Elsa L Gunter 2112 SC, UIUC Based on slides by Roy Campbell, Sam.
© 2006 by «Author»; made available under the EPL v1.0 | Date | Other Information, if necessary Doug Schaefer CDT DOM What is it? What should it be?
© 2002 IBM Corporation Confidential | Date | Other Information, if necessary PTP 2.1 Release Review October 29, 2008.
Mitchell McMullen Paul Nguyen SWAN. Python written entirely in C#. Can access all.NET libraries and Silverlight. Created by the same guy as Jython. No.
1 Compiler Construction (CS-636) Muhammad Bilal Bashir UIIT, Rawalpindi.
CS536 Semantic Analysis Introduction with Emphasis on Name Analysis 1.
Recursive Descent Parsers Lecture 6 Mon, Feb 2, 2004.
Chapter 1 Introduction Major Data Structures in Compiler
What am I? while b != 0 if a > b a := a − b else b := b − a return a AST == Abstract Syntax Tree.
Chapter 5 Linked List by Before you learn Linked List 3 rd level of Data Structures Intermediate Level of Understanding for C++ Please.
C H A P T E R T W O Linking Syntax And Semantics Programming Languages – Principles and Paradigms by Allen Tucker, Robert Noonan.
Chap. 7, Syntax-Directed Compilation J. H. Wang Nov. 24, 2015.
©SoftMoore ConsultingSlide 1 Structure of Compilers.
© 2008 UniTESK Lab, ISP RAS; made available under the EPL v1.0 Towards Common Language Toolkit Institute for System Programming of RAS,
© 2005 by QNX; made available under the EPL v1.0 | March 8, 2016 CDT Roadmap Doug Schaefer CDT Project Lead QNX Software Systems.
1 Storing and Maintaining Semistructured Data Efficiently in an Object- Relational Database Mo Yuanying and Ling Tok Wang.
Module 5: Managing Content. Overview Publishing Content Executing Reports Creating Cached Instances Creating Snapshots and Report History Creating Subscriptions.
CS 2130 Lecture 18 Bottom-Up Parsing or Shift-Reduce Parsing Warning: The precedence table given for the Wff grammar is in error.
Improving Performance
Searching and Indexing
Semantic Analysis with Emphasis on Name Analysis
History of compiler development
Chapter 1: Introduction to Compiling (Cont.)
Trees.
CS 3304 Comparative Languages
Compiler Construction
CPSC 388 – Compiler Design and Construction
Compiler 薛智文 TH 6 7 8, DTH Spring.
Compiler 薛智文 TH 6 7 8, DTH Spring.
Instructor 彭智勇 武汉大学软件工程国家重点实验室 电话:
Trees.
Data Models.
Compiler 薛智文 M 2 3 4, DTH Spring.
WEB DESIGN Cross 11, Tapovan Enclave Nala pani Road, Dehradun : ,
Presentation transcript:

Oct 26, 2005 CDT DOM Roadmap Doug Schaefer

Parser History  CDT 1.0 ► JavaCC based parser  Used to populate CModel and Structure Compare ► ctags based indexer  Used for open declaration, text hover, content assist  CDT 1.1 ► Introduced first handwritten recursive descent parser  Used for CModel and Structure Compare

Parser History  CDT 1.2 ► Ctags based indexer replace with parser based indexer  Parser symbol table added to capture semantic info ► Added C/C++ Search that used the index  Hooked up content assist to search engine  CDT 2.0 ► Added content assist as parser client (more accurate) ► Added Type Cache to cache types for Open Type, Class Browser ► Added parsing of text selection for search features

CDT 3.0 The Dawn of the DOM  Previous architecture used callbacks to communicate with clients ► Passed in objects describing grammar rules that got accepted ► Left it to client responsibility to create necessary data structures ► Thought it would reduce memory consumption ► However, made it very difficult to build clients ► That and the objects the parser was passing were almost an AST  Wanted to support advanced features with parser ► Refactoring ► Code analysis such as call hierarchies ► i.e. JDT catch up…

CDT 3.0 The Dawn of the DOM  Better approach is to follow traditional architecture of compilers ► Abstract Syntax Tree captures structure of code ► Symbol Table captures semantic information ► No more callbacks, clients get root node of AST and go from there  We also added links from AST nodes back to source locations ► Including navigation through macros and inclusions ► Facilitate refactoring

CDT DOM Architecture Abstract Syntax Tree Bindings Names Locations references declarations

CDT 3.0 DOM Clients  DOM (Full) Indexer  Search Actions ► Open Declaration, Open Definition  Content Assist  Refactoring

CDT 3.0 Clients Still on Old Parser  CModel and Structure Compare ► Requires very fast parsing to satisfy Views ► Generally only cares about contents of a given file  Type Cache ► Used by Open Type and Class Browser ► Previously required since it needs all types in workspace ► Also needs to be updated when types are added, removed, or changed  Objective: Move these clients to DOM ► Need to make sure DOM meets their requirements ► Then we can get rid of the old parser

Problems with the DOM  DOM is complete but requires a lot of processing and memory ► Caching DOM parse results would exacerbate the memory problem ► Optimized algorithms as much as we could ► DOM Indexer is faster than CDT 2.x indexer but still takes a long time on large projects  No rewrite capability ► JDT DOM supports translating DOM changes into TextEdits ► Required to properly support refactoring

Solving Performance with PDOM  PDOM – Persisted DOM ► Persist highly used parts of the DOM in a database  Assumption: ► Many clients do not require 100% completeness  Some do ► Header files always produce the same AST Nodes  That’s not 100% true (e.g., stddef.h) ► Declarations do not span files  I have seen that not true (includes in middle of function) ► Database lookups faster than parsing header files  We’ll see but so far I’ve seen that to be true with embedded Derby

PDOM Explained  Skip over header files that have up-to-date information already stored in the PDOM  Persist Names and Bindings in PDOM to satisfy ► resolveBinding and resolvePrefix  Navigate from Names to Bindings ► getDeclarations, getDefinitions, getReferences  Navigate from Bindings to Names

CDT PDOM Architecture Abstract Syntax Tree Bindings Names Locations references declarations PDOM objects in black

PDOM Database Engine  Want to be flexible to allow ISVs to plugin in their own embedded database technology  Default implementation is on Apache Derby ► Embedded SQL database engine ► Apache licensed ► Already used by other Eclipse projects (BIRT, TPTP?)  Big worry is performance of database writes ► Will need to tune caching to make sure it is fast enough ► Objective: populate PDOM with Mozilla source in 20 minutes  On my Athon XP MB FC4 Linux  Current full index time is 90 minutes

Final Migration  Need to move all features to the DOM ► Code reduction exercise  Need for indexer removed ► May still want to populate PDOM using ctags  Migrate Search Engine to query the PDOM  Migrate CModelBuilder and CStructureBuilder to DOM ► Since we can skip header files, this should be pretty fast. ► Need to monitor it though to make sure.

Final Migration  Remove Type Cache ► PDOM queries should be fast enough  Migrate Class Browser, Type Hierarchy, and Open Type to PDOM ► Use queries to find list of types and relationships