Prolog's Control Constructs in a Functional Setting — Axioms and Implementation

The purpose of this article is twofold. First, we show that Prolog's control constructs can be smoothly integrated into a functional language like Haskell. The resulting `language', termed embedded Prolog, incorporates many of the features prescribed by the Prolog ISO standard: control con...

תיאור מלא

מידע ביבליוגרפי
מחבר ראשי: Hinze, R
פורמט: Journal article
יצא לאור: 2001
_version_ 1826278107376517120
author Hinze, R
author_facet Hinze, R
author_sort Hinze, R
collection OXFORD
description The purpose of this article is twofold. First, we show that Prolog's control constructs can be smoothly integrated into a functional language like Haskell. The resulting `language', termed embedded Prolog, incorporates many of the features prescribed by the Prolog ISO standard: control constructs including the cut, all solution collecting functions, and error handling facilities. Embedded Prolog lacks some concepts such as logical variables but it inherits all of Haskell's strengths, eg static polymorphic typing, higher order functions etc. Technically, the integration is achieved using monads and monad transformers. One of the main innovations is the definition of a backtracking monad transformer, which allows us to combine backtracking with exception handling and interaction. Second, we work towards an axiomatization of the operations, through which the computational features are accessed. Equations are used to lay down the meaning of the various operations and their interrelations enabling the programmer to reason about programs in a simple calculational style. The axiomatization is applied to show that each finite computation has a simple canonical form.
first_indexed 2024-03-06T23:39:00Z
format Journal article
id oxford-uuid:6ea601c5-5e3e-42ee-a7a2-cdcf2f2ea913
institution University of Oxford
last_indexed 2024-03-06T23:39:00Z
publishDate 2001
record_format dspace
spelling oxford-uuid:6ea601c5-5e3e-42ee-a7a2-cdcf2f2ea9132022-03-26T19:25:47ZProlog's Control Constructs in a Functional Setting — Axioms and ImplementationJournal articlehttp://purl.org/coar/resource_type/c_dcae04bcuuid:6ea601c5-5e3e-42ee-a7a2-cdcf2f2ea913Department of Computer Science2001Hinze, RThe purpose of this article is twofold. First, we show that Prolog's control constructs can be smoothly integrated into a functional language like Haskell. The resulting `language', termed embedded Prolog, incorporates many of the features prescribed by the Prolog ISO standard: control constructs including the cut, all solution collecting functions, and error handling facilities. Embedded Prolog lacks some concepts such as logical variables but it inherits all of Haskell's strengths, eg static polymorphic typing, higher order functions etc. Technically, the integration is achieved using monads and monad transformers. One of the main innovations is the definition of a backtracking monad transformer, which allows us to combine backtracking with exception handling and interaction. Second, we work towards an axiomatization of the operations, through which the computational features are accessed. Equations are used to lay down the meaning of the various operations and their interrelations enabling the programmer to reason about programs in a simple calculational style. The axiomatization is applied to show that each finite computation has a simple canonical form.
spellingShingle Hinze, R
Prolog's Control Constructs in a Functional Setting — Axioms and Implementation
title Prolog's Control Constructs in a Functional Setting — Axioms and Implementation
title_full Prolog's Control Constructs in a Functional Setting — Axioms and Implementation
title_fullStr Prolog's Control Constructs in a Functional Setting — Axioms and Implementation
title_full_unstemmed Prolog's Control Constructs in a Functional Setting — Axioms and Implementation
title_short Prolog's Control Constructs in a Functional Setting — Axioms and Implementation
title_sort prolog s control constructs in a functional setting axioms and implementation
work_keys_str_mv AT hinzer prologscontrolconstructsinafunctionalsettingaxiomsandimplementation