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

First draft of L15.

parent 475a2ece
No related branches found
No related tags found
No related merge requests found
File added
File added
File added
%\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{booktabs}
\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<presentation>{}
\input{../def-beamer}
\newcommand{\topic}{15 Module Guide (H\&S Chapt.\ 6}
\input{../titlepage}
\begin{document}
\input{../footline}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{MG}
\begin{itemize}
\item Modules with external interaction
\item Parnas's Rational Design Process (finish up)
\item Examples
\begin{itemize}
\item A mesh generator
\item A maze tracing robot
\end{itemize}
\end{itemize}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Administrative Details}
\begin{itemize}
\item Assignment 2
\begin{itemize}
\item Files due by 11:59 pm Feb 15
\item E-mail partner files by 11:59 pm Feb 16
\item Lab report due by 11:59 pm Feb 27
\end{itemize}
\item Midterm exam
\begin{itemize}
\item March 1, 7:00 pm, TSH/120
\item 90 minute duration
\item Multiple choice - 30--40 questions?
\item Open book (any paper)
\end{itemize}
\end{itemize}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Modules with External Interaction}
\begin{itemize}
\item In general, some modules may interact with the environment or other modules
%\item The Display Point Masses Applet module does this
\item Environment might include the keyboard, the screen, the file system, motors, sensors, etc.
\item Sometimes the interaction is informally specified using prose (natural language)
\item Can introduce an environment variable
\begin{itemize}
\item Name, type
\item Interpretation
\end{itemize}
\item Environment variables include the screen, the state of a motor (on, direction of rotation, power level, etc.),
the position of a robot
\end{itemize}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{External Interaction Continued}
\begin{itemize}
\item Some external interactions are hidden
\begin{itemize}
\item Present in the implementation, but not in the MIS
\item An example might be OS memory allocation calls
\end{itemize}
\item External interaction described in the MIS
\begin{itemize}
\item Naming access programs of the other modules
\item Specifying how the other module's state variables are changed
\item The MIS should identify what external modules are used
\end{itemize}
\end{itemize}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{MIS for GUI Modules}
\begin{itemize}
\item Could introduce an environment variable
\item window: sequence [RES\_H][RES\_V] of pixelT
\begin{itemize}
\item Where window[r][c] is the pixel located at row r and column c, with numbering zero-relative and beginning at the
upper left corner
\item Would still need to define pixelT
\end{itemize}
\item Could formally specify the environment variable transitions
\item More often it is reasonable to specify the transition in prose
\item In some cases the proposed GUI might be shown by rough sketches
\end{itemize}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Display Point Masses Module Syntax}
\textbf{Exported Access Programs}\\
~\newline
\begin{tabular}{| l | l | l | l |}
\hline
\textbf{Routine name} & \textbf{In} & \textbf{Out} & \textbf{Exc.}\\
\hline
DisplayPointMassesApplet & ~ & DisplayPointMassesApplet & ~\\
\hline
paint & ~ & ~ & ~\\
\hline
\end{tabular}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Display Point Masses Module Semantics}
\textbf{Environment Variables}\\
$\mathit{win}:$ 2D sequence of pixels displayed within a web-browser \\
\noindent DisplayPointMassesApplet():
\begin{itemize}
\item transition: The state of the abstract object ListPointMasses is modified as follows:\\
ListPointMasses.init()\\
ListPointMasses.add(0, PointMassT(20, 20, 10)\\
ListPointMasses.add(1, PointMassT(120, 200, 20)\\
...
\end{itemize}
\noindent paint():
\begin{itemize}
\item transition $win := $ Modify window so that the point masses in ListPointMasses
are plotted as circles. The centre of each circles should be the corresponding x and y coordinates and the radius should
be the mass of the point mass.
\end{itemize}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Assignment 3 Vector Module}
\textbf {Exported Access Programs}\\
~\newline
\begin{tabular}{| l | l | l | p{0.75in} |}
\hline
\textbf{Routine name} & \textbf{In} & \textbf{Out} & \textbf{Exceptions}\\
\hline
new vectorT & real $\rightarrow$ real & vectorT & ~\\
\hline
getf & ~ & real $\rightarrow$ real & ~\\
\hline
eval & real, real, integer & sequence of real & deltaNeg, nstepsNeg\\
\hline
evalPrint & real, real, integer & ~ & deltaNeg, nstepsNeg\\
\hline
\end{tabular}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Vector Module Semantics}
\textbf{Environment Variables}\\
$\mathit{screen}$ : two dimensional sequence of positions on the screen, which each position holding a character\\
~\newline
\textbf{State Variables}\\
$f$: real $\rightarrow$ real\\
~\newline
\textbf{Access Routine Semantics}\\
\noindent eval ($\mathit{startx}, \mathit{deltax}, \mathit{nsteps}$):
\begin{itemize}
\item output: $out := < f(\mathit{startx}), f(\mathit{startx} + \mathit{deltax}), f(\mathit{startx} + 2 \cdot \mathit{deltax}), ...
, f(\mathit{startx} + \mathit{nsteps} \cdot \mathit{deltax})>$
\item exception: $exc := ((\mathit{deltax} < 0) \Rightarrow \mbox{deltaNeg} | (\mathit{nsteps} < 0) \Rightarrow
\mbox{nstepsNeg})$
\end{itemize}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Vector Module Semantics Continued}
\noindent evalPrint ($\mathit{startx}, \mathit{deltax}, \mathit{nsteps}$):
\begin{itemize}
\item transition: The state of $\mathit{screen}$ is modified so that the sequence returned by eval ($\mathit{startx}$,
$\mathit{deltax}$, $\mathit{nsteps}$) is displayed.
\item exception: $exc := ((\mathit{deltax} < 0) \Rightarrow \mbox{deltaNeg} | (\mathit{nsteps} < 0) \Rightarrow
\mbox{nstepsNeg})$
\end{itemize}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Parnas's Rational Design Process (RDP)}
\begin{itemize}
\item SRS
\item MG
\item Uses Hierarchy (produced after all MISs)
\item For each module
\begin{itemize}
\item MIS
\item MID
\end{itemize}
\item Implementation
\item Testing
\item Very successfully used on projects such as
\begin{itemize}
\item The Darlington Nuclear Reactor shutdown system
\item The A7-E fighter jet
\end{itemize}
\end{itemize}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{RDP - Views}
\begin{itemize}
\item As well as the MG, the modular decomposition should be displayed using a variety of views
\item An obvious one is the \structure{Uses Hierarchy}
\item The Uses Hierarchy can be formed once the MIS for all modules is complete
\item The Uses Hierarchy can be represented
\begin{itemize}
\item Graphically (if it isn't too large and complex)
\item Using a binary matrix
\end{itemize}
\end{itemize}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{RDP - MG}
\begin{itemize}
\item Criteria for a good secret
\begin{itemize}
\item One module one secret (if possible)
\item Secrets should often be nouns (data structure, algorithm, hardware, ...)
\item Secrets are often phrased as ``How to ... ''
\end{itemize}
\end{itemize}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{RDP - MID}
\begin{itemize}
\item Another document that is often helpful is the Module Internal Design (MID) for each module
\item The MID provides the implementation of the module; that is, it shows how we will deliver on what is promised in
the MIS
\item The MID is requirements for the code represented at a higher level of abstraction than the code
\item The MID uses the syntax of the selected programming language
\item The MID shows decisions like whether to use a static array, or dynamic memory allocation and pointers
\end{itemize}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Mesh Generator Simple Rectangular Geometry}
\vspace{-1cm}
\begin{figure}[H]
\includegraphics[scale=0.35, angle=-90]{ExampleMesh.pdf}
\end{figure}\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Mesh Generator Complex Circular Geometry}
\begin{figure}[H]
\includegraphics[scale=0.25]{magnetron1.pdf}
\end{figure}\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Mesh Generator Example: Design Goals}
\begin{itemize}
\item Independent and flexible representation for each mesh entity
\item Complete separation of geometric data from the topology
\item The mesh generator should work with different coordinate systems
\item A flexible data structure to store sets of vertices, edges and triangles
\item Different mesh generation algorithms with a minimal amount of local changes
\end{itemize}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Mesh Generator Uses Hierarchy}
\begin{figure}[H]
\includegraphics[scale=0.345]{hierarchy_diagram.pdf}
\end{figure}\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Dr.\ v.\ Mohrenschildt's Maze Tracing Robot Example}
\begin{figure}
\includegraphics[scale=0.42]{ExampleMaze.pdf}
\end{figure}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}
File added
File added
File added
File added
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