|
| 1 | +--- |
| 2 | +title: "Compiler Research Research Areas" |
| 3 | +layout: gridlay |
| 4 | +excerpt: "Research" |
| 5 | +sitemap: false |
| 6 | +permalink: /research/ |
| 7 | +--- |
| 8 | + |
| 9 | +Following are the areas of research that Compiler Research Group is focused on: |
| 10 | + |
| 11 | +### Automatic Differentiation |
| 12 | + |
| 13 | +Automatic Differentiation (AD) is a useful technique in scientific research |
| 14 | +fields like machine learning and computational physics. AD enables the |
| 15 | +automatic computation of derivatives of functions with high precision and |
| 16 | +efficiency. A notable implementation of AD is the [Clad plugin for the Clang] |
| 17 | +compiler. This integration not only simplifies the process of differentiation |
| 18 | +but also enhances the performance and accuracy of numerical computations in |
| 19 | +scientific applications. |
| 20 | + |
| 21 | +In scientific research, where intricate mathematical models are prevalent, the |
| 22 | +utilization of AD through tools like the Clad brings a new level of |
| 23 | +sophistication and speed to derivative calculations. By leveraging AD within |
| 24 | +C++ compilers, researchers can focus more on the scientific aspects of their |
| 25 | +work rather than getting bogged down in manual differentiation tasks. This |
| 26 | +automation not only accelerates the development process but also ensures that |
| 27 | +computations are error-free and consistent. |
| 28 | + |
| 29 | +### Compiler-As-A-Service |
| 30 | + |
| 31 | +[Compiler as a Service (CaaS)] is an evolving technology that redefines the |
| 32 | +traditional approach to compilers by providing a service-oriented |
| 33 | +architecture. Instead of treating the compiler as a black box, the CaaS |
| 34 | +approach helps open up the functionality to make it available as APIs. This |
| 35 | +gives developers unprecedented control and insights into the compilation |
| 36 | +process, while being able to use lightweight APIs for simpler workflows and |
| 37 | +diagnostics, helping create sophisticated applications more efficiently. |
| 38 | + |
| 39 | +Practical applications of CaaS include deeper and interactive program analysis |
| 40 | +and conversion from one programming language to another (e.g., C++ <-> |
| 41 | +Python). |
| 42 | + |
| 43 | + |
| 44 | +### Incremental C++ |
| 45 | + |
| 46 | +Despite its high performance capabilities, C++ not the first programming |
| 47 | +language that comes to mind for rapidly developing robust applications, mainly |
| 48 | +due to the long edit-compile-run cycles. |
| 49 | + |
| 50 | +Ongoing research in projects such as [Cling], [Clang-REPL], etc. aims to |
| 51 | +provide practically usable interactive capabilities to the C++ programming |
| 52 | +language. The goal is to enable dynamic interoperability, rapid prototyping, |
| 53 | +and exploratory programming, which are essential for data science and other |
| 54 | +scientific applications. |
| 55 | + |
| 56 | +Following are some practical applications of a "[C++ Interpreter]," so to speak: |
| 57 | + |
| 58 | +- In Data Science: Interactive probing of data and interfaces, making complex |
| 59 | + libraries and data more accessible to users. [^1] |
| 60 | + |
| 61 | +- In CUDA: The Cling CUDA extension brings the workflows of interactive C++ to |
| 62 | + GPUs without losing performance and compatibility to existing software. [^1] |
| 63 | + |
| 64 | +- In Exploratory Programming: rapid reproduction of results, which is crucial |
| 65 | + during the exploratory phase of a project. [^2] |
| 66 | + |
| 67 | +- In Jupyter Notebooks: Interactive C++ can be integrated with Jupyter |
| 68 | + Notebooks, providing a swift prototyping and learning experience for C++ users. [^2] |
| 69 | + |
| 70 | +### Language Interoperability |
| 71 | + |
| 72 | +[Language interoperability] helps programmers get the best of both worlds, with |
| 73 | +the ability to work with a high-performance language (e.g., C++), and at the |
| 74 | +same time, take advantage of a more interactive one (e.g., Python), while |
| 75 | +helping them identify each other's entities (like variables and classes) for |
| 76 | +seamless integration. |
| 77 | + |
| 78 | +This interoperability can be achieved by libraries like [CppInterOp], which |
| 79 | +expose APIs from compilers like Clang/LLVM in a backward-compatible manner. By |
| 80 | +enabling interactive C++ usage through the Compiler-As-A-Service, CppInterOp |
| 81 | +simplifies complex tasks such as "language interoperability on the fly". |
| 82 | + |
| 83 | +The practical implications of language interoperability include the growing |
| 84 | +need for systems in data science to be able to interoperate with C++ |
| 85 | +codebases. By providing automatic creation of bindings on demand, tools |
| 86 | +like CppInterOp enable Python to interoperate with C++ code dynamically, |
| 87 | +instantiate templates, and execute them efficiently. This dynamic approach not |
| 88 | +only improves performance but also simplifies code development and debugging |
| 89 | +processes, offering a more efficient alternative to static binding methods. |
| 90 | + |
| 91 | +--- |
| 92 | +Footnotes: |
| 93 | + |
| 94 | +[^1]: [Interactive C++ for Data Science](https://blog.llvm.org/posts/2020-12-21-interactive-cpp-for-data-science/) |
| 95 | + |
| 96 | +[^2]: [Interactive Workflows for C++ with Jupyter](https://blog.jupyter.org/interactive-workflows-for-c-with-jupyter-fe9b54227d92) |
| 97 | + |
| 98 | + |
| 99 | +[CppInterOp]: https://github.com/compiler-research/CppInterOp/blob/main/README.md |
| 100 | + |
| 101 | +[Clad plugin for the Clang]: https://compiler-research.org/clad/ |
| 102 | + |
| 103 | +[Language interoperability]: https://compiler-research.org/libinterop/ |
| 104 | + |
| 105 | +[Cling]: https://rawgit.com/root-project/cling/master/www/index.html |
| 106 | + |
| 107 | +[Clang-REPL]: https://clang.llvm.org/docs/ClangRepl.html |
| 108 | + |
| 109 | +[Compiler as a Service (CaaS)]: https://compiler-research.org/caas/ |
| 110 | + |
| 111 | +[C++ Interpreter]: https://compiler-research.org/interactive_cpp |
0 commit comments