%\documentclass[aspectratio=169]{beamer}
\documentclass{beamer}
%\usepackage[czech]{babel}
\usepackage[utf8]{inputenc}
%balíček na A4
\usepackage{amsthm}
\usepackage{amsmath}
\usepackage{amsbsy}
\usepackage{amssymb}

\usepackage{graphicx}

%\usepackage{mathpazo}

%\usepackage[mathlf]{MinionPro}
\usepackage{sansmathfonts}
%\usepackage[mathlf,textlf]{MyriadPro}
%\usepackage{mathpazo}
\usepackage[small]{eulervm}
%\usepackage{newtxmath}

\usepackage{mathtools}
\usepackage{xcolor}
\usepackage{booktabs}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{setspace}
\usepackage{array}
\usepackage{tabularx}
\usepackage{pbox}

\usepackage{tikz}

\tikzset{
   invisible/.style={opacity=0},
   visible on/.style={alt=#1{}{invisible}},
   blank/.style={},
   red on/.style={alt={#1{fill=red!10}{blank}}},
   alt/.code args={<#1>#2#3}{%
     \alt<#1>{\pgfkeysalso{#2}}{\pgfkeysalso{#3}} % \pgfkeysalso doesn't change the path
   },
 }

\captionsetup{compatibility=false}
%\renewcommand{\arraystretch}{1}
%\hypersetup{pdfpagemode={FullScreen}}

\makeatletter
    \newenvironment{withoutheadline}{
        \setbeamertemplate{headline}[default]
        \def\beamer@entrycode{\vspace*{-\headheight}}
    }{}
\makeatother

\title{SMT Solving for the Theory of Bit-Vectors}
\author{Martin Jonáš \vspace{-0.3cm}}
\institute{PhD Thesis Proposal \vspace{1cm}}
%\date
\date{\today}
%\subject{IA072 -- Seminar on Concurrency}

\usetheme{Antibes}
\setbeamertemplate{headline}{}
\setbeamertemplate{navigation symbols}{}%remove navigation symbols

\setbeamertemplate{footline}[frame number]

\definecolor{foreground}{RGB}{255,255,255}
\definecolor{background}{RGB}{24,24,24}
% \definecolor{title}{RGB}{107,174,214}
\definecolor{title}{RGB}{255,255,255}
\definecolor{main}{RGB}{39,66,96}
\definecolor{gray}{RGB}{155,155,155}
\definecolor{subtitle}{RGB}{102,255,204}
\definecolor{hilight}{RGB}{233,140,5}
\definecolor{vhilight}{RGB}{251,95,37}

\setbeamercolor{titlelike}{fg=title,bg=main}
\setbeamercolor{subtitle}{fg=subtitle}
\setbeamercolor{institute}{fg=gray}
%\setbeamercolor{normal text}{fg=foreground,bg=background}

\setbeamercolor*{block title}{fg=white, bg=main}
\setbeamercolor*{block body}{fg=black, bg=main!5}
\setbeamercolor*{block title example}{fg=white, bg=vhilight!65}
\setbeamercolor*{block body example}{fg=black, bg=vhilight!10}

\setbeamercolor{item}{fg=main} % color of bullets
%\setbeamercolor{subitem}{fg=gray}
\setbeamercolor{alerted text}{fg=hilight}
\setbeamercolor{description item}{fg=hilight}
%\setbeamercolor{itemize/enumerate subbody}{fg=gray}
\setbeamertemplate{itemize subitem}{{\textendash}}
\setbeamerfont{itemize/enumerate subbody}{size=\small}
\setbeamerfont{itemize/enumerate subitem}{size=\small}

\DeclareSymbolFont{operators}{\encodingdefault}{ppl}{m}{n}
\DeclareMathAlphabet{\mathbf}{\encodingdefault}{ppl}{bx}{n}
\DeclareMathAlphabet{\mathit}{\encodingdefault}{ppl}{m}{it}

\newcommand{\set}[1]{\{#1\}}
\newcommand{\bitvec}[1]{ \texttt{bitvec}_{#1} }
\newcommand{\so}[2]{\ensuremath{#1_{[#2]}}}
\newcommand{\concat}[2]{ \ensuremath{\texttt{concat}_{[#1,#2]}}}
\newcommand{\extract}[3]{ \texttt{extract}_{[#1, #2, #3] } }
\newcommand{\bvnot}{ \texttt{not} }
\newcommand{\bvand}{ \texttt{and} }
\newcommand{\bvor}{ \texttt{or} }
\newcommand{\bvshl}{ \texttt{shl} }
\newcommand{\bvshr}{ \texttt{shr} }
\newcommand{\computeBDD}{ \texttt{computeBDD} }
\newcommand{\sat}{\texttt{sat}}
\newcommand{\unsat}{\texttt{unsat}}
\newcommand{\Zplus}{\mathbb{N}^+}
\newcommand{\ite}{\texttt{ite}}
\newcommand{\levels}{\mathit{levels}}
\newcommand{\true}{\mathit{true}}
\newcommand{\false}{\mathit{false}}
\newcommand{\BV}{\ensuremath{\mathcal{BV}}}
\newcommand{\QFBV}{\ensuremath{\mathcal{QFBV}}}


\let\otp\titlepage
\renewcommand{\titlepage}{\otp\addtocounter{framenumber}{-1}}

\begin{document}

\begin{frame}[plain]
 \titlepage
\end{frame}

\section{Satisfiability Modulo Theories}
\begin{frame}
  \frametitle{Satisfiability Modulo Theories}

  Decide the satisfiability of a first-order formula in a given
  theory.

  \smallskip

  Function and relation symbols are given interpretations by the theory.

  \bigskip

  For example
  \begin{itemize}
  \item $x + y = 3~\wedge~x > 1~\wedge~y > x$ is \alert{satisfiable} over the
    integers,
  \item $3 = x + x$ is \alert{unsatisfiable} over the integers,
  \item $3 = x + x$ is \alert{satisfiable} over the rationals.
  \end{itemize}

\end{frame}

\section{Theory of Bit-Vectors}
\begin{frame}
  \frametitle{Theory of Bit-Vectors}

  Hardware and programming languages do not work over integers.

  The formula
  \[
    (x > 0)~\wedge~(y > 0)~\wedge~(x + y < 0)
  \]
  should be satisfiable due to overflows.

  \bigskip
  \pause

  The \alert{theory of bit-vectors} describes bounded integers (or vectors of
  bits) with:
  \begin{itemize}
  \item arithmetic operations,
  \item bitwise operations,
  \item comparison.
  \end{itemize}
\end{frame}

\section{Quantifier-Free Bit-Vector Logic}
\begin{frame}
  \frametitle{Quantifier-Free Bit-Vector Logic} Quantifier-free
  bit-vector formulas usually solved by reduction to a propositional
  formula (\emph{bit-blasting}) and using a SAT solver.

  \smallskip

  Approach taken by Z3, CVC4, Boolector, UCLID, Yices, \ldots.

  \bigskip

  Alternative approaches exist:
  \begin{itemize}
  \item model-constructing satisfiability calculus,
  \item abstract CDCL,
  \item stochastic local search.
  \end{itemize}
\end{frame}

\section{Quantified Bit-Vector Logic}
\begin{frame}
  \frametitle{Quantified Bit-Vector Logic}

  In many software verification applications, quantifiers are
  necessary.

  \bigskip

  Quantifier bit-vector formulas traditionally solved by
  \alert{quantifier instantiation}.
\end{frame}

\section{Symbolic Approach to Quantified Bit-Vectors}
\begin{frame}
  \frametitle{Symbolic Approach to Quantified Bit-Vectors}
  Bit-vector formulas can be represented by \alert{binary decision diagrams} (BDD).

  \bigskip

  Assuming that $x^{[4]} = x_3x_2x_1x_0$, formula
  \[
    x^{[4]} >_u 0
  \]
  is represented by

  \begin{center}
  \begin{tikzpicture}[every node/.style={draw, circle}]
    \node (x0) at (2,4) {$x_0$};
    \node (x1) at (3,3) {$x_1$};
    \node (x2) at (4,2) {$x_2$};
    \node (x3) at (5,1) {$x_3$};

    \node [rectangle] (true) at (0,0) {true};
    \node [rectangle] (false) at (6,0) {false};

    \path[auto, every node/.style={}, above, dashed]
    (x0) edge [above right] node {$0$} (x1)
    (x1) edge [above right] node {$0$} (x2)
    (x2) edge [above right] node {$0$} (x3)
    (x3) edge [above right] node {$0$} (false);

    \path[auto, every node/.style={}, above left]
    (x0) edge [] node {$1$} (true)
    (x1) edge [] node {$1$} (true)
    (x2) edge [] node {$1$} (true)
    (x3) edge [] node {$1$} (true);

  \end{tikzpicture}
\end{center}
\end{frame}

\begin{frame}
  \frametitle{Symbolic Approach to Quantified Bit-Vectors}

  Efficient algorithm are known for operations with BDDs (conjunction,
  disjunction, quantifiers).

  \bigskip

  Quantification usually reduces the size of the BDD -- useful for
  quantified bit-vectors.

  \bigskip

  Representation by (reduced and ordered) BDDs is canonical -- formula
  is unsatisfiable iff the BDD has root false.
\end{frame}

\begin{frame}
  \frametitle{Symbolic Approach to Quantified Bit-Vectors}

  I have implemented the solver Q3B, which
  \begin{itemize}
  \item simplifies the formula,
  \item converts the formula to the BDD,
  \item tries to use approximations if the precise BDD computation is
    too expensive.
  \end{itemize}

  \bigskip

  Q3B is the \alert{winner} of SMT Competition 2016 in the category of quantified bit-vectors.
\end{frame}

\section{Aims of the Work}
\begin{frame}
  \frametitle{Aims of the Work}
  \textcolor{main}{\textbf{Major aims}}
  \begin{itemize}
  \item Further development of the symbolic solver for quantified-bit
    vectors.
  \item Hybrid approach to quantified bit-vectors.
  \end{itemize}

  \bigskip

  \textcolor{main}{\textbf{Minor aims}}
  \begin{itemize}
  \item Determining a computational complexity of quantified bit-vector logic with
    bit-widths represented in binary.
  \item Extending known syntactic simplifications of quantified
    bit-vector formulas.
  \end{itemize}
\end{frame}

\section{Publications}
\begin{frame}
  \frametitle{Publications}
  \begin{itemize}
    \setlength\itemsep{2em}
  \item \textsc{Jonáš}, M. and J. \textsc{Strejček}. \emph{``Solving
      Quantified Bit-Vector Formulas Using Binary Decision
      Diagrams.''}  In: SAT 2016, Bordeaux, France, July 5-8, 2016,
    Proceedings. 2016, pp. 267-283

    \bigskip

    Main author of the text of the paper, implemented the SMT solver
    and conducted all the experiments.
\item \textsc{Chalupa} M., M. \textsc{Jonáš}, J. \textsc{Slabý},
  J. \textsc{Strejček}, and M. \textsc{Vitovská}. \emph{``Symbiotic 3:
    New Slicer and Error-Witness Generation -- (Competition
    Contribution).''} In: TACAS 2016, Eindhoven, The Netherlands, April
  2-8, 2016, Proceedings, pp. 946-949

  \bigskip

  Wrote parts of the paper and prepared the environment that was used
  to run experiments with the implemented tool Symbiotic.
\end{itemize}
\end{frame}

\begin{frame}
  \frametitle{Publications}
  \begin{itemize}
    \setlength\itemsep{2em}
  \item \textsc{Mrázek} J., M. \textsc{Jonáš}, V. \textsc{Štill},
    H. \textsc{Lauko}, and J. \textsc{Barnat}. \emph{``Optimizing and
      Caching SMT Queries in SymDIVINE (Competition Contribution)''}
    In: TACAS 2017 (to appear).

    \bigskip

    Wrote about half of the paper and implemented SMT formula
    simplifications.
  \item \textsc{Chalupa} M., M. \textsc{Vitovská}, M. \textsc{Jonáš},
    J. \textsc{Slabý}, J.~\textsc{Strejček}. \emph{``Symbiotic 4:
      Beyond Reachability (Competition Contribution)''} In: TACAS 2017
    (to appear).

    \bigskip

    Wrote parts of the paper and prepared the environment that was used
    to run experiments with the implemented tool Symbiotic.
\end{itemize}
\end{frame}

\end{document}

%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End:
