Edinburgh Research Explorer

Probabilistic Programming with Densities in SlicStan: Efficient, Flexible, and Deterministic

Research output: Contribution to journalArticle

Related Edinburgh Organisations

Open Access permissions



  • Download as Adobe PDF

    Rights statement: This work is licensed under a Creative Commons Attribution 4.0 International License. © 2019 Copyright held by the owner/author(s).

    Final published version, 478 KB, PDF document

    Licence: Creative Commons: Attribution (CC-BY)

Original languageEnglish
Article number35
Pages (from-to)35:1-35:30
Number of pages30
JournalProceedings of the ACM on Programming Languages (PACMPL)
Issue numberPOPL
Publication statusPublished - 2 Jan 2019


Stan is a probabilistic programming language that has been increasingly used for real-world scalable projects. However, to make practical inference possible, the language sacrifices some of its usability by adopting a block syntax, which lacks compositionality and flexible user-defined functions. Moreover, the semantics of the language has been mainly given in terms of intuition about implementation, and has not been formalised.

This paper provides a formal treatment of the Stan language, and introduces the probabilistic programming language SlicStan --- a compositional, self-optimising version of Stan. Our main contributions are (1) the formalisation of a core subset of Stan through an operational density-based semantics; (2) the design and semantics of the Stan-like language SlicStan, which facilities better code reuse and abstraction through its compositional syntax, more flexible functions, and information-flow type system; and (3) a formal, semantic-preserving procedure for translating SlicStan to Stan.

    Research areas

  • information flow analysis, probabilistic programming, Markov chain Monte Carlo method, probabilistic computing

Download statistics

No data available

ID: 89085758