6–9 Jul 2026
Europe/Warsaw timezone

Metamorphoses: Transforming CVXR to S7 with an AI Agent

9 Jul 2026, 11:10
20m
Talks (15-20 minutes) Talks

Speaker

Balasubramanian Narasimhan (Stanford University)

Description

CVXR is the R implementation of CVXPY, a widely-used disciplined convex optimization framework. Maintained by two developers, the S4-based CVXR 1.0 had fallen significantly behind CVXPY in features. We report on a complete rewrite using S7 We report on a complete rewrite using S7, that is now on CRAN that targets current version of CVXPY. The new version is 4-5x faster than old CVXR and the rewrite was CRAN ready in 25 days, despite a full-day job. We share the architectural decisions that made this feasible -- isomorphic file trees, a 15-rule "constitution" governing the AI agent, annotation-based test mapping -- along with S7 pitfalls we encountered and honest performance data. Some of the strategies we adopted might be useful for others using AI agents for building R packages.

If you used AI tools or services to support the preparation of this submission, please state the name and reason for using each of them.

This talk involves AI so the answer is yes. The AI agent was claude and it was chosen because of its reputation as well as usability in an Emacs environment which I favor.

Additional Material or Paper

I gave an initial talk on this at the CVXPY workshop in February. See https://naras.su.domains/blog

Keywords: Please list up to 5 keywords to help us find the right session for your contribution. R packages, AI agents, code translation, S7
Virtual Option This submission is for onsite presentation only
Video Recording Video sharing is fine
The author(s) agree(s) to take responsibility and be accountable for the contents of the submission and is/are authorized to present it. Confirm
Interested in serving as reviewer? naras@stanford.edu

Author

Balasubramanian Narasimhan (Stanford University)

Presentation materials

There are no materials yet.