Weighted Programming

02/15/2022
by   Kevin Batz, et al.
0

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.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
03/01/2023

Kleene Algebra With Tests for Weighted Programs

Weighted programs generalize probabilistic programs and offer a framewor...
research
05/27/2018

A Formal Model of the Safety-Critical Java Level 2 Paradigm

Safety-Critical Java (SCJ) introduces a new programming paradigm for app...
research
03/08/2000

Logic Programming for Describing and Solving Planning Problems

A logic programming paradigm which expresses solutions to problems as st...
research
11/28/2021

Virtualizing Intermittent Computing

Intermittent computing requires custom programming models to ensure the ...
research
01/10/2019

PML 2 : Integrated Program Verification in ML

We present the PML 2 language, which provides a uniform environment for ...
research
03/11/2022

Veracity: Declarative Multicore Programming with Commutativity

There is an ongoing effort to provide programming abstractions that ease...
research
07/28/2023

From Probabilistic Programming to Complexity-based Programming

The paper presents the main characteristics and a preliminary implementa...

Please sign up or login with your details

Forgot password? Click here to reset