<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">%\documentclass[t,12pt,numbers,fleqn,handout]{beamer}
\documentclass[t,12pt,numbers,fleqn]{beamer}

\usepackage{pgfpages} 
\usepackage{hyperref}
\hypersetup{colorlinks=true,
    linkcolor=blue,
    citecolor=blue,
    filecolor=blue,
    urlcolor=blue,
    unicode=false}
\urlstyle{same}

\usepackage{hhline}
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{multicol}
\usepackage{array}
\usepackage{listings}

\usepackage{amssymb}
\usepackage{amsmath}

\useoutertheme{split} %so the footline can be seen, without needing pgfpages

% \pgfpagesuselayout{resize to}[letterpaper,border
% shrink=5mm,landscape] %if this is uncommented, the hyperref links do not work

\mode&lt;presentation&gt;{}

\input{../def-beamer}

\newcommand{\topic}{28 Parnas Tables}

\input{../titlepage}

\begin{document}

\input{../footline}

\lstset{language=java,breaklines=true,showspaces=false,showstringspaces=false,breakatwhitespace=true}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
\frametitle{Parnas Tables}

\begin{itemize}
\item Today's slide are partially based on slides by Dr.\ Wassyng
\item Administrative details
\item Translating English to Math exercise
\item Motivating example: midterm question
\item History of tables
\item Example tables
\item Semantics for tables
\item Classification of tables
\item Tables in practise
\item Advantages of tables
\item pointInRegion(p)
\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
\frametitle{Administrative Details}

\begin{itemize}

\item A3 deadlines
\begin{itemize}
\item Part 2 - Code: due 11:59 pm Mar 20
\item \structure{Part 1 spec available in repo}
\end{itemize}

\item A4
\bi
\item Your own design and specification
\item Due April 3 at 11:59 pm
\ei

\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
\frametitle{Exercise}

\bi
\item
  \href{http://www.lonelyplanet.com/blog/2011/11/24/lost-in-translation-our-top-20-photos/}{For
  SE Section}
\ei

Consider an array $D$ with index values ranging from $1$ to $n$. The subject of this example is part of a specification
for a subprogram that will count how many times a particular given value occurs in the array $D$.\\
~\newline

The goal of this exercise is to write a postcondition for the subprogram, relating the various relevant variablesÕ
values when the search is complete.

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
\frametitle{Exercise Continued}

Understand the task in the original language

\begin{itemize}

