Skip to content

Commit

Permalink
[presentation] Optimise for static slides
Browse files Browse the repository at this point in the history
  • Loading branch information
georgejkaye committed Feb 7, 2023
1 parent ed6789b commit 646e9ad
Show file tree
Hide file tree
Showing 9 changed files with 152 additions and 129 deletions.
44 changes: 35 additions & 9 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,22 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: "3.x"
- name: Package the slides
- name: Package the presentation slides
uses: xu-cheng/texlive-action/full@v1
with:
run: python3 ./scripts/src/package.py ${{ github.event.repository.name }} . main
- name: Zip up the slides
run: python3 ./scripts/src/package.py ${{ github.event.repository.name }}-presentation . main-presentation
- name: Package the static slides
uses: xu-cheng/texlive-action/full@v1
with:
run: python3 ./scripts/src/package.py ${{ github.event.repository.name }}-static . main-static
- name: Zip up the presentation slides
uses: montudor/action-zip@v1
with:
args: zip -qq -r ${{ github.event.repository.name }}-presentation.zip ${{ github.event.repository.name }}-presentation
- name: Zip up the static slides
uses: montudor/action-zip@v1
with:
args: zip -qq -r ${{ github.event.repository.name }}.zip ${{ github.event.repository.name }}
args: zip -qq -r ${{ github.event.repository.name }}-static.zip ${{ github.event.repository.name }}-static
- name: Set release name
id: name
run: echo "name=$(date +'%Y-%m-%d-%H%M')" >> $GITHUB_OUTPUT
Expand All @@ -42,21 +50,39 @@ jobs:
with:
release_name: ${{ steps.name.outputs.name }}
tag_name: ${{ steps.name.outputs.name }}
- name: Upload the slides to the release
- name: Upload the presentation slides to the release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: main.pdf
asset_name: ${{ github.event.repository.name}}-${{ steps.name.outputs.name }}-presentation.pdf
asset_content_type: pdf
- name: Upload the static slides to the release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: main.pdf
asset_name: ${{ github.event.repository.name}}-${{ steps.name.outputs.name }}.pdf
asset_name: ${{ github.event.repository.name}}-${{ steps.name.outputs.name }}-static.pdf
asset_content_type: pdf
- name: Upload the slides zip to the release
- name: Upload the presentation slides zip to the release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ github.event.repository.name }}-presentation.zip
asset_name: ${{ github.event.repository.name }}-${{ steps.name.outputs.name }}-presentation.zip
asset_content_type: zip
- name: Upload the static slides zip to the release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ github.event.repository.name }}.zip
asset_name: ${{ github.event.repository.name }}-${{ steps.name.outputs.name }}.zip
asset_path: ${{ github.event.repository.name }}-static.zip
asset_name: ${{ github.event.repository.name }}-${{ steps.name.outputs.name }}-static.zip
asset_content_type: zip
3 changes: 3 additions & 0 deletions main-presentation.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
% !TeX root = main-presentation.tex
\documentclass[aspectratio=169]{beamer}
\input{main}
3 changes: 3 additions & 0 deletions main-static.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
% !TeX root = main-static.tex
\documentclass[aspectratio=169,handout]{beamer}
\input{main}
8 changes: 0 additions & 8 deletions main.tex
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
\documentclass[aspectratio=169]{beamer}

