\documentclass[pdf,plainsem,slideColor]{prosper}

\usepackage{xspace}
\usepackage{latexsym}
\usepackage{amssymb}

\usepackage{dl-macros}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\def\MiniPage#1#2{\begin{minipage}[t]{.49\hsize}#1\end{minipage}%
\hspace{1ex}\begin{minipage}[t]{.49\hsize}#2\end{minipage}}

\newlength{\ParLen}
\def\Parbox#1#2{\settowidth{\ParLen}{#1}\parbox[t]{\ParLen}{#2}}

\newcommand {\minitab}  {\hspace*{1ex}}
\newcommand {\smalltab} {\hspace*{5mm}}
\newcommand {\tab}      {\hspace*{10mm}}
\newcommand {\bigtab}   {\hspace*{15mm}}
\newcommand {\hugetab}  {\hspace*{20mm}}

\newcommand{\per}{\mathpunct{\mbox{\bf .}}}

%%%%%%%%%% macros %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newcommand {\smalltabu} {\hspace*{1em}}
\newcommand {\tabu}      {\hspace*{2em}}

\def\card#1{|{#1}|}

\newcommand{\Id}[1]{\mbox{\sf id}(#1)}
\newcommand{\ALCQIOreg}{\mbox{${\cal ALCQIO}_{\mbox{\it reg}}$}}


\def\allRC{\all R C}
\def\someRC{\some R C}
\def\someRT{\someT R}

\newcommand{\inc}[2]{#1 \!:#2}
\newcommand{\relc}[3]{#1#2#3}

\def\asp{\makebox[3pt]{}}  %arrow space, put before and after arrows
\def\osp{\hskip1pt}  %operator space, put before and after operators
\def\asps#1{{\asp#1\asp}}
\def\osps#1{{\osp{#1}\osp}}
\def\eset{\emptyset}
\def\incl{\subseteq}
\def\qland{\;\;\land\;\;}
\def\col{\colon}
\def\imp{\Rightarrow}
\def\cld{,\ldots,}        %comma lower dots

\def\braces#1{$\{$ #1 $\}$}

\def\con{\asp\asp\&\asp}
\def\deq{\doteq}

\newcommand{\hangif}[1]{\raisebox{-1ex}{\hspace{2em}
                                        \makebox[1.0em][l]{if}
                                        \parbox[t]{300pt}{#1}}}
\newcommand{\hangifshort}[1]{\raisebox{-1ex}{\hspace{2em}
                                        \makebox[1.0em][l]{if}
                                        \parbox[t]{250pt}{#1}}}

\newcommand{\cs}{constraint system}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% General Math
\def\A{{\cal A}} \def\B{{\cal B}} \def\C{{\cal C}} \def\D{{\cal D}}
\def\E{{\cal E}} \def\F{{\cal F}} \def\G{{\cal G}} \def\H{{\cal H}}
\def\I{{\cal I}} \def\J{{\cal J}} \def\K{{\cal K}} \def\L{{\cal L}}
\def\M{{\cal M}} \def\N{{\cal N}} \def\O{{\cal O}} \def\P{{\cal P}}
\def\Q{{\cal Q}} \def\R{{\cal R}} \def\S{{\cal S}} \def\T{{\cal T}}
\def\U{{\cal U}} \def\V{{\cal V}} \def\W{{\cal W}} \def\X{{\cal X}}
\def\Y{{\cal Y}} \def\Z{{\cal Z}}

\newcommand{\ALE}{{\cal ALE}}
\newcommand{\Dom}[1]{{\sf Dom(}#1{\sf )}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\semtitle{Description Logics}
\semsubject{Propositional Description Logics}
\semauthor{Enrico Franconi}
\sememail{franconi@cs.man.ac.uk}
\semwebpage{http://www.cs.man.ac.uk/\~{}franconi}
\seminstitution{Department of Computer Science, University of Manchester}

\begin{document}

\makesemtitle

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Summary: where we stand}

\begin{itemize}
\item Description Logics as a formalization of O-O languages
\item Description Logics as a {\em predicate level} language
  \begin{itemize}
  \item Concepts
  \item Roles
  \end{itemize}
\item Reasoning in Description Logics
  \begin{itemize}
  \item Subsumption
  \end{itemize}
\item {\FLm}: the simplest structural description logic
\end{itemize}

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Why Description Logics?}

If predicate logic is directly used without some kind of restriction, then

\begin{itemize}
\item the structure of the knowledge/information is lost (no variables,
  concepts as classes, and roles as properties),
\item the expressive power is too high for having good computational
  properties and efficient procedures.
\end{itemize}

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Axioms, Disjunctions and Negations}

${\tt Teaching\mbox{-}Assistant}~\IsSubs~
\Not{\tt Undergrad}~\Or~{\tt Professor}$

$\forall x\per\ 
   {\tt Teaching\mbox{-}Assistant}(x) \rightarrow
   \neg{\tt Undergrad}(x) \vee {\tt Professor}(x)$
   
   {\footnotesize A necessary condition in order to be a teaching
     assistant is to be either not undergraduated or a professor.
     Clearly, a graduated student being a teaching assistant is not
     necessarily a professor; moreover, it may be the case that some
     professor is not graduated.}

\vspace{1em}

${\tt Teaching\mbox{-}Assistant}~\doteq~
\Not{\tt Undergrad}~\Or~{\tt Professor}$


$\forall x\per\ 
   {\tt Teaching\mbox{-}Assistant}(x) \leftrightarrow
   \neg{\tt Undergrad}(x) \vee {\tt Professor}(x)$
   
   {\footnotesize When the left-han side is an atomic concept, the
     ``$\IsSubs$'' symbol introduces a {\em primitive definition} --
     giving only necessary conditions -- while the ``$\doteq$'' symbol
     introduces a real definition -- with necessary and sufficient
     conditions.\\
     In general, it is possible to have complex concept expressions at
     the left-hand side as well.}

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{\ALC: the simplest propositional DL}

\begin{center}
$\renewcommand{\arraystretch}{1}
\begin{array}{|c|c|l|}
\hline
A        & \Int A\subseteq\dom & \mbox{\scriptsize primitive concept} \\
R        & \Int R\subseteq\dom\times\dom & \mbox{\scriptsize primitive role} \\
\top     & \dom & \mbox{\scriptsize top} \\    
\bot     & \emptyset & \mbox{\scriptsize bottom} \\
\Not C   & \dom \setminus \Int C & \mbox{\scriptsize complement} \\
C\And D  & \Int C \cap \Int D & \mbox{\scriptsize conjunction} \\
C\Or D   & \Int C \cup \Int D & \mbox{\scriptsize disjunction} \\
\all{R}{C}   & \{ x \mid \forall y\per\Int R(x,y)\rightarrow\Int C(y)\}
         & \mbox{\scriptsize universal quant.} \\
\some{R}{C}  & \{ x \mid \exists y\per\Int R\,(x,y)\ \wedge\Int C(y)\}
         & \mbox{\scriptsize existential quant.}\\
         &&\\
\hline
\end{array}
\renewcommand{\arraystretch}{1}$
\end{center}

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Closed Propositional Language}

\begin{itemize}
\item {\bf Conjunction} is interpreted as {\em intersection} of sets of
  individuals.
\item {\bf Disjunction} is interpreted as {\em union} of sets of
  individuals.
\item {\bf Negation} is interpreted as {\em complement} of sets of
  individuals.
\end{itemize}

\vspace{1em}

\begin{itemize}
\item $\some{R}{\Top}\Longleftrightarrow \some R$
\item $\Not(C\And D)\Longleftrightarrow \Not C \Or \Not D$
\item $\Not(C\Or D)\Longleftrightarrow \Not C \And \Not D$
\item $\Not(\all{R}{C})\Longleftrightarrow \some{R}{\Not C}$
\item $\Not(\some{R}{C})\Longleftrightarrow \all{R}{\Not C}$
\end{itemize}

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Negating Universal formul\ae}

\begin{itemize}
\item $\Not(\all{R}{C})\Longrightarrow \some{R}{\Not C}$
\item $\Not(\some{R}{C})\Longrightarrow \all{R}{\Not C}$
\end{itemize}

\vspace{2em}

\centerline{\includegraphics[width=.5\textwidth]{universal.eps}}

\vspace{2em}

{\it (Compare with \FLm\ expressivity)}

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Formal Semantics}

An {\em interpretation\,} $\I = (\dom, \Int\cdot)$ consists of:

\begin{itemize}
\item a nonempty set $\dom$ (the {\em domain\/})
\item a function $\Int{\cdot}$ (the {\em interpretation function\/})\\
  that maps
  \begin{itemize}
  \item every {\em concept} to a subset of $\dom$ 
  \item every {\em role} to a subset of $\dom\times\dom$
  \item every {\em individual} to an element of $\dom$
  \end{itemize}
\end{itemize}

An interpretation function $\Int\cdot$ is an {\bf extension} function if and
only if it satisfies the semantic definitions of the language.

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Knowledge Bases}

  \centerline{\fbox{\mbox{$\Sigma = \langle {\sf TBox},{\sf Abox} \rangle$}}}

\vspace{1ex}

  \begin{itemize}

  \item {\bf Terminological Axioms:} $C\IsSubs D$ , $C\doteq D$

    \begin{itemize}

    \item 
      ${\tt Student}\doteq {\tt Person}\And 
        \parbox[t]{.4\textwidth}{%
          $\some{\tt NAME}{\tt String} \And \\
          \some {\tt ADDRESS}{\tt String} \And \\
          \some{\tt ENROLLED}{\tt Course}$}
        $\\

    \item ${\tt Student}\IsSubs\some{\tt ENROLLED}{\tt Course}$

    \item $\some{\tt TEACHES}{\tt Course}\IsSubs$  $\Not{\tt Undergrad}\Or{\tt
        Professor}$

    \end{itemize}

\vspace{1ex}

  \item {\bf Membership statements:} $C(a), R(a,b)$

    \begin{itemize}

    \item ${\tt Student}({\tt john})$

    \item ${\tt ENROLLED}({\tt john},{\tt cs415})$

    \item $({\tt Student} \Or {\tt Professor})({\tt paul})$

    \end{itemize}

  \end{itemize}

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{TBox: descriptive semantics}
  
  Different semantics have been proposed for the TBox, depending on
  the fact whether cyclic statements are allowed or not. 
  
  We consider now the descriptive semantics, based on classical
  logics.

\vspace{1em}

\begin{itemize}
\item An interpretation $\I$ {\em satisfies\/} the statement $C~
  \dot\IsSubs~ D$ if $\Int C \subseteq \Int D$.
\item An interpretation $\I$ {\em satisfies\/} the statement $C \doteq D$ if
  $\Int C = \Int D$.
\end{itemize}

\vspace{1em}


An interpretation $\I$ is a {\em model\/} for a TBox $\T$ if $\I$ satisfies
all the statements in $\T$.

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{ABox}

If $\I = (\dom, \Int\cdot)$ is an interpretation, 

\begin{itemize}
\item $C(a)$ is satisfied by $\I$ if $\Int a \in \Int{C}$.
\item $R(a,b)$ is satisfied by $\I$ if $(\Int a,\Int b) \in \Int{R}$.
\end{itemize}

A set $\A$ of assertions is called an ABox. 

An interpretation $\I$ is said to be a {\em model\/} of the ABox $\A$ if
every assertion of $\A$ is satisfied by $\I$. The ABox $\A$ is said to be
{\em satisfiable\/} if it admits a model.

\vspace{3em}

\fbox{\parbox[t]{\textwidth}{An interpretation $\I = (\dom, \Int\cdot)$ is
    said to be a {\em model\/} of a knowledge base $\Sigma$ if every axiom
    of $\Sigma$ is satisfied by $\I$.  \\ A knowledge base $\Sigma$ is said
    to be {\em satisfiable\/} if it admits a model.}}

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Logical Implication}

$\Sigma\models\varphi$ 
\smalltab if every model of $\Sigma$ is a model of $\varphi$


\vspace{2em}


{\it Example:}

\vspace{1em}

{\sf TBox}:\\ 
\smalltab$\some{\tt TEACHES}{\tt Course}\IsSubs$\\ \tab $ \Not{\tt Undergrad}\Or{\tt Professor}$

\vspace{1em}

{\sf ABox}:\\
$\smalltab{\tt TEACHES}({\tt john},{\tt cs415}),
{\tt Course}({\tt cs415}),$\\
$\smalltab{\tt Undergrad}({\tt john})$

\vspace{2em}

$\Sigma\models{\tt Professor}({\tt john})$

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Logical Implication}

{\it What if:}

\vspace{1em}

{\sf TBox}:\\ 
\smalltab$\some{\tt TEACHES}{\tt Course}\IsSubs$\\ \tab $ {\tt Undergrad}\Or{\tt Professor}$

\vspace{1em}

{\sf ABox}:\\
$\smalltab{\tt TEACHES}({\tt john},{\tt cs415}),
{\tt Course}({\tt cs415}),$\\
$\smalltab{\tt Undergrad}({\tt john})$

\vspace{2em}

$\Sigma\stackrel{?}\models{\tt Professor}({\tt john})$

$\Sigma\stackrel{?}\models\Not{\tt Professor}({\tt john})$

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Reasoning Services}

\vspace{-1em}\noindent
\begin{tabular}{cll}
$\bullet$\hspace{-3ex} & {\bf Concept Satisfiability}\hspace{-3.5ex} & \\
        & $\Sigma\not\models C\equiv\bot$ & 
{\small ${\tt Student}\And\Not{\tt Person}$}\\
&\multicolumn{2}{l}{\scriptsize\parbox[t]{\textwidth}
{the problem of checking whether $C$ is satisfiable w.r.t.\ $\Sigma$, 
i.e.\ whether there exists a model $\I$ of $\Sigma$ such that 
$\Int C\neq\emptyset$}}\\
$\bullet$\hspace{-3ex} & {\bf Subsumption} & \\
        & $\Sigma\models C\IsSubs D$ & 
{\small ${\tt Student}\IsSubs{\tt Person}$}\\
&\multicolumn{2}{l}{\scriptsize\parbox[t]{\textwidth}
{the problem of checking whether $C$ is subsumed by $D$ w.r.t.\
        $\Sigma$, i.e.\ whether 
        $\Int C\subseteq\Int D$ in every model $\I$ of $\Sigma$}}\\
$\bullet$\hspace{-3ex} & {\bf Satisfiability}  & \\
        & $\Sigma\not\models$ & 
{\small ${\tt Student}\doteq\Not{\tt Person}$}\\
&\multicolumn{2}{l}{\scriptsize\parbox[t]{\textwidth}
{the problem of checking whether $\Sigma$ is satisfiable, 
         i.e.\ whether it has a model}}\\
$\bullet$\hspace{-3ex} & {\bf Instance Checking} & \\
        & $\Sigma\models C(a)$ & {\small ${\tt Professor}({\tt john})$}\\
&\multicolumn{2}{l}{\scriptsize\parbox[t]{\textwidth}
{the problem of checking whether the assertion
         $C(a)$ is      satisfied in every model of $\Sigma$}}\\
\end{tabular}

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Reasoning Services {\em (cont.)}}

\noindent
\begin{tabular}{cll}
$\bullet$\hspace{-3ex} & {\bf Retrieval} & \\
        & $\{{\color{blue}a}\mid\Sigma\models C({\color{blue}a})\}$ & 
        {\small ${\tt Professor}\Rightarrow{\tt john}$}\\
$\bullet$\hspace{-3ex} & {\bf Realization} & \\
        & $\{{\color{blue}C}\mid\Sigma\models {\color{blue}C}(a)\}$ & 
        {\small ${\tt john}\Rightarrow{\tt Professor}$}
\end{tabular}

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Reduction to satisfiability}

  \begin{itemize}

   \item Concept Satisfiability 

      $\Sigma\not\models C\equiv\bot \smalltab\leftrightarrow$ \\
      \smalltab  exists $x$ s.t. $\Sigma\cup\set{C(x)}$ has a model

   \item Subsumption
      
      $\Sigma\models C\IsSubs D  \smalltab\leftrightarrow$ \\ 
      $\smalltab\Sigma\cup\set{(C \And \Not D)(x)}$ has no models
      
  \end{itemize}
  
  \vspace{1em}
\centerline{\includegraphics[width=.3\textwidth]{subs.eps}}

\vspace{-2em}   
  \begin{itemize}

   \item Instance Checking

      $\Sigma\models C(a) \smalltab\leftrightarrow$ \\
      $\smalltab\Sigma\cup\set{\Not C(a)}$ has no models

  \end{itemize}


\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\overlays{2}{
\begin{slide}{The Taxonomy}

\onlySlide{2}{${\tt N}\doteq {\tt ANIMATE}\And ({\tt STUDENT}\Or 
{\tt PROFESSOR})$}

\vspace{1ex}
%
\begin{center}
{\scriptsize\setlength{\unitlength}{1em}
\begin{picture}(20,13)
              \put(0,6){COURSE}
              \put(-1,9){INANIMATE}
              \put(4.5,12){TOP}
              \put(7,9){ANIMATE}
              \put(7.5,6){PERSON}
              \put(4,3){STUDENT}
              \put(10,3){PROFESSOR}
              \put(5,0){WORKING-STUDENT}
             %
              \thinlines
              \put(2,10){\vector(4,3){2.5}}
              \put(2,7){\vector(0,1){1.75}}
              \put(9.5,10){\vector(-4,3){2.5}}
              \put(9.5,7){\vector(0,1){1.75}}
              \put(6,4){\vector(1,1){1.75}}
              \put(13,4){\vector(-1,1){1.75}}
              \put(8,1){\vector(-1,1){1.75}}
              \put(11,1){\vector(1,1){1.75}}
%
\onlySlide{2}{%
              \put(8,4){\vector(4,1){6}}
              \put(14,4){\vector(0,1){1.75}}
              \put(14,7){\vector(-1,1){1.75}}
              \put(14,6){\bf\footnotesize N}%
}
%
\end{picture}}
\end{center}

\begin{itemize}
\item Subsumption  is a {\em partial ordering} relation in the
  space of concepts.
\item If we consider only {\em named} concepts, subsumption induces a
  taxonomy  where only
  direct subsumptions are explicitly drawn.
\item A taxonomy is the minimal relation in the space of named concepts such
  that its rlflexive-transitive closure is the subsumption relation.
\end{itemize}

\end{slide}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Classification}


\begin{itemize}
\item Given a concept $C$ and a TBox $\T$, for all concepts $D$ of $\T$
  determine whether $D$ subsumes $C$, or $D$ is subsumed by $C$.

\item Intuitively, this amounts to finding the ``right place" for $C$ in the
  taxonomy implicitly present in $\T$.

\item {\em Classification} is the task of inserting new concepts in a
  taxonomy. It is {\em sorting} in partial orders.

\end{itemize}

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Reasoning procedures}

  \begin{itemize}
  \item Terminating, efficient and complete algorithms for deciding {\bf
      satisfiability} -- and all the other reasoning services -- are
    available.

  \item Algorithms are based on tableaux-calculi techniques.
    
  \item Completeness is important for the usability of description logics in
    real applications.
    
  \item Such algorithms are efficient for both average and real knowledge
    bases, even if the problem in the corresponding logic is in PSPACE
    or EXPTIME.
    
  \end{itemize}


\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Tableaux Calculus}

The Tableaux Calculus is a decision procedure solving the problem of
satisfiability.

If a formula is satisfiable, the procedure will constructively exhibit a
model of the formula.

The basic idea is to incrementally build the model by looking at the
formula, by decomposing it in a top/down fashion. The procedure exhaustively
looks at all the possibilities, so that it can eventually prove that no
model could be found for unsatisfiable formulas.

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Tableaux Calculus}

\begin{enumerate}
\item Syntactically transform a theory $\Sigma$ in a {\it Constraint System}
  $S$ -- also called {\em tableaux}.\\
  Every formula of $\Sigma$ is transformed into a {\em constraint} in $S$.
      
\item Add constraints to $S$, applying specific {\it completion rules}. \\
  Completion rules are either deterministic -- they yield a uniquely
  determined constraint system -- or nondeterministic -- yielding several
  possible alternative constraint systems ({\it branches}).
      
\item Apply the completion rules until either a contradiction (a {\it
    clash}) is generated in every branch, or there is a {\em completed}
  branch where no more rule is applicable.

\item The completed constraint system gives a model of $\Sigma$; it
  corresponds to a particular branch of the tableaux.
\end{enumerate}


\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{The FOL example}


{\footnotesize{\scriptsize
  \begin{minipage}[t]{4em}$
  \begin{array}{c}
  \phi\wedge\psi\\
  \hline
  \phi\\
  \psi
  \end{array}
  $\end{minipage}~~~~
  \begin{minipage}[t]{4em}$
  \begin{array}{c|c}
  \multicolumn{2}{c}{\phi\vee\psi}\\
  \hline
  \phi & \psi\\
  \multicolumn{2}{c}{}
  \end{array}
  $\end{minipage}~~~~
  \begin{minipage}[t]{5em}$
  \begin{array}{c}
  \forall x\per\ \phi\\
  \hline
  \phi\{X/t\}\\
  \multicolumn{1}{c}{}\\  
  \end{array}
  $\end{minipage}~~~~
  \begin{minipage}[t]{5em}$
  \begin{array}{c}
  \exists x\per\ \phi\\
  \hline
  \phi\{X/Z\}\\
  \multicolumn{1}{c}{}\\  
  \end{array}
  $\end{minipage}}
  
\vspace{-1em}
  $$
  \begin{array}{c}
    \mbox{\fbox{$\exists y\per\ (p(y)\wedge\neg q(y)) \land \forall z\per
    (p(z)\lor q(z))$}}\\
    \exists y\per\ (p(y)\wedge\neg q(y)) \\
    \forall z\per\ (p(z)\lor q(z))\\
    p(\bar{y})\wedge\neg q(\bar{y})\\
    p(\bar{y})\\
    \neg q(\bar{y})\\
    p(\bar{y})\lor q(\bar{y})\\
%    \\
    \begin{array}{c@{\hspace{8em}}c}
      p(\bar{y}) & q(\bar{y})\\
      {\tt <COMPLETED>} & {\tt <CLASH>}
    \end{array}
  \end{array}
  $$

%\vspace{0.5ex}

The formula is satisfiable. The devised model is~ $\dom=\{\bar{y}\}$,~ $\Int
p=\{\bar{y}\}$,~ $\Int q=\emptyset$.
}

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Negation Normal Form}

Recall that the above completion rules for FOL work only if the formula has
been translated into Negation Normal Form, i.e., all the negations have been
pushed down.

\vspace{1em}

In the same way, we can transform any $\ALC$\ formula into an equivalent one
in Negation Normal Form, so that negation appears only in front of atomic
concepts:

\begin{itemize}
\item $\Not(C\And D)\Longleftrightarrow \Not C \Or \Not D$
\item $\Not(C\Or D)\Longleftrightarrow \Not C \And \Not D$
\item $\Not(\all{R}{C})\Longleftrightarrow \some{R}{\Not C}$
\item $\Not(\some{R}{C})\Longleftrightarrow \all{R}{\Not C}$
\end{itemize}

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Completion Rules: the AND rule}

The propagation rules come straightforwardly from the semantics of
constructors.

\vspace{1em}

If in a given interpretation $\I$, whose domain contains the element $a$, we
have that $a \in \Int{(C\And D)}$, then from the semantics we know that such
element $a$ should be in the intersection of $\Int C$ and $\Int D$, i.e. it
should be in both $\Int C$ and $\Int D$. 

\vspace{1em}

Since this must be true for any interpretation, we can abstract from
interpretations and their elements, and say that if in a generic
interpretation we have a generic element $x$ that is in the interpretation
of the concept $C\And D$ (denote this by $\inc x (C\And D)$) then the
element $x$ should belong both to the interpretation of $C$ and to the
interpretation of $D$.

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{The AND rule}

