Rsem is a work-in-progress static type-checker for the R language. See tyr for more info.
We plan to integrate Rsem into the tyr package.
For now, it must be installed in standalone by following these instructions (only tested on Linux).
- Installing the OCaml Package Manager OPAM, and set up an OCaml 5.3.0 environment:
opam switch create typr 5.3.0
eval $(opam env --switch=typr)
-
Installing the parser dependencies by following the instructions on our fork of ocaml-tree-sitter-semgrep.
-
You may need to export treesitter directories:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/.../r-parser/core/tree-sitter/lib/
export TREESITTER_INCDIR=/.../r-parser/core/tree-sitter/include/
export TREESITTER_LIBDIR=/.../r-parser/core/tree-sitter/lib/
- Installing this project dependencies, and building it:
make deps
make
The signatures of the functions of base R live in sigs/base.R,
in the base namespace. They are processed before the tests (make test), and
tyr uses them as its prelude.
This work is supported by the Czech Ministry of Education, Youth and Sports under program ERC-CZ, grant agreement LL2325, as well as by the Czech Science Foundation Grant No. 23-07580X.