# Kleene Algebra With Tests for Weighted Programs

**Authors:** Igor Sedl\'ar

arXiv: 2303.00322 · 2023-03-02

## TL;DR

This paper extends Kleene algebra with tests to handle weighted programs, providing an algebraic framework for reasoning about program equivalence and optimization in probabilistic and mathematical models.

## Contribution

It introduces Kleene algebra with weights and tests, extending existing algebraic formalism to reason about weighted programs and their equivalence.

## Key findings

- Relational semantics for the extended language are developed.
- The framework can reason about equivalence and optimal runs of weighted programs.
- An example demonstrates the practical applicability of the algebraic approach.

## Abstract

Weighted programs generalize probabilistic programs and offer a framework for specifying and encoding mathematical models by means of an algorithmic representation. Kleene algebra with tests is an algebraic formalism based on regular expressions with applications in proving program equivalence. We extend the language of Kleene algebra with tests so that it is sufficient to formalize reasoning about a simplified version weighted programs. We introduce relational semantics for the extended language, and we generalize the relational semantics to an appropriate extension of Kleene algebra with tests, called Kleene algebra with weights and tests. We demonstrate by means of an example that Kleene algebra with weights and tests offers a simple algebraic framework for reasoning about equivalence and optimal runs of weighted programs.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/2303.00322/full.md

## Figures

1 figure with captions in the complete paper: https://tomesphere.com/paper/2303.00322/full.md

## References

13 references — full list in the complete paper: https://tomesphere.com/paper/2303.00322/full.md

---
Source: https://tomesphere.com/paper/2303.00322