Suppose now we want to construct a generic interpretation $S$ such that the
set corresponding to the concept $C\And D$ contains at least one element. We
can state this initial requirement as the constraint $\inc x (C\And D)$.

\vspace{1em}

Following the semantics, we know that $S$ must be such that the constraints
$\inc x C$ and $\inc x D$ must hold, hence we can add these new constraints
to $S$, knowing that if $S$ will ever satisfy them then it will also satisfy
the first constraint. 

\vspace{1em}

These considerations lead to the following propagation rule:

\vspace{1em}

$S \asps{\rightarrow_{\And}} \set{\inc x{C},\ \inc x{D}} \cup S$ \\
      \hangifshort{     1. $\inc x{C\And D}$ is in $S$,\\ 
                2. $\inc x{C}$ and $\inc x {D}$     are not both in $S$}

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{The SOME rule}

If in a given interpretation $\I$, whose domain contains the element $a$, we
have that $a \in \Int{(\someRC)}$, then from the semantics we know that
there must be an element $b$ (not necessarily distinct from $a$) such that
$(a,b)\in\Int R$, and $b\in\Int C$.

\vspace{1em}

Since this must be true for any interpretation, we can abstract from
interpretations and their elements, and say that if in a generic
interpretation we have a generic element $x$ that is in the interpretation
of the concept $\someRC$ (denote this by $\inc x \someRC$) then there must
be a generic element $y$ such that $x$ and $y$ are in relation through $R$
(denote it $\relc x R y$) and $y$ belongs to the interpretation of $C$
(denoted as $\inc y C$).

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{The SOME rule {\em (cont.)}}

These considerations lead to the following propagation rule:

\vspace{2em}

$S \asps{\rightarrow_{\exists}}
\set{\relc x R y,\ \inc y C}\cup S$  \\
      \hangifshort{     1. $\inc x\someRC$ is in $S$,\\
                        2. $y$ is a new variable, \\
               3. \parbox[t]{15em}{there is no $z$ such that \\ both
  $\relc x R z$ and $\inc z C$ are in $S$}}

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Completion rules for \ALC}

{\small
\MiniPage{%
$S \asps{\rightarrow_{\And}} \set{\inc x{C},\ \inc x{D}} \cup S$ \\
      \hangifshort{     1. $\inc x{C\And D}$ is in $S$,\\ 
                2. $\inc x{C}, \inc x {D}$     are not both in $S$}
}{%
$S \asps{\rightarrow_{\Or}} \set{\inc x E} \cup S$  \\
      \hangifshort{     1. $\inc x{C\Or D}$ is in $S$,\\ 
                2. neither $\inc x{C}$ nor $\inc x {D}$ is in $S$, \\
                3. $E=C$ or $E=D$}
}

\vspace{2em}

\MiniPage{%
$S \asps{\rightarrow_{\forall}} \set{\inc y C} \cup S$  \\
      \hangifshort{     1. $\inc x \allRC$ is in $S$,\\
                        2. $\relc x R y$ is in $S$, \\
                        3. $\inc y C$ is not in $S$}
}{%
$S \asps{\rightarrow_{\exists}} 
\set{\relc x R y,\ \inc y C}\cup S$  \\
      \hangifshort{     1. $\inc x\someRC$ is in $S$,\\
                        2. $y$ is a new variable, \\
               3. \parbox[t]{15em}{there is no $z$ such that \\ both
  $\relc x R z$ and $\inc z C$ are in $S$}}
}
}

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Clash}

While building a \cs, we can look for evident contradictions to see if the
\cs\ is not satisfiable. We call these contradictions {\bf clashes}.

\vspace{2em}  

A~{\em clash} is a \cs\ having the form:

\vspace{1em}  

$\set{\inc x A,\ \inc x{\Not A}}$, where $A$ is a concept name.

\vspace{2em}  

A clash is evidently an unsatisfiable \cs, hence any \cs\ containing a clash
is obviously unsatisfiable.

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{An Example of tableaux}

$\renewcommand{\arraystretch}{1.3}\begin{array}{cl}

\mbox{Satisfiability of the concept:}\\
\mbox{\fbox{$\mbox{\Large(}(\all {\tt CHILD} {\tt Male}) \And (\some {\tt CHILD} {\Not {\tt Male}})\mbox{\Large)}$}}\hspace{-2em} & \vspace{1em}\\ 
\mbox{\Large(}(\all {\tt CHILD} {\tt Male}) \And (\some {\tt CHILD} {\Not {\tt Male}})\mbox{\Large)}(x)\hspace{-2em} &\\
(\all {\tt CHILD} {\tt Male})(x) & \And\mbox{\it-rule}\\
(\some {\tt CHILD} {\Not {\tt Male}})(x) & ``\\
{\tt CHILD}(x,y) & \exists\mbox{\it-rule}\\
\mbox{\boldmath $\Not{{\tt Male}}(y)$} & ``\\
\mbox{\boldmath ${\tt Male}(y)$} & \forall\mbox{\it-rule}\\
\langle CLASH \rangle &
\end{array}\renewcommand{\arraystretch}{1}$

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{An Example of tableaux - {\em constraint} syntax -}

$\renewcommand{\arraystretch}{1.3}\begin{array}{cl}

\mbox{\fbox{$\mbox{\Large(}(\all {\tt CHILD} {\tt Male}) \And (\some {\tt CHILD} {\Not {\tt Male}})\mbox{\Large)}$}}\hspace{-2em} & \vspace{1em}\\
% 
\inc x \mbox{\Large(}(\all {\tt CHILD} {\tt Male}) \And (\some {\tt CHILD} {\Not {\tt Male}})\mbox{\Large)}\hspace{-2em} &\\
%
\inc x (\all {\tt CHILD} {\tt Male}) & \And\mbox{\it-rule}\\
\inc x (\some {\tt CHILD} {\Not {\tt Male}}) & ``\\
\relc x {~{\tt CHILD}~} y& \exists\mbox{\it-rule}\\
\inc {\mbox{$\boldmath y$}} {\Not{\tt Male}} & ``\\
\inc {\mbox{$\boldmath y$}} {\tt Male} & \forall\mbox{\it-rule}\\
\langle CLASH \rangle &
\end{array}\renewcommand{\arraystretch}{1}$

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Another example}

$\renewcommand{\arraystretch}{1.3}\begin{array}{cl}

\mbox{\fbox{$\mbox{\Large(}(\all {\tt CHILD} {\tt Male}) \And (\some {\tt CHILD} {\tt Male})\mbox{\Large)}$}}\hspace{-2em} & \vspace{1em}\\
% 
\inc x \mbox{\Large(}(\all {\tt CHILD} {\tt Male}) \And (\some {\tt CHILD} {\tt Male})\mbox{\Large)}\hspace{-2em} &\\
%
\inc x (\all {\tt CHILD} {\tt Male}) & \And\mbox{\it-rule}\\
\inc x (\some {\tt CHILD} {\tt Male}) & ``\\
\relc x {~{\tt CHILD}~} y& \exists\mbox{\it-rule}\\
\inc {\mbox{$\boldmath y$}} {\tt Male} & ``\\
\inc {\mbox{$\boldmath y$}} {\tt Male} & \forall\mbox{\it-rule}\\
\langle COMPLETED \rangle &
\end{array}\renewcommand{\arraystretch}{1}$

\vspace{1em}
{\it Exercise: find a model.}

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Tableaux with individuals}

Check the satisfiability of the ABox:

${\tt (Parent\And \all{CHILD}{Male})(john)}$ \\
${\tt \Not Male(mary) }$\\
${\tt CHILD(john,mary)}$

\vspace{1em}

$\renewcommand{\arraystretch}{1}\begin{array}{cl}

\inc {\tt john} {\tt Parent\And \all{CHILD}{Male}} &\\
\inc {\tt mary} {\tt \Not Male} &\\
\relc {\tt john} {\tt ~CHILD~} {\tt mary} &\\
%
\inc {\tt john} {\tt Parent} & \And\mbox{\it-rule}\\
\inc {\tt john} \all{\tt CHILD}{\tt Male}  & ``\\
\inc {\tt mary} {\tt Male} & \forall\mbox{\it-rule}\\
\langle CLASH \rangle &
\end{array}\renewcommand{\arraystretch}{1}$

\vspace{1em}
{\it The knowledge base is inconsistent.}

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Soundness of the Tableaux for \ALC}

The calculus does not add unnecessary contradictions. 

That is, deterministic rules always preserve the Satisfiability of a \cs,
and nondeterministic rules have always a choice of application that
preserves Satisfiability.


\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Termination of the Tableaux  for \ALC}

A \cs\ is {\em complete\/} if no propagation rule applies to it.  A complete
system derived from a system $S$ is also called a {\em completion\/} of $S$.
Completions are reached when there is no infinite chain of applications of
rules.  

Intuitively, this can be proved by using the following argument: all rules
but $\rightarrow_{\forall}$ are never applied twice on the same constraint;
this rule in turn is never applied to a variable $x$ more times than the
number of the {\em direct successors} of $x$, which is bounded by the length
of a concept; finally, each rule application to a constraint $\inc y C$ adds
constraints $\inc z D$ such that $D$ is a strict subexpression of $C$.

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Completeness of the Tableaux  for \ALC}
  
  If $S$ is a completion of $\set{\inc x C}$ and $S$ contains no clash, then
  it is always possible to construct an interpretation for $C$ on the basis
  of $S$, such that $\Int C$ is nonempty. 
  
  The proof is a straightforward induction on the length of the concepts
  involved in each constraint.

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Interpretations as graphs}

An interpetation can be viewed as a labeled directed graph.

\begin{itemize}
\item Each node is a generic element of the interpretation domain.
\item Labels on nodes are concepts which include that specific element in
  the interpretation.
\item Each arc is labeled by a relationship (i.e., a role) among elements of
  the interpretation domain that must hold.
\end{itemize}

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Exponential models}

{\scriptsize

$\some{R}{C_1} \And \some{R}{C_2} \And\forall R\per$
\fbox{$(\some{R}{C_1} \And \some{R}{C_2} \And\forall R\per $
      \fbox{$\ldots$}
      )}


      
\vspace{3em}

$x : \some{R}{C_1} \And \some{R}{C_2} \And
      \all{R}{(\some{R}{C_1} \And \some{R}{C_2} \And \all{R}{(\ldots)})}$
      
\smalltab\framebox{\parbox[t]{20em}{
     $xRx_1,\ x_1 : C_1$ \\
     \smalltab $x_1 : \some{R}{C_1}\And\some{R}{C_2} \And \all{R}{(\ldots)}$\\
     \tab\framebox{\parbox[t]{10em}{\ldots\\\ldots}}\\
     $xRx_2,\ x_2 : C_2$\\
     \smalltab  $x_2 : \some{R}{C_1}\And\some{R}{C_2} \And \all{R}{(\ldots)}$\\
     \tab\framebox{\parbox[t]{10em}{\ldots\\\ldots}}
     }}
    
}

\vspace{2em}

$2^n$ generated variables!

\vspace{2em}

{\it Exercise: depict the model as a graph.}

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Complexity of reasoning}

\noindent
{\scriptsize
    \begin{tabular}[t]{|cc|c|c|}
      \hline
       \multicolumn{2}{|c|}{Expressivity} 
          & {\tiny $\!\models C\!\IsSubs\! D\!$} & 
            {\tiny $\!\models C(a)\!$}\\
       \hline
       \multicolumn{4}{c}{}\\ 
       \hline
          $C\And D$ & $\FLm$ & P & P\\
          $\all R C$ &  & & \\
          $\exists R$ & & &\\
      \hline
      \multicolumn{4}{c}{}\\[-.5ex]
       \hline
          $\Not A$ & $\AL$ & P & P\\
      \hline
      \multicolumn{4}{c}{}\\[-.5ex]
      \hline
        $\some{R}{C}$ & $\ALE$ & NP & PSPACE \\
      \hline
      \multicolumn{4}{c}{}\\[-.5ex] 
      \hline
        $\Not C$ &  $\ALC$ & \multicolumn{2}{c|}{{\color{blue}PSPACE
        \smalltab$\Longleftarrow$ {\bf !!}}}\\       
      \hline
      \multicolumn{4}{c}{}\\[-.5ex] 
      \hline
         \{$a_1\ldots$\} & ${\cal ALCO}$ & \multicolumn{2}{c|}{PSPACE} \\ 
      \hline
      \multicolumn{4}{c}{}\\[-.5ex] 
      \hline
         & ${\cal SHIQ}$  & \multicolumn{2}{c|}{EXPTIME} \\ 
      \hline
      \multicolumn{4}{c}{}\\[-.5ex] 
      \hline
         & KL-ONE & \multicolumn{2}{c|}{undecidable} \\ 
      \hline
    \end{tabular}
}

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Traces}

\begin{itemize}
  
\item In order to obtain a polynomial space algorithm for \ALC, we
  should exploit the property of independency between {\em traces} of
  a satisfiability proof.
  
\item A {\em completed constraint system} can be partitioned into
  traces, where the computation can be performed {\em independently}
  -- i.e.\ an inconsistency can be generated only by a clash belonging
  to a single trace.
  
\item Since a completed constraints system denotes a model, it can be
  regarded as a graph: traces correspond to paths from the starting
  node to a leaf.
  
\item A clash at a leaf node can only be generated by the application
  of rules from the trace it belongs to. It is impossible that a clash
  is generated by rules applied at some other trace. This is because
  completed constraint systems are trees.

\item A trace has polynomial size!

\end{itemize}

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Functional Algorithms}

\begin{itemize}

\item Nodes in a constraint system are only generated by the completion rule
  for the {\it existential constraint} ``$\rightarrow_{\exists}$''.

\item In order to exploit traces (which are paths in the model), we force a
  depth-first strategy in the generation of new nodes in the constraint
  system.

  \begin{itemize}

  \item Apply the ``$\rightarrow_{\exists}$'' rule only if no other rule is
    applicable;

  \item If the ``$\rightarrow_{\exists}$'' rule is applicable to more that
    one constraint, choose the constraint with the most recently generated
    variable.

  \end{itemize}
  
\end{itemize}

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Example}

$\renewcommand{\arraystretch}{1}\begin{array}{cl}

\mbox{\fbox{$\mbox{\Large(}(\some {\tt CHILD} {\tt Male}) \And (\some {\tt CHILD} {\Not {\tt Male}})\mbox{\Large)}$}}\hspace{-2em} & \vspace{1em}\\
% 
\inc x \mbox{\Large(}(\some {\tt CHILD} {\tt Male}) \And (\some {\tt CHILD}
{\Not {\tt Male}})\mbox{\Large)}\hspace{-2em} &\\ 
%
\inc x (\some {\tt CHILD} {\tt Male}) & \And\mbox{\it-rule}\\
\inc x (\some {\tt CHILD} {\Not {\tt Male}}) & ``\\
\relc x {~{\tt CHILD}~} y& \exists\mbox{\it-rule}\\
\inc {\mbox{$\boldmath y$}} {\tt Male} & ``\\
\relc x {~{\tt CHILD}~} z& \exists\mbox{\it-rule}\\
\inc {\mbox{$\boldmath z$}} \Not{\tt Male} & ``\\
\langle COMPLETED \rangle &
\end{array}\renewcommand{\arraystretch}{1}$

%\vspace{1ex}
{\small
\begin{center}
\setlength{\unitlength}{4em}
\begin{picture}(2,1)(0,0)
\put(1,1){\vector(-1,-1){1}}
\put(1,1){\vector(1,-1){1}}
\put(1,1.1){$x$}
\put(0,-0.2){$y:$ \tt Male}
\put(2,-0.2){$z: \Not$\tt Male}
\put(1.5,0.6){\tt CHILD}
\put(-0.2,0.6){\tt CHILD}
\end{picture}
\end{center}}

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\overlays{2}{
\begin{slide}{Example with traces}

{\small
$\renewcommand{\arraystretch}{1.1}
\begin{array}{cl}

\inc x \mbox{\Large(}(\some {\tt CHILD} {\tt Male}) \And (\some {\tt CHILD}
{\Not {\tt Male}})\mbox{\Large)}\hspace{-2em} &\\ 
%
\inc x (\some {\tt CHILD} {\tt Male}) & \And\mbox{\it-rule}\\
\inc x (\some {\tt CHILD} {\Not {\tt Male}}) & ``\\
%
{\relc x {~{\tt CHILD}~} y}%
\hspace{-10ex}\fromSlide{2}{%
  \psframebox%
  [fillstyle=vlines,hatchcolor=gray,framesep=2ex,framearc=.3,linewidth=0pt]%
  {\hspace{10ex}}}%
 & 
  \exists\mbox{\it-rule}\\
{\inc {\mbox{$\boldmath y$}} {\tt Male} }%
\hspace{-10ex}\fromSlide{2}{%
  \psframebox%
  [fillstyle=vlines,hatchcolor=gray,framesep=2ex,framearc=.3,linewidth=0pt]%
   {\hspace{10ex}}}
 & 
  ``\\
%
\fromSlide{2}{\relc x {~{\tt CHILD}~} z }
& \fromSlide{2}{\exists\mbox{\it-rule} }\\
\fromSlide{2}{\inc {\mbox{$\boldmath z$}} \Not{\tt Male}} & \fromSlide{2}{ ``}\\
\fromSlide{2}{\langle COMPLETED \rangle} &
\end{array}
\renewcommand{\arraystretch}{1}$

\vspace{1ex}

\begin{center}
\setlength{\unitlength}{4em}
\begin{picture}(2,1)(0,0)
\put(1,1){\vector(-1,-1){1}}
\fromSlide{2}{ \put(1,1){\vector(1,-1){1}}}
\put(1,1.1){$x$}
\put(0,-0.2){$y:$ \tt Male}
\fromSlide{2}{\put(2,-0.2){$z: \Not$\tt Male}}
\fromSlide{2}{ \put(1.5,0.6){\tt CHILD}}
\put(-0.2,0.6){\tt CHILD}
\fromSlide{2}{%
  \psframe%
  [fillstyle=vlines,hatchcolor=gray,framearc=.3,linewidth=0pt]%
  (-0.5,-0.5)(1.4,1.4)
}
\end{picture}
\end{center}
}

\end{slide}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{The Functional Algorithms for \ALC}

\begin{tabbing}
    {\sl sat}($S$) = \= \+
    {\tt if} \= $S$ includes a clash \\
    \> {\tt then} {\tt false} \\
    {\tt elseif} $C\And D\in S$ {\tt and} $C\not\in S$ {\tt or} $D\not\in S$ \\
    \> {\tt then} ${\sl sat}(S\cup \set{C,D})$ \\
    {\tt elseif} $C\Or D\in S$ {\tt and} $C\not\in S$ {\tt and} $D\not\in S$ \\
    \> {\tt then} ${\sl sat}(S\cup\set{C})$ {\tt or} 
                  ${\sl sat}(S\cup\set{D})$ \\
    {\tt else} {\tt fo}\= \kill
    {\tt else} {\tt forall} $\some R C \in S$ \\
    \> ${\sl sat}(\set{C}\cup\set{D\mid\all R D \in S})$
\end{tabbing}

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Sources of Complexity}

Such a deterministic version of the tableaux calculus can be seen as a
depth-first exploring of an AND-OR tree:

\begin{itemize}
  
\item AND-branching corresponds to the (independent) check of all {\em
    successors} of a node;

\item OR-branching corresponds to the choices of application of the
  non-deterministic rule.

\end{itemize}

The exponential-time behaviour of the calculus has two origins:

\begin{itemize}
  
\item AND-branching -- leading to constraint systems of exponential
  size (with an exponential number of possible clashes to be searched
  through);

\item OR-branching -- leading to an exponential number of possible
  constraint systems (like in propositional calculus).

\end{itemize}

\end{slide}
  
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Sources of Complexity - II}

Differently from {\em databases} and, in general, from {\em static data
  structures}, description logics do not handle only ground and complete
knowledge but perform also reasoning on incomplete knowledge and case
analysis:

\begin{itemize}
\item Existential quantification ($\ALE$)
\item Disjunction ($\ALC$)
\item Enumerated types (${\cal ALCO}$)
\item Terminological axioms (${\cal SHIQ}$)
\end{itemize} 


\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{An example}

$\Sigma =$
\parbox[t]{.7\textwidth}{\tt
FRIEND(john,susan) $\wedge$\\ 
FRIEND(john,andrea) $\wedge$\\
LOVES(susan,andrea) $\wedge$\\ 
LOVES(andrea,bill) $\wedge$\\
Female(susan) $\wedge$\\ 
$\neg$Female(bill)
}

%\vspace{2em}

{\tt\small
\setlength{\unitlength}{0.8em}
\begin{picture}(20,13)
\thinlines    \put(2,0){bill: $\neg$Female}
              \put(2,6){andrea}
              \put(12,6){susan: Female}
              \put(7.5,11.6){john}
              
              \put(3.5,5){\vector(0,-1){4}}
              \put(11,6.2){\vector(-1,0){4.5}}
              \put(7,11){\vector(-1,-1){4}}
              \put(10,11){\vector(1,-1){4}}
                            
              \put(1,9){FRIEND}
              \put(13,9){FRIEND}
              \put(7,6.6){LOVES}
              \put(4,3){LOVES}
\end{picture}}

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{}

$\Sigma = $
{\tt\footnotesize
\setlength{\unitlength}{0.9em}
\begin{picture}(20,13)
\thinlines    \put(2,0){bill: $\neg$Female}
              \put(2,6){andrea}
              \put(12,6){susan: Female}
              \put(7.5,11.6){john}
              
              \put(3.5,5){\vector(0,-1){4}}
              \put(11,6.2){\vector(-1,0){4.5}}
              \put(7,11){\vector(-1,-1){4}}
              \put(10,11){\vector(1,-1){4}}
                            
              \put(1,9){FRIEND}
              \put(13,9){FRIEND}
              \put(7,6.6){LOVES}
              \put(4,3){LOVES}
\end{picture}}

Does John have a female friend loving a male (i.e. not female) person?

\vspace{1em}

$\exists X,Y\per\ 
   {\tt FRIEND}({\tt john},X)\wedge {\tt Female}(X)\wedge
   {\tt LOVES}(X,Y)\wedge\Not{\tt Female}(Y)$


%\vspace{1em}

$\Sigma\stackrel{\mbox{\bf ?}}{\models}$
\hspace*{1ex}{\small
$\mbox{\Large(}\some{\tt FRIEND}
            {\mbox{\large(}{\tt Female}\And
                           \left(\some{\tt LOVES}
                                      {\Not{\tt Female}}\right)\mbox{\large)}}\mbox{\Large)}
{\tt (john)}$
}

%\vspace{1em}

\begin{center}
$\Longrightarrow$~~{\bf Answer: YES}
\end{center}

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Exercise}

\begin{itemize}
\item Reduce the problem into a satisfiability problem
\item Solve it using plain tableaux calculus
\item Solve it using the functional algorithm (is there any difference?)
\item Comment on the sources of complexity in finding the solution
\end{itemize}

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Some extensions of \ALC}

\begin{center}

\noindent
\begin{scriptsize}
\begin{tabular}{|l|c|c|} \hline
Constructor   &   Syntax   & Semantics\\ \hline\hline
concept name     & $A$        & $\Int A \subseteq \dom$\\ \hline
top              &  $\top$    &   $\dom$ \\  \hline 
bottom           &  $\bot$    &  $\emptyset$ \\ \hline 
conjunction     & $C\And D$  & $\Int C\cap \Int D$\\ \hline
disjunction ($\U$)            & $C\Or D$   & $\Int C \cup \Int D$\\ \hline
negation ($\C$)       & $\Not C$   &  $\dom \setminus \Int C$\\ \hline
universal & $\all{R}{C}$   &$\set{x \mid 
                \forall y:\Int R(x,y)\rightarrow \Int C(y)}$\\  \hline
existential ($\E$)& $\some{R}{C}$   & $\set{x\mid 
                \exists y: \Int R(x,y) \wedge \Int C(y)}$ \\ \hline
cardinality ($\N$) & $\atleast n R$ & 
            $\set{x\mid \sharp\set{y\mid \Int R(x,y)} \geq n}$ \\ \cline{2-3}
                    & $\atmost n R$ & 
                $\set{x\mid \sharp\set{y\mid \Int R(x,y)} \leq n}$ \\ \hline
qual. cardinality ($\Q$) & $\atleastq n R C$ & 
            $\set{x\mid \sharp\set{y\mid \Int R(x,y)\wedge \Int C(y)} \geq n}$ \\ \cline{2-3}
                    & $\atmostq n R C$ & 
                $\set{x\mid \sharp\set{y\mid \Int R(x,y)\wedge \Int C(y)} \leq n}$ \\ \hline
enumeration ($\O$) &$\!\set{a_1 \dots a_n}$&
                                $\set{\Int {a_1},\dots,\Int{a_n}}$\\\hline
selection ($\F$) &$\selects {f}{C}$& 
                                $\set{ x\in\Dom{\Int f} \mid \Int C(\Int f(x))}$\\\hline
\end{tabular}
\end{scriptsize}

{\tiny\it (\ALC\ has same expressivity as $\ALC\U\E$)}

\end{center}

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Cardinality Restriction}

Role quantification {\em cannot} express that a woman has {\em at least 3}
(or {\em at most 5}) children.

Cardinality restrictions can express conditions on the number of fillers:

