-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathclinguin.tex
55 lines (53 loc) · 2.33 KB
/
clinguin.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
% ----------------------------------------------------------------------
\begin{frame}{\clinguin}
\begin{itemize}
\item \structure{Idea} \ build user interfaces in ASP
\item \structure{Features}
\begin{itemize}
\item UIs defined in terms of facts
% \texttt{elem/2}, style: \texttt{attr/3} and actions: \texttt{when/4}
\item extensible set of backend operations for interaction
% \texttt{add\_assumption}, \texttt{next\_solution}, \texttt{set\_external}, etc.
\item brave reasoning for menus (via predicate \ \lstinline{_any(X)} )
% \item Available extensions for \clingraph, explanations, temporal reasoning.
\end{itemize}
\item \structure{Technology} \ \clingo, \clorm, \textit{angular}, \textit{bootstrap}
\item \structure{Applications} \
product configuration,
% job shop scheduling,
study regulations~\cite{hamaneotroscsc23a}
\end{itemize}
\end{frame}
% ----------------------------------------------------------------------
\begin{frame}[fragile]{Example}{Sudoku interactive}
\begin{adjustbox}{max totalsize={\textwidth}{.5\textheight},keepaspectratio}
\begin{lstlisting}[]
elem(window, window, root).
attr(window, child_layout, grid).
elem(d(X,Y), dropdown_menu, window) :- pos(X,Y).
attr(d(X,Y), width, 50) :- pos(X,Y).
attr(d(X,Y), height, 50) :- pos(X,Y).
attr(d(X,Y), grid_column, X) :- pos(X,Y).
attr(d(X,Y), grid_row, Y) :- pos(X,Y).
attr(d(X,Y), class, ("border-dark";"bg-primary")) :- pos(X,Y).
attr(d(X,Y), class, "bg-opacity-50") :- subgrid(X,Y,S), S\2!=0.
attr(d(X,Y), selected, V) :- _all(sudoku(X,Y, V)).
elem(dv(X,Y, V), dropdown_menu_item, d(X,Y)) :- _any(sudoku(X,Y, V)).
attr(dv(X,Y, V), label, V) :- _any(sudoku(X,Y, V)).
when(dv(X,Y, V), click, call, add_assumption(sudoku(X,Y, V))) :- _any(sudoku(X,Y, V)).
\end{lstlisting}
\end{adjustbox}
\end{frame}
% ----------------------------------------------------------------------
\begin{frame}[c]{Example}{Sudoku interactive}
\qquad%
\includegraphics<1>[height=0.7\textheight]{pictures/clinguin1.png}%
\includegraphics<2>[height=0.7\textheight]{pictures/clinguin2.png}%
\includegraphics<3>[height=0.7\textheight]{pictures/clinguin3.png}%
\end{frame}
% ----------------------------------------------------------------------
%
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "../../main"
%%% End: