Towards Typed Prolog

Tom Schrijvers, VĂ­tor Santos Costa, Jan Wielemaker and Bart Demoen

December 2008


Abstract

Prolog is traditionally not statically typed. Since the benefits of static typing are huge, it was decided to grow a portable type system inside two widely used open source Prolog systems: SWI-Prolog and Yap. This requires close cooperation and agreement between the two systems. The type system is Hindley-Milner. The main characteristics of the introduction of types in SWI and Yap are that typing is not mandatory, that typed and untyped code can be mixed, and that the type checker can insert dynamic type checks at the boundaries between typed and untyped code. The basic decisions and the current status of the Typed Prolog project are described, as well as the remaining tasks and problems to be solved.

Bibtex

@InProceedings{schrijvers-iclp08,
  author =    {T. Schrijvers and V. Santos Costa and J. Wielemaker and B. Demoen},
  title =     {{Towards Typed Prolog}},
  booktitle = {Proceedings of the 24th International Conference on Logic Programming (ICLP 2008)},
  pages =     {693--697},
  number =    {5366},
  series =    {LNCS},
  publisher = {Springer},
  editor =    {M. Garcia de la Banda and E. Pontelli},
  month =     {December},
  year =      {2008},
  address =   {Udine, Italy},
}

Download Paper

Springer