-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathclingraph.tex
42 lines (41 loc) · 1.77 KB
/
clingraph.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
% ----------------------------------------------------------------------
\begin{frame}{\clingraph}
\begin{itemize}
\item \structure{Idea} \ build graph visualizations in ASP
\item \structure{Features}
\begin{itemize}
\item graphs defined in terms of logic programs % \texttt{graph/2}, \texttt{node/2}, \texttt{edge/2}, \texttt{attr/4}
\item uses \graphviz\ as a backend
\item produces png, pdf, gif, (interactive) svg images and \LaTeX\ code
\end{itemize}
\item \structure{Technology} \ \clingo, \clorm, \graphviz
\item \structure{References} \ \cite{hasascst22a}
\item \structure{Applications} \ debugging, explanation, visualization % Product Configuration, Warehouse logistics, etc
\end{itemize}
\end{frame}
% ----------------------------------------------------------------------
\begin{frame}[fragile]{Example}{Queens puzzle}
\begin{adjustbox}{max totalsize={\textwidth}{.7\textheight},keepaspectratio}
\begin{lstlisting}[mathescape]
node((X,Y)) :- cell(X,Y).
attr(node,(X,Y),width,1) :- cell(X,Y).
attr(node,(X,Y),pos,@pos(X,Y)) :- cell(X,Y).
attr(node,(X,Y),shape,square) :- cell(X,Y).
attr(node,(X,Y),style,filled) :- cell(X,Y).
attr(node,(X,Y),fillcolor,gray) :- cell(X,Y),(X+Y)\2=0.
attr(node,(X,Y),fillcolor,white) :- cell(X,Y),(X+Y)\2!=0.
attr(node,(X,Y),fontsize,"50") :- queen(X,Y).
attr(node,(X,Y),label,"$\symqueen$") :- queen(X,Y).
\end{lstlisting}
\end{adjustbox}
\end{frame}
% ----------------------------------------------------------------------
\begin{frame}[c]{Example}{Queens puzzle}
\qquad\includegraphics[height=0.7\textheight]{pictures/queens.png}
\end{frame}
% ----------------------------------------------------------------------
%
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "../../main"
%%% End: