Parsing expression grammars: a recognition-based syntactic foundation
Proceedings of the 31st ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Consistent query answering in databases
ACM SIGMOD Record
The DLV system for knowledge representation and reasoning
ACM Transactions on Computational Logic (TOCL)
The ruby programming language
JELIA '08 Proceedings of the 11th European conference on Logics in Artificial Intelligence
Hi-index | 0.01 |
Normal Form Nested (NFN ) programs have recently been introduced in order to allow for enriching the syntax of disjunctive logic programs under the answer sets semantics. In particular, heads of rules can be disjunctions of conjunctions, while bodies can be conjunctions of disjunctions. Different to many other proposals of this kind, NFN programs may contain variables, and a notion of safety has been defined for guaranteeing domain independence. Moreover, NFN programs can be efficiently translated to standard disjunctive logic programs (DLP ). In this paper we present the tool nfn2dlp , a compiler for NFN programs, which implements an efficient translation from safe NFN programs to safe DLP programs. The answer sets of the original NFN program can be obtained from the answer sets of the transformed program (which in turn can be obtained by using a DLP system) by a simple transformation. The system has been implemented using the object-oriented programming language Ruby and Treetop, a language for Parsing Expression Grammars (PEGs). It currently produces DLP programs in the format of DLV. The separate script nfnsolve uses DLV as a back-end to compute answer sets for NFN programs. Thus, combining the two tools we obtain a system which supports the powerful NFN language, and is available for experiments.