The Power of Negation in Higher-Order Datalog
Angelos Charalambidis, BABIS KOSTOPOULOS, Christos Nomikos, Panos Rondogiannis · Theory and Practice of Logic Programming · 2025
Abstract We investigate the expressive power of Higher-Order $Datalog^ eg$ under both the well-founded and the stable model semantics, establishing tight connections with complexity classes. We prove that under the well-founded semantics, for all $k\geq 1$ , $(k+1)$ -Order $Datalog^ eg$ captures $k-\textsf {EXP}$ , a result that holds without explicit ordering of the input database. The proof of this fact can be performed either by using the powerful existential predicate variables of the language or by using partially applied relations and relation enumeration. Furthermore, we demonstrate that this expressive power is retained within a stratified fragment of the language. Under the stable model semantics, we show that $(k+1)$ -Order $Datalog^ eg$ captures $\textsf {co}-(k-\textsf {NEXP})$ using cautious reasoning and $k-\textsf {NEXP}$ using brave reasoning, again with analogous results for the stratified fragment augmented with choice rules. Our results establish a hierarchy of expressive power, highlighting an interesting trade-off between order and non-determinism in the context of higher-order logic programing: increasing the order of programs under the well-founded semantics can surpass the expressive power of lower-order programs under the stable model semantics.