<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Towards a Description Logic for Program Analysis:</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Extending ALCQI O</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Tomer Kotek</institution>
          ,
          <addr-line>Mantas Simkus, Helmut Veith, and Florian Zuleger</addr-line>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Vienna University of Technology</institution>
        </aff>
      </contrib-group>
      <abstract>
        <p>Shape analysis attempts to analyze and verify correctness of programs with dynamic data structures. This is a notoriously di cult task, because it necessitates e cient decision procedures for expressive logics on graphs and graph-like structures. In the last decade, model-theoretic approaches have been less prominent, and the leading approach is proof-theoretic [15]. Recent advances in nite model theory have created an opportunity for development of practical modeltheoretic approaches in shape analysis. Description Logics (DLs) are a well established family of logics for Knowledge Representation and Reasoning [2]. They model the domain of interest in terms of concepts (classes of objects) and roles (binary relations between objects). These features make DLs very useful to formally describe and reason about graph-structured information. The usefulness of DLs is witnessed e.g. by the W3C choosing DLs to provide the logical foundations to the standard Web Ontology Language (OWL) [14]. Another application of DLs is formalization and static analysis of UML class diagrams and ER diagrams, which are basic modeling artifacts in object-oriented software development and database design, respectively [4,1]. In these settings, standard reasoning services provided by DLs can be used to verify e.g. the consistency of a diagram. To describe the memory of programs with dynamic data structures using a DL, a rather powerful DL must be chosen. The DL in question needs to allow a computationally problematic combination of constructors: (i) nominals are required to represent the program's variables; (ii) number restrictions are required so that the program's pointers (represented as roles) are interpreted as functions; (iii) inverses are needed for de ning data structures such as trees, where elements in the tree must have at most one parent, and for encoding program computation; and (iv) reachability is required since data structures should contain only elements which are reachable from program variables via program pointers. Our contribution: We introduce and develop decision procedures for the logic ALCQIOb;Re, which extends the closure of ALCQIO under Boolean operations (ALCQIOb) with reachability assertions over nite structures. The main ? The rst, third and fourth author were supported by the Austrian National Research Network S11403-N23 (RiSE) of the Austrian Science Fund (FWF) and by the Vienna Science and Technology Fund (WWTF) through grants PROSEED and ICT12-059. The second author was supported by the FWF project P25518 and the WWTF project ICT12-15.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>results of this paper are algorithms which decide the nite satis ability and
nite implication problems of ALCQIOb;Re. The algorithms are reductions to
nite satis ability in ALCQIO, which suggests relatively simple
implementation using existing ALCQIO reasoners. Currently no ALCQIO reasoners over
nite structures exist to our knowledge. Still, reasoners over arbitrary structures
could be used as part of a program veri cation procedure which is sound but not
complete. The algorithms run in NEXPTIME, which is optimal since ALCQIO
is already NEXPTIME-hard. We only consider nite structures since only they
and not in nite structures can represent the memory of programs.</p>
      <p>The reachability assertions guarantee that elements of the universe of a
model are reachable in the graph-theoretic sense from initial sets of elements
using prescribed sets of binary relation symbols. Alternatively, we can think
of ALCQIOb;Re as ALCQIOb interpreted over structures containing an
unbounded number of trees of bounded degree d.</p>
      <p>ALCQIOb;Re is obtained from ALCQIO by (1) allowing the Boolean
connectives _; ^; : and (2) adding two new types of assertions:
Reachability Assertion B !S A where A; B 2 NC and S NF. Intuitively, it
says that B is contained in A and that A is a set of elements reachable from
B, without leaving A, through the roles of S.</p>
      <p>Disjointness Assertion Disj(A1; A2) = (A1 u A2 ?) for A1; A2 2 NC.
Let RE and DI be sets of reachability respectively disjointness assertions.
Compatibility RE and DI compatible if for every B1 !S1 A1
B2 !S2 A2 in RE such that S1 \ S2 6= ;, Disj(A1; A2) is in DI.
and
If we think of the Ai as the sets of elements in di erent data structures in the
memory, then compatibility is the natural statement that that data structures
can only share the same domain if they use di erent pointers.</p>
      <p>Let denote the re exive-transitive closure, denote role composition,
RM = (Ss2S sM \ AM AM) and RM(BM) = fv j 9(u; v) 2 RM: u 2 BMg.
We have M j= B !S A i M j= B v A and RM(BM) = AM .</p>
      <p>Theorem 1. Let i 2 ALCQIOb;Re for i = 1; 2. There are polynomial-time
computable ALCQIO formulas and over an extended vocabulary such that
(1) 1 is satis able i is satis able.
(2) 1 implies 2 i is not satis able.
(3) Satis ability and implication in ALCQIOb;Re is NEXPTIME-complete.
Satis ability and implication here are over nite structures.</p>
      <p>The proof of Theorem 1 is by reduction to the satis ability problem of ALCQIO.
The models of = 1 resp. = 1 ! 2 can be partitioned into standard and
non-standard models, depending on whether they satisfy the reachability
assertions. Since ALCQIO is contained in rst order logic, ALCQIO cannot express
the reachability assertions. However, we can augment so that it is
guaranteed that whenever a non-standard model exists, so does a standard model, and
the standard model can be obtained from the non-standard model by means of
so-called tree surgery. The construction relies on a locality property of ALCQIO.</p>
      <p>The logic ALCQIOb;Re is especially suited to shape analysis, since it
contains nominals, number restrictions, inverses and reachability. ALCQIOb;Re is
strong enough to describe e.g. lists, trees and lists of lists. ALCQIOb;Re supports
programs whose data structures have complex sharing patterns, and memory
cells (which in model-theoretic terms are elements of the universe of the model)
may participate in multiple data structures. The closure of the underlying logic
ALCQIOb under Boolean operations allows to describe conditional statements
in programs. The decision procedure for implication for ALCQIOb;Re is essential
for veri cation applications, since it allows to show that speci cations relating
pre- and post-conditions are correct.</p>
      <p>
        Since ALCQIOb;Re is a DL, using ALCQIOb;Re for shape analysis brings
an additional advantage. The veri cation community has focused mostly on
a bottom-up approach to the analysis of programs with dynamic data
structures, which examines pointers and the shapes induced by them. However, many
real world programs manipulate complex data whose structure and content is
most naturally described by formalisms from object oriented programming and
databases such as UML and ER diagrams which are generalized by the
framework of description logic. In another extended abstract in this volume (see also
[
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]) we discusse how to use a DL to reason and verify correctness of
entityrelations-type content of data structures on top of an existing shape analysis.
Related work
We list some DLs with some form of reachability from the literature. The
important work of Schild [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ] exposed a correspondence between variants of
propositional dynamic logic (PDL), a logic for reasoning about program behavior, and
variants of DLs extended with further role constructors, e.g. the transitive
closure of a role. Close correspondences between DLs extended with xpoints and
variants of the -calculus have also been identi ed [
        <xref ref-type="bibr" rid="ref12 ref13 ref16 ref18 ref5 ref6">18,12,5,13,16,6</xref>
        ]. Extensions
