(aside image)

Modularity Support

Tools for the (de)composition and modular processing of ground logic program modules.

Main Components of the Implementation

The respective binaries are available for download. For further command line options of the tools, please check lists provided by the --help option of each individual tool (except for modun which has no options due to its nature).

Using the Software

The typical use cases are illustrated by the following command lines. The file program.lp is assumed to contain the ASP encoding as well as instance data (if appropriate).

$ gringo program.lp | modlist | modrun "len -r" | sort

$ gringo program.lp | modrun lp2normal2 | lpcat -r | clasp

$ (for p in *.lp; do gringo $p; done) | lpcat -r | clasp

The first example simply computes the number of rules in each module and sorts them to analyze the size distribution. The second example performs normalization module-by-module and links the normalized modules together before solving. The third example illustrates modular grounding and, again, the resulting program slices are put together.

Related Publications

E. Oikarinen and T. Janhunen. Modular Equivalence for Normal Logic Programs. In the Proceedings of the 17th ECAI 2006, p. 412-416. IOS Press.

T. Janhunen. Modular Construction of Ground Logic Programs using LPCAT. Presented at LaSh'10.