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.
- 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 Scholar
Digital Library
- Robert D Cameron. Source encoding using syntactic information source models. Information Theory, IEEE Transactions on, 34(4):843– 850, 1988. Google Scholar
Digital Library
- 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 Scholar
- 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 Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Markus Lohrey, Sebastian Maneth, and Roy Mennicke. Tree structure compression with repair. In Data Compression Conference (DCC), 2011, pages 353–362. IEEE, 2011. Google Scholar
Digital Library
- 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 Scholar
- Craig G. Nevill-Manning and Ian H. Witten. Compression and explanation using hierarchical grammars. Comput. J., 40(2/3):103–116, 1997.Google Scholar
Cross Ref
- Amr Sabry and Matthias Felleisen. Reasoning about programs in continuation-passing style. Lisp and Symbolic Computation, 6(3- 4):289–360, 1993. Google Scholar
Digital Library
- Julian Seward. bzip2 : Home. http://bzip.org.Google Scholar
- John Tromp. Binary lambda calculus and combinatory logic. In Kolmogorov Complexity and Applications, volume 06051 of Dagstuhl Seminar Proceedings, 2006.Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
Index Terms
Compact bit encoding schemes for simply-typed lambda-terms
Recommendations
Compact bit encoding schemes for simply-typed lambda-terms
ICFP 2016: Proceedings of the 21st ACM SIGPLAN International Conference on Functional ProgrammingWe 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 ...
Wavelet transform and bit-plane encoding
ICIP '95: Proceedings of the 1995 International Conference on Image Processing (Vol. 1)-Volume 1 - Volume 1In this work a new approach for wavelet transform (WT) based image compression is presented. Employing a simple region representation coding scheme previously used with bi-level facsimile pictures, the wavelet transform coefficients are first quantized ...
The Use of Asymmetric Numeral Systems Entropy Encoding in Video Compression
Distributed Computer and Communication NetworksAbstractModern image and video compression technologies includes many compression methods both lossless and lossy. Entropy encoding has a special place among lossless compression methods - it performs final data compression before its conversion to output ...







Comments