of DLs with regular expressions over roles have been proposed [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. ALCQIO
is the extension of ALC with nominals, number restrictions and inverses, see
e.g. [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. No extensions of ALCQIO with reachability or transitive closure were
known to be decidable on nite structures. [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] extended SHOIQ with
transitive closure of roles and proved decidable in non-deterministic triple exponential
time on arbitrary structures. Our result has a similarity in proof strategy with
a recent decidability result for an extension of the two-variable fragment of rst
order logic with trees and counting [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. Our results are incomparable with [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ].
      </p>
      <p>
        The use of DLs in shape analysis has been previously suggested in [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ],
where a framework for veri cation is given based mainly on the description
logics ALCQIO, which extends ALCQIO with xed points, and on ALCQO.
However, unlike ALCQIOb;Re, from the methods of [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] it follows that ALCQIO
is undecidable over nite structures, and ALCQO is unknown to be decidable
on nite structures.
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>A.</given-names>
            <surname>Artale</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Calvanese</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Kontchakov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Ryzhikov</surname>
          </string-name>
          , and
          <string-name>
            <given-names>M.</given-names>
            <surname>Zakharyaschev</surname>
          </string-name>
          .
          <article-title>Reasoning over extended ER models</article-title>
          .
          <source>In Conceptual Modeling-ER</source>
          <year>2007</year>
          , volume
          <volume>4801</volume>
          <source>of LNCS</source>
          , pages
          <volume>277</volume>
          {
          <fpage>292</fpage>
          . Springer,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>F.</given-names>
            <surname>Baader</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Calvanese</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D. L.</given-names>
            <surname>McGuinness</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Nardi</surname>
          </string-name>
          , and
          <string-name>
            <surname>P. F.</surname>
          </string-name>
          <article-title>Patel-Schneider, editors. The Description Logic handbook: theory, implementation, and applications</article-title>
          . Cambridge University Press,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>F.</given-names>
            <surname>Baader</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Lutz</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Milicic</surname>
          </string-name>
          ,
          <string-name>
            <given-names>U.</given-names>
            <surname>Sattler</surname>
          </string-name>
          , and
          <string-name>
            <given-names>F.</given-names>
            <surname>Wolter</surname>
          </string-name>
          .
          <article-title>Integrating description logics and action formalisms: First results</article-title>
          .
          <source>In AAAI</source>
          , pages
          <volume>572</volume>
          {
          <fpage>577</fpage>
          ,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>D.</given-names>
            <surname>Berardi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Calvanese</surname>
          </string-name>
          , and G. De Giacomo.
          <article-title>Reasoning on UML class diagrams</article-title>
          .
          <source>Arti cial Intelligence</source>
          ,
          <volume>168</volume>
          (
          <issue>1</issue>
          {2):
          <volume>70</volume>
          {
          <fpage>118</fpage>
          ,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Piero</surname>
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Bonatti</surname>
          </string-name>
          , Carsten Lutz, Aniello Murano, and
          <string-name>
            <surname>Moshe</surname>
            <given-names>Y.</given-names>
          </string-name>
          <string-name>
            <surname>Vardi</surname>
          </string-name>
          .
          <article-title>The complexity of enriched mu-calculi</article-title>
          .
          <source>Logical Methods in Computer Science</source>
          ,
          <volume>4</volume>
          (
          <issue>3</issue>
          ),
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Piero</surname>
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Bonatti</surname>
            and
            <given-names>Adriano</given-names>
          </string-name>
          <string-name>
            <surname>Peron</surname>
          </string-name>
          .
          <article-title>On the undecidability of logics with converse, nominals, recursion and counting</article-title>
          . Artif. Intell.,
          <volume>158</volume>
          (
          <issue>1</issue>
          ):
          <volume>75</volume>
          {
          <fpage>96</fpage>
          ,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>D.</given-names>
            <surname>Calvanese</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Eiter</surname>
          </string-name>
          , and
          <string-name>
            <given-names>M.</given-names>
            <surname>Ortiz</surname>
          </string-name>
          .
          <article-title>Regular path queries in expressive description logics with nominals</article-title>
          .
          <source>In IJCAI-09</source>
          , pages
          <fpage>714</fpage>
          {
          <fpage>720</fpage>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>D.</given-names>
            <surname>Calvanese</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Kotek</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Simkus</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Veith</surname>
          </string-name>
          , and
          <string-name>
            <given-names>F.</given-names>
            <surname>Zuleger</surname>
          </string-name>
          .
          <article-title>Shape and content: Incorporating domain knowledge into shape analysis</article-title>
          .
          <source>CoRR, abs/1312.6624</source>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <given-names>W.</given-names>
            <surname>Charatonik</surname>
          </string-name>
          and
          <string-name>
            <given-names>P.</given-names>
            <surname>Witkowski</surname>
          </string-name>
          .
          <article-title>Two-variable logic with counting and trees</article-title>
          .
          <source>In LICS</source>
          , pages
          <volume>73</volume>
          {
          <fpage>82</fpage>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Chan Le</surname>
            <given-names>Duc</given-names>
          </string-name>
          , Myriam Lamolle, and
          <string-name>
            <given-names>Olivier</given-names>
            <surname>Cure</surname>
          </string-name>
          .
          <article-title>A decision procedure for shoiq with transitive closure of roles</article-title>
          .
          <source>In International Semantic Web Conference (1)</source>
          , pages
          <fpage>264</fpage>
          {
          <fpage>279</fpage>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <given-names>L.</given-names>
            <surname>Georgieva</surname>
          </string-name>
          and
          <string-name>
            <given-names>P.</given-names>
            <surname>Maier</surname>
          </string-name>
          .
          <article-title>Description logics for shape analysis</article-title>
          .
          <source>In SEFM</source>
          , pages
          <volume>321</volume>
          {
          <fpage>330</fpage>
          . IEEE,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>G. De Giacomo</surname>
            and
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Lenzerini</surname>
          </string-name>
          .
          <article-title>Concept language with number restrictions and xpoints, and its relationship with mu-calculus</article-title>
          .
          <source>In ECAI</source>
          , pages
          <volume>411</volume>
          {
          <fpage>415</fpage>
          ,
          <year>1994</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Orna</surname>
            <given-names>Kupferman</given-names>
          </string-name>
          , Ulrike Sattler, and
          <string-name>
            <surname>Moshe</surname>
            <given-names>Y.</given-names>
          </string-name>
          <string-name>
            <surname>Vardi</surname>
          </string-name>
          .
          <article-title>The complexity of the graded -calculus</article-title>
          .
          <source>In CADE</source>
          , pages
          <volume>423</volume>
          {
          <fpage>437</fpage>
          ,
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14. W3C OWL Working Group.
          <article-title>OWL 2 Web Ontology Language: Document Overview</article-title>
          .
          <source>W3C Recommendation</source>
          , 27
          <year>October 2009</year>
          . Available at http://www.w3.org/TR/ owl2-overview/.
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <surname>J. C.</surname>
          </string-name>
          <article-title>Reynolds. Separation Logic: A logic for shared mutable data structures</article-title>
          .
          <source>In LICS</source>
          , pages
          <volume>55</volume>
          {
          <fpage>74</fpage>
          , Washington, DC, USA,
          <year>2002</year>
          . IEEE Computer Society.
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <given-names>Ulrike</given-names>
            <surname>Sattler</surname>
          </string-name>
          and
          <string-name>
            <given-names>Moshe Y.</given-names>
            <surname>Vardi</surname>
          </string-name>
          .
          <article-title>The hybrid -calculus</article-title>
          .
          <source>In IJCAR</source>
          , pages
          <volume>76</volume>
          {
          <fpage>91</fpage>
          ,
          <year>2001</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <given-names>K.</given-names>
            <surname>Schild</surname>
          </string-name>
          .
          <article-title>A correspondence theory for terminological logics: Preliminary report</article-title>
          .
          <source>In IJCAI</source>
          , pages
          <volume>466</volume>
          {
          <fpage>471</fpage>
          ,
          <year>1991</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          18.
          <string-name>
            <given-names>K.</given-names>
            <surname>Schild</surname>
          </string-name>
          .
          <article-title>Terminological cycles and the propositional -calculus</article-title>
          .
          <source>In KR</source>
          , pages
          <volume>509</volume>
          {
          <fpage>520</fpage>
          . Morgan Kaufmann,
          <year>1994</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>