Skip to main content
QUICK REVIEW

[Paper Review] An Abstract Programming System

David A. Plaisted|ArXiv.org|Jun 5, 2003
Logic, programming, and type systems30 references4 citations
TL;DR

This paper presents PL, a system that translates abstract proofs of program correctness into correct, efficient programs across multiple programming languages. By using classical logic and Scott-Strachey semantics, it enables the generation of verified imperative programs with side effects and destructive updates, ensuring correctness through formal verification and translation into diverse target languages without rewriting from scratch.

ABSTRACT

The system PL permits the translation of abstract proofs of program correctness into programs in a variety of programming languages. A programming language satisfying certain axioms may be the target of such a translation. The system PL also permits the construction and proof of correctness of programs in an abstract programming language, and permits the translation of these programs into correct programs in a variety of languages. The abstract programming language has an imperative style of programming with assignment statements and side-effects, to allow the efficient generation of code. The abstract programs may be written by humans and then translated, avoiding the need to write the same program repeatedly in different languages or even the same language. This system uses classical logic, is conceptually simple, and permits reasoning about nonterminating programs using Scott-Strachey style denotational semantics.

Motivation & Objective

  • To enable the construction of abstract proofs that can be systematically translated into correct programs in any PL-feasible programming language.
  • To support the generation of efficient imperative programs with destructive updates and side effects, which are essential for realistic algorithm implementation.
  • To decouple program correctness proofs from implementation details, allowing reuse of verified logic across different target languages.
  • To provide a formal framework where abstract programs in $L^*$ can be translated into correct code in any PL-feasible language via effective functions.
  • To support reasoning about nonterminating and nondeterministic programs using classical logic and denotational semantics.

Proposed method

  • The system uses classical logic and Scott-Strachey domain theory to model program semantics, enabling reasoning about nonterminating and nondeterministic behaviors.
  • It defines an abstract programming language $L^*$ with imperative features, including assignment and side effects, to model efficient algorithms like quicksort.
  • For each target language $L$, the system defines axioms $PL(L)$ that specify the minimal requirements for $L$ to be PL-feasible, ensuring translation correctness.
  • It introduces relations $R_f$ that relate program variables to their semantics, allowing intuitive specification of pre- and post-conditions in proofs.
  • The system employs inductive reasoning over bounded subarray sizes via relations $R_i^k$, enabling proof of correctness for recursive programs like quicksort.
  • Effective functions map proofs in $PL^*$ or $L^*$ programs to correct code in any $PL$-feasible language, supporting language-agnostic program generation.

Experimental results

Research questions

  • RQ1How can a single abstract proof of correctness be systematically translated into correct programs across multiple programming languages?
  • RQ2What formal conditions must a programming language satisfy to be a valid target for translation from abstract proofs?
  • RQ3Can imperative features like destructive assignment and side effects be formally integrated into a proof-based program generation system?
  • RQ4How can nonterminating and nondeterministic programs be reasoned about within a classical logic framework for program verification?
  • RQ5What is the role of abstract programming languages in enabling reusable, verified code generation across diverse implementation languages?

Key findings

  • The system successfully translates abstract proofs in $PL^*$ into correct, efficient programs in any $PL$-feasible language, including imperative, functional, and logic programming languages.
  • The correctness of the quicksort algorithm is formally proven using relations like $R_{qs}(Q)$, which specifies that the final array is sorted and a permutation of the input.
  • The proof structure uses bounded recursion via $R_i^k$ relations, enabling inductive reasoning over subarray sizes and ensuring termination for finite inputs.
  • The final program for quicksort does not include the partition routine, which can be replaced with any verified implementation, demonstrating modularity and reusability.
  • The system supports the generation of efficient code by modeling destructive updates and side effects directly in the abstract language, enabling realistic algorithm representation.
  • The framework allows for both formal proof of correctness and practical code generation, with the option to use testing or other means to validate abstract programs before translation.

Better researchstarts right now

From reading papers to final review, dramatically reduce your research time.

No credit card · Free plan available

This review was created by AI and reviewed by human editors.