Clings Context, Status and Plans Prototype of ROOTs new Interpreter - - PowerPoint PPT Presentation

cling s context status and plans
SMART_READER_LITE
LIVE PREVIEW

Clings Context, Status and Plans Prototype of ROOTs new Interpreter - - PowerPoint PPT Presentation

Clings Context, Status and Plans Prototype of ROOTs new Interpreter and Reflection Database Axel Naumann, 2011-03-14 Timetable 9:05 Motivation for cling 9:10 Context for a new interpreter 9:20 Status 9:25 Plans 2 Motivation 3


slide-1
SLIDE 1

Cling’s Context, Status and Plans

Prototype of ROOT’s new Interpreter and Reflection Database

Axel Naumann, 2011-03-14

slide-2
SLIDE 2

Timetable

9:05 Motivation for cling 9:10 Context for a new interpreter 9:20 Status 9:25 Plans

2

slide-3
SLIDE 3

Motivation

3

slide-4
SLIDE 4

Motivation

Deficiencies of CINT now relevant: Correctness C++ support, also C++ 1x Speed Maintenance

4

slide-5
SLIDE 5

Why cling

cling based on open source compiler llvm / clang Correctness C++ support, also c++ 1x Speed Maintenance

5

slide-6
SLIDE 6

Why cling

cling based on open source compiler llvm / clang Correctness C++ support, also c++ 1x Speed Maintenance

5

slide-7
SLIDE 7

Why cling

cling based on open source compiler llvm / clang Correctness C++ support, also c++ 1x Speed Maintenance

5

slide-8
SLIDE 8

Why cling

cling based on open source compiler llvm / clang Correctness C++ support, also c++ 1x Speed Maintenance

5

slide-9
SLIDE 9

Why cling

cling based on open source compiler llvm / clang Correctness C++ support, also c++ 1x Speed Maintenance

5

slide-10
SLIDE 10

Context

6

slide-11
SLIDE 11

Context

BACKWARD COMPATIBILITY! CINT features, C++ extensions ROOT Reflection & I/O: TCint, TClass Dictionaries: selection.xml, Linkdef.h Reflex

7

slide-12
SLIDE 12

CINT features, ++C++

Dynamic scope: Un- / Reloading: #includes, library loading, variable declaration: all implicit

new ¡TFile(“h.root”); hist-­‑>Draw(); .x mycode.C //edit .x mycode.C

8

slide-13
SLIDE 13

ROOT Reflection

Interface to CINT is TCint; re-implement using cling/clang/llvm Proper overload resolution (signal/ slot etc) Will allow full access to C++ through ROOT (enum, ...) Simplifies dictionaries (shadow,...)

9

slide-14
SLIDE 14

ROOT Reflection (2)

Reflection database: clang abstract syntax tree (AST) authoritative covers full language built-in persistence: precompiled headers (PCH)

10

slide-15
SLIDE 15

PCH / Dictionary

Depend on platform not compiler! No wrappers needed if LLVM-JIT available (e.g. all LCG platforms) Less disk size, less RAM: partial loads on demand FAST lookup: used by clang itself

slide-16
SLIDE 16

ROOT I/O

type names change

ROOT with CINT ROOT with Cling Old TFile Future TFile using namespace std A::B<C> new lookup 1) change type names OR 2) Backport to old ROOT // CINT: vector<string> A::B<C> // clang: std::vector<std::string> A::B<A::C>

12

slide-17
SLIDE 17

Type Names and ROOT

Very different from CINT7!

CINT7 cling Type Names CINT-compatible Functionally equivalent Reflection DB Reflex clang Type Lookup CINT, Reflex clang Dict Format CINT, Reflex clang* Handling A<B=alloc> vs A CINT vs Reflex clang

13

slide-18
SLIDE 18

Dictionaries

selection.xml, Linkdef.h will map to same selection algorithm (already implemented) Selection on clang AST (to be done) Backward compatible invocation and

  • utput (happy Makefiles)

14

slide-19
SLIDE 19

Reflex

Becomes 2nd-tier reflection interface Reflex exposes underlying collection types through typedefs. Two options: Copy clang AST to Reflex Change underlying iterator types Up to the experiments to decide

15

slide-20
SLIDE 20

Status

16

slide-21
SLIDE 21

Status

Interpreter: ROOT with execution in cling, reflection in CINT Some CINT extensions implemented .x hsimple.C just works! No changes in clang + llvm needed!

17

slide-22
SLIDE 22

Status (2)

Reflection: Linkdef / selection.xml parser 70%: Reflex dict from clang AST 50%: dictionary in PCH, to do: >1 PCHs, AST node selection 10%: TCint ➠ TCling

18

slide-23
SLIDE 23

Plans

19

slide-24
SLIDE 24

Plans

PCH dictionary Independent: validate type name chain header ➠ rootcling dict ➠ Reflex ➠ Cintex ➠ CINT (Reflex because of similarity GCC / clang type names) Verify compatibility of type names in reco file

20

slide-25
SLIDE 25

Plans (2)

Offer interpreter to clang by summer: visibility, show good manners Embed in ROOT, --enable-cling Implement missing + functionally required (cf. backward compatibility) CINT features Study cling + multi-threading

21

slide-26
SLIDE 26

Outlook

22

slide-27
SLIDE 27

Outlook

Long list of crazy items: who would’ve thought a compiler can...! Working down the list until we’re done Now that basics are there: regular cling progress report @ ROOT.cern.ch (search for cling)

23