Incremental-DLV2 is a new incremental ASP reasoner that represents the evolution of the second version of DLV towards multi-shot reasoning. It relies on overgrouding tecniques to incrementally drive the computation, without requiring any operational instructions. The system is able to transparently evaluate a logic program across a sequence of consecutive shots, each one of which presents a set of input facts possibly different from any other shot.


Francesco Calimeri, Giovambattista Ianni, Francesco Pacenza, Simona Perri, Jessica Zangari: Forgetting Techniques for Optimizing ASP-based Stream Reasoning. PADL 2024

Francesco Calimeri, Giovambattista Ianni, Francesco Pacenza, Simona Perri, Jessica Zangari: ASP-based Multi-shot Reasoning via DLV2 with Incremental Grounding. PPDP 2022: 2:1-2:9


Incremental-DLV2 is available for 64-bit Linux OS:

For other operating systems versions and bug report, please write to and


Incremental-DLV2 can be executed in a local mode by providing via standard input a XML commands to be executed.


Commands can be also redirected from a file, e.g., commands.xml:

./incremental-dlv2 < commands.xml

The option --remote can be used to run the system in the remote mode. 

The system remains listening on the port 4790 by default and the option --port can be used to specify a different port. 

For instance, when doing as follows, the system, which is executed in the remote mode, remains listening on the port 1200:

./incremental-dlv2 --server --port=1200

The system manages the given XML commands in the order they are provided. The syntax and the meaning of the XML commands currently recognized are described below.


The tag load can be used to form an XML element that requests to load a program or a set of facts from a file.

The attribute path can be used to specify a string, representing a file path containing what has to be loaded. 

Multiple load commands can be provided: rules are accumulated to form a unique program and, similarly, also facts are accumulated.

For instance, with the following commands the system is asked to load four files: 

<load path="my_rule1.asp"/>

<load path="my_rule2.asp"/>

<load path="my_facts1.asp"/>

<load path="my_facts2.asp"/>

Assuming the the first two loaded files contain rules while the latter two contain facts, the system composes a program consisting of all rules and stores all loaded facts.


The run command requests to evaluate the loaded program over the collected facts.  

For instance, issuing:

<load path="my_rule1.asp"/>

<load path="my_rule2.asp"/>

<load path="my_facts1.asp"/>

<load path="my_facts2.asp"/>


the system is requested to compute the answer sets of the composed program over the loaded facts.

After that a run command is executed, all so far loaded facts are assumed to be no longer true.

Future loading of rules after the first run will be discarded, as the program is assumed to be fixed; conversely, loading of facts is always possible.


The command:

<forget type="r"/>

can be used to form an XML element which requests to "forget" (i.e., remove) all ground rules composing the so-far accumulated overgrounded program. 

Similarly, the command:

<forget type="p"/>

can be used to form an XML element which requests to "forget" (i.e., remove) all predicate extensions, removing all input or inferred ground-atoms

Since the overgrounded program tends to be continuously enlarged, this commands can be used to save memory by dropping off all stored rules or atoms. 

Overgrounding is started from scratch in the next shot.  


The xml reset command requests to hardly reset all internal data structure and restart the computation from scratch. 



The xml exit command requests to close the working session and stop the system.


Additional material

All material used for the PPDP 2022 paper - "ASP-based Multi-shot Reasoning via DLV2 with Incremental Grounding". 

[Last update: 2022-06-01]


Incremental-DLV2 is free for academic and non-commercial educational use, as well as for use by non-profit organisations. For further information for commercial use, please visit this website.