omegahat/RClangSimple: R Interface to the clang parser's C API

This package is currently an interface to some of the functionality in the clang parsing facilities. The idea is to be able to extract information from C and C++ source files and headers so that we can do semantic analysis on the contents and use this information in various different ways. One application is to be able to programmatically generate bindings to arbitrary C/C++ routines. The functionality here is similar to the basic facilities in RGCCTranslationUnit. We will probably develop a richer and more powerful interface using the C++ API that will give us access to more features of the AST classes. We can analyze not only the declarations but the body of the code of C routines. This allows us to analyze routines in existing C libraries and determine information such as what inputs they mutate, how memory management is done, how to interface R data types to them. This is far from trivial, but feasible. We can also use this to analyze routines and find global variables suggeest and/or implement refactoring to remove these and permit parallel execution. We can, in the extreme, recover simple C routines into higher level instructions and then try to parallelize them in R.

Getting started

Package details

AuthorDuncan Temple Lang
MaintainerDuncan Temple Lang <duncan@r-project.org>
LicenseGPL-2
Version0.5-0
URL http://www.omegahat.org/RCIndex
Package repositoryView on GitHub
Installation Install the latest version of this package by entering the following in R:
install.packages("remotes")
remotes::install_github("omegahat/RClangSimple")
omegahat/RClangSimple documentation built on Aug. 17, 2024, 10:23 a.m.