This document provides the documentation for the internals of the stanc3 compiler intended for developers.
If you are looking for the user-facing documentation, see this section of the Stan User's Guide.
See the Getting Started page for information on setting up a stanc3 development environment.
Here are some resources (internal and external) which may be useful to a new developer.
The major code sections of the compiler are as follows (these are links):
Driver
Frontend
Middle
Common
Analysis_and_optimization
Stan_math_signatures
This module stores a table of all signatures from the Stan math C++ library which are exposed to Stan, and some helper functions for dealing with those signatures.Stan_math_backend
These are related in the following architecture diagram
We additionally use several outside dependencies.