Dictionary generation for the Experiments

Slides:



Advertisements
Similar presentations
Optional Static Typing Guido van Rossum (with Paul Prescod, Greg Stein, and the types-SIG)
Advertisements

Seal Dictionary Applications Area Internal Review 20 October 2003 Stefan Roiser / CERN.
LLVM-based C++ Interpreter For ROOT Axel Naumann, CERN Lukasz Janyst, CERN Philippe Canal, Fermilab.
Requirements Engineering n Elicit requirements from customer  Information and control needs, product function and behavior, overall product performance,
SEAL Reflex, the new Reflection Library Stefan Roiser (for the LCG/SEAL Dictionary work package) LCG Applications Area Meeting, Oct. 6, 2004.
SableCC SableCC is developed by professors and graduate students at McGill University and is open source (licensed under the Apache License, Version 2.0)‏
4 July 2005 overview Traineeship: Mapping of data structures in multiprocessor systems Nick de Koning
Chapter 3.2 C++, Java, and Scripting Languages. 2 C++ C used to be the most popular language for games Today, C++ is the language of choice for game development.
System Design and Analysis
Chapter 3.2 C++, Java, and Scripting Languages “The major programming languages used in game development.”
Wizard of House Management - Programming Language and Translators Project Rui Kuang Arvid Bessen Andrey Butov Svetlana Starshinina.
Version Enterprise Architect Redefines Modeling in 2006 An Agile and Scalable modeling solution Provides Full Lifecycle.
ANTLR.
Microsoft Visual Basic 2012 CHAPTER ONE Introduction to Visual Basic 2012 Programming.
OOSE 01/17 Institute of Computer Science and Information Engineering, National Cheng Kung University Member:Q 薛弘志 P 蔡文豪 F 周詩御.
Katanosh Morovat.   This concept is a formal approach for identifying the rules that encapsulate the structure, constraint, and control of the operation.
CINT Retrospect ROOT Workshop Mar 2013 Agilent Technologies Masaharu Goto.
MT311 Java Application Development and Programming Languages Li Tak Sing( 李德成 )
Requirements Analysis
CSE 332: C++ templates This Week C++ Templates –Another form of polymorphism (interface based) –Let you plug different types into reusable code Assigned.
.NET Framework Danish Sami UG Lead.NetFoundry
CINT & Reflex: New Reflection Data Structures Masa(haru) Goto Agilent Philippe Canal Fermilab/CD Stefan Roiser, Axel Naumann PH/SFT.
Axel Naumann University of Nijmegen / NIKHEF, NL ROOT 2004 Users Workshop The Future of THtml Plans and Status of ROOT’s documentation facility.
Replay Compilation: Improving Debuggability of a Just-in Time Complier Presenter: Jun Tao.
CINT C++ Interpreter update ROOT2001 at Fermi-Lab Masaharu Goto.
Microsoft Visual Basic 2005 BASICS Lesson 1 A First Look at Microsoft Visual Basic.
Chapter 1 Introduction. Chapter 1 - Introduction 2 The Goal of Chapter 1 Introduce different forms of language translators Give a high level overview.
THtml  THtml will generate >=1 doc.root file .html pages generated from doc.root files by April (Feb doesn't exist)  Bertrand: extract doc for online.
CS536 Semantic Analysis Introduction with Emphasis on Name Analysis 1.
Chapter 1 Introduction Major Data Structures in Compiler
Chapter 1 Introduction. Chapter 1 -- Introduction2  Def: Compiler --  a program that translates a program written in a language like Pascal, C, PL/I,
Slide Advanced Programming 2004, based on LY Stefanus's slides Native Methods.
Visualization Four groups Design pattern for information visualization
Software Engineering1  Verification: The software should conform to its specification  Validation: The software should do what the user really requires.
Low-Level Virtual Machine support for Eclipse C/C++ Development Tooling Petri Tuononen - 17/5/2011.
How Are Computers Programmed? CPS120: Introduction to Computer Science Lecture 5.
ROOT Team Meeting Axel Naumann CERN PH/SFT Crienftlex Extended Version. And also Director’s Cut. Crienftlex.
D. Duellmann - IT/DB LCG - POOL Project1 The LCG Dictionary and POOL Dirk Duellmann.
CINT & Reflex – The Future CINT’s Future Layout Reflex API Work In Progress: Use Reflex to store dictionary data Smaller memory footprint First step to.
Axel Naumann. Nada FTE  LLVM + cling would take 4 years  when done, move to next hot-spot in ROOT Axel Naumann ROOT Team Meeting2.
©SoftMoore ConsultingSlide 1 Structure of Compilers.
Introduction to Computer Programming Concepts M. Uyguroğlu R. Uyguroğlu.
Some of the utilities associated with the development of programs. These program development tools allow users to write and construct programs that the.
Part -1 © by Pearson Education, Inc. All Rights Reserved.
ROOT / Reflex ‘07+ Stefan Roiser Missed last team meeting b/c.
IS 350 Course Introduction. Slide 2 Objectives Identify the steps performed in the software development life cycle Describe selected tools used to design.
D Language Compiler as a Library
Lecture 9 Symbol Table and Attributed Grammars
Stefan Roiser CERN / PH / SFT
Week 3-4 Control flow (review) Function definition Program Structures
Strategy Pattern Jim Fawcett CSE776 – Design Patterns Fall 2014.
Clang Plugins working group
Introduction to Visual Basic 2008 Programming
Chapter 10 Design Patterns.
Software Development, Quality and Documentation Tool
Semantic Analysis with Emphasis on Name Analysis
Geant4 Geometry Objects Persistency using ROOT
-by Nisarg Vasavada (Compiled*)
Implementing Chares in a High-Level Scripting Language
Data Modeling II XML Schema & JAXB Marc Dumontier May 4, 2004
Protocols and Layering
Module 1: Getting Started
Automated Parser Generation for High-Speed NIDS
Software Development, Quality and Documentation Tool
Conceptual Architecture of PostgreSQL
Conceptual Architecture of PostgreSQL
Metadata Framework as the basis for Metadata-driven Architecture
Chapter 1 Introduction.
Chapter 3 Discussion Pages
Strategy Pattern Jim Fawcett CSE776 – Design Patterns Fall 2014.
Presentation transcript:

Dictionary generation for the Experiments Velislava Spasova Supervisor: Axel Naumann

Introduction to dictionaries LHC data is C++ objects stored at disks C++ provides very limited Runtime type information (RTTI) A mechanism to describe reflection information for the objects’ classes is needed Dictionaries are one such mechanism Dictionaries are C++ source files generated from header files

Current Dictionary Generating Tools (rootcint) Two dictionary generation tools – rootcint and genreflex rootcint : Uses CINT for the parsing of the header files Selection information could be passed as a Linkdef.h file Problems: CINT is limited in its parsing capabilities, templates processing could be problematic, etc.

Current Dictionary Generating Tools (genreflex) genreflex is a Python script (1000s of lines) Uses GCCXML to parse the header files – a temporary XML file describing the AST is created XML selection files could be used for specification of the items for which a dictionary is to be generated Problems: Slow and practically impossible to debug, creates an intermediate file between the header file and the dictionary which slows down even more the dictionary generation

LLVM and clang LLVM - collection of compiler and tool-chain technologies Used as an optimizer and code generator for different compiler front-ends clang – compiler front-end for C, C++ and Objective-C Uses LLVM as a back-end Offers a C++ interface to C++ code Is much faster than GCC Benefits: enhanced language support, shortened build times, more dynamic access to C++

Proposed solution Combine rootcint and genreflex functionality into one tool - rootcling using LLVM and clang

Requirements to rootcling Should be a drop-in solution The transition to the new tool should be transparent to the users Shouldn’t break existing code Should accept current mechanisms for dictionary selection (XML selection files or Linkdef.h files)

My task – dictionary selection Create small (pseudo) XML parser to parse the selection.xml files used by genreflex Create small parser to parse Linkdef.h files used by rootcint Realize different selection policies corresponding to the different policies of rootcint and genreflex. Realize the selection process based on the information in the selection files

Classes flow chart .

The role of clang Provides access to the header through the clang::Decl class and its derivatives (“AST”) Fast and reliable Provides mechanism for recursive traversal of the AST Overriding the DeclVisitor methods to check if a Decl* is to be selected and if yes, trigger the dictionary generation

Selection data structure Selection criteria are represented as a hierarchy of Selection rules Selection rules are created when parsing the selection files

Example Linkdef.h file #ifdef __CINT__ #pragma link off all globals; #pragma link off all classes; #pragma link off all functions; #pragma link C++ nestedclasses; #pragma link C++ class A+; #pragma link C++ class B-!; #pragma link C++ function n::get_n(); #pragma link C++ function n::set_values(int*, std::string&); #pragma link C++ global var_a; #pragma link C++ enum ETest; #endif

Example selection.xml file <lcgdict> <selection> <class name = “a” /> <class pattern=“std::vector<*” /> <class file = “test.h” /> <function proto_name = “n::get_n(float\*,int)” /> </selection> <exclusion> <class name = “a” > <method proto_pattern = “set_value(*)” /> </class> </exclusion> </lcgdict>

Some complications … rootcint and genreflex have different and complex default behavior Should nested classes (A::B) inherit the selection rule for the outer class (A)? genreflex and rootcint allow for different behavior Determine selection behavior of both tools experimentally

Selection flow chart

Progress and Future work XML parser developed Pattern recognition developed Selection rule classes developed Selection mechanism implemented Future work: Linkdef.h parser to be developed Tests

Don’t hesitate to share any remarks, suggestions or questions

Thank you!