\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}|}

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

\semtitle{Description Logics}
\semsubject{Structural Description Logics: \FLm}
\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}{\FLm}

\begin{itemize}
\item In the following part of this lecture, we will concentrate ourself to
  the simplest conceivable {\em structural} description logic: \FLm.
\item We will consider \FLm\ as a logical language:
  speak about:
  \begin{itemize}
  \item Syntax
  \item Semantics
  \item Reasoning problems
    \begin{itemize}
    \item Decidability
    \item Complexity
    \end{itemize}
  \item Reasoning procedures
    \begin{itemize}
    \item Soundness
    \item Completeness
    \item Asymptotic complexity
    \end{itemize}
  \end{itemize}
\end{itemize}

\end{slide}

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

\begin{slide}{The grammar}

{\samepage
\begin{eqnarray*}
  C,D & \rightarrow & A \mid C \And D \mid \all R C \mid \exists R
\end{eqnarray*}

\vspace{1em}

{\centering\small
$
\begin{array}{l}
  A \in \mbox{\sl atomic-concept}\\
  R \in \mbox{\sl atomic-role}\\
  C,D \in \mbox{\sl concept}
\end{array}
$}
}

\vspace{1em}

\begin{eqnarray*}
  \mbox{\sl concept} 
                 & ::= & \langle\mbox{\sl atomic-concept}\rangle \mid\\
                 &     & \langle\mbox{\sl concept}\rangle \And \langle\mbox{\sl concept}\rangle \mid\\
                 &     & \exists \langle\mbox{\sl atomic-role}\rangle \mid\\
                 &     & \all{\langle\mbox{\sl atomic-role}\rangle}{\langle\mbox{\sl concept}\rangle}
\end{eqnarray*}

\end{slide}

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

\begin{slide}{Alternative grammar}

$\hspace{-1em}\begin{array}{rcl}
  \mbox{\sl concept} 
                 & ::= & \langle\mbox{\sl atomic-concept}\rangle \mid\\
                 &     & ({\tt :and}\ \langle\mbox{\sl concept}\rangle\ldots \langle\mbox{\sl concept}\rangle) \mid\\
                 &     & ({\tt :some}\ \langle\mbox{\sl atomic-role}\rangle) \mid\\
                 &     & ({\tt :all}\ {\langle\mbox{\sl atomic-role}\rangle}\ {\langle\mbox{\sl concept}\rangle})

\end{array}$

\end{slide}

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

\begin{slide}{Intuitive semantics}

Intuitively (as we already know):

\begin{itemize}
\item {\em Concepts} represent classes, i.e., sets of individuals.
\item {\em Roles} represent relations between pairs of individuals.
\end{itemize}

\vspace{1em}

\begin{itemize}
\item Atomic concepts are the names of primitive (undefined) concepts.
\item {\tt :and} constructions represent conjoined concepts, so, for
  example, {\tt (:and Adult Male Person)} would represent the concept of
  something that is at the same time an adult, a male, and a person. 
\item This allows us to put several properties (i.e. {\em super-concepts} or
  attribute restrictions) together in the definition of a concept.
\end{itemize}

\end{slide}

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

\begin{slide}{Quantifiers}

\begin{itemize}
\item The {\tt :all} construct provides a concept restriction on the values
  of an attribute ($x$ is an {\tt (:all R C)} if and only if each {\tt R} of
  $x$ is a {\tt C}. Thus, {\tt (:all CHILD Doctor)} corresponds to the
  concept of something all of whose children are doctors. It is a way to
  {\em restrict} the value of a slot at a frame.
\item The {\tt :some} operator guarantees that there will be at least one
  value for the attribute named ($x$ is a {\tt (:some R)} if and only if $x$
  has at least one {\tt R}. For instance, {\tt (:and Person (:some CHILD))}
  would represent the concept of a parent. This is a way to introduce a
  slot at a frame.
\end{itemize}

\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$
  \end{itemize}
\end{itemize}

\end{slide}

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

\begin{slide}{Extension of concepts}

An interpretation function $\Int\cdot$ is an extension function iff:

\vspace{1em}

\noindent
\begin{eqnarray*}
\Int{(C\And D)}     & = & \Int C \cap \Int D\\
\Int{(\all{R}{C})}  & = & \{ x\in\Delta \mid 
                          \forall y\per\, \parbox[t]{20em}{$(x,y)\in\Int R 
                                          \Rightarrow \\ y\in\Int C\}$}\\
\Int{(\exists{R})} & = & \set{ x\in\Delta \mid 
                          \exists y\per\, (x,y)\in\Int R}\\
\end{eqnarray*}

\vspace{2em} Recall that $\Int C$ is a set of all the individual in
the extension of $C$: so, writing $x\in\Int C$ has the same truth
value as $C(x)$. Analogously, $(x,y)\in\Int R$ is the same as
$R(x,y)$.

\end{slide}

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

\begin{slide}{Exercises}

Choose a domain $\dom$ and an extension functions over $\dom$; compute the
extensions of the following concepts:

{\small
\begin{itemize}
\item {\tt (:and Adult Male)}
\item {\tt (:and Adult Male Rich)}
\item {\tt (:all CHILD (:and Adult Male))}
\item {\tt (:some CHILD)}
\item ${\tt \exists{CHILD}\And \all{CHILD}{(\exists{CHILD}\And Adult)}}$
\end{itemize}
}

\end{slide}

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

\begin{slide}{The subsumption problem}

{\tt C} $\IsSubs$ {\tt D} \\
{\tt C} {\em is subsumed by} {\tt D}

\vspace{2em}

iff

\vspace{2em}

for any domain $\dom$\\
and any extension function $\Int\cdot$ over $\dom$:

\vspace{1em}

$\Int{\tt C}\subseteq \Int{\tt D}$

\vspace{1em}

i.e.,

$\forall x\per\ C(x) \rightarrow D(x)$

\vspace{1em}

\end{slide}

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

\begin{slide}{Simple examples}

{\small
\begin{itemize}
\item {\tt (:and Adult Male)} $\IsSubs$ {\tt Adult}
\item {\tt (:and Adult Male Rich)} $\IsSubs$ \\ {\tt (:and Adult Male)}
\item {\tt (:all CHILD (:and Adult Male))} $\IsSubs$ \\ {\tt (:all CHILD Adult)}
\item {\tt (:and (:all CHILD Adult)(:some CHILD))} $\IsSubs$ \\ {\tt (:all CHILD Adult)}
\item {\tt (:all CHILD Adult)} $\not\IsSubs$ {\tt (:some CHILD)}
\item {\tt (:some CHILD)} $\not\IsSubs$ {\tt (:all CHILD Adult)} 
\end{itemize}
}

\end{slide}

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

\begin{slide}{The universal quantifier}

$\Int{(\all{R}{C})}=$

\vspace{2em}

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


\end{slide}

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

\begin{slide}{Computational properties}

{\em Subsumption} for \FLm\ has the following computational properties,
which will be proved constructively:

\begin{itemize}
\item Decidable
\item in P
\end{itemize}

\end{slide}

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

\begin{slide}{The subsumption {\em structural} algorithm}

\begin{itemize}
\item The algorithm for computing Subsumption is based on structural
  comparisons between concept expressions.
  
\item At the heart of structural comparison is the idea that if the two
  concept expressions to be compared are made of subexpressions, one can
  compare separately one subexpression of a concept with all those of the
  others.

\end{itemize}

\end{slide}

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

\begin{slide}{The normal form}

The algorithm works in two phases: first, concepts are rewritten in a normal
form, then their structures are compared.

\vspace{2em}

{\bf Normal Form}:

\vspace{1em}

\begin{enumerate}
\item All nested conjunctions are flattened, i.e. $A \And (B \And C)
  \leadsto A \And B \And C$.
\item All conjunctions of universal quantifications are factorized, i.e.
  ${\all R C}\And {\all R D}\leadsto \all R{(C \And D)}$.
\end{enumerate}

The rewritten concepts are logically equivalent to the previous ones, hence
subsumption is preserved by this transformation.

\vspace{1em}

{\em (Exercise: prove it)}

\end{slide}

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

\begin{slide}{The core algorithm: SUBS?[C,D]}
  
  Let $C = C_1 \And \cdots \And C_n$ and $D = D_1 \And \cdots \And D_m$ \\
  (in normal form).

  Then SUBS?[C,D] returns {\sc true} if and only if for all $C_i$:

   \begin{enumerate}
   \item if $C_i$ is either an atomic concept, or is a concept of the form
     $\exists{R}$, then there exists a $D_j$ such that $C_i = D_j$;
   \item if $C_i$ is a concept of the form $\all R {C'}$, then there exists
     a $D_j$ of the form $\all R {D'}$ (same atomic role $R$) such that
     SUBS?[$C'$,$D'$].
   \end{enumerate}

\end{slide}

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

\begin{slide}{Simple exercises}
  
  Check the following subsumption using the structural algorithm:

{\small
\begin{itemize}
\item {\tt (:and Adult Male)} $\IsSubs$ {\tt Adult}
\item {\tt (:and Adult Male Rich)} $\IsSubs$ \\ {\tt (:and Adult Male)}
\item {\tt (:all CHILD (:and Adult Male))} $\IsSubs$ \\ {\tt (:all CHILD Adult)}
\item {\tt (:and (:all CHILD Adult)(:some CHILD))} $\IsSubs$ \\ {\tt (:all CHILD Adult)}
\item {\tt (:all CHILD Adult)} $\not\IsSubs$ {\tt (:some CHILD)}
\item {\tt (:some CHILD)} $\not\IsSubs$ {\tt (:all CHILD Adult)} 
\end{itemize}
}

\end{slide}

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

\begin{slide}{Asymptotic complexity}
  
\begin{itemize}
  
\item By induction on the nesting of $\forall$-quantifiers, one can prove
  that the complexity of the above algorithm is $O(\card C\times\card D)$
  (i.e., quadratic in the length of the longest argument).
  
\item If subexpressions of each concept are ordered (e.g.\ 
  lexicographically), then it can be shown that the complexity is only
  linear, so the dominant factor becomes the complexity of ordering
  concepts.

\end{itemize}

\end{slide}

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

\begin{slide}{Soundness}

Remember: whenever a {\bf sound} reasoning procedure claims to have found a
solution for a given instance of the problem, then this is actually a
solution.

The structural subsumption algorithm is sound since, when it says that
a concept {\tt C} subsumes a concept {\tt D} -- i.e., SUBS?[$C,D$]
returns true -- then it holds that $\Int{\tt D}\subseteq \Int{\tt C}$
for all interpretations.

\vspace{2em}

{\em Observation:} the part of the algorithm computing the normal form does
not change the extension of the concepts for any interpretation; thus it
does not affect the soundness (and the completeness) of the algorithm.

\end{slide}

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

\begin{slide}{Informal proof}

\begin{itemize}
  
\item Suppose that SUBS?[$C,D$] returns {\sc true} and consider one of the
  conjuncts of $C$ -- call it $C_i$.
  
\item Either $C_i$ is among the $D_j$, or it is of the form $\all R {C'}$.
  
\item In the latter case, there is a $\all R {D'}$ among the $D_j$, where
  SUBS?[$C'$,$D'$].
  
\item Then, by induction, any extension of $D'$ must be a subset of $C'$, 
  and so any extension of $D_j$ must be a subset of $C_i$'s.
  
\item So, no matter what $C_i$ is, the extension of $D$ -- which is the
  conjunction of all the $D_j$'s -- must be a subset of $C_i$.
  
\item Since this is true for every $C_i$, the extension of $D$ must
  also be a subset of the extension of $C$ -- which is the
  intersection of all the extensions of $C_i$.
  
\item So, whenever SUBS?[$C,D$] returns {\sc true}, $C$ subsumes $D$,
  i.e., $\Int{\tt D}\subseteq \Int{\tt C}$.

\end{itemize}

\end{slide}

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

\begin{slide}{Completeness}

Remember: whenever an instance of the problem has a solution, a {\bf
  complete} reasoning procedure computes the solution for that instance.

The structural subsumption algorithm is complete since, whenever it
holds that $\Int{\tt C}\subseteq \Int{\tt D}$ for all interpretations,
then the algorithm says that {\tt C} subsumes {\tt D}.

\vspace{2em}

{\em Observation:} The proof is done by showing that anytime
SUBS?[$C,D$] returns {\sc false}, there exists an interpretation
assigning an element to $D$ but not to $C$, i.e., in that
interpretation the extension on $C$ is not a superset of the extension
of $D$.

\end{slide}

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

\begin{slide}{Idea of the proof}

\begin{itemize}
\item The proof is done by showing that anytime SUBS?[$C,D$] returns {\sc
    false}, there exists an interpretation assigning an element to $D$ but
  not to $C$, i.e., in that interpretation the extension on $C$ is not a
  superset of the extension of $D$.
\item This shows a counter-example, i.e., anytime SUBS?[$C,D$] returns {\sc
    false} it is not true that $\Int{\tt D}\subseteq \Int{\tt C}$ for that
  particular interpretation, and so $C\not\IsSubs D$.
\end{itemize}

\end{slide}

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

\begin{slide}{Idea of the proof {\em (cont.)}}

\begin{itemize}
\item The proof relies on the fact that anytime SUBS?[$C,D$] returns {\sc
    false} it is possible to find a conjunct $C_i$ of $C$ which has no
  correspondent conjunct in $D$.
\item It is shown that in this case there exists an interpretation which
  assigns an object to any primitive concept, but not to the factorized one
  $C_i$.
\item Thus, it is not possible that $\Int{\tt D}\subseteq \Int{\tt C}$.
\end{itemize}

\end{slide}

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

\begin{slide}{Structural algorithms (or normalize-and-compare)}

What happens if we enrich the expressivity?

\begin{itemize}
\item {\sc classic}
\item {\sc back}
\item {\sc loom}
\end{itemize}

These (old) systems have incomplete algorithms, due to the
interactions between constructors, which can not be taken into account
by structural algorithms, which is based on syntactical comparisons
between subexpressions of the concepts.

{\it Example:} $A \Or \Not A$ subsumes every concept, even if such a
concept does not mention at all the atomic concept $A$ in its
definition.

\end{slide}

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

\end{document}