\item Identify objects referred to (look for nouns in the original English text)
\item&lt;2-&gt; \structure&lt;2&gt;{Array $D$, index value, times (count), particular given value, relevant variables's value}
\item Identify missing information 
\item&lt;3-&gt; \structure&lt;3&gt;{Names of variable for: index, times (count), particular given value}
\item&lt;4-&gt; \structure&lt;4&gt;{Are there any other relevant variables?}
\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
\frametitle{Exercise}

\begin{itemize}

\item Identify missing information
\item Names of variable for
\begin{itemize}
\item Index: assume $i$
\item Times (count): ask the author of the task, assume $\mathit{count}$
\item Particular given value: Ask the author of the task, assume $\mathit{key}$
\item Are there any other relevant variables? (no?)
\end{itemize}
\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
\frametitle{Exercise Continued}

\begin{itemize}
\item Close the gap between English text and mathematics
\begin{itemize}
\item Reword the English text to be closer to mathematics
\item Use the English verb $\mathit{count}$
\end{itemize}

\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
\frametitle{Exercise Continued}

\begin{itemize}

\item The English verb $count$ means, in programming language and in terms closer to mathematics, $\mathit{add}$ $1$
\item But this is a dynamic (action) concept
\item The corresponding static (state, relational) concept in mathematics is the function \textit{addition with 1},
that is $+1$

\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
\frametitle{Exercise Continued}

\begin{itemize}

\item The occurrence of the particular given value in an array element in $D$
\item $D[i] = \mathit{key}$
\item A condition for the addition with 1
\item The repetition over a variable number of index values suggests quantification with the function addition and
with the argument $1$
\item $+(i : ?  | ... \wedge D[i] = \mathit{key} : 1)$

\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
\frametitle{Exercise Continued}

Identify relationships between essential objects

\begin{itemize}

\item Array $D$, index value, particular given value: $D[i] = \mathit{key}$
\item Combine the above with count ($+$ conditionally with $1$)
\item $\mathit{count} = +(i: \mathbb{N} | ... \leq i \leq ... \wedge D[i] = \mathit{key} : 1)$
\item Range of $i$ missing
\item Refer to original English text: $1$ to $n$
\item $\mathit{count} = +(i: \mathbb{N} | 1 \leq i \leq n \wedge D[i] = \mathit{key} : 1)$
\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
\frametitle{Exercise: New Glossary Entry}

Now we have a new entry for our glossary

\begin{itemize}

\item count: $ +(i: \mathbb{N} | ... \leq i \leq ... \wedge ... : 1)$, where the ... defines the range of the
quantified variable and the condition for counting

\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
\frametitle{Summary}

\begin{itemize}

\item Knowledge of English and Mathematics is necessary but not sufficient to translate into Mathematics
\item Knowledge of subject area also needed
\item Translating skills needed
\item The three are different

\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
\frametitle{Summary}

\begin{itemize}

\item Compile your own glossary
\item Make intermediate steps and expressions conscious
\item Modularize
\item Organize systematically
\item KISSS
\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
\frametitle{Tables Motivating Example: ptOn(c, s)}

\begin{align*}
(x(c) = x(s) &amp;\Rightarrow \begin{aligned} (y(s) \leq y(f) &amp;\Rightarrow y(s) \leq
  y(c) \leq y(f) | \\ y(s) &gt; y(f) &amp;\Rightarrow y(f) \leq y(c) \leq y(s)
  )\end{aligned}\\
| y(c) = y(s) &amp;\Rightarrow \begin{aligned} (x(s) \leq x(f) &amp;\Rightarrow x(s) \leq
  x(c) \leq x(f) | \\ x(s) &gt; x(f) &amp;\Rightarrow x(f) \leq x(c) \leq x(s)
  )\end{aligned}\\
| N(c,s) &amp;\Rightarrow \mbox{False} )
\end{align*} 

$N(c,s) \equiv x(c) \neq x(s) \wedge y(c) \neq y(s)$

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
\frametitle{In Tabular Form}

\begin{tabular}{|p{2.5cm}|p{2.5cm}|p{5.1cm}|}
\hhline{~|~|-|}
\multicolumn{1}{r}{} &amp; \multicolumn{1}{r|}{} &amp; \multicolumn{1}{l|}{\textbf{out}}\\
\hhline{|-|-|-|}
{$x(c) = x(s)$} &amp; {$y(s) \leq y(f)$} &amp; {$y(s) \leq y(c) \leq y(f)$}\\
\hhline{|~|-|-|}
~ &amp; {$y(s) &gt; y(f)$} &amp; {$y(f) \leq y(c) \leq y(s)$}\\
\hhline{|-|-|-|}
{$y(c) = y(s)$} &amp; {$x(s) \leq x(f)$} &amp; {$x(s) \leq x(c) \leq x(f)$}\\
\hhline{|~|-|-|}
~ &amp; {$x(s) &gt; x(f)$} &amp; {$x(f) \leq x(c) \leq x(s)$}\\
\hhline{-|-|-|}
\multicolumn{2}{|l|}{{$x(c) \neq x(s) \wedge y(c) \neq y(s)$}} &amp; {$\mbox{False}$}\\
\hhline{|-|-|-|}

\end{tabular}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
\frametitle{A Brief History of Tables}

\begin{itemize}

\item Similar work, such as decision tables, have been around for a while (1950s?)
\item The intuitive use of tables proliferated on the A-7E Aircraft US Naval Research Lab (NRL) project (Parnas)
\item The US NRL continues to work on the SCR (Software Cost Reduction) method
\item Ontario Hydro - Darlington Shutdown Systems
\item Work began on the semantics of tables - Parnas, Janicki, Zucker, Abraham
\item Ontario Power Generation (OPG) methods for Safety Critical Software
\item More semantics - Janicki, Khedri, Kahl, Wassyng
\item Dave Parnas has championed the use of tabular expressions (tables) in documenting software requirements and
designs

\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
\frametitle{Example Table from A-7E Project}

\includegraphics[scale=0.47]{../Figures/SCR_A7E_Example.png}\\
%this table does not cover all of the cases

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
\frametitle{Example Table from OPG Project}

\includegraphics[scale=0.48]{../Figures/OPG_Example.png}
%f_ means function
%y_ means type
%m_ means monitored
%k_ means constant
%HT is heat transfer
%hys is hysteresis
%sp is set point
%e mean enumerated type
%subscript -1 means previous value
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
\frametitle{Example for Input Checking}

\begin{flushleft}
\scalebox{0.75}{
\begin{tabular}{||r|p{6cm}||}
\hhline{=|=}
Composition rule &amp; $\cup_{i=1}^{4} H_2[i] \cap  (\cap_{j=1}^{2} H_1[j] ~;~ G[i,j])$ \\
\hhline{=|=}
\end{tabular}
}
\end{flushleft}

\begin{tabular}{|l|p{0.3cm}|l|l|}
\multicolumn{4}{c}{} \\
\multicolumn{2}{c}{} &amp; \multicolumn{2}{&gt;{\large}c}{$H_1$} \\
\hhline{|~|~|-|-|}
\multicolumn{2}{c|}{} &amp; $S_{GET}'\cup =$ &amp; $ErrorMsg'+=$ \\
\hhline{|~|~|-|-|}
\multicolumn{4}{c}{} \\
\hhline{|-|~|-|-|}
$x_1 &lt; 0$ &amp; &amp; $\emptyset$ &amp; $InvalidInput\_x_1$  \\
\hhline{|-|~|-|-|}
$0 \le x_1 &lt; min_d$ &amp; &amp; $\emptyset$ &amp; $x_1\_TooSmall$ \\
\hhline{|-|~|-|-|}
$x_1 &gt; max_d$ &amp; &amp; $\emptyset$ &amp; $x_1\_TooLarge$ \\
\hhline{|-|~|-|-|}
$min_d \le x_1 \le max_d$ &amp; &amp; $\{@{x_1}\}$ &amp; $NULL$ \\
\hhline{|-|~|-|-|}
\multicolumn{2}{c}{} &amp; \multicolumn{2}{r}{$\land ChangeOnly(S_{GET}, ErrorMsg)$}\\
\multicolumn{2}{&gt;{\large}c}{$H_2$} &amp; \multicolumn{2}{&gt;{\large}c}{$G$} \\
\end{tabular}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
\frametitle{Solving Real Roots of $ax^2 + bx + c = 0$}

\includegraphics[scale=0.5]{../Figures/QuadraticEquationExample.png}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
\frametitle{Table for Solving the Quadratic Equation}

\includegraphics[scale=0.5]{../Figures/QuadraticEquationTable.png}

\structure&lt;1&gt;{What are the advantages of the tabular specification?}
\uncover&lt;2-&gt;{
\bi
\item Understandable
\item Unambiguous
\item Check for completeness and disjointness
\item Test cases
\ei
}
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
\frametitle{Why We Need Precise Semantics}

\begin{itemize}

\item To promote an unambiguous understanding for both writers and readers
\item To understand the meaning of tables that look similar, but have different semantics
\item To be able to link tables of different types
\item To know what notation we can use in the tables
\item To be able to build software tools that create, edit, transform and print tables

\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
\frametitle{Early Semantics}

\begin{tabular}{|p{4cm}|p{4cm}|}
\hhline{~|-}
\multicolumn{1}{r|}{} &amp; \multicolumn{1}{l|}{\textbf{f\_name}}\\
\hhline{|-|-|}
Condition 1 &amp; Result 1\\
\hhline{|-|-|}
Condition 2 &amp; Result 2\\
\hhline{|-|-|}
... &amp; ...\\
\hhline{|-|-|}
Condition n &amp; Result n\\
\hhline{|-|-|}
\end{tabular}
~\newline

If Condition 1 then f\_name = Result 1\\
Elseif Condition 2 then f\_name = Result 2\\
Elseif ...\\
Elseif Condition n then f\_name = Result n\\
~\newline
\uncover&lt;2-&gt;{\structure&lt;2&gt;{Disjointedness $\equiv$
$\forall (i, j: \mathbb{N} | 1 \leq i \leq n \wedge 1 \leq j \leq n \wedge i \neq j : \mbox{Condition } i \wedge
\mbox{Condition } j \Leftrightarrow \mbox{false})$\\
~\\
Completeness $\equiv \vee (i: \mathbb{N} | 1 \leq i \leq n : \mbox{Condition } i )$}}
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
\frametitle{Semantics}

\includegraphics[scale=0.45]{../Figures/Semantics.png}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
\frametitle{Semantics Continued}

\begin{itemize}

\item Disjointedness and Completness are not part of the semantics of tables
\item We impose these conditions to make tables more useful in practise

\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
\frametitle{Classification of Tables}

Tabular expressions can be classified according to the orientation of the tables\\
~\newline
Vertical condition tables \\
~\newline
\includegraphics[scale=0.3]{../Figures/VerticalConditionTable.png}\\
~\newline
Horizontal condition tables \\
~\newline
\includegraphics[scale=0.3]{../Figures/HorizontalConditionTable.png}\\

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
\frametitle{Types of Tables}

\includegraphics[scale=0.45]{../Figures/TypesOfTables.png}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
\frametitle{World View of Tables}

\bi
\item \structure{Do tables take a dynamic or a static world view?}
\item \structure{Can you write an algorithm with a table?}
\ei

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
\frametitle{Tables in Practise}

\begin{itemize}

\item According to Dr.\ Wassyng projects typically define a small set of types of tables to be used in that project
\item Tables at Ontario Power Generation, Darlington Nuclear Generating Station - Shutdown System One (SDS1)
\begin{itemize}
\item Horizontal condition tables for requirements - read from left to right, fit on the page well
\item Vertical condition tables for the software design - better suited to multiple outputs
\item Sometimes also state transition tables
\end{itemize}
\item Use table structure to visually aid readers so that they can discern nested conditions (see the quadratic
equation example)
\item Tables enable production of formal requirements that are readable by domain experts
\item Use \structure{natural language expressions} to enhance readability

\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
\frametitle{Advantages of Tables}

\begin{itemize}

\item Tabular expressions describe relations through pre and post conditions - ideal for describing behaviour without
sequences of operations
\item They make it easy to ensure input domain coverage
\item They are easy to read and understand (you need just a little practise to write them)
\item Coding from tables results in extremely well structured code
\item They facilitate identification of test cases
\item Extremely good for real-time/embedded systems
\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
\frametitle{A Table for pointInRegion(p)}

\begin{itemize}

\item Consider all of the cases
\item Draw a picture
\item Short form notation
\begin{itemize}
\item $px = p.\mbox{xcoord()}$
\item $py = p.\mbox{ycoord()}$
\item $llx = \mathit{lower\_left}.\mbox{xcoord()}$
\item $lly = \mathit{lower\_left}.\mbox{ycoord()}$
\item $llxw = \mathit{lower\_left}.\mbox{xcoord()} + \mathit{width}$
\item $llyh = \mathit{lower\_left}.\mbox{ycoord()} + \mathit{height}$
\item T = Constants.TOLERANCE
\end{itemize}

\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}[plain]
%\frametitle{A Table for Assignment 4, Part 2, pointInRegion(p)}

