[clang-repl] Tutorial development with clang-repl

Description

The Clang compiler is part of the LLVM compiler infrastructure and supports various languages such as C, C++, ObjC and ObjC++. The design of LLVM and Clang enables them to be used as libraries, and has led to the creation of an entire compiler-assisted ecosystem of tools. The relatively friendly codebase of Clang and advancements in the JIT infrastructure in LLVM further enable research into different methods for processing C++ by blurring the boundary between compile time and runtime. Challenges include incremental compilation and fitting compile/link time optimizations into a more dynamic environment.

Incremental compilation pipelines process code chunk-by-chunk by building an ever-growing translation unit. Code is then lowered into the LLVM IR and subsequently run by the LLVM JIT. Such a pipeline allows creation of efficient interpreters. The interpreter enables interactive exploration and makes the C++ language more user friendly. The incremental compilation mode is used by the interactive C++ interpreter, Cling, initially developed to enable interactive high-energy physics analysis in a C++ environment.

Our group puts efforts to incorporate and possibly redesign parts of Cling in Clang mainline through a new tool, clang-repl. The project aims implementing tutorials demonstrating the capabilities of the project and investigating adoption of clang-repl in xeus-cling.

Expected results

There are several foreseen tasks:

  • Write several tutorials demostrating the current capabilities of clang-repl.
  • Investigate the requirements for adding clang-repl as a backend to xeus-cling.
  • Implement the xeus kernel protocol for clang-repl.
  • Prepare a blog post about clang-repl and possibly Jupyter.
  • Present the work at the relevant meetings and conferences.

Desirable skills

Intermediate C++; Understanding of Clang and the Clang API in particular

Project type

Medium

Mentors

@vvassilev

Further reading

clang-repl
clang-repl RFC
Cling

1 Like

Hi @vvassilev ,
I am Krishna Narayanan and I had previously done my GSoC’22 under Beagleboard.Org.I am interested in working on this project with decent exposure to compilers, interpreters and would like to contribute to this project idea.I have been through the resources of cling and have built from source.I have been referring to repl sources and JIT also.

Thanks,
Krishna Narayanan

Thanks for reaching out! Please note that this was a project proposed for the last year round of GSoC.

Yes,
Any chances of having this project idea for GSoC’23 so that I can make a proposal for this project!?
Thanks,
Krishna Narayanan.

Can you send me a CV in private? We might be able to do something in that area, perhaps worded a little differently.

Yes, I have sent you the CV in private.

Thanks,
Krishna Narayanan.

@Krishna, I have checked and it is okay to have this project for this year too. Please start working on a proposal draft if you are still interested.