-
Notifications
You must be signed in to change notification settings - Fork 1
/
casp.tex
133 lines (132 loc) · 4.1 KB
/
casp.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
% ----------------------------------------------------------------------
\newcommand{\scope}[1]{\ensuremath{\mathit{S}(#1)}}
\newcommand{\range}[1]{\ensuremath{\mathit{R}(#1)}}
\newcommand{\project}[2]{\ensuremath{{#1}|_{#2}}}
\newcommand{\abody}[1]{\project{\mathit{body}(#1)}{\mathcal{A}}} % {\ensuremath{\mathit{abody}(#1)}}
\newcommand{\cbody}[1]{\project{\mathit{body}(#1)}{\mathcal{C}}} % {\ensuremath{\mathit{cbody}(#1)}}
\newcommand{\catom}[1]{\project{\atom{#1}}{\mathcal{C}}} % {\ensuremath{\mathit{catom}(#1)}}
\newcommand{\aatom}[1]{\project{\atom{#1}}{\mathcal{A}}}
% ----------------------------------------------------------------------
\begin{frame}{Constraint satisfaction problem}
\bigskip
\begin{itemize}
\item<1-> \structure{Notation}
We use $\scope{c}=S$ and $\range{c}=R$ to access the scope and the relation
of a constraint $c=(S,R)$
\medskip
\item<2-> For an assignment
\(
A: V\to \bigcup_{v\in V}\domain{v}
\)
and a constraint $(S,R)$
with scope
\(
S=(v_1,\dots,v_k)
\),
define
\[
\mathit{sat}_C(A)
=
\{
c\in C \mid A(\scope{c}) \in \range{c}
\}
\]
where
\(
A(S)
=
(A(v_1),\dots,A(v_k))
\)
\end{itemize}
\end{frame}
% ----------------------------------------------------------------------
\begin{frame}{Constraint Answer Set Programming}
\bigskip
\begin{itemize}
\item<1-> A \alert{constraint logic program}~$P$ is a logic program over an extended
alphabet $\mathcal{A}\cup\mathcal{C}$
where
\begin{itemize}
\item $\mathcal{A}$ is a set of \alert{regular atoms} and
\item $\mathcal{C}$ is a set of \alert{constraint atoms},
\end{itemize}
such that $\head{r}\in\mathcal{A}$ for each $r\in P$
\medskip
\item<2-> Given a set of literals~$B$ and some set~$\mathcal{B}$ of atoms,
we define
\\\(\quad
\project{B}{\mathcal{B}}
=
(\poslits{B}\cap\mathcal{B})
\cup
\{\neg a\mid a\in\neglits{B}\cap\mathcal{B}\}
\)
\end{itemize}
\end{frame}
% ----------------------------------------------------------------------
\begin{frame}{Constraint Answer Set Programming}
\bigskip
\begin{itemize}
\item<1-> We identify constraint atoms with constraints via a function
\[
\gamma: \mathcal{C}\to C
\]
\item<1-> Furthermore,
\(
\gamma(Y)=\{\gamma(c)\mid c\in Y\}
\)
for any $Y\subseteq\mathcal{C}$
\medskip
\item<2-> \structure{Note}
Unlike regular atoms $\mathcal{A}$, constraint atoms~$\mathcal{C}$
are not subject to the unique names assumption, eg.\
\begin{itemize}
\item[] $\gamma(x<y) \ = \ \gamma(((-y-1)\leq -(x+1))\wedge (x\neq y))$
\end{itemize}
\medskip
\item<3-> A constraint logic program $P$ is associated with a CSP\\
as follows
\begin{itemize}
\item
\(
C[P]=\gamma(\atom{P}\cap\mathcal{C}) % (\catom{P})
\),
\item $V[P]$ is obtained from the constraint scopes in $C[P]$,
\item $D[P]$ is provided by a declaration
\end{itemize}
\end{itemize}
\end{frame}
% ----------------------------------------------------------------------
\begin{frame}{Constraint Answer Set Programming}
\begin{itemize}
\item<1-> Let~$P$ be a constraint logic program over $\mathcal{A}\cup\mathcal{C}$ and \\
let $A: V[P]\to D[P]$ be an assignment,
\item<1-> [] define the \alert{constraint reduct} of as $P$ wrt $A$ as follows
\[
\begin{array}{rcl}
P^A
&=&
\{\
\head{r}\leftarrow\abody{r}
\mid r\in P,\\
&&\qquad\qquad
\gamma(\poslits{\cbody{r}})
\subseteq\mathit{sat}_{C[P]}(A)
,\\
&&\qquad\qquad
\gamma(\neglits{\cbody{r}})
\,\cap\,
\mathit{sat}_{C[P]}(A)
=
\emptyset
\ \}
\end{array}
\]
\item<2-> A set $\alert<3>{X}\subseteq\mathcal{A}$ of (regular) atoms
is a \alert{constraint answer set} of~$P$ \alert<3>{wrt~$A$}, if
$X$ is an stable model of~$P^A$.\pause%\pause
\item<3-> \structure{Note}
That is, if $X$ is the $\subseteq$-smallest model of $(P^A)^X$
\end{itemize}
\end{frame}
% ----------------------------------------------------------------------