Publication | Closed Access
Backtracking, interleaving, and terminating monad transformers
96
Citations
15
References
2005
Year
Unknown Venue
Monadplus InterfaceEngineeringAutomated ReasoningProgram AnalysisFunctional Programming LanguageAbstract InterpretationFormal MethodsSingle Primitive MsplitHaskell MonadMonad TransformersProgram SynthesisComputer ScienceLambda CalculusFormal VerificationFunctional ProgrammingLogic Programming
We design and implement a library for adding backtracking computations to any Haskell monad. Inspired by logic programming, our library provides, in addition to the operations required by the MonadPlus interface, constructs for fair disjunctions, fair conjunctions, conditionals, pruning, and an expressive top-level interface. Implementing these additional constructs is easy in models of backtracking based on streams, but not known to be possible in continuation-based models. We show that all these additional constructs can be generically and monadically realized using a single primitive msplit. We present two implementations of the library: one using success and failure continuations; and the other using control operators for manipulating delimited continuations.
| Year | Citations | |
|---|---|---|
Page 1
Page 1