Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

t/ezasp submodule #2

Draft
wants to merge 43 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
d31f245
separating in files
javier-romero Nov 2, 2020
fd431cb
done motivation slide
javier-romero Nov 2, 2020
263d06f
first example done
javier-romero Nov 3, 2020
4369800
rearranged nodes of example1
javier-romero Nov 3, 2020
c5cb73b
adding example2 in a separate file
javier-romero Nov 3, 2020
d7d3b28
example2 added
javier-romero Nov 3, 2020
5017062
replaced p and q by a and b
javier-romero Nov 3, 2020
502ab17
replaced p, q... by a, b...
javier-romero Nov 3, 2020
652f871
added box with lp for example1
javier-romero Nov 3, 2020
20ce0af
progress on variables
javier-romero Nov 4, 2020
c52fe9a
added example1_long
javier-romero Nov 4, 2020
a9e43d2
done with examples 1 and 2
javier-romero Nov 5, 2020
c580904
done first example with vars
javier-romero Nov 5, 2020
6822ecc
examples working :)
javier-romero Nov 5, 2020
0d19704
done with examples with vars and recursive
javier-romero Nov 5, 2020
8f938be
added traveling example
javier-romero Nov 6, 2020
5c131a8
added negative recursion example
javier-romero Nov 6, 2020
d4d58ed
minor
javier-romero Nov 6, 2020
a0061a5
all examples working
javier-romero Nov 6, 2020
17e9f67
fixed traveling example, and added oddeven example
javier-romero Dec 1, 2020
05d0f3f
done for now, only introduction missing
javier-romero Dec 2, 2020
df29633
summary working well
javier-romero Dec 2, 2020
6a96949
finished slides for this part
javier-romero Dec 3, 2020
c3d2f5e
added last slide, and minors
javier-romero Dec 3, 2020
ab7de56
fine tuning
javier-romero Dec 9, 2020
b8444f0
change to tt font
javier-romero Dec 9, 2020
6a6f434
moved example2 to tt
javier-romero Dec 9, 2020
f475f6c
minor
javier-romero Dec 9, 2020
c4586c5
moved example3 to tt
javier-romero Dec 9, 2020
4c446b0
changed title
javier-romero Dec 9, 2020
cbd8ea4
adapted example4 to tt
javier-romero Dec 9, 2020
98afa27
adapted to tt
javier-romero Dec 10, 2020
87444c7
rename
tortinator Apr 13, 2023
29bd1d0
naf -> neg
tortinator Apr 13, 2023
d5e39c1
simplify
tortinator Apr 17, 2023
e97bc30
polish
tortinator Apr 17, 2023
7eb4e34
pimp
tortinator Apr 17, 2023
f619f46
alert
tortinator Apr 17, 2023
722fcf5
alert
tortinator Apr 17, 2023
943ec9a
add new summary
tortinator Apr 17, 2023
6f76a9d
ignore
tortinator Apr 17, 2023
a04bafc
oops
tortinator Apr 17, 2023
d2dac21
space
tortinator Apr 17, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -245,3 +245,5 @@ TSWLatexianTemp*

# generated if using elsarticle.cls
*.spl

trash
18 changes: 9 additions & 9 deletions application_figs.tex
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
% normal rules
%
\only<4>{
\node at (0,0) (x) {$\phantom{{A}_{\{s \leftarrow \naf{q}, \naf{r}\}}}\boldsymbol{X}=\{\{\}, \{r\}, \{p, q\}\}$};
\node[below=of x] (aofx) {$\A{\{s \leftarrow \naf{q}, \naf{r}\}}{\boldsymbol{X}}=\{\{s\},\{r\},\{p,q\}\}$};
\node at (0,0) (x) {$\phantom{{A}_{\{s \leftarrow \neg{q}, \neg{r}\}}}\boldsymbol{X}=\{\{\}, \{r\}, \{p, q\}\}$};
\node[below=of x] (aofx) {$\A{\{s \leftarrow \neg{q}, \neg{r}\}}{\boldsymbol{X}}=\{\{s\},\{r\},\{p,q\}\}$};

% line 3
\node[smodel, right=of x.east, xshift=-6mm] (node31) {};
Expand All @@ -27,15 +27,15 @@
\node[smodel, below=of node32] (node42) {$r$} edge [arrow] (node32);
\node[smodel, below=of node33] (node43) {$p$ $q$} edge [arrow] (node33);

\node[rule, right=of node43.east, xshift=-6mm] (rule_seq_4) {$s \leftarrow \naf{q}, \naf{r}$};
\node[rule, right=of node43.east, xshift=-6mm] (rule_seq_4) {$s \leftarrow \neg{q}, \neg{r}$};
}

