Skip to content
Snippets Groups Projects
Commit dacba0ae authored by W. Spencer Smith's avatar W. Spencer Smith
Browse files

Updates to lectures, esp L22 for introduction to specification

parent 45d18a06
No related branches found
No related tags found
No related merge requests found
Lectures/Figures/GIS_Raster.png

13.7 KiB

......@@ -474,6 +474,10 @@ is satisfied. Is this statement True or False.
\item False
\end{enumerate}
% This specification is like what we saw previously, except the full exception
% has been removed. In the case of adding to a full sequence, the specification
% says that the sequence is unchanged. This is likely not desireable behaviour,
% but from the point of view of the state invariant, the invariant is respected.
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
......
smiths@naghdi.local.54255
\ No newline at end of file
No preview for this file type
......@@ -22,7 +22,7 @@
\mode<presentation>{}
\input{../def-beamer}
\Drafttrue
\Draftfalse
\newcommand{\topicTitle}{21 Intro to Specification (Ch.\ 5) }
\ifDraft
......@@ -58,7 +58,7 @@
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Administrative Details}
......@@ -69,35 +69,59 @@ TBD
{
\begin{itemize}
\item Some of today's slides adapted from Dr.\ Wassyng's slides
\item A2 Part 2 due today
\item A3 deadlines
\item A2: \structure{Part 2: March 3, 2018 (note date change)}
\item A3
\begin{itemize}
\item Part 1 - Specification: due 11:59 pm Mar 8
\item Part 2 - Code: due 11:59 pm Mar 20
\item Part 1 - Specification: due 11:59 pm Mar 12
\item Part 2 - Code: due 11:59 pm Mar 26
\end{itemize}
\item A4
\bi
\item Your own design and specification
\item Due April 3 at 11:59 pm
\item Due April 9 at 11:59 pm
\ei
\item Midterm exam
\end{itemize}
}
\fi
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Midterm Details}
\ifDraft
TBD
\else
{
\begin{itemize}
\item March 1, 7:00 pm, TSH/120
\item February 28 (today!), 7:00 pm
\bi
\item \structure{Aani to Laurant: UH/213}
\item \structure{Le to Zhou: T13/123-124}
\ei
\item 90 minute duration
\item Multiple choice - 30 questions
\item Open book (any paper)
\end{itemize}
\item Bring
\bi
\item HB Pencil
\item Student Card
\ei
\item No calculators
\item Coats and backpacks to be left against the wall
\item Come to the correct room
\item Remember to fill in your version and student number
\end{itemize}
}
\fi
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Midterm Examination}
......@@ -108,7 +132,7 @@ TBD
{
\begin{itemize}
\item Everything up to an including Friday, Feb 17, 2017
\item Everything up to an including Friday, Feb 16, 2018
\item Any questions?
\end{itemize}
......@@ -117,88 +141,89 @@ TBD
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{A3: Remote Image Guided Autonomous Rescue Robots (RIGARR)}
\frametitle{Sample Question}
s: sequence of integer\\
~\newline
mystery(j):\\
\begin{itemize}
\item Motivated by existing technology
\item In the event of a disaster, robots can be used to find and rescue the
survivors
\item In some cases the robots may be autonomous
\item output: out := $+(i: \mathbb{N} | i \in s \wedge i \geq j: 1)$
\end{itemize}
\href{https://www.google.ca/search?q=rescue+robots}{Images}
What does the mystery access program return?
\begin{enumerate}[A.]
\item The sum of the entries in $s$ that are greater or equal to $j$
\item The sum of the entries in $s$ that are greater than $j$
\item A count of the number of entries in $s$ that are greater or equal
to $j$ %answer
\item A count of the number of entries in $s$ that are greater than $j$
\item True if there exists an entry in $s$ that is greater than $j$, False otherwise
\end{enumerate}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{A3: RIGARR Continued}
\begin{columns}[c]
\frametitle{Sample Question}
\column{1.5in}
s: sequence of integer\\
~\newline
mystery(j):\\
\begin{itemize}
\item Given an image
\item Begin at the start (white circle)
\item Reach destinations (black circles)
\item Benchmarks (red circles)
\item Teams competed for fastest time
\end{itemize}
\column{2in}
\includegraphics[width=1.1\textwidth]{ImageGuided.png}
\end{columns}
\end{frame}
\item output: out := $+(i: \mathbb{N} | i \in [0 .. |s|-1] \wedge s[i] \geq j: 1)$
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{itemize}
\begin{frame}
\frametitle{A3 Example Map and Path}
Which of the following implements mystery(j) in Python?
\begin{center}
\includegraphics[scale=0.36]{ExampleMapAndPath.pdf}
\end{center}
\begin{enumerate}[A.]
\item \texttt{reduce(lambda a, b: a+b, [1 for i in range(len(s)) if s[i] >= j], 0)} %answer
\item \texttt{reduce(lambda a, b: a+b, [s[i] for i in range(len(s)) if s[i] >= j], 0)}
\item \texttt{reduce(lambda a, b: a or b, [(i >= j) for i in s], False)}
\item \texttt{reduce(lambda a, b: a or b, [(i >= j) for i in s], True)}
\end{enumerate}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{A Robot}
\begin{center}
\includegraphics[scale=0.36]{../Figures/23.jpg}
\end{center}
\frametitle{A3: Raster Based GIS Modules}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[plain]
%\frametitle{A Mission}
\begin{center}
\includegraphics[scale=0.25]{../Figures/19.jpg}
\end{center}
\begin{itemize}
\item Motivated by existing technology
\item Cells for data on
\bi
\item Landuse
\item Elevation
\ei
\end{itemize}
\begin{center}
\includegraphics[scale=0.25]{../Figures/15.jpg}
\includegraphics[width=0.8\textwidth]{../Figures/GIS_Raster.png}
\end{center}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{A3 Specify and Implement a Portion of RIGARR}
\frametitle{A3: Specify and Implement a Portion of GIS}
\bi
\item Focusing on the data model portion of the design
\bi
\item PointT
\item LineT
\item PathT
\item MapT
\ei
\item Part 1
\bi
\item Complete incomplete specification
......@@ -208,16 +233,12 @@ TBD
\item Part 2
\bi
\item Given complete specification
\item Implement in Java
\item Test using JUnit
\item Implement and test in C++
\ei
\item
\href{https://gitlab.cas.mcmaster.ca/smiths/se2aa4_cs2me3/blob/master/Assignments/A3/A3.pdf}{Assignment
Specification}
\ei
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Mathematical Notation Example 1}
......@@ -232,7 +253,7 @@ TBD
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Mathematical Notation Example 2}
......@@ -249,7 +270,7 @@ TBD
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Mathematical Notation Example 3}
......@@ -264,7 +285,7 @@ TBD
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Mathematical Notation Example 4}
......@@ -279,7 +300,7 @@ TBD
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Mathematical Notation Example 4}
......@@ -294,7 +315,7 @@ TBD
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Outline of Specification Topics}
......@@ -327,7 +348,7 @@ TBD
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{When do we use Specification?}
......@@ -342,7 +363,7 @@ TBD
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Specification}
......@@ -362,7 +383,7 @@ TBD
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Uses of Specification}
......@@ -390,6 +411,6 @@ TBD
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}
\ No newline at end of file
No preview for this file type
......@@ -436,7 +436,7 @@ drawing
\end{enumerate}
\end{itemize}
\begin{figure}
\includegraphics[scale=0.38]{../Figures/DrawingACircle.png}
\includegraphics[scale=0.35]{../Figures/DrawingACircle.png}
\end{figure}
\end{frame}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment