English

Computing with Hereditarily Finite Sequences

Programming Languages 2011-12-19 v1

Abstract

e use Prolog as a flexible meta-language to provide executable specifications of some fundamental mathematical objects and their transformations. In the process, isomorphisms are unraveled between natural numbers and combinatorial objects (rooted ordered trees representing hereditarily finite sequences and rooted ordered binary trees representing G\"odel's System {\bf T} types). This paper focuses on an application that can be seen as an unexpected "paradigm shift": we provide recursive definitions showing that the resulting representations are directly usable to perform symbolically arbitrary-length integer computations. Besides the theoretically interesting fact of "breaking the arithmetic/symbolic barrier", the arithmetic operations performed with symbolic objects like trees or types turn out to be genuinely efficient -- we derive implementations with asymptotic performance comparable to ordinary bitstring implementations of arbitrary-length integer arithmetic. The source code of the paper, organized as a literate Prolog program, is available at \url{http://logic.cse.unt.edu/tarau/research/2011/pPAR.pl}

Keywords

Cite

@article{arxiv.1112.3782,
  title  = {Computing with Hereditarily Finite Sequences},
  author = {Paul Tarau},
  journal= {arXiv preprint arXiv:1112.3782},
  year   = {2011}
}

Comments

Online Proceedings of the 11th International Colloquium on Implementation of Constraint LOgic Programming Systems (CICLOPS 2011), Lexington, KY, U.S.A., July 10, 2011

R2 v1 2026-06-21T19:52:34.950Z