%
% choices
%
\only<6>{
\node at (0,0) (x) {$\phantom{{A}_{\{\{r\} \leftarrow \naf{p}\}}}\boldsymbol{X}=\{\{\}, \{p, q\}\}\phantom{,\{r\}}$};
\node[below=of x] (aofx) {$\A{\{\{r\} \leftarrow \naf{p}\}}{\boldsymbol{X}}=\{\{\},\{r\},\{p,q\}\}$};
\node at (0,0) (x) {$\phantom{{A}_{\{\{r\} \leftarrow \neg{p}\}}}\boldsymbol{X}=\{\{\}, \{p, q\}\}\phantom{,\{r\}}$};
\node[below=of x] (aofx) {$\A{\{\{r\} \leftarrow \neg{p}\}}{\boldsymbol{X}}=\{\{\},\{r\},\{p,q\}\}$};

% line 3
\node[smodel, right=of x.east, xshift=0mm] (node31) {};
Expand All @@ -46,15 +46,15 @@
\node[smodel, below right=of node31, xshift=-4mm] (node42) {$r$} edge [arrow] (node31);
\node[smodel, below=of node32] (node43) {$p$ $q$} edge [arrow] (node32);

\node[rule, right=of node43.east, xshift=-6mm] (rule_seq_4) {$\{r\} \leftarrow \naf{p}$};
\node[rule, right=of node43.east, xshift=-6mm] (rule_seq_4) {$\{r\} \leftarrow \neg{p}$};
}

%
% constraints
%
\only<8>{
\node at (0,0) (x) {$\phantom{{A}_{\{\phantom{s}\leftarrow r, \naf{p}\}}}\boldsymbol{X}=\{\{s\}, \{r\}, \{p, q\}\}$};
\node[below=of x] (aofx) {$\A{\{\phantom{s}\leftarrow r, \naf{p}\}}{\boldsymbol{X}}=\{\{s\},\{p,q\}\}\phantom{,\{r\}}$};
\node at (0,0) (x) {$\phantom{{A}_{\{\phantom{s}\leftarrow r, \neg{p}\}}}\boldsymbol{X}=\{\{s\}, \{r\}, \{p, q\}\}$};
\node[below=of x] (aofx) {$\A{\{\phantom{s}\leftarrow r, \neg{p}\}}{\boldsymbol{X}}=\{\{s\},\{p,q\}\}\phantom{,\{r\}}$};

% line 3
\node[smodel, right=of x.east, xshift=-6mm] (node31) {$s$};
Expand All @@ -65,7 +65,7 @@
\node[smodel, below=of node31] (node41) {$s$} edge [arrow] (node31);
\node[smodel, below=of node33] (node42) {$p$ $q$} edge [arrow] (node33);

\node[rule, right=of node42.east, xshift=-6mm] (rule_seq_4) {$\phantom{s}\leftarrow r, \naf{p}$};
\node[rule, right=of node42.east, xshift=-6mm] (rule_seq_4) {$\phantom{s}\leftarrow r, \neg{p}$};
}

