Driver.EntryStan compiler entrypoints
type compilation_result = (string, Frontend.Errors.t) Stdlib.resultEither the C++ a model compiled to, or an error
type mir_compilation_result =
(Middle.Program.Typed.t, Frontend.Errors.t) Stdlib.resultEither a model compiled to Stan Math backend-transformed and optimized MIR, or an error
type other_output = | Formatted of string| DebugOutput of string| Memory_patterns of string| Info of string| Version of string| Generated of string| Warnings of Frontend.Warnings.t listThe type of all auxiliary outputs from the compiler
val stan2mir :
string ->
[ `Code of string | `File of string ] ->
Flags.t ->
(other_output -> unit) ->
mir_compilation_resultCompile a model through Stan Math backend transformation and MIR optimization, without lowering it to C++. Takes the model's name, model code, compiler settings, and a callback for auxiliary output.
val stan2cpp :
string ->
[ `Code of string | `File of string ] ->
Flags.t ->
(other_output -> unit) ->
compilation_resultThe main function of the compiler. Takes in the model's name, the model code, compiler settings, and a callback for all non-C++ output