\usepackage{figures/tikzit}
\usepackage{graphicx}
\usepackage{etoolbox}
\usepackage{amssymb}
\usepackage{xparse}
\usepackage[
Expand Down Expand Up @@ -38,9 +35,6 @@
\def\mdseries@sf{l}
\makeatother

\newtoggle{static}
\settoggle{static}{false}

\definecolor{backg}{RGB}{9,72,61}
\definecolor{accent}{RGB}{0,150,136}

Expand All @@ -57,8 +51,6 @@
\setbeamercolor{block title}{fg=dracfore, bg=dracblock}
\setbeamercolor{alerted text}{fg=draccent}

\newcommand{\wait}{\iftoggle{static}{}{\pause}}

\newtheorem{axiom}{Axiom(s)}

\title{A compositional theory of digital circuits}
Expand Down
4 changes: 2 additions & 2 deletions sections/conclusion.tex
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
We have defined a \alert{sound and complete} compositional
theory of digital circuits.

\wait
\pause

Also defined an \alert{equational theory} for sequential circuits!

\wait
\pause

\nocite{circuits}

Expand Down
64 changes: 32 additions & 32 deletions sections/equational.tex
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ \section{Equational reasoning}
We have a \alert{sound and complete} semantics for circuits as
\alert{stream functions}.

\wait
\pause

But reasoning with streams can be a \alert{pain}...

\wait
\pause
Why not reason \alert{equationally}?
\end{frame}
\begin{frame}
Expand Down Expand Up @@ -92,7 +92,7 @@ \section{Equational reasoning}
\end{minipage}
\end{axiom}

\wait
\pause

\visible<6->{
For \(
Expand All @@ -112,15 +112,15 @@ \section{Equational reasoning}
\frametitle{Let's get structural}

\centering
\wait
\pause

\((
\dsptikzfig{strings/structure/monoid/merge}[comb],
\dsptikzfig{strings/structure/monoid/init}[comb],
\dsptikzfig{strings/structure/comonoid/copy}[comb],
\dsptikzfig{strings/structure/comonoid/discard}[comb],
)\) is a \alert{bialgebra}.
\wait
\pause
\begin{axiom}
\centering
\begin{minipage}{0.21\textwidth}
Expand Down Expand Up @@ -208,28 +208,28 @@ \section{Equational reasoning}

\alert{Isolate} the sequential and combinational components...

\wait
\pause
\[
\dsptikzfig{strings/category/f}[F][seq]
=
\dsptikzfig{circuits/productivity/pre-mealy-form-verbose}[F][s]
\dsptikzfig{circuits/productivity/pre-mealy-form-verbose}[F][\overline{s}]
\]

\wait
\pause
This is \emph{almost} another Mealy machine moment...
\raisebox{-1.5em}{
\includegraphics[width=0.1\textwidth]{imgs/mealy}
}

\wait
\pause
...but there is the non-delay-guarded trace!
\end{frame}
\begin{frame}
\frametitle{Do we even need it?}

In industry, normally circuits must be \alert{delay-guarded}.

\wait
\pause

But this rules out some \alert{clever} circuits!

Expand All @@ -241,7 +241,7 @@ \section{Equational reasoning}
\dsptikzfig{circuits/examples/cyclic-combinational/reduced-true}
}

\wait
\pause

\vspace{0.5em}

Expand All @@ -254,19 +254,19 @@ \section{Equational reasoning}

\(\values\) is a \alert{finite} lattice...\

\wait
\pause
The functions are monotone...

\wait
\pause
We can compute the \alert{least fixed point} in finite iterations!
\wait
\pause

\centering
\[
\dsptikzfig{circuits/instant-feedback/f0-box}
:=
\dsptikzfig{circuits/instant-feedback/f0-definition}
\wait
\pause
\qquad
\dsptikzfig{circuits/instant-feedback/fkp1-box}
:=
Expand All @@ -290,12 +290,12 @@ \section{Equational reasoning}
\[
\dsptikzfig{circuits/instant-feedback/trand}
\quad
\wait
\pause
=
\quad
\dsptikzfig{circuits/instant-feedback/trand-instfb}
=
\wait
\pause
\quad
\dsptikzfig{strings/structure/monoid/init}[comb]
\]
Expand All @@ -313,10 +313,10 @@ \section{Equational reasoning}
\quad
=
\quad
\dsptikzfig{circuits/productivity/mealy-form-verbose}[F][\overline{s}]
\dsptikzfig{circuits/productivity/mealy-form-verbose}[\tilde{F}][\overline{s}]
\]
\wait

\pause

\includegraphics[width=0.25\textwidth]{imgs/mealy}

Expand All @@ -326,11 +326,11 @@ \section{Equational reasoning}

What more structure can we add?

\wait
\pause

\alert{Forking} is natural...

\wait
\pause

\begin{axiom}
\begin{minipage}{0.33\textwidth}
Expand Down Expand Up @@ -369,15 +369,15 @@ \section{Equational reasoning}
\dsptikzfig{circuits/axioms/stub-gate-rhs}
\end{equation*}
\end{minipage}
\wait
\pause
\begin{minipage}{0.2\textwidth}
\begin{equation*}
\dsptikzfig{circuits/axioms/unobservable-lhs}
=
\dsptikzfig{circuits/axioms/unobservable-rhs}
\end{equation*}
\end{minipage}
\wait
\pause
\quad
\begin{minipage}{0.3\textwidth}
\begin{equation*}
Expand Down Expand Up @@ -411,10 +411,10 @@ \section{Equational reasoning}
\]

\LARGE
\wait
\pause
Cartesian!
\normalsize
\wait
\pause
\[
\dsptikzfig{strings/traced/trace-rhs}[F][seq]
=
Expand Down Expand Up @@ -443,12 +443,12 @@ \section{Equational reasoning}
\frametitle{Running the simulation}

\begin{axiom}
\wait
\pause
\[
\dsptikzfig{circuits/axioms/streaming-lhs-verbose}[g][v]
=
\dsptikzfig{circuits/axioms/streaming-rhs}[g][v]
\wait
\pause
\qquad
\dsptikzfig{circuits/axioms/join-delay-lhs}
=
Expand All @@ -469,16 +469,16 @@ \section{Equational reasoning}
\frametitle{Running the simulation}
\[
\dsptikzfig{circuits/productivity/productive-goal-lhs-verbose}[F][v]
\wait
\pause
=
\dsptikzfig{circuits/productivity/productive-lhs-verbose}[F][v][s]
\dsptikzfig{circuits/productivity/productive-lhs-verbose}[F][s][v]
\]

\vspace{0.5em}
\wait
\pause
\(
= \dsptikzfig{circuits/productivity/productive-step-9}[F][s][v]
\)
\wait
\pause
\raisebox{-3em}{\includegraphics[width=0.2\textwidth]{imgs/mealy}}
\end{frame}
Loading

0 comments on commit 646e9ad

Please sign in to comment.