\end{tikzpicture}
Expand Down
154 changes: 154 additions & 0 deletions example1.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
% ----------------------------------------------------------------------
\begin{frame}<1-10,11-20>[label=ezaspexample1,fragile]{An example}
%
\alt<1-10>{
%
\texttt{
\alert<4-5,10>{\alert<8>{\{\alert<2-3>{{a}}\}}.}
\alert<4,6,10>{\alert<2-3,8>{b}{ \myleftarrow}\alert<2-3,9>{ a}.}
\alert<4,7,10>{\myleftarrow\alert<3,9>{ \myneg}\alert<2-3,9>{ b}.}
}
%
\hspace{3mm}
\alert{{%
\only<2>{{atoms}}%
\only<3>{{literals}}%
\only<4>{{rules}}%
\only<5>{{choice rule}}%
\only<6>{{normal rule}}%
\only<7>{{constraint rule}}%
\only<8>{{heads}}%
\only<9>{{bodies}}%
\only<10>{{program}}%
}} % \alert
} % \alt
{
\only<13->{\hspace{-1.1mm}}
\alert<11,12>{
%
\texttt{
b \myleftarrow { a}.%
\only<11>{\hspace{3.2mm}\{a\}.}\only<12->{ \myleftarrow { \myneg} {b}.}%
\only<11>{ \myleftarrow { \myneg} {b}.}\only<12->{\hspace{3.2mm}\{a\}.}
} % \texttt
%
\visible<11-12>{\hspace{3mm}program}
} % \alertbf
} % \alt
%
\bigskip
%
\begin{center}
%
%\resizebox{.50\textwidth}{!}{
%
\begin{tikzpicture}[
examples,
every node/.style={node distance=1cm and 1cm, on grid},
rule/.style={minimum width = 1cm},
]
% line 0
\uncover<14->{
\alert<14>{
\node[smodel] (node01) at ( 0, 0) {};
}}
% line 1
\uncover<15->{
\alert<15>{
\node[smodel, below left=of node01] (node11) {}
edge [arrow] (node01);
\node[smodel, below right=of node01] (node12) {a}
edge [arrow] (node01);
\node[rule, right=of node12, xshift=12mm] (rule1)
{\scode \ \ \hspace{-1mm}\{a\}.\phantom{b :- }};
}}
% line 2
\uncover<16->{
\alert<16>{
\node[smodel, below=of node11] (node21) {}
edge [arrow] (node11);
\node[smodel, below=of node12] (node22) {a b}
edge [arrow] (node12);
\node[rule, below=of rule1] (rule2)
{\scode \ \ b :- a.\phantom{nt}};
}}

\visible<18-19>{\node[right=of rule2, xshift=15mm] {\Large{\textbf{\alert{In order}}}};}
% line 3
\uncover<17->{
\alert<17>{
\node[smodel, below=of node22] (node32) {a b}
edge [arrow] (node22);
\node[rule, below=of rule2] (rule3)
{\scode \ \ :- not b.};
}}

\uncover<19->{
%\node[any, below=of node22, xshift=7mm, yshift=-3mm] (ok) {\MiddleBigOK};
\node[any, below=of node22, xshift=8mm, yshift=-3mm] (ok) {\OK};
}

\visible<20>{
\draw[on grid] ($ (rule1.north west) + (3mm,-0.1) $) rectangle ($ (rule3.south east) + (0,0.1) $);
\node[on grid] at ($ (rule1.north) + (1.5mm,4.5mm) $) {\texttt{example1.lp}};
}

%\draw [help lines] (0,0) grid (5,5);
\end{tikzpicture}
%}
\end{center}
%
\end{frame}
% ----------------------------------------------------------------------
\begin{frame}[fragile]{An example}

{
{\hspace{0.15mm}}
%
\texttt{
b \myleftarrow { a}.%
{ \myleftarrow { \myneg} {b}.}%
{\hspace{3.2mm}\{a\}.}
} % \texttt
%
%\visible<11-12>{\hspace{3mm}program}
%} % \alertbf
} % \alt
%
\bigskip
%
\begin{center}
%\resizebox{.50\textwidth}{!}{
\begin{tikzpicture}[
examples,
]
% line 0
\alert<1>{\node[smodel] (node01) at ( 1, 0) {};}

% line 1
\uncover<2->{\alert<2>{
\node[smodel, below=of node01] (newnode11){}
edge [arrow] (node01);
\node[rule, right=of newnode11, xshift=8mm] (rule1)
{\scode \ \ b :- a.\phantom{nt}};
}}

% line 2
\uncover<3->{\alert<3>{
\node[rule, below=of rule1] (rule2) {\scode \ \ :- not b.};
}}

% line 3
\uncover<4->{\alert<4>{
\node[rule, below=of rule2] (rule3) {\scode \ \ \hspace{-1mm}\{a\}.\phantom{b :- }};
}}

\visible<5->{\node[right=of rule2, xshift=-5mm] {\Large{\textbf{\alert{Not in order}}}};}
%\visible<6>{\node[any, below=of rule1, xshift=3mm] (ko) {\BigBigKO};}
\visible<6>{\node[any, below=of rule1, xshift=-7mm, yshift=0.5cm] (ko) {\BigBigKO};}
\end{tikzpicture}
%}
\end{center}
%
\end{frame}
% ----------------------------------------------------------------------
Loading