\begin{itemize}
\item ${\tt Busy{-}Woman}\doteq{\tt Woman}\And(\atleast 3 {\tt CHILD})$
\item ${\tt Conscious{-}Woman}\doteq{\tt Woman}\And(\atmost 5 {\tt CHILD})$
\end{itemize}


\vspace{3em}

\begin{center}
\fbox{$(\atleast 1 R) \Longleftrightarrow (\some R)$}
\end{center}

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Cardinality Restriction}

\begin{itemize}
\item ${\tt Busy{-}Woman}\doteq{\tt Woman}\And(\atleast 3 {\tt CHILD})$
\item ${\tt Conscious{-}Woman}\doteq{\tt Woman}\And(\atmost 5 {\tt CHILD})$
\end{itemize}

$ {\tt Busy{-}Woman}({\it mary})$

\vspace{1em}

\fbox{\begin{minipage}[t]{.8\textwidth} \noindent $\mbox{\it busy-woman}:
\begin{minipage}[t]{.6\textwidth} $ {\tt Woman}, \\ {\tt CHILD}:\ 
  _{_{\geq 3}}\ {\tt Person} $
\end{minipage}
$
\end{minipage} 
}

\vspace{1em}

\fbox{\begin{minipage}[t]{.5\textwidth} \noindent $\mbox{\it mary}:
\begin{minipage}[t]{.6\textwidth} $ {\tt Woman}, \\ {\tt CHILD}: {\it john}, 
\\ {\tt CHILD}: {\it sue}, \\ {\tt CHILD}: {\it karl} $
\end{minipage}
$
\end{minipage} 
}

\vspace{1em}

$\models {\tt Conscious{-}Woman}({\it mary})$\ {\bf\Large ?}

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Roles as Functions}

\begin{itemize}

\item A role is {\em functional} is the filler functionally depends on the
  individual, i.e., the role can be considered as a function: $R(x,y)
  \Leftrightarrow f(x)=y$.

\item For example, the roles {\tt CHILD} and {\tt PARENT} are not
  functional, while the roles {\tt MOTHER} and {\tt AGE} are functional.

\item If a role is functional, we write:\\
  $\some f C\equiv \selects f c$ \tab {\it (selection operator)}

\end{itemize}

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Individuals}

In every interpretation different individuals are assumed to denote
different elements, i.e.\ for every pair of individuals $a,b$, and for every
interpretation $\I$, if $a \neq b$ then $\Int a \neq \Int b$. 

This is called the {\em Unique Name Assumption\/} and is usually assumed in
database applications.

\vspace{2em}

{\em Example:}

How many children does this family have?

{\tt Family(f), Father(f,john), Mother(f,sue),}\\{\tt Son(f,paul), Son(f,george),
  Son(f,alex)}

\vspace{1em}

${\tt \models (\atleast 3 {Son})(f)}$

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Enumeration Type (one-of)}

\begin{itemize}
  
\item ${\tt Weekday} \doteq \oneof{{\tt mon, tue, wed, thu, fri, sat, sun}}$
  
\item $\Int{\tt Weekday} = \{{\tt \Int {mon}, \Int {tue}, \Int {wed}, \Int
    {thu}, \Int {fri}, \Int {sat}, \Int {sun}}\}$
  
\item ${\tt Citizen} \doteq ({\tt Person} \And \all {\tt LIVES} {\tt
    Country})$

\item ${\tt French} \doteq ({\tt Citizen} \And \all {\tt LIVES} \oneof{\tt
    france})$

\end{itemize}

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Trace-based satisfiability algorithm for one-of}

Expressive languages may not have the trace-independence property:
enumerated types introduce interactions between traces, even if the
satisfiability problem is still in PSPACE.

{\it Example:}

${\tt \some{CHILD}{(Male\And \oneof{peter})}}\ \And$\\ 
${\tt \some{CHILD}{(\Not Male\And \oneof{peter})}}$

\vspace{1ex}

The two traces generated by the two existential quantifications on {\tt
  CHILD} are independently satisfiable, but are globally unsatisfiable,
since both existential variables should be co-referenced to the individual
{\tt peter}.


\vspace{1em}

\begin{center}
\setlength{\unitlength}{4em}
\begin{picture}(2,1)(0,0)
\pscurve[xunit=4em,yunit=4em]{->}(1,1)(0.5,0.5)(1,0)
\pscurve[xunit=4em,yunit=4em]{->}(1,1)(1.5,0.5)(1,0)
\put(1,1.1){$x$}
\put(0.8,-0.2){$\mbox{\tt peter}:$ \tt Male$, \Not$Male}
\put(1.5,0.6){\tt CHILD}
\put(-0.2,0.6){\tt CHILD}
\end{picture}
\end{center}
\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Adequacy}

{\sf
Student

\begin{tabular}{|ll|}
        \hline
        Person &   \\
        \hline
        name: & [String]  \\
        address: & [String]  \\
        enrolled: & [Course]  \\
        \hline
\end{tabular}
}

\vspace{1em}

      \begin{minipage}[t]{16em} ${\tt Student}\doteq
        \begin{minipage}[t]{10em} 
          ${\tt Person}\And \\ 
          \selects{\tt NAME}{\tt String} \And \\
          \all {\tt ADDRESS}{\tt String} \And \\
          \atleast 1 {\tt ADDRESS} \And \\
          \some{\tt ENROLLED}{\tt Course}$
        \end{minipage}
        $
      \end{minipage}\vspace{1em}

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Some constructors for role expressions}

\begin{center}

\noindent
\begin{small}
\begin{tabular}{|l|c|c|} \hline
Constructor   &   Syntax   & Semantics\\ \hline\hline
role name     & $P$        & $\Int P \subseteq \dom\times\dom$\\ \hline
conjunction     & $R\And S$  & $\Int R\cap \Int S$\\ \hline
disjunction             & $R\Or S$   & $\Int R \cup \Int S$\\ \hline
negation        & $\Not R$   &  $\dom\times\dom \setminus \Int R$\\ \hline
inverse & $\inv{R}$   &$\set{(x,y)\in\dom\times\dom \mid 
                              (y,x)\in\Int R}$\\  \hline
composition & $R\comp S$   & $\set{(x,y)\in\dom\times\dom \mid \exists z\per\
                              (x,z)\in\Int R\land (z,y)\in\Int S}$ \\ \hline
range & $\restrict R C$ & $\set{(x,y)\in\dom\times\dom \mid
                              (x,y)\in\Int R\land y \in\Int C}$   \\ \hline
product & $\product C D$ & $\set{(x,y)\in\Int C\times\Int D}$   \\ \hline
\end{tabular}
\end{small}

\end{center}

\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{slide}{Extending Description Logics}

\begin{itemize}

        \item  Defaults and  Beliefs
                
        \item  Probability- and similarity-based reasoning

        \item  Epistemic statements
        
        \item  Closed world assumption
        
        \item  Plural entities: records, sets, collections, aggregations

        \item Concrete domains
        
        \item  Ontological primitives
        
           \begin{itemize}
                \item  time and action
                
                \item  space
                
                \item  parts and wholes
                
           \end{itemize}

\end{itemize}


\end{slide}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\end{document}
