Hobbits for Haskell: A Library for Higher-Order Encodings in Functional Programming Languages

被引:0
|
作者
Westbrook, Edwin [1 ]
Frisby, Nicolas
Brauner, Paul [1 ]
机构
[1] Rice Univ, Houston, TX 77251 USA
来源
HASKELL 11: PROCEEDINGS OF THE 2011 ACM SIGPLAN HASKELL SYMPOSIUM | 2011年
关键词
D O I
暂无
中图分类号
TP3 [计算技术、计算机技术];
学科分类号
0812 ;
摘要
Adequate encodings are a powerful programming tool, which eliminate whole classes of program bugs: they ensure that a program cannot generate ill-formed data, because such data is not part of the representation; and they also ensure that a program is well-defined, meaning that it cannot have different behaviors on different representations of the same piece of data. Unfortunately, it has proven difficult to define adequate encodings of programming languages themselves. Such encoclings would be very useful in language processing tools such as interpreters, compilers, model-checking tools, etc., as these systems are often difficult to get correct. The key problem in representing programming languages is in encoding binding constructs; previous approaches have serious limitations in either the operations they allow or the correctness guarantees they make. In this paper, we introduce a new library for Haskell that allows the user to define and use higher-order encodings, a powerful technique for representing bindings. Our library allows straightforward recursion on bindings using pattern-matching, which is not possible in previous approaches. We then demonstrate our library on a medium-sized example, lambda-lifting, showing how our library can be used to make strong correctness guarantees at compile time.
引用
收藏
页码:35 / 46
页数:12
相关论文
共 50 条
  • [21] On the Expressive Power of Programming Languages for Generative Design The Case of Higher-Order Functions
    Leitao, Antonio
    Proenca, Sara
    FUSION: DATA INTEGRATION AT ITS BEST, VOL 1, 2014, : 257 - 266
  • [22] HIGHER-ORDER LOGIC PROGRAMMING
    MILLER, DA
    NADATHUR, G
    JOURNAL OF SYMBOLIC LOGIC, 1986, 51 (03) : 851 - 851
  • [23] Environmental Bisimulations for Higher-Order Languages
    Sangiorgi, Davide
    Kobayashi, Naoki
    Sumii, Eijiro
    ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 2011, 33 (01):
  • [24] Coinductive techniques for higher-order languages
    Sangiorgi, Davide
    ELECTRONIC PROCEEDINGS IN THEORETICAL COMPUTER SCIENCE, 2013, (131): : 1 - +
  • [25] EFFECT ANALYSIS IN HIGHER-ORDER LANGUAGES
    NEIRYNCK, A
    PANANGADEN, P
    DEMERS, AJ
    INTERNATIONAL JOURNAL OF PARALLEL PROGRAMMING, 1989, 18 (01) : 1 - 36
  • [26] Higher-Order Operator Precedence Languages
    Reghizzi, Stefano Crespi
    Pradella, Matteo
    ELECTRONIC PROCEEDINGS IN THEORETICAL COMPUTER SCIENCE, 2017, (252): : 86 - 100
  • [27] Environmental bisimulations for higher-order languages
    Sangiorgi, Davide
    Kobayashi, Naoki
    Sumii, Eijiro
    22ND ANNUAL IEEE SYMPOSIUM ON LOGIC IN COMPUTER SCIENCE, PROCEEDINGS, 2007, : 293 - +
  • [28] Linear-algebraic λ-calculus: Higher-order, encodings, and confluence
    Arrighi, Pablo
    Dowek, Gilles
    REWRITING TECHNIQUES AND APPLICATIONS, PROCEEDINGS, 2008, 5117 : 17 - +
  • [29] Functional programming languages for verification tools: A comparison of Standard ML and Haskell
    Leucker M.
    Noll T.
    Stevens P.
    Weber M.
    International Journal on Software Tools for Technology Transfer, 2005, 7 (2) : 184 - 194
  • [30] Implicit computation complexity in higher-order programming languages A Survey in Memory of Martin Hofmann
    Dal Lago, U.
    MATHEMATICAL STRUCTURES IN COMPUTER SCIENCE, 2022, 32 (06) : 760 - 776