Probabilistic termination by monadic affine sized typing
UD Lago, C Grellois - ACM Transactions on Programming Languages …, 2019 - dl.acm.org
ACM Transactions on Programming Languages and Systems (TOPLAS), 2019•dl.acm.org
We introduce a system of monadic affine sized types, which substantially generalizes usual
sized types and allows in this way to capture probabilistic higher-order programs that
terminate almost surely. Going beyond plain, strong normalization without losing soundness
turns out to be a hard task, which cannot be accomplished without a richer, quantitative
notion of types, but also without imposing some affinity constraints. The proposed type
system is powerful enough to type classic examples of probabilistically terminating programs …
sized types and allows in this way to capture probabilistic higher-order programs that
terminate almost surely. Going beyond plain, strong normalization without losing soundness
turns out to be a hard task, which cannot be accomplished without a richer, quantitative
notion of types, but also without imposing some affinity constraints. The proposed type
system is powerful enough to type classic examples of probabilistically terminating programs …
We introduce a system of monadic affine sized types, which substantially generalizes usual sized types and allows in this way to capture probabilistic higher-order programs that terminate almost surely. Going beyond plain, strong normalization without losing soundness turns out to be a hard task, which cannot be accomplished without a richer, quantitative notion of types, but also without imposing some affinity constraints. The proposed type system is powerful enough to type classic examples of probabilistically terminating programs such as random walks. The way typable programs are proved to be almost surely terminating is based on reducibility but requires a substantial adaptation of the technique.
ACM Digital Library