Published online by Cambridge University Press: 31 July 2003
Schlipf (1995) proved that Stable Logic Programming (SLP) solves all$\mathit{NP}$decision problems. We extend Schlipf's result to prove that SLPsolves all search problems in the class $\mathit{NP}$. Moreover, we do this in auniform way as defined in Marek and Truszczyński (1991).Specifically, we show that there is a single $\mathrm{DATALOG}^{\neg}$ program$P_{\mathit{Trg}}$such that given any Turing machine $M$, any polynomial $p$ with non-negative integercoefficients and any input $\sigma$ of size $n$ over a fixed alphabet $\Sigma$, there is an extensionaldatabase $\mathit{edb}_{M,p,\sigma}$ such that there isa one-to-one correspondence between the stable models of$\mathit{edb}_{M,p,\sigma} \cupP_{\mathit{Trg}}$ and the acceptingcomputations of the machine $M$ that reach the final state in at most$p(n)$ steps.Moreover, $\mathit{edb}_{M,p,\sigma}$ can be computed inpolynomial time from $p$, $\sigma$ and the description of$M$ and thedecoding of such accepting computations from its correspondingstable model of $\mathit{edb}_{M,p,\sigma} \cupP_{\mathit{Trg}}$ can be computed in lineartime. A similar statement holds for Default Logic with respect to$\Sigma_2^\mathrm{P}$-search problems.The proof of this result involvesadditional technical complications and will be a subject ofanother publication.