Well-typed logic programs are not wrong

被引:0
|
作者
Deransart, P
Smaus, JG
机构
[1] Inst Natl Rech Informat & Automat, F-78153 Le Chesnay, France
[2] CWI, NL-1098 SJ Amsterdam, Netherlands
关键词
D O I
暂无
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
We consider prescriptive type systems for logic programs (as in Godel or Mercury). In such systems, the typing is static, but it guarantees an operational property: if a program is "well-typed", then all derivations starting in a "well-typed" query,axe again "well-typed". This property has been called subject reduction. We show that this property can also be phrased as a property of the proof-theoretic semantics of logic programs, thus abstracting from the usual operational (top-down) semantics. This proof-theoretic view leads us to questioning a condition which is usually considered necessary for subject reduction, namely the head condition. It states that the head of each clause must have a type which is a variant (and not a proper instance) of the declared type. We provide a more general condition, thus reestablishing a certain symmetry between heads and body atoms. The condition ensures that in a derivation, the types of two unified terms are themselves unifiable. We discuss possible implications of this result. We also discuss the relationship between the head condition and polymorphic recursion, a concept known in functional programming.
引用
收藏
页码:280 / 295
页数:16
相关论文
共 50 条
  • [31] Typed Quantum Logic
    Kenji Tokuo
    International Journal of Theoretical Physics, 2003, 42 : 27 - 38
  • [32] Typed quantum logic
    Tokuo, K
    INTERNATIONAL JOURNAL OF THEORETICAL PHYSICS, 2003, 42 (01) : 27 - 38
  • [33] TYPED HORN LOGIC
    POIGNE, A
    LECTURE NOTES IN COMPUTER SCIENCE, 1990, 452 : 470 - 477
  • [34] Curry-Typed Semantics in Typed Predicate Logic
    Fox, Chris
    LOGICA YEARBOOK 2013, 2014, : 35 - 47
  • [35] Logic programs, well-orderings, and forward chaining
    Marek, VW
    Nerode, A
    Remmel, JB
    ANNALS OF PURE AND APPLIED LOGIC, 1999, 96 (1-3) : 231 - 276
  • [36] THE WELL-FOUNDED SEMANTICS FOR GENERAL LOGIC PROGRAMS
    VANGELDER, A
    ROSS, KA
    SCHLIPF, JS
    JOURNAL OF THE ACM, 1991, 38 (03) : 620 - 650
  • [37] Coherent well-founded annotated logic programs
    Damásio, CV
    Pereira, LM
    Swift, T
    LOGIC PROGRAMMING AND NONMONOTONIC REASONING, 1999, 1730 : 262 - 276
  • [38] The well supported semantics for multidimensional dynamic logic programs
    Banti, F
    Alferes, JJ
    Brogi, A
    Hitzler, P
    LOGIC PROGRAMMING AND NONMONOTONIC REASONING, 2005, 3662 : 356 - 368
  • [39] A VARIABLE TYPED LOGIC OF EFFECTS
    HONSELL, F
    MASON, IA
    SMITH, S
    TALCOTT, C
    INFORMATION AND COMPUTATION, 1995, 119 (01) : 55 - 90
  • [40] WELL-FOUNDED SEMANTICS AND STRATIFICATION FOR ORDERED LOGIC PROGRAMS
    LEONE, N
    ROSSI, G
    NEW GENERATION COMPUTING, 1993, 12 (01) : 91 - 121