@article {IOPORT.06058066, author = {Ma{\l}uszy{\'n}ski, Jan and Sza{\l}as, Andrzej}, title = {Logical foundations and complexity of 4QL, a query language with unrestricted negation.}, year = {2011}, journal = {Journal of Applied Non-Classical Logics}, volume = {21}, number = {2}, issn = {1166-3081}, pages = {211-232}, publisher = {Taylor \& Francis}, doi = {10.3166/jancl.21.211-232}, abstract = {Summary: The paper discusses properties of 4QL, a $\mathrm{Datalog}^{\neg\neg}$-like query language, originally outlined by the authors [Lect. Notes Comput. Sci. 6702, 384--398 (2011; \url{doi:10.1007/978-3-642-24206-9_22})]. 4QL allows one to use rules with negation in heads and bodies of rules. It is based on a simple and intuitive semantics and provides uniform tools for `lightweight' versions of known forms of nonmonotonic reasoning. Negated literals in heads of rules may naturally lead to inconsistencies. On the other hand, rules do not have to attach meaning to some literals. Therefore 4QL is founded on a four-valued semantics, employing the logic introduced by the authors and {\it A. Vit\'oria} [Lect. Notes Comput. Sci. 5306, 41--51 (2008; Zbl 1185.68713); Fundam. Inform. 97, No. 4, 405--438 (2009; Zbl 1186.68468)] with truth values: `true', `false', `inconsistent' and `unknown'. In addition, 4QL is tractable w.r.t. data complexity and captures PTime queries. Even though $\mathrm{Datalog}^{\neg\neg}$ is known as a concept for the last 30 years, to our best knowledge no existing approach enjoys these properties. In the current paper we: - investigate properties of well-supported models of 4QL - prove the correctness of the algorithm for computing well-supported models - show that 4QL has PTime data complexity and captures PTime.}, identifier = {06058066}, }