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 条
  • [1] Hobbits for Haskell: A Library for Higher-Order Encodings in Functional Programming Languages
    Westbrook, Edwin
    Frisby, Nicolas
    Brauner, Paul
    ACM SIGPLAN NOTICES, 2011, 46 (12) : 35 - 46
  • [2] The del-calculus.: Functional programming with higher-order encodings
    Schürmann, C
    Poswolsky, A
    Sarnat, JR
    TYPED LAMBDA CALCULI AND APPLICATIONS, PROCEEDINGS, 2005, 3461 : 339 - 353
  • [3] Practical programming with higher-order encodings and dependent types
    Poswolsky, Adam
    Schurmann, Carsten
    PROGRAMMING LANGUAGES AND SYSTEMS, PROCEEDINGS, 2008, 4960 : 93 - +
  • [4] Higher-Order Type-Level Programming in Haskell
    Kiss, Csongor
    Field, Tony
    Eisenbach, Susan
    Jones, Simon Peyton
    PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2019, 3 (ICFP):
  • [5] Definitional interpreters for higher-order programming languages
    Reynolds, John C.
    Higher-Order and Symbolic Computation, 1998, 11 (04): : 363 - 397
  • [6] Automatic Alignment in Higher-Order Probabilistic Programming Languages
    Lunden, Daniel
    Caylak, Gizem
    Ronquist, Fredrik
    Broman, David
    PROGRAMMING LANGUAGES AND SYSTEMS, ESOP 2023, 2023, 13990 : 535 - 563
  • [7] Higher-order logic programming languages with constraints: A semantics
    Lipton, James
    Nieva, Susana
    TYPED LAMBDA CALCULI AND APPLICATIONS, PROCEEDINGS, 2007, 4583 : 272 - +
  • [8] Concolic Testing of Higher-order Functional Languages
    Sagonas, Konstantinos
    ELECTRONIC PROCEEDINGS IN THEORETICAL COMPUTER SCIENCE, 2019, (296): : 2 - 2
  • [9] ModuRes: A Coq Library for Modular Reasoning About Concurrent Higher-Order Imperative Programming Languages
    Sieczkowski, Filip
    Bizjak, Ales
    Birkedal, Lars
    INTERACTIVE THEOREM PROVING, 2015, 9236 : 375 - 390
  • [10] Lightweight Higher-Order Rewriting in Haskell
    Axelsson, Emil
    Vezzosi, Andrea
    TRENDS IN FUNCTIONAL PROGRAMMING (TFP 2015), 2016, 9547 : 1 - 21