Implicit Parameters for Logic Programming

Magnus Madsen, Ondrej Lhoták

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

Abstract

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.

OriginalsprogEngelsk
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
Artikelnummer14
ISBN (Trykt)978-1-4503-6441-6
DOI
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
http://ppdp-lopstr-18.cs.uni-frankfurt.de/ppdp18.html

Konference

KonferenceInternational Symposium on Principles and Practice of Declarative Programming
Nummer20
Land/OmrådeTyskland
ByFrankfurt am Main
Periode03/09/201805/09/2018
Internetadresse

Emneord

  • implicit parameters, typed logic programming

Fingeraftryk

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

Citationsformater