skip to main content
article

Compact bit encoding schemes for simply-typed lambda-terms

Published:04 September 2016Publication History
Skip Abstract Section

Abstract

We consider the problem of how to compactly encode simply-typed λ-terms into bit strings. The work has been motivated by Kobayashi et al.’s recent work on higher-order data compression, where data are encoded as functional programs (or, λ-terms) that generate them. To exploit its good compression power, the compression scheme has to come with a method for compactly encoding the λ-terms into bit strings. To this end, we propose two type-based bit-encoding schemes; the first one encodes a λ-term into a sequence of symbols by using type information, and then applies arithmetic coding to convert the sequence to a bit string. The second one is more sophisticated; we prepare a context-free grammar (CFG) that describes only well-typed terms, and then use a variation of arithmetic coding specialized for the CFG. We have implemented both schemes and confirmed that they often output more compact codes than previous bit encoding schemes for λ-terms.

References

  1. A. Apostolico and S. Lonardi. Some theory and proactive of greedy off-line textual substitution. In Data Compression Conference 1998 (DCC98), pages 119–128, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Robert D Cameron. Source encoding using syntactic information source models. Information Theory, IEEE Transactions on, 34(4):843– 850, 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Nicolaas Govert De Bruijn. Lambda calculus notation with nameless dummies, a tool for automatic formula manipulation, with application to the church-rosser theorem. In Indagationes Mathematicae (Proceedings), volume 75, pages 381–392. Elsevier, 1972.Google ScholarGoogle Scholar
  4. K. Matsuda K. Takeda, N. Kobayashi. Optimization of a repair-based higher-order compression algorithm. Proc. 31th JSSST 2014, 31:346– 359, 2014. (in Japanese).Google ScholarGoogle Scholar
  5. Andrew J. Kennedy and Dimitrios Vytiniotis. Every bit counts: The binary representation of typed data and programs. J. Funct. Program., 22(4-5):529–573, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Naoki Kobayashi, Kazutaka Matsuda, Ayumi Shinohara, and Kazuya Yaguchi. Functional programs as compressed data. Higher-Order and Symbolic Computation, 25(1):39–84, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Markus Lohrey, Sebastian Maneth, and Roy Mennicke. Tree structure compression with repair. In Data Compression Conference (DCC), 2011, pages 353–362. IEEE, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. G Nigel N Martin. Range encoding: an algorithm for removing redundancy from a digitised message. In Proc. Institution of Electronic and Radio Engineers International Conference on Video and Data Recording, 1979.Google ScholarGoogle Scholar
  9. Craig G. Nevill-Manning and Ian H. Witten. Compression and explanation using hierarchical grammars. Comput. J., 40(2/3):103–116, 1997.Google ScholarGoogle ScholarCross RefCross Ref
  10. Amr Sabry and Matthias Felleisen. Reasoning about programs in continuation-passing style. Lisp and Symbolic Computation, 6(3- 4):289–360, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Julian Seward. bzip2 : Home. http://bzip.org.Google ScholarGoogle Scholar
  12. John Tromp. Binary lambda calculus and combinatory logic. In Kolmogorov Complexity and Applications, volume 06051 of Dagstuhl Seminar Proceedings, 2006.Google ScholarGoogle Scholar
  13. Dimitrios Vytiniotis and Andrew J. Kennedy. Functional pearl: every bit counts. In Proceeding of the 15th ACM SIGPLAN international conference on Functional programming, ICFP 2010, Baltimore, Maryland, USA, September 27-29, 2010, pages 15–26. ACM, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Ian H Witten, Radford M Neal, and John G Cleary. Arithmetic coding for data compression. Communications of the ACM, 30(6):520–540, 1987. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Compact bit encoding schemes for simply-typed lambda-terms

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in

      Full Access

      • Published in

        cover image ACM SIGPLAN Notices
        ACM SIGPLAN Notices  Volume 51, Issue 9
        ICFP '16
        September 2016
        501 pages
        ISSN:0362-1340
        EISSN:1558-1160
        DOI:10.1145/3022670
        Issue’s Table of Contents
        • cover image ACM Conferences
          ICFP 2016: Proceedings of the 21st ACM SIGPLAN International Conference on Functional Programming
          September 2016
          501 pages
          ISBN:9781450342193
          DOI:10.1145/2951913

        Copyright © 2016 ACM

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 4 September 2016

        Check for updates

        Qualifiers

        • article

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!