RUS  ENG
Full version
JOURNALS // Computing, Telecommunication and Control // Archive

St. Petersburg Polytechnical University Journal. Computer Science. Telecommunication and Control Sys, 2018 Volume 11, Issue 2, Pages 35–46 (Mi ntitu206)

Software of Computer, Telecommunications and Control Systems

Relational programming with memoization and negation

E. A. Moiseenko, A. V. Podkopaev

Saint Petersburg State University

Abstract: The relational paradigm allows to express programs as relations. Unlike functions, the relations do not distinguish input and output parameters, thus a single relational program can be used to solve several related problems. Relational interpreters are of particular interest. These interpreters can execute a program, check that the program satisfies a set of constraints or generate a program that has specified properties. In order to take advantages of the relational interpreter, the developer needs to define the semantics of the programming language as a relation. In this work, we present an implementation of two useful extensions of relational programming: tabling and constructive negation. Tabling helps to traverse the state space of the interpreter efficiently. Constructive negation allows to check that some state of the interpreter is unreachable. We show how this extensioncan be used on an example of a relational interpreter for a concurrent imperative programming language.

Keywords: relational programming, declarative programming, constraint logic programming, tabling, constructive negation.

UDC: 004.434

DOI: 10.18721/JCSTCS.11203



© Steklov Math. Inst. of RAS, 2024