\begin{tabular}{|p{2.cm}|p{2.8cm}|p{5.3cm}|}
\hhline{~|~|-|}
\multicolumn{1}{r}{} &amp; \multicolumn{1}{r|}{} &amp; \multicolumn{1}{l|}{\textbf{out}}\\
\hhline{|-|-|-|}
\uncover&lt;2-&gt;{$px &lt; llx$} &amp; \uncover&lt;3-&gt;{$py &lt; lly$} &amp; \uncover&lt;4-&gt;{$p.\mbox{dist}(\mbox{PointT}(llx, lly)) \leq
\mbox{T}$}\\
\hhline{|~|-|-|}
~ &amp; \uncover&lt;3-&gt;{$lly \leq py \leq llyh$} &amp; \uncover&lt;5-&gt;{$(llx - px) \leq \mbox{T}$}\\
\hhline{|~|-|-|}
~ &amp; \uncover&lt;3-&gt;{$py &gt; llyh$} &amp; \uncover&lt;6-&gt;{$p.\mbox{dist}(\mbox{PointT}(llx, llyh)) \leq \mbox{T}$}\\
\hhline{-|-|-|}
\uncover&lt;2-&gt;{$llx \leq px \leq llxw$} &amp; \uncover&lt;3-&gt;{$py &lt; lly$} &amp; \uncover&lt;7-&gt;{$(lly-py) \leq\mbox{T}$}\\
\hhline{|~|-|-|}
~ &amp; \uncover&lt;3-&gt;{$lly \leq py \leq llyh$} &amp; \uncover&lt;8-&gt;{$\mbox{True}$}\\
\hhline{|~|-|-|}
~ &amp; \uncover&lt;3-&gt;{$py &gt; llyh$} &amp; \uncover&lt;9-&gt;{$(py - llyh) \leq \mbox{T}$}\\
\hhline{-|-|-|}
\uncover&lt;2-&gt;{$px &gt; llxw$} &amp; \uncover&lt;3-&gt;{$py &lt; lly$} &amp; \uncover&lt;10-&gt;{$p.\mbox{dist}(\mbox{PointT}(llxw, lly)) \leq
\mbox{T}$}\\
\hhline{|~|-|-|}
~ &amp; \uncover&lt;3-&gt;{$lly \leq py \leq llyh$} &amp; \uncover&lt;10-&gt;{$(px-llxw) \leq \mbox{T}$}\\
\hhline{|~|-|-|}
~ &amp; \uncover&lt;3-&gt;{$py &gt; llyh$} &amp; \uncover&lt;10-&gt;{$p.\mbox{dist}(\mbox{PointT}(llxw,llyh)) \leq \mbox{T}$}\\
\hhline{-|-|-|}

