-
P$ρ$Log: a system for rule-based programming
Authors:
Besik Dundua
Abstract:
In this paper, we give a brief overview of the rule-based programming system, called P$ρ$Log and illustrate its capabilities.
In this paper, we give a brief overview of the rule-based programming system, called P$ρ$Log and illustrate its capabilities.
△ Less
Submitted 3 September, 2021; v1 submitted 26 August, 2021;
originally announced August 2021.
-
Regular matching problems for infinite trees
Authors:
Carlos Camino,
Volker Diekert,
Besik Dundua,
Mircea Marin,
Géraud Sénizergues
Abstract:
We study the matching problem of regular tree languages, that is, "$\exists σ:σ(L)\subseteq R$?" where $L,R$ are regular tree languages over the union of finite ranked alphabets $Σ$ and $\mathcal{X}$ where $\mathcal{X}$ is an alphabet of variables and $σ$ is a substitution such that $σ(x)$ is a set of trees in $T(Σ\cup H)\setminus H$ for all $x\in \mathcal{X}$. Here, $H$ denotes a set of "holes" w…
▽ More
We study the matching problem of regular tree languages, that is, "$\exists σ:σ(L)\subseteq R$?" where $L,R$ are regular tree languages over the union of finite ranked alphabets $Σ$ and $\mathcal{X}$ where $\mathcal{X}$ is an alphabet of variables and $σ$ is a substitution such that $σ(x)$ is a set of trees in $T(Σ\cup H)\setminus H$ for all $x\in \mathcal{X}$. Here, $H$ denotes a set of "holes" which are used to define a "sorted" concatenation of trees. Conway studied this problem in the special case for languages of finite words in his classical textbook "Regular algebra and finite machines" published in 1971. He showed that if $L$ and $R$ are regular, then the problem "$\exists σ\forall x\in \mathcal{X}: σ(x)\neq \emptyset\wedge σ(L)\subseteq R$?" is decidable. Moreover, there are only finitely many maximal solutions, the maximal solutions are regular substitutions, and they are effectively computable. We extend Conway's results when $L,R$ are regular languages of finite and infinite trees, and language substitution is applied inside-out, in the sense of Engelfriet and Schmidt (1977/78). More precisely, we show that if $L\subseteq T(Σ\cup\mathcal{X})$ and $R\subseteq T(Σ)$ are regular tree languages over finite or infinite trees, then the problem "$\exists σ\forall x\in \mathcal{X}: σ(x)\neq \emptyset\wedge σ_{\mathrm{io}}(L)\subseteq R$?" is decidable. Here, the subscript "$\mathrm{io}$" in $σ_{\mathrm{io}}(L)$ refers to "inside-out". Moreover, there are only finitely many maximal solutions $σ$, the maximal solutions are regular substitutions and effectively computable. The corresponding question for the outside-in extension $σ_{\mathrm{oi}}$ remains open, even in the restricted setting of finite trees.
△ Less
Submitted 31 January, 2022; v1 submitted 21 April, 2020;
originally announced April 2020.
-
CLP(H): Constraint Logic Programming for Hedges
Authors:
Besik Dundua,
Mário Florido,
Temur Kutsia,
Mircea Marin
Abstract:
CLP(H) is an instantiation of the general constraint logic programming scheme with the constraint domain of hedges. Hedges are finite sequences of unranked terms, built over variadic function symbols and three kinds of variables: for terms, for hedges, and for function symbols. Constraints involve equations between unranked terms and atoms for regular hedge language membership. We study algebraic…
▽ More
CLP(H) is an instantiation of the general constraint logic programming scheme with the constraint domain of hedges. Hedges are finite sequences of unranked terms, built over variadic function symbols and three kinds of variables: for terms, for hedges, and for function symbols. Constraints involve equations between unranked terms and atoms for regular hedge language membership. We study algebraic semantics of CLP(H) programs, define a sound, terminating, and incomplete constraint solver, investigate two fragments of constraints for which the solver returns a complete set of solutions, and describe classes of programs that generate such constraints.
△ Less
Submitted 1 March, 2015;
originally announced March 2015.
-
Strategies in PRholog
Authors:
Besik Dundua,
Temur Kutsia,
Mircea Marin
Abstract:
PRholog is an experimental extension of logic programming with strategic conditional transformation rules, combining Prolog with Rholog calculus. The rules perform nondeterministic transformations on hedges. Queries may have several results that can be explored on backtracking. Strategies provide a control on rule applications in a declarative way. With strategy combinators, the user can constru…
▽ More
PRholog is an experimental extension of logic programming with strategic conditional transformation rules, combining Prolog with Rholog calculus. The rules perform nondeterministic transformations on hedges. Queries may have several results that can be explored on backtracking. Strategies provide a control on rule applications in a declarative way. With strategy combinators, the user can construct more complex strategies from simpler ones. Matching with four different kinds of variables provides a flexible mechanism of selecting (sub)terms during execution. We give an overview on programming with strategies in PRholog and demonstrate how rewriting strategies can be expressed.
△ Less
Submitted 25 January, 2010;
originally announced January 2010.