  We present the new ASP system clingo 4. Unlike its predecessors, being mere
monolithic combinations of the grounder gringo with the solver clasp, the new
clingo 4 series offers high-level constructs for realizing complex reasoning
processes. Among others, such processes feature advanced forms of search, as in
optimization or theory solving, or even interact with an environment, as in
robotics or query-answering. Common to them is that the problem specification
evolves during the reasoning process, either because data or constraints are
added, deleted, or replaced. In fact, clingo 4 carries out such complex
reasoning within a single integrated ASP grounding and solving process. This
avoids redundancies in relaunching grounder and solver programs and benefits
from the solver's learning capacities. clingo 4 accomplishes this by
complementing ASP's declarative input language by control capacities expressed
via the embedded scripting languages lua and python. On the declarative side,
clingo 4 offers a new directive that allows for structuring logic programs into
named and parameterizable subprograms. The grounding and integration of these
subprograms into the solving process is completely modular and fully
controllable from the procedural side, viz. the scripting languages. By
strictly separating logic and control programs, clingo 4 also abolishes the
need for dedicated systems for incremental and reactive reasoning, like iclingo
and oclingo, respectively, and its flexibility goes well beyond the advanced
yet still rigid solving processes of the latter.