\end{tabular}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
\frametitle{Seven Cases}

\begin{tabular}{|p{2.cm}|p{2.8cm}|p{5.3cm}|}
\hhline{~|~|-|}
\multicolumn{1}{r}{} &amp; \multicolumn{1}{r|}{} &amp; \multicolumn{1}{l|}{\textbf{out}}\\
\hhline{|-|-|-|}
\uncover&lt;1-&gt;{$px &lt; llx$} &amp; \uncover&lt;1-&gt;{$py &lt; lly$} &amp; \uncover&lt;1-&gt;{$p.\mbox{dist}(\mbox{PointT}(llx, lly)) \leq
\mbox{T}$}\\
\hhline{|~|-|-|}
~ &amp; \uncover&lt;1-&gt;{$lly \leq py \leq llyh$} &amp; \uncover&lt;1-&gt;{$(llx - px) \leq \mbox{T}$}\\
\hhline{|~|-|-|}
~ &amp; \uncover&lt;1-&gt;{$py &gt; llyh$} &amp; \uncover&lt;1-&gt;{$p.\mbox{dist}(\mbox{PointT}(llx, llyh)) \leq \mbox{T}$}\\
\hhline{|-|-|-|}
\multicolumn{2}{|l|}{\uncover&lt;1-&gt;{$llx \leq px \leq llxw$}} &amp; \uncover&lt;2-&gt;{$(lly-\mbox{T}) \leq py \leq (llyh +
\mbox{T})$}\\
\hhline{|-|-|-|}
\uncover&lt;1-&gt;{$px &gt; llxw$} &amp; \uncover&lt;1-&gt;{$py &lt; lly$} &amp; \uncover&lt;1-&gt;{$p.\mbox{dist}(\mbox{PointT}(llxw, lly)) \leq
\mbox{T}$}\\
\hhline{|~|-|-|}
~ &amp; \uncover&lt;1-&gt;{$lly \leq py \leq llyh$} &amp; \uncover&lt;1-&gt;{$(px-llxw) \leq \mbox{T}$}\\
\hhline{|~|-|-|}
~ &amp; \uncover&lt;1-&gt;{$py &gt; llyh$} &amp; \uncover&lt;1-&gt;{$p.\mbox{dist}(\mbox{PointT}(llxw, llyh)) \leq \mbox{T}$}\\
\hhline{-|-|-|}

