request. For instance, consider Example \[ex:pigeonhole\], the request [<span style="font-variant:small-caps;">GetFrozenAtoms</span>($\A$)]{} is represented by the facts $get\_frozen\_atoms()$ and $atom(p(i,j))$ for each $p_{i,j} \in \A$. A call to an external solver produces an answer set containing $freeze(p(i,j))$, for each $p_{i,j} \in \A$, that is interpreted as [<span style="font-variant:small-caps;">\#Freeze($\A$)</span>]{}. Other request and corresponding responses are handled in a similar manner. Our implementation currently supports any external solver compliant with ASP solver output. The predicate-based interface can easily support variants of ASP (e.g., with *preferences* [@DBLP:conf/aaai/BrewkaD0S15], *CASP* [@DBLP:conf/iclp/GebserOS09], etc.) an could be adapted, in principle, also to support other languages based on predicate logic.

Partner Units Problem
---------------------

The [PUP]{}comes from the railway safety domain [@Falkner2010], but has a variety of other applications including security monitoring systems, peer-to-peer networks, etc. [@DBLP:conf/iaai/TeppanFF12]. In order to ensure the safety of train movements, railway tracks (see Figure \[fig:pup\_layout\]) are equipped with hardware *sensors* $s_1,\dots,s_6$ which register when a wagon passes by. All registered events are forwarded from sensors to *control units* $u_1,\dots,u_3$ belonging to a safety system. The latter has to prevent wagons of different trains from entering the same safety *zone* of the tracks $z_1,\dots,z_{24}$, hence avoiding unwanted collisions. To solve the problem one needs to 