(aside image)

LP2NORMAL and LP2NORMAL2

This tool transforms an smodels program into a normal logic program by translating away extended rule types (choice rules, cardinality rules, and weight rules).

Implementation

Simple Example

The tool is compatible with an extended smodels-format (with a support for input atoms) and can be used as part of command lines such as:

$ gringo file.lp | lp2normal | igen | clasp 0

See the --help option of lp2normal for a wide variety of options controlling the result of normalization. The intermediate filter IGEN (v. 1.7) expresses input atoms using a choice rules (for backward compatibility and is not needed with latest versions of clasp).

Related Publications

J. Bomanson, M. Gebser, and T. Janhunen. Rewriting Optimization Statements in Answer-Set Programs. In Technical Commmunications of ICLP'16, OASIcs, to appear, 2016.

J. Bomanson, M. Gebser, and T. Janhunen. Improving the Normalization of Weight Rules in Answer Set Programs. In the Proceedings of JELIA'14, 166—180. Springer LNCS 8761.

J. Bomanson and T. Janhunen. Normalizing Cardinality Rules using Merging and Sorting Constructions. In the Proceedings of LPNMR'13, 187—199. Springer LNCS 8148.

T. Janhunen and I. Niemelä. Compact Translations of Non-Disjunctive Answer Set Programs to Propositional Clauses. In Gelfond Festschrift, 2010, 111—130. Springer LNCS 6565.