Philipp Jan Andries Stassen, Rasmus Ejlers Møgelberg, Maaike Zwart, Alejandro Aguirre, Lars Birkedal
{"title":"Modelling Probabilistic FPC in Guarded Type Theory","authors":"Philipp Jan Andries Stassen, Rasmus Ejlers Møgelberg, Maaike Zwart, Alejandro Aguirre, Lars Birkedal","doi":"arxiv-2408.04455","DOIUrl":null,"url":null,"abstract":"Constructive type theory combines logic and programming in one language. This\nis useful both for reasoning about programs written in type theory, as well as\nfor reasoning about other programming languages inside type theory. It is\nwell-known that it is challenging to extend these applications to languages\nwith recursion and computational effects such as probabilistic choice, because\nthese features are not easily represented in constructive type theory. We show\nhow to define and reason about a programming language with probabilistic choice\nand recursive types, in guarded type theory. We use higher inductive types to\nrepresent finite distributions and guarded recursion to model recursion. We\ndefine both operational and denotational semantics, as well as a relation\nbetween the two. The relation can be used to prove adequacy, but we also show\nhow to use it to reason about programs up to contextual equivalence. To the\nbest of our knowledge, this is the first model of a programming language with\nprobabilistic choice and recursive types in a constructive type theory.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":null,"pages":null},"PeriodicalIF":0.0000,"publicationDate":"2024-08-08","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"arXiv - CS - Programming Languages","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/arxiv-2408.04455","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0
Abstract
Constructive type theory combines logic and programming in one language. This
is useful both for reasoning about programs written in type theory, as well as
for reasoning about other programming languages inside type theory. It is
well-known that it is challenging to extend these applications to languages
with recursion and computational effects such as probabilistic choice, because
these features are not easily represented in constructive type theory. We show
how to define and reason about a programming language with probabilistic choice
and recursive types, in guarded type theory. We use higher inductive types to
represent finite distributions and guarded recursion to model recursion. We
define both operational and denotational semantics, as well as a relation
between the two. The relation can be used to prove adequacy, but we also show
how to use it to reason about programs up to contextual equivalence. To the
best of our knowledge, this is the first model of a programming language with
probabilistic choice and recursive types in a constructive type theory.