\end{tabular}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
\frametitle{Six Cases}

\begin{tabular}{|p{2.5cm}|p{2.5cm}|p{5.1cm}|}
\hhline{~|~|-|}
\multicolumn{1}{r}{} &amp; \multicolumn{1}{r|}{} &amp; \multicolumn{1}{l|}{\textbf{out}}\\
\hhline{|-|-|-|}
\uncover&lt;1-&gt;{$px &lt; llx$} &amp; \uncover&lt;1-&gt;{$py &lt; lly$} &amp; \uncover&lt;1-&gt;{$p.\mbox{dist}(\mbox{PointT}(llx, lly)) \leq
\mbox{T}$}\\
\hhline{|~|-|-|}
~ &amp; \uncover&lt;1-&gt;{$py &gt; llyh$} &amp; \uncover&lt;1-&gt;{$p.\mbox{dist}(\mbox{PointT}(llx, llyh)) \leq \mbox{T}$}\\
\hhline{|-|-|-|}
\multicolumn{2}{|l|}{\uncover&lt;1-&gt;{$llx \leq px \leq llxw$}} &amp; \uncover&lt;1-&gt;{$(lly-\mbox{T}) \leq py \leq (llyh +
\mbox{T})$}\\
\hhline{|-|-|-|}
\uncover&lt;1-&gt;{$px &gt; llxw$} &amp; \uncover&lt;1-&gt;{$py &lt; lly$} &amp; \uncover&lt;1-&gt;{$p.\mbox{dist}(\mbox{PointT}(llxw, lly)) \leq
\mbox{T}$}\\
\hhline{|~|-|-|}
~ &amp; \uncover&lt;1-&gt;{$py &gt; llyh$} &amp; \uncover&lt;1-&gt;{$p.\mbox{dist}(\mbox{PointT}(llxw, llyh)) \leq \mbox{T}$}\\
\hhline{-|-|-|}
\multicolumn{2}{|l|}{\uncover&lt;1-&gt;{$lly \leq py \leq llyh$}} &amp; \uncover&lt;2-&gt;{$(llx-\mbox{T}) \leq px \leq (llxw +
\mbox{T})$}\\
\hhline{|-|-|-|}

