Implicit Parameters for Logic Programming

Magnus Madsen, Ondrej Lhoták

Publikation: Bidrag til bog/antologi/rapport/proceedingKonferencebidrag i proceedingsForskningpeer review


Implicit parameters allow programmers to omit certain arguments from function calls and have them automatically inferred by the compiler based on their types. At every call site, the compiler determines the values of the implicit parameters based on their declared types and the bindings currently in implicit scope. The programmer controls this mechanism in two ways: by adding bindings to the implicit scope, or by explicitly providing the implicit parameters for the function call.

Implicit parameters are known from functional and object-oriented languages such as Haskell and Scala. In recent years, more languages have added support for implicit parameters, including Agda, Coq, and Idris. Implicit parameters have played an impressive role as the foundation for a broad range of language features such as type classes, capability and effect systems, software transactional memory, macros, and more.

In this paper, we propose a design of implicit parameters for typed Horn clause based logic programming languages, such as Datalog and Prolog. We illustrate the usefulness of implicit parameters and show how they support logic programming in the large. We explore some of the differences that arise between implicit parameters in functional languages and in logic languages.

TitelProceedings of the 20th International Symposium on Principles and Practice of Declarative Programming
Redaktører David Sabel, Peter Thiemann
Antal sider14
UdgivelsesstedNew York, NY, USA
ForlagAssociation for Computing Machinery
Publikationsdato3 sep. 2018
ISBN (Trykt)978-1-4503-6441-6
StatusUdgivet - 3 sep. 2018
Udgivet eksterntJa
BegivenhedInternational Symposium on Principles and Practice of Declarative Programming - Frankfurt am Main, Tyskland
Varighed: 3 sep. 20185 sep. 2018
Konferencens nummer: 20


KonferenceInternational Symposium on Principles and Practice of Declarative Programming
ByFrankfurt am Main


  • implicit parameters, typed logic programming


Dyk ned i forskningsemnerne om 'Implicit Parameters for Logic Programming'. Sammen danner de et unikt fingeraftryk.