論理プログラムの再帰計算
A Refinement Calculus for Logic Programs
A Refinement Calculus for Logic Programs
@misc{hayes2002a,
title = {A Refinement Calculus for Logic Programs},
author = {Ian Hayes and Robert Colvin and David Hemer and Paul Strooper and Ray Nickson},
year = {2002},
eprint = {cs/0202002},
archivePrefix = {arXiv},
primaryClass = {cs.SE},
url = {https://arxiv.org/abs/cs/0202002}
}
Hayes, I., Colvin, R., Hemer, D., Strooper, P., & Nickson, R. (2002). A Refinement Calculus for Logic Programs [Preprint]. arXiv. https://doi.org/10.48550/arXiv.cs/0202002
HAYES I, COLVIN R, HEMER D, et al. A Refinement Calculus for Logic Programs[EB/OL]. (2002-02-04)[2026-11-29]. https://arxiv.org/abs/cs/0202002.
要旨
既存の精細化演算子(refinement calculi)は、仕様から命令型プログラムを段階的に開発するための枠組みを提供している。本稿では、論理プログラムを導出するための精細化演算子を提案する。この演算子には、順序結合、析取、存在量化などの実行可能構文に加え、一般述語、仮定、普遍量化などの仕様構文を含む広範な論理プログラミング言語が含まれる。この広範な言語に対する実行に基づく宣言的意味論が定義される。状態はバインディングの集合として表現され、実行は状態から状態への部分関数である。この意味論を用いて、パラメータと再帰を含むプログラムおよび仕様の意味が定義される。演算子を完成させるために、広範な言語のプログラムに対する正しさを保持する精細化の概念が定義され、プログラム開発のための精細化法則が導入される。本稿では、例の導出を用いて精細化演算子を説明し、プロトタイプツール支援について議論する。
Existing refinement calculi provide frameworks for the stepwise development of imperative programs from specifications. This paper presents a refinement calculus for deriving logic programs. The calculus contains a wide-spectrum logic programming language, including executable constructs such as sequential conjunction, disjunction, and existential quantification, as well as specification constructs such as general predicates, assumptions and universal quantification. A declarative semantics is defined for this wide-spectrum language based on executions. Executions are partial functions from states to states, where a state is represented as a set of bindings. The semantics is used to define the meaning of programs and specifications, including parameters and recursion. To complete the calculus, a notion of correctness-preserving refinement over programs in the wide-spectrum language is defined and refinement laws for developing programs are introduced. The refinement calculus is illustrated using example derivations and prototype tool support is discussed.