skip to main content
10.1145/2951913.2951918acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
research-article

Compact bit encoding schemes for simply-typed lambda-terms

Published: 04 September 2016 Publication History

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.
[2]
Robert D Cameron. Source encoding using syntactic information source models. Information Theory, IEEE Transactions on, 34(4):843– 850, 1988.
[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.
[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).
[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.
[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.
[7]
Markus Lohrey, Sebastian Maneth, and Roy Mennicke. Tree structure compression with repair. In Data Compression Conference (DCC), 2011, pages 353–362. IEEE, 2011.
[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.
[9]
Craig G. Nevill-Manning and Ian H. Witten. Compression and explanation using hierarchical grammars. Comput. J., 40(2/3):103–116, 1997.
[10]
Amr Sabry and Matthias Felleisen. Reasoning about programs in continuation-passing style. Lisp and Symbolic Computation, 6(3- 4):289–360, 1993.
[11]
Julian Seward. bzip2 : Home. http://bzip.org.
[12]
John Tromp. Binary lambda calculus and combinatory logic. In Kolmogorov Complexity and Applications, volume 06051 of Dagstuhl Seminar Proceedings, 2006.
[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.
[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.

Cited By

View all
  • (2019)Compaction of Church NumeralsAlgorithms10.3390/a1208015912:8(159)Online publication date: 8-Aug-2019
  • (2019)10 Years of the Higher-Order Model Checking Project (Extended Abstract)Proceedings of the 21st International Symposium on Principles and Practice of Declarative Programming10.1145/3354166.3354167(1-2)Online publication date: 7-Oct-2019
  • (2019)10 Years of the Higher-Order Model Checking Project (Extended Abstract)Proceedings of the 21st International Symposium on Principles and Practice of Programming Languages 201910.1145/3354166.3354167(1-2)Online publication date: 7-Oct-2019

Recommendations

Comments

Information & Contributors

Information

Published In

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
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 04 September 2016

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Bit encoding
  2. Data compression
  3. Simply-typed lambda-calculus

Qualifiers

  • Research-article

Funding Sources

Conference

ICFP'16
Sponsor:

Acceptance Rates

Overall Acceptance Rate 333 of 1,064 submissions, 31%

Upcoming Conference

ICFP '25
ACM SIGPLAN International Conference on Functional Programming
October 12 - 18, 2025
Singapore , Singapore

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)2
  • Downloads (Last 6 weeks)0
Reflects downloads up to 07 Mar 2025

Other Metrics

Citations

Cited By

View all
  • (2019)Compaction of Church NumeralsAlgorithms10.3390/a1208015912:8(159)Online publication date: 8-Aug-2019
  • (2019)10 Years of the Higher-Order Model Checking Project (Extended Abstract)Proceedings of the 21st International Symposium on Principles and Practice of Declarative Programming10.1145/3354166.3354167(1-2)Online publication date: 7-Oct-2019
  • (2019)10 Years of the Higher-Order Model Checking Project (Extended Abstract)Proceedings of the 21st International Symposium on Principles and Practice of Programming Languages 201910.1145/3354166.3354167(1-2)Online publication date: 7-Oct-2019

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media