arXiv.itsnick.co

an independent field guide to 23 million papers from arXiv & OpenAlex — not affiliated with arXiv.org

Computer Science · Artificial Intelligence

Reusable monadic semantics of logic programs with arithmetic predicates.

José Emilio Labra Gayo, Juan Manuel Cueva Lovelle, María Cándida Luengo Díez, Agustín Cernuda del Río

· APPIA-GULP-PRODE

See on the map

Abstract

We present a combination of modular monadic semantics and generic programming concepts that improves the reusability of semantic specifications. The computational structure is defined as the composition of several monad transformers, where each monad transformer adds a new notion of computation to a given monad. The abstract syntax is defined as the fixed point of several non-recursive pattern functors. In the case of several syntactic categories, it is possible to define many sorted algebras and n-catamorphisms. As an application, we combine the kernel of a pure logic programming language with independently specified arithmetic expressions obtaining a logic programming language with arithmetic predicates.

More like this