Generate assets in separate build processes
This commit is contained in:
parent
fef9cdf90a
commit
b6a20cac9c
13
Makefile
13
Makefile
@ -16,10 +16,18 @@ latex.out/.sync:
|
||||
mkdir -p latex.out
|
||||
touch latex.out/.sync
|
||||
|
||||
%.pdf: %.tex latex.out/.sync FORCE
|
||||
$(info compiling $@)
|
||||
%.pdf: %.tex latex.out/.sync assets FORCE
|
||||
$(info compiling $*)
|
||||
@pipenv run ./vendor/latexrun --latex-cmd=$(LATEX) --latex-args="-shell-escape --8bit" --bibtex-cmd=$(BIBTEX) --makeglossaries-cmd=$(MAKEGLOS) $<
|
||||
|
||||
assets: assets/img/back_chess1.pdf assets/img/back_chess2.pdf assets/img/back_chess3.pdf assets/img/back_chess4.pdf assets/img/rew_interpreter_plot.pdf
|
||||
|
||||
assets/img/%.pdf: assets/img/src/%.tex
|
||||
xelatex -output-directory=assets/img $<
|
||||
rm -f assets/img/$*.{aux,log}
|
||||
|
||||
|
||||
|
||||
update:
|
||||
pipenv lock
|
||||
rm -f latex.out/.sync
|
||||
@ -30,3 +38,4 @@ clean:
|
||||
|
||||
clobber:
|
||||
rm -rf latex.out/*
|
||||
rm -f assets/img/{back_chess{1,2,3,4},rew_interpreter_plot}.*
|
||||
|
BIN
assets/img/back_chess1.pdf
Normal file
BIN
assets/img/back_chess1.pdf
Normal file
Binary file not shown.
BIN
assets/img/back_chess2.pdf
Normal file
BIN
assets/img/back_chess2.pdf
Normal file
Binary file not shown.
BIN
assets/img/back_chess3.pdf
Normal file
BIN
assets/img/back_chess3.pdf
Normal file
Binary file not shown.
BIN
assets/img/back_chess4.pdf
Normal file
BIN
assets/img/back_chess4.pdf
Normal file
Binary file not shown.
BIN
assets/img/rew_interpreter_plot.pdf
Normal file
BIN
assets/img/rew_interpreter_plot.pdf
Normal file
Binary file not shown.
16
assets/img/src/back_chess1.tex
Normal file
16
assets/img/src/back_chess1.tex
Normal file
@ -0,0 +1,16 @@
|
||||
\documentclass{standalone}
|
||||
|
||||
% Drawing chessboards (background)
|
||||
\usepackage{chessboard}
|
||||
\setchessboard{showmover=false}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\chessboard[
|
||||
setwhite={Qd3},
|
||||
pgfstyle=cross,
|
||||
color=red,
|
||||
markarea={d1-d2,d4-d8},
|
||||
]
|
||||
|
||||
\end{document}
|
19
assets/img/src/back_chess2.tex
Normal file
19
assets/img/src/back_chess2.tex
Normal file
@ -0,0 +1,19 @@
|
||||
\documentclass{standalone}
|
||||
|
||||
% Drawing chessboards (background)
|
||||
\usepackage{chessboard}
|
||||
\setchessboard{showmover=false}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\chessboard[
|
||||
setwhite={Qd3},
|
||||
pgfstyle=cross,
|
||||
color=red!35!white,
|
||||
markareas={d1-d2,d4-d8},
|
||||
pgfstyle=cross,
|
||||
color=red,
|
||||
markareas={a3-c3,e3-h3},
|
||||
]
|
||||
|
||||
\end{document}
|
19
assets/img/src/back_chess3.tex
Normal file
19
assets/img/src/back_chess3.tex
Normal file
@ -0,0 +1,19 @@
|
||||
\documentclass{standalone}
|
||||
|
||||
% Drawing chessboards (background)
|
||||
\usepackage{chessboard}
|
||||
\setchessboard{showmover=false}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\chessboard[
|
||||
setwhite={Qd3},
|
||||
pgfstyle=cross,
|
||||
color=red!35!white,
|
||||
markareas={d1-d2,d4-d8,a3-c3,e3-h3},
|
||||
pgfstyle=cross,
|
||||
color=red,
|
||||
markareas={b1-b1,c2-c2,e4-e4,f5-f5,g6-g6,h7-h7},
|
||||
]
|
||||
|
||||
\end{document}
|
19
assets/img/src/back_chess4.tex
Normal file
19
assets/img/src/back_chess4.tex
Normal file
@ -0,0 +1,19 @@
|
||||
\documentclass{standalone}
|
||||
|
||||
% Drawing chessboards (background)
|
||||
\usepackage{chessboard}
|
||||
\setchessboard{showmover=false}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\chessboard[
|
||||
setwhite={Qd3},
|
||||
pgfstyle=cross,
|
||||
color=red!35!white,
|
||||
markareas={d1-d2,d4-d8,a3-c3,e3-h3,b1-b1,c2-c2,e4-e4,f5-f5,g6-g6,h7-h7},
|
||||
pgfstyle=cross,
|
||||
color=red,
|
||||
markareas={a6-a6,b5-b5,c4-c4,e2-e2,f1-f1},
|
||||
]
|
||||
|
||||
\end{document}
|
44
assets/img/src/rew_interpreter_plot.tex
Normal file
44
assets/img/src/rew_interpreter_plot.tex
Normal file
@ -0,0 +1,44 @@
|
||||
\documentclass{standalone}
|
||||
\usepackage{pgfplots}
|
||||
\usepackage{pgfplotstable}
|
||||
\pgfplotsset{compat=1.17}
|
||||
\usetikzlibrary{patterns}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\definecolor{cb1}{RGB}{230, 159, 0}
|
||||
\definecolor{cb2}{RGB}{ 86, 180, 223}
|
||||
\definecolor{cb3}{RGB}{ 0, 158, 115}
|
||||
\definecolor{cb4}{RGB}{240, 228, 66}
|
||||
|
||||
\pgfplotstableread[
|
||||
col sep=comma,
|
||||
]{assets/table/rew_functional.csv}\rewFuncData{}
|
||||
\begin{tikzpicture}
|
||||
\begin{axis}[
|
||||
xbar,
|
||||
reverse legend,
|
||||
legend style={at={(0.82,0.8)},
|
||||
anchor=west,legend columns=1},
|
||||
xlabel={Run-time (ms)},
|
||||
symbolic y coords={{A(3,6)},{Fib(23)},{Tak(18,12,6)}},
|
||||
ytick=data,
|
||||
% cycle list name=exotic,
|
||||
nodes near coords,
|
||||
nodes near coords align={horizontal},
|
||||
width = \columnwidth,
|
||||
height = 8cm,
|
||||
enlarge y limits={0.3},
|
||||
enlarge x limits={0.03},
|
||||
xmin = 0,
|
||||
xmax = 130,
|
||||
]
|
||||
\addplot[fill=cb1, postaction={pattern=grid}] table [y={test}, x={MiniZinc}]{\rewFuncData};
|
||||
\addplot[fill=cb2, postaction={pattern=north east lines}] table [y={test}, x={Python}]{\rewFuncData};
|
||||
\addplot[fill=cb3, postaction={pattern=dots}] table [y={test}, x={Prototype}]{\rewFuncData};
|
||||
\addplot[fill=cb4] table [y={test}, x={OCaml}]{\rewFuncData};
|
||||
\legend{MiniZinc,Python,Prototype,OCaml}
|
||||
\end{axis}
|
||||
\end{tikzpicture}
|
||||
|
||||
\end{document}
|
@ -60,11 +60,6 @@
|
||||
|
||||
% Tables
|
||||
\usepackage{booktabs}
|
||||
% Plots
|
||||
\usepackage{pgfplots}
|
||||
\usepackage{pgfplotstable}
|
||||
\pgfplotsset{compat=1.17}
|
||||
\usetikzlibrary{patterns}
|
||||
|
||||
% Glossary / Acronyms
|
||||
\usepackage[acronym,toc]{glossaries}
|
||||
@ -79,11 +74,6 @@
|
||||
\usepackage{graphicx}
|
||||
\usepackage{subcaption}
|
||||
|
||||
% Drawing chessboards (background)
|
||||
\usepackage{chessboard}
|
||||
\setchessboard{showmover=false}
|
||||
|
||||
|
||||
% % TODO: What am I doing with this?
|
||||
\newcommand*\justify{%
|
||||
\fontdimen2\font=0.4em% interword space
|
||||
|
@ -538,53 +538,24 @@ They allow modellers to use high-level constraints that are used directly by the
|
||||
\centering
|
||||
\begin{subfigure}[b]{.48\columnwidth}
|
||||
\centering
|
||||
\chessboard[
|
||||
setwhite={Qd3},
|
||||
pgfstyle=cross,
|
||||
color=red,
|
||||
markarea={d1-d2,d4-d8},
|
||||
]
|
||||
\includegraphics{assets/img/back_chess1}
|
||||
\caption{\label{sfig:back-nqueens-1} Assign a queen to d3}
|
||||
\end{subfigure}%
|
||||
\hspace{0.04\columnwidth}%
|
||||
\begin{subfigure}[b]{.48\columnwidth}
|
||||
\centering
|
||||
\chessboard[
|
||||
setwhite={Qd3},
|
||||
pgfstyle=cross,
|
||||
color=red!35!white,
|
||||
markareas={d1-d2,d4-d8},
|
||||
pgfstyle=cross,
|
||||
color=red,
|
||||
markareas={a3-c3,e3-h3},
|
||||
]
|
||||
\includegraphics{assets/img/back_chess2}
|
||||
\caption{\label{sfig:back-nqueens-2} Propagate rows}
|
||||
\end{subfigure}
|
||||
\begin{subfigure}[b]{.48\columnwidth}
|
||||
\centering
|
||||
\chessboard[
|
||||
setwhite={Qd3},
|
||||
pgfstyle=cross,
|
||||
color=red!35!white,
|
||||
markareas={d1-d2,d4-d8,a3-c3,e3-h3},
|
||||
pgfstyle=cross,
|
||||
color=red,
|
||||
markareas={b1-b1,c2-c2,e4-e4,f5-f5,g6-g6,h7-h7},
|
||||
]
|
||||
\includegraphics{assets/img/back_chess3}
|
||||
\caption{\label{sfig:back-nqueens-3} Propagate upwards diagonal}
|
||||
\end{subfigure}%
|
||||
\hspace{0.04\columnwidth}%
|
||||
\begin{subfigure}[b]{.48\columnwidth}
|
||||
\centering
|
||||
\chessboard[
|
||||
setwhite={Qd3},
|
||||
pgfstyle=cross,
|
||||
color=red!35!white,
|
||||
markareas={d1-d2,d4-d8,a3-c3,e3-h3,b1-b1,c2-c2,e4-e4,f5-f5,g6-g6,h7-h7},
|
||||
pgfstyle=cross,
|
||||
color=red,
|
||||
markareas={a6-a6,b5-b5,c4-c4,e2-e2,f1-f1},
|
||||
]
|
||||
\includegraphics{assets/img/back_chess4}
|
||||
\caption{\label{sfig:back-nqueens-4} Propagate downward diagonal}
|
||||
\end{subfigure}
|
||||
\caption{\label{fig:back-nqueens} An example of domain propagation when a queen gets assigned in the N-Queens problem.}
|
||||
|
@ -739,7 +739,7 @@ These are very encouraging results, given that we are comparing a largely unopti
|
||||
\includegraphics[width=\columnwidth]{assets/img/rew_compare_memory}
|
||||
\caption{\label{sfig:rew-comparemem}Maximum resident set size (kbytes)}
|
||||
\end{subfigure}
|
||||
\caption{\label{fig:rew-runtime}Performance on flattening MiniZinc Challenge
|
||||
\caption{\label{fig:4-runtime}Performance on flattening MiniZinc Challenge
|
||||
instances. \minizinc\ 2.5.5 (x-axis) vs new architecture (y-axis), log-log
|
||||
plot. Dots below the line indicate the new system is better.}
|
||||
\end{figure}
|
||||
@ -747,40 +747,7 @@ These are very encouraging results, given that we are comparing a largely unopti
|
||||
\begin{figure}[ht]
|
||||
\centering
|
||||
|
||||
\definecolor{cb1}{RGB}{230, 159, 0}
|
||||
\definecolor{cb2}{RGB}{ 86, 180, 223}
|
||||
\definecolor{cb3}{RGB}{ 0, 158, 115}
|
||||
\definecolor{cb4}{RGB}{240, 228, 66}
|
||||
|
||||
\pgfplotstableread[
|
||||
col sep=comma,
|
||||
]{assets/table/rew_functional.csv}\rewFuncData{}
|
||||
\begin{tikzpicture}
|
||||
\begin{axis}[
|
||||
xbar,
|
||||
reverse legend,
|
||||
legend style={at={(0.82,0.8)},
|
||||
anchor=west,legend columns=1},
|
||||
xlabel={Run-time (ms)},
|
||||
symbolic y coords={{A(3,6)},{Fib(23)},{Tak(18,12,6)}},
|
||||
ytick=data,
|
||||
% cycle list name=exotic,
|
||||
nodes near coords,
|
||||
nodes near coords align={horizontal},
|
||||
width = \columnwidth,
|
||||
height = 8cm,
|
||||
enlarge y limits={0.3},
|
||||
enlarge x limits={0.03},
|
||||
xmin = 0,
|
||||
xmax = 130,
|
||||
]
|
||||
\addplot[fill=cb1, postaction={pattern=grid}] table [y={test}, x={MiniZinc}]{\rewFuncData};
|
||||
\addplot[fill=cb2, postaction={pattern=north east lines}] table [y={test}, x={Python}]{\rewFuncData};
|
||||
\addplot[fill=cb3, postaction={pattern=dots}] table [y={test}, x={Prototype}]{\rewFuncData};
|
||||
\addplot[fill=cb4] table [y={test}, x={OCaml}]{\rewFuncData};
|
||||
\legend{MiniZinc,Python,Prototype,OCaml}
|
||||
\end{axis}
|
||||
\end{tikzpicture}
|
||||
\includegraphics[width=\columnwidth]{assets/img/rew_interpreter_plot}
|
||||
|
||||
\caption{\label{fig:rew-interpreter-comp} Run-time comparison of interpreters
|
||||
on recursive functions: Takeuchi, Fibonacci, and Ackermann.}
|
||||
|
Reference in New Issue
Block a user