aran
TypeScript icon, indicating that this package has built-in type declarations

4.0.0 • Public • Published

Aran aran-logo

Versions in the range 4.0.x should be considered in early access

Aran is a npm module for instrumenting JavaScript code. Aran was designed as a generic infra-structure for building various development-time dynamic program analyses such as: objects and functions profiling, debugging, control-flow tracing, taint analysis and concolic testing. Aran is a JavaScript library without any dependencies that only export functions that manipulates estree. Hence, additional work is required to actually conduct program analyses.

Disclaimer Aran started as an academic research project, and is used at SOFT lab to support publications and run experiments. Although Aran supports almost entirely ECMAScript2024 and is well-tested against test262, it has been seldomly used to instrument large-scale programs. The performance overhead and even the increase size of the instrumented code may cause issues.

Getting Started

Aran is a npm module that can be installed as any other npm module with: npm install aran. It exports two main functions:

  • generateSetup: generates an estree that should be executed before any instrumented code.
  • instrument: instruments an estree and expects the advice to be defined as a global variable.

API

typedoc

Live Demo

live-demo

Known Issues

Beside performance overhead, Aran has some known issues that may cause instrumented programs to no behave as their pre-instrumented version.

In practice, the issue that is most susceptible to cause a program to behave differentially is early script declaration. Other issues require fairly convoluted code to be triggered.

Acknowledgments

I'm Laurent Christophe a phd student at the Vrij Universiteit of Brussel. My promoters are Coen De Roover and Wolfgang De Meuter.

vub soft tearless

/aran/

    Package Sidebar

    Install

    npm i aran

    Weekly Downloads

    26

    Version

    4.0.0

    License

    MIT

    Unpacked Size

    1.27 MB

    Total Files

    242

    Last publish

    Collaborators

    • lachrist