SEMBridge: Tagless-Final Program Semantics with Weakest-Precondition and Bounded-Checking Interpretations
Title: SEMBridge: Enabling Tagless-Final Program Semantics via Weakest-Precondition and Bounded-Checking Interpretations
Abstract:
While formal methods offer rigorous models of program behavior, practical software engineering typically relies on executable libraries, testing, and iterative design. To bridge this gap, this paper introduces SEMBridge, a lightweight tagless-final framework designed to generate both weakest-precondition and bounded-checking interpretations from identical executable object programs.
Rather than anchoring program semantics to a single abstract syntax tree and constructing distinct traversal logic for each interpretation, SEMBridge allows developers to write object programs against a unified semantic interface. This approach enables the interpretation of code into multiple formats, including readable source code, concrete execution traces, predicate transformers, bounded counterexample searches, and potential back ends for proof assistants or SMT solators.
The Python-based prototype supports a loop-free imperative core featuring assignments, conditionals, assumptions, and assertions. In evaluations involving five sample programs, the unified tagless-final definitions successfully produced executable state transformers and verification conditions. These conditions were validated through bounded checking across domains containing up to 729 states.
The primary contribution of this work is not a Scala-based code-generation tool or a novel verifier, but rather a compact architectural approach that maintains synchronization among executable semantics, weakest-precondition artifacts, and bounded validation results.
Source: arXiv Generated at: 2026-06-02 00:00:00 UTC




