Lune

OOPSLA2022Top-tier venue

Weighted programming: a programming paradigm for specifying mathematical models

Kevin Batz, Adrian Gallus, Benjamin Lucien Kaminski, Joost-Pieter Katoen, Tobias Winkler

Abstract

We study weighted programming, a programming paradigm for specifying mathematical models. More specifically, the weighted programs we investigate are like usual imperative programs with two additional features: (1) nondeterministic branching and (2) weighting execution traces. Weights can be numbers but also other objects like words from an alphabet, polynomials, formal power series, or cardinal numbers. We argue that weighted programming as a paradigm can be used to specify mathematical models beyond probability distributions (as is done in probabilistic programming). We develop weakest-precondition- and weakest-liberal-precondition-style calculi à la Dijkstra for reasoning about mathematical models specified by weighted programs. We present several case studies. For instance, we use weighted programming to model the ski rental problem — an optimization problem. We model not only the optimization problem itself, but also the best deterministic online algorithm for solving this problem as weighted programs. By means of weakest-precondition-style reasoning, we can determine the competitive ratio of the online algorithm on source code level.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

8 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • A Deductive Verification Infrastructure for Probabilistic Programs cites Latticed k-Induction with an Application to Probabilistic Programs
  • A Deductive Verification Infrastructure for Probabilistic Programs cites Quantitative strongest post: a calculus for reasoning about the flow of quantitative information
  • Quantitative Weakest Hyper Pre: Unifying Correctness and Incorrectness Hyperproperties via Predicate Transformers cites Quantitative strongest post: a calculus for reasoning about the flow of quantitative information
  • Quantitative Weakest Hyper Pre: Unifying Correctness and Incorrectness Hyperproperties via Predicate Transformers cites Outcome Separation Logic: Local Reasoning for Correctness and Incorrectness with Computational Effects
  • Programmatic Strategy Synthesis: Resolving Nondeterminism in Probabilistic Programs cites A Deductive Verification Infrastructure for Probabilistic Programs
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers8

  1. A Deductive Verification Infrastructure for Probabilistic ProgramsPhilipp Schröer, Kevin Batz, Benjamin Lucien Kaminski, Joost-Pieter Katoen et al.OOPSLA 2023 · 22 citations
  2. Outcome Separation Logic: Local Reasoning for Correctness and Incorrectness with Computational EffectsNoam Zilberstein, Angelina Saliling, Alexandra SilvaOOPSLA 2024 · 16 citations
  3. Programmatic Strategy Synthesis: Resolving Nondeterminism in Probabilistic ProgramsKevin Batz, Tom Jannik Biskup, Joost-Pieter Katoen, Tobias WinklerPOPL 2024 · 11 citations
  4. Quantitative Weakest Hyper Pre: Unifying Correctness and Incorrectness Hyperproperties via Predicate TransformersLinpeng Zhang, Noam Zilberstein, Benjamin Lucien Kaminski, Alexandra SilvaOOPSLA 2024 · 5 citations
  5. A Unifying Approach to Product Constructions for Quantitative Temporal InferenceKazuki Watanabe, Sebastian Junges, Jurriaan Rot, Ichiro HasuoOOPSLA 2025 · 1 citation

Builds on2

  1. Latticed k-Induction with an Application to Probabilistic ProgramsKevin Batz, Mingshuai Chen, Benjamin Lucien Kaminski, Joost-Pieter Katoen et al.CAV 2021 · 21 citations
  2. Quantitative strongest post: a calculus for reasoning about the flow of quantitative informationLinpeng Zhang, Benjamin Lucien KaminskiOOPSLA 2022 · 14 citations

Related papers

  1. Probabilistic Access Policies with Automated Reasoning SupportShaowei Zhu, Yunbo ZhangCAV 2024 · 1 citation
  2. Improved Learning-Augmented Algorithms for the Multi-Option Ski Rental Problem via Best-Possible Competitive AnalysisYongho Shin, Changyeol Lee, Gukryeol Lee, Hyung-Chan AnICML 2023 · 19 citations
  3. Highly Incremental: A Simple Programmatic Approach for Many ObjectivesPhilipp Schröer, Joost-Pieter KatoenFM 2026 · 1 citation
  4. On Lexicographic Proof Rules for Probabilistic TerminationKrishnendu Chatterjee, Ehsan Kafshdar Goharshady, Petr Novotný, Jiri Zárevúcky et al.FM 2021 · 11 citations
  5. Scaling Optimization over Uncertainty via CompilationMinsung Cho, John Gouwar, Steven HoltzenOOPSLA 2025 · 1 citation
Dusk over the sea between two cliffs drawn in fine vertical lines