\end{tabular}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
\frametitle{Three Cases}

\begin{tabular}{|p{2.5cm}|p{2.5cm}|p{5.1cm}|}
\hhline{~|~|-|}
\multicolumn{1}{r}{} &amp; \multicolumn{1}{r|}{} &amp; \multicolumn{1}{l|}{\textbf{out}}\\
\hhline{|-|-|-|}
\multicolumn{2}{|p{5cm}|}{\uncover&lt;1-&gt;{$llx \leq px \leq llxw$}} &amp; \uncover&lt;1-&gt;{$(lly-\mbox{T}) \leq py \leq (llyh +
\mbox{T})$}\\
\hhline{|-|-|-|}
\multicolumn{2}{|p{5cm}|}{\uncover&lt;1-&gt;{$lly \leq py \leq llyh$}} &amp; \uncover&lt;1-&gt;{$(llx-\mbox{T}) \leq px \leq (llxw +
\mbox{T})$}\\
\hhline{|-|-|-|}
\multicolumn{2}{|p{5cm}|}{\uncover&lt;1-&gt;{$\neg(llx \leq px \leq llxw) \wedge \neg(lly \leq py \leq llyh)$}} &amp;
\uncover&lt;2-&gt;{$\mbox{min}[p.\mbox{dist}(\mbox{PointT}(llx, lly)),$ $p.\mbox{dist}(\mbox{PointT}(llxw, lly)),$
$p.\mbox{dist}(\mbox{PointT}(llx, llyh)),$ 
$p.\mbox{dist}(\mbox{PointT}(llxw, llyh)) ] \leq \mbox{T}$}\\
\hhline{|-|-|-|}

\end{tabular}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\end{document}</pre></body></html>