|
| 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++ and |
| 41 | +Python). |
| 42 | + |
| 43 | + |
| 44 | +#### [Incremental C++ ↗] |
| 45 | + |
| 46 | +Despite its high performance capabilities, C++ is 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. |
| 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. |
| 63 | + |
| 64 | +- In Exploratory Programming: rapid reproduction of results, which is crucial |
| 65 | + during the exploratory phase of a project. |
| 66 | + |
| 67 | +- In Jupyter Notebooks: Interactive C++ can be [integrated with Jupyter |
| 68 | + Notebooks], providing a swift prototyping and learning experience for C++ |
| 69 | + users. |
| 70 | + |
| 71 | +#### [Language Interoperability ↗] |
| 72 | + |
| 73 | +Language interoperability helps programmers get the best of both worlds, with |
| 74 | +the ability to work with a high-performance language (e.g., C++), and at the |
| 75 | +same time, take advantage of a more interactive one (e.g., Python), while |
| 76 | +helping them identify each other's entities (like variables and classes) for |
| 77 | +seamless integration. |
| 78 | + |
| 79 | +This interoperability can be achieved by libraries like [CppInterOp], which |
| 80 | +expose APIs from compilers like Clang in a backward-compatible manner. By |
| 81 | +enabling interactive C++ usage through the Compiler-As-A-Service, CppInterOp |
| 82 | +simplifies complex tasks such as "language interoperability on the fly". |
| 83 | + |
| 84 | +The practical implications of language interoperability include the growing |
| 85 | +need for systems in data science to be able to interoperate with C++ |
| 86 | +codebases. By providing automatic creation of bindings on demand, tools |
| 87 | +like CppInterOp enable Python to interoperate with C++ code dynamically, |
| 88 | +instantiate templates, and execute them efficiently. This dynamic approach not |
| 89 | +only improves performance but also simplifies code development and debugging |
| 90 | +processes, offering a more efficient alternative to static binding methods. |
| 91 | + |
| 92 | + |
| 93 | +[Automatic Differentiation ↗]: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p2072r0.pdf |
| 94 | + |
| 95 | +[Interactive C++]: https://blog.llvm.org/posts/2020-12-21-interactive-cpp-for-data-science/ |
| 96 | + |
| 97 | +[integrated with Jupyter Notebooks]: https://blog.jupyter.org/interactive-workflows-for-c-with-jupyter-fe9b54227d92 |
| 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://cppinterop.readthedocs.io/en/latest/index.html |
| 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 ↗]: https://compiler-research.org/caas/ |
| 110 | + |
| 111 | +[Incremental C++ ↗]: https://compiler-research.org/interactive_cpp |
0 commit comments