Liberal Typing for Functional Logic Programs

被引:0
|
作者
Lopez-Fraguas, Francisco [1 ]
Martin-Martin, Enrique [1 ]
Rodriguez-Hortala, Juan [1 ]
机构
[1] Univ Complutense Madrid, Dept Sistemas Informat & Computac, E-28040 Madrid, Spain
来源
关键词
Type systems; functional logic programming; generic functions; type-indexed functions; existential types; higher-order patterns; SYSTEMS;
D O I
暂无
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
We propose a new type system for functional logic programming which is more liberal than the classical Damas-Milner usually adopted, but it is also restrictive enough to ensure type soundness. Starting from Damas-Milner typing of expressions we propose a new notion of well-typed program that adds support for type-indexed functions, existential types, opaque higher-order patterns and generic functions-as shown by an extensive collection of examples that illustrate the possibilities of our proposal. In the negative side, the types of functions must be declared, and therefore types are checked but not inferred. Another consequence is that parametricity is lost, although the impact of this flaw is limited as "free theorems" were already compromised in functional logic programming because of non-determinism.
引用
收藏
页码:80 / 96
页数:17
相关论文
共 50 条
  • [1] A liberal type system for functional logic programs
    Javier Lopez-Fraguas, Francisco
    Martin-Martin, Enrique
    Rodriguez-Hortala, Juan
    [J]. MATHEMATICAL STRUCTURES IN COMPUTER SCIENCE, 2015, 25 (04) : 942 - 977
  • [2] Typing constraint logic programs
    Fages, F
    Coquery, E
    [J]. THEORY AND PRACTICE OF LOGIC PROGRAMMING, 2001, 1 : 751 - 777
  • [3] Safe typing of functional logic programs with opaque patterns and local bindings.
    Lopez-Fraguas, Francisco J.
    Martin-Martin, Enrique
    Rodriguez-Hortala, Juan
    [J]. INFORMATION AND COMPUTATION, 2014, 235 : 36 - 69
  • [4] From Logic to Functional Logic Programs
    Hanus, Michael
    [J]. THEORY AND PRACTICE OF LOGIC PROGRAMMING, 2022, 22 (04) : 538 - 554
  • [5] FUNCTIONAL COMPUTATIONS IN LOGIC PROGRAMS
    DEBRAY, SK
    WARREN, DS
    [J]. ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 1989, 11 (03): : 451 - 481
  • [6] A LOGIC FOR NONDETERMINISTIC FUNCTIONAL PROGRAMS
    GILLUEZAS, A
    [J]. LECTURE NOTES IN COMPUTER SCIENCE, 1989, 380 : 197 - 208
  • [7] Correction of functional logic programs
    Alpuente, M
    Ballis, D
    Correa, FJ
    Falaschi, M
    [J]. PROGRAMMING LANGUAGES AND SYSTEMS, 2003, 2618 : 54 - 68
  • [8] From Functional Logic Programs to Purely Functional Programs Preserving Laziness
    Brassel, Bernd
    Fischer, Sebastian
    [J]. IMPLEMENTATION AND APPLICATION OF FUNCTIONAL LANGUAGES, 2011, 5836 : 25 - 42
  • [9] Overlapping rules and logic variables in functional logic programs
    Antoy, Sergio
    Hanus, Michael
    [J]. LOGIC PROGRAMMING, PROCEEDINGS, 2006, 4079 : 87 - 101
  • [10] From functional specifications to logic programs
    Gelfond, M
    Gabaldon, A
    [J]. LOGIC PROGRAMMING - PROCEEDINGS OF THE 1997 INTERNATIONAL SYMPOSIUM, 1997, : 355 - 369