HOARE LOGIC, EXECUTABLE SPECIFICATIONS, AND LOGIC PROGRAMS

被引:0
|
作者
FUCHS, NE [1 ]
机构
[1] UNIV ZURICH,DEPT COMP SCI,CH-8057 ZURICH,SWITZERLAND
来源
STRUCTURED PROGRAMMING | 1992年 / 13卷 / 03期
关键词
HOARE LOGIC; LOGIC PROGRAMMING; CONSTRUCTIVE LOGIC; LOGIC SPECIFICATIONS; EXECUTABLE SPECIFICATIONS; COROUTINING; STRUCTURAL INDUCTION; PROLOG;
D O I
暂无
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
From Hoare correctness formulae {P} S {Q} which define first-order predicates S by their preconditions and postconditions P and Q, we formulate logic specifications S <--> P AND Q for the predicates. Subsequently, we discuss two methods to construct logic programs from logic specifications. First, we simply derive programs as the if-halves of their logic specifications. These programs are concise and readable, but often inefficient, and should rather be considered executable specifications. In the second method, we derive more efficient programs by structural induction. These programs are recursive, and-though correct-not obviously logical consequences of the preconditions and postconditions of the predicate.
引用
收藏
页码:129 / 135
页数:7
相关论文
共 50 条
  • [1] THE HOARE LOGIC OF CONCURRENT PROGRAMS
    LAMPORT, L
    [J]. ACTA INFORMATICA, 1980, 14 (01) : 21 - 37
  • [2] Proving pointer programs in Hoare logic
    Bornat, R
    [J]. MATHEMATICS OF PROGRAM CONSTRUCTION, 2000, 1837 : 102 - 126
  • [3] Abstract interpretation, Hoare logic, and incorrectness logic for quantum programs
    Feng, Yuan
    Li, Sanjiang
    [J]. INFORMATION AND COMPUTATION, 2023, 294
  • [4] EXECUTABLE LOGIC SPECIFICATIONS FOR PROTOCOL SERVICE INTERFACES
    SIDHU, DP
    CRALL, CS
    [J]. IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 1988, 14 (01) : 98 - 121
  • [5] Reversibility of Executable Interval Temporal Logic Specifications
    Cau, Antonio
    Kuhn, Stefan
    Hoey, James
    [J]. REVERSIBLE COMPUTATION (RC 2021), 2021, 12805 : 214 - 223
  • [6] Efficiently executable temporal logic programs
    Merz, S
    [J]. EXECUTABLE MODAL AND TEMPORAL LOGICS, 1995, 897 : 69 - 85
  • [7] Hoare-Style Logic for Unstructured Programs
    Lundberg, Didrik
    Guanciale, Roberto
    Lindner, Andreas
    Dam, Mads
    [J]. SOFTWARE ENGINEERING AND FORMAL METHODS, SEFM 2020, 2020, 12310 : 193 - 213
  • [8] Refining specifications to logic programs
    Hayes, IJ
    Nickson, RG
    Strooper, PA
    [J]. LOGIC PROGRAM SYNTHESIS AND TRANSFORMATION, 1997, 1207 : 1 - 19
  • [9] Floyd-Hoare Logic for Quantum Programs
    Ying, Mingsheng
    [J]. ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 2011, 33 (06):
  • [10] Verifiable and executable logic specifications of concurrent objects in Lπ
    Caires, L
    Monteiro, L
    [J]. PROGRAMMING LANGUAGES AND SYSTEMS, 1998, 1381 : 42 - 56