%\documentclass[handout]{beamer} 
\documentclass[t,12pt,numbers,fleqn]{beamer}
%\documentclass[ignorenonframetext]{beamer}

\newif\ifquestions
%\questionstrue
\questionsfalse

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

\usepackage{booktabs}
\usepackage{hhline}
\usepackage{multirow}
\usepackage{multicol}
\usepackage{array}
\usepackage{listings}
\usepackage{bm}
\usepackage{colortbl}
\usepackage{bnf}

\usepackage{tikz}
\usetikzlibrary{positioning}

\newcommand{\colA}{2.1cm}
\newcommand{\colB}{6.9cm}
\newcommand{\colC}{1.1cm} %do not need this column if binding time is not listed
\newcommand{\colAwidth}{0.15\textwidth}
\newcommand{\colBwidth}{0.7\textwidth}

\newcounter{temp}
\setcounter{temp}{0}

\bibliographystyle{plain}

%\usetheme{Iimenau}

\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}{05 Program Families}

\input{../titlepage}

\begin{document}

\input{../footline}

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

\begin{frame}
\frametitle{Program Families}

\bi
\item Administrative details
\item Motivating a document driven design process %including documentation
\item Finish up SRS Example
\item Requirements specification qualities 
\item Motivation for families
\item Proposed family methods
\item Family of Linear Solvers
\item Other examples (covered in ``bonus'' slides)
\bi
\item Family of Mesh Generators (in other set of slides)
\item Family of Material Behaviour Models (in other set of slides)
\ei 
\ei
\end{frame}

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

\begin{frame}
\frametitle{Administrative Details}

\bi
\item Not all projects approved
(\href{https://gitlab.cas.mcmaster.ca/smiths/cas741/-/blob/master/Repos.csv?ref_type=heads}
{Repos.csv})
\item All rubrics available on Avenue (please verify you can see them)
%\item 80 columns in tex files
%\item Spell check
%\item Replace ``in order to'' by ``to''
%\item Use a \texttt{.gitignore} file
%\item Include the commit hash that closes the issue
%\item Close issues assigned to you

\ei

\end{frame}

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

\input{../Deadlines.tex}

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

\begin{frame}
\frametitle{Administrative Details: Presentations}

\bi
\item Presentation length depends (15-20 min)
\item Informal
\item HDMI connection in room
\item To help you prepare your written document
\item Questions from audience
\item Grading out of 3
\bi 
\item Generate discussion, evidence of thought, organized 3/3
\item Any element missing from above 2/3
\item Any two elements missing from above 1/3
\item No presentation 0/3
\ei
\ei

\end{frame}

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

\begin{frame}
\frametitle{SRS Presentations}
\bi
\item Project name
\item Example of calculation
\item Draft Goal statements
\item Draft Assumptions
\item Draft Input and output variables (data constraints)
\item Draft General Definitions and Theoretical models
\item Draft Instanced models
\item Questions (from reviewers, instructor, anyone)
\ei
\end{frame}

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

\input{../PresentationGuidelines}

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

\begin{frame}
\frametitle{GitHub Issues}

\bi
\item Reviewers GitHub issues
  \begin{itemize}
  \item \textbf{Please limit the number of issues related to formatting :-)}
  \item Issues that are questions are fine
  \item \href{https://github.com/JacquesCarette/Drasil/issues/2248} {Example of
      question label}
  \item \href{https://github.com/JacquesCarette/Drasil/issues/2242} {Example of
    ``at'', and traceability}
  \item One issue, per issue
  \item \href{https://github.com/JacquesCarette/Drasil/issues/2241} {Connection to
    commit and pull request}
  \item \href{https://github.com/JacquesCarette/Drasil/issues/3031}
  {screenshots, links, full description}
  % \item
  % \href{https://github.com/smiths/capTemplate/blob/main/docs/Checklists/Writing-Checklist.pdf}
  % {Writing Checklist} include advice on issue creation
  \end{itemize}
\item Pull request of Repos.csv for suggested domain reviewer
\begin{itemize}
  \item You can discuss with colleagues and find your own domain reviewer
  \item Otherwise one will be assigned
  \item Due Jan 29
\end{itemize}
\ei

\end{frame}

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

\input{../GitHubReviews.tex}

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

\begin{frame}
\frametitle{Motivation: Solar Water Heating System}
\bi
\item Given code for
\href{https://github.com/smiths/swhs/tree/master/src/Program/Python} {Solar
Water Heating System}
\item Asked to
\begin{itemize}
  \item Verify that the code is correct
  \item Supervise a team maintaining the code
  \item Add thermal cooling from the tank
  \item Create a new code for the thermal analysis of reactor fuel pins
\end{itemize}
\ei
\end{frame}

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

\begin{frame}
\frametitle{Accompanying ``Specification''}

\href{https://www.sciencedirect.com/science/article/pii/S0038092X17310174\#b0150} {A Journal Paper}\\
\begin{center}
 \includegraphics[width=1.1\textwidth]{../Figures/JournalSWHSTheory.png}
\end{center}

\end{frame}

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

\begin{frame}

\frametitle{Examples, Checklist and Template}

\begin{itemize}

\item
  \href{https://jacquescarette.github.io/Drasil/examples/projectile/SRS/srs/Projectile_SRS.html}
  {Projectile Example}
\item
  \href{https://jacquescarette.github.io/Drasil/examples/glassbr/SRS/srs/GlassBR_SRS.html}
  {GlassBR Example}
\item
  \href{https://jacquescarette.github.io/Drasil/examples/swhsnopcm/SRS/HTML/SWHSNoPCM_SRS.html}
  {SWHS Example} (Let's go through this one)
\item
  \href{https://github.com/smiths/capTemplate/blob/main/docs/SRS/SRS.pdf}
  {Blank SRS from Template} (Let's look at the advice/hints)
\item
  \href{https://github.com/smiths/capTemplate/blob/main/docs/Checklists/SRS-Checklist.pdf} {Checklist}
\end{itemize}

\end{frame}

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

% \begin{frame}
% \frametitle{More Example Projects}
% \bi
% \item
% \href{https://jacquescarette.github.io/Drasil/examples/dblpendulum/SRS/srs/DblPendulum_SRS.html}
% {Double Pendulum}
% \item \href{https://github.com/icbicket/SpectrumImageAnalysisPy}
%   {SpectrumImageAnalysisPy}
% \item \href{https://github.com/PeaWagon/Kaplan} {Conformer Searching using
%     Evolutionary Computation}
% \item \href{https://github.com/Ao99/MISEG} {Medical Image Segmentation}
% \item \href{https://github.com/caobo1994/FourierSeries} {Fourier Series}
% \item \href{https://github.com/sorainsm/library-of-lighting-models} {Library of
%     Lighting Models}
% \item \href{https://github.com/slimpotatoes/STEM_Moire_GPA} {Scanning
%     Transmission Electron Microscopy}
% \item \href{https://github.com/palmerst/cas741_sp} {Chemical Speciation}
% \ei
% \end{frame}

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

\begin{frame}
\frametitle{Questions?}
\begin{itemize}
\item Questions about SRS?
\item Any questions on the 
  \href{https://github.com/smiths/capTemplate/blob/main/docs/SRS/SRS.pdf}
  {SRS Template?}
\item Any questions on the 
  \href{https://github.com/smiths/capTemplate/blob/main/docs/Checklists/Writing-Checklist.pdf}
  {Writing Checklist?}
\item Any questions on the 
  \href{https://github.com/smiths/capTemplate/blob/main/docs/Checklists/SRS-Checklist.pdf}
  {SRS Checklist?}
\item Is $a = \frac{dv}{dt}$ a TM or a DD?
\end{itemize}
\end{frame}

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

\begin{frame}
\frametitle{Software Requirements Activities}
\begin{itemize}
\item A software requirement is a description of how the system should behave,
  or of a system property or attribute
\item Requirements should be \textbf{abstract}, \textbf{unambiguous},
\textbf{complete}, \textbf{consistent}, \textbf{modifiable}, \textbf{verifiable}
and \textbf{traceable}
\item Requirements should express ``What'' not ``How''
\item Formal versus informal specification
\item Functional versus nonfunctional requirements
\item Software requirements specification (SRS)
\item Requirements template
\end{itemize}
\end{frame}

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

% \begin{frame}
% \frametitle{Kreyman and Parnas Five Variable Model}
% \begin{itemize}
% \item See \cite{KreymanAndParnas2002}
% \item An alternative approach
% \item Unfortunately the numerical algorithm is not hidden in the requirements specification
% \item The analogy with real-time systems leads to some confusion
% \end{itemize}
% \end{frame}

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

% \begin{frame}
% \frametitle{Examples}
% \begin{itemize}
% \item \href{https://github.com/smiths/swhs} {Solar Water Heating System}
% \item
%   \href{https://github.com/smiths/caseStudies/tree/master/CaseStudies/glass/docs/SRS}
%   {GlassBR}
% \end{itemize}
% \end{frame}

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

\begin{frame}
\frametitle{Outline of Discussion of Requirements}

\begin{itemize}

% \item Background on requirements elicitation, analysis, and documentation
% \item Why requirements analysis for engineering computation?

\item System Requirements Specification and template for beam analysis software
\begin{itemize}
\item Provides guidelines
\item Eases transition from general to specific
\item Catalyses early consideration of design
\item Reduces ambiguity
\item Identifies range of model applicability
\item Clear documentation of assumptions
\end{itemize}

\end{itemize}
\end{frame}

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

\begin{frame}
\frametitle{A Rational Design Process}
%\begin{figure}
\begin{center}
 \includegraphics[width=1.0\textwidth]{../Figures/reqSE.pdf}
\end{center}
%\end{figure}
\end{frame}

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

\begin{frame}
\frametitle{Sometimes Include Commonality Analysis}
%\begin{figure}
\begin{center}
 \includegraphics[width=1.0\textwidth]{../Figures/Waterfall.pdf}
\end{center}
%\end{figure}
\end{frame}

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

\begin{frame}
\frametitle{Software Requirements Activities}
\begin{itemize}
\item A software requirement is a description of how the system should behave,
  or of a system property or attribute
\item Requirements should be abstract, unambiguous, complete, consistent,
  modifiable, verifiable and traceable
\item Requirements should express ``What'' not ``How''
\item Formal versus informal specification
\item Functional versus nonfunctional requirements
\item Software requirements specification (SRS)
\item Requirements template
\end{itemize}
\end{frame}

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

\begin{frame}
\frametitle{Why Requirements Analysis?}
%\begin{figure}
\begin{center}
 \includegraphics[width=1.0\textwidth]{../Figures/StagesInSciCompErrors.pdf}
\end{center}
%\end{figure}
\end{frame}

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

\begin{frame}
\frametitle{Beam Analysis Software}
~\newline
~\newline
\begin{center}
 \includegraphics[width=1.0\textwidth]{../Figures/beamFBD.pdf}
\end{center}
\end{frame}

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

\begin{frame}
\frametitle{Proposed Template}

From \cite{SmithEtAl2007}

\scalebox{0.85}{
\begin{minipage}{1.2\textwidth}
\begin{enumerate}

\item Reference Material: a) Table of Symbols ...

\item Introduction: a) Purpose of the Document; b) Scope of the Software Product; c) Organization of the Document.

\item General System Description: a) System Context; b) User Characteristics; c) System Constraints.

\item Specific System Description:
\begin{enumerate}
\item Problem Description: i) Background Overview ...
\item Solution specification: i) Assumptions; ii) Theoretical Models; ...
\item Non-functional Requirements: i) Accuracy of Input Data; ii) Sensitivity ...
\end{enumerate}

\item{Traceability Matrix}

\item List of Possible Changes in the Requirements

\item{Values of Auxiliary Constants}

\end{enumerate}
\end{minipage}
}
\end{frame}

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

\begin{frame}
\frametitle{Provides Guidance}
\begin{itemize}
\item Details will not be overlooked, facilitates multidisciplinary collaboration
\item Encourages a systematic process
\item Acts as a checklist
\item Separation of concerns
\begin{itemize}
\item Discuss purpose separately from organization
\item Functional requirements separate from non-functional
%\begin{itemize}
%\item solve for forces
%\item system responds within 1 second
%\end{itemize}
\end{itemize}
\item Labels for cross-referencing
\begin{itemize}
\item Sections, physical system description, goal statements, assumptions, etc.
\item PS1.a ``the shape of the beam is long and thin''
\end{itemize}
%\item Use of parameters instead of explicit values
\end{itemize}
\end{frame}

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

\begin{frame}
\frametitle{Eases Transition from General to Specific}
\begin{itemize}
\item ``Big picture'' first followed by details
\item Facilitates reuse
\item ``Introduction'' to ``General System Description'' to ``Specific System Description''
\item Refinement of abstract goals to theoretical model to instanced model
\begin{itemize}
\item \textbf{G1}. Solve for the unknown external forces applied to the beam
\item $ \textbf{T1}~ 
\textrm{$\sum{F_{xi}} = 0$,}~  
\textrm{$\sum{F_{yi}} = 0$,}~
\textrm{$\sum{M_i} = 0$}$
\item \textbf{M1} \textrm{$F_{ax} - F_1\cdot \cos\theta_3 - F_2\cdot \cos\theta_4 - F_{bx} = 0$}
\end{itemize}
\end{itemize}
\end{frame}

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

\begin{frame}
\frametitle{Ensures Special Cases are Considered}
\scalebox{0.6}{
\begin{tabular}{| p{3.8cm} | p{1.7cm} | p{0.05cm} | p{9.0cm} | p{1.8cm} |}
\multicolumn{3}{c}{} & \multicolumn{2}{>{\large}c}{$H_1$} \\
\hhline{|~|~|~|-|-|}
\multicolumn{3}{c}{} & \multicolumn{1}{|c|}{$S_{GET} = S_{sym} - S_{unkF}$} & $S_{GET} \ne  (S_{sym} - S_{unkF})$ \\
\hhline{|~|~|~|-|-|}

\hhline{|-|-|~|-|-|} $S_{unkF} \notin \mathbb{P}_3$ & - &  & $(ErrorMsg'=InvalidUnknown)$ \newline
$\land ChangeOnly(ErrorMsg)$ &
\multirow{9}{2cm}{$FALSE$} \\
\hhline{|-|-|~|-|~|} $S_{unkF} = \newline \{@{F_{ax}}, @{F_{bx}}, @{F_{ay}} \}$ & - & & $ErrorMsg'=NoSolution$ \newline
$\land ChangeOnly(ErrorMsg)$ & \\
%\hhline{|-|-|~|-|~|} $S_{unkF} = \newline \{@{F_{ax}}, @{F_{bx}}, @{F_{by}} \}$ & - & & $ErrorMsg'=NoSolution$ \newline
%$\land ChangeOnly(ErrorMsg)$ & \\
%\hhline{|-|-|~|-|~|} $S_{unkF} = \newline \{@{F_{ax}}, @{F_{bx}}, @{F_1} \}$ & - & & $ErrorMsg'=NoSolution$ \newline
%$\land ChangeOnly(ErrorMsg)$ & \\
%\hhline{|-|-|~|-|~|} $S_{unkF} = \newline \{@{F_{ax}}, @{F_{bx}}, @{F_2} \}$ & - & & $ErrorMsg'=NoSolution$ \newline
%$\land ChangeOnly(ErrorMsg)$ & \\
\hhline{|-|-|~|-|~|}
%\multirow{3}{4.2cm}
{$S_{unkF} = \newline \{@{F_{ax}}, @{F_{ay}}, @{F_1}\}$} & 
$x_1 \ne 0 $ \newline
$\land~\theta_3 \ne 0$ \newline
$\land~\theta_3 \ne 180$
& & 
$F_{ax}' = $\newline
$\frac{-\cos\theta_3 F_2 x_2 \sin\theta_4 + \cos\theta_3 F_{by} L + F_2 \cos\theta_4 x_1 \sin\theta_3
+ F_{bx} x_1 \sin\theta_3}{x_1 \sin\theta_3}$\newline
$\land$\newline
$F_{ay}' = -\frac{F_2 x_2 \sin\theta_4 - F_{by} L - F_2 \sin\theta_4 x_1 + F_{by} x_1}{x_1}$\newline
{$\land~F_1' = \frac{-F_2 x_2 \sin\theta_4 + F_{by} L}{x_1 \sin\theta_3} \land ChangeOnly(S_{unkF})$}
& \\
\hhline{|~|-|~|-|~|} & $otherwise$ & & $(ErrorMsg'=Indeterminant)$\newline
$\land ChangeOnly(ErrorMsg)$ & \\
\hhline{|-|-|~|-|-|}

\multicolumn{5}{c}{} \\
\multicolumn{3}{>{\large}c}{$H_2$} & \multicolumn{2}{>{\large}c}{$G$} \\
\end{tabular} }
\end{frame}

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

\begin{frame}
\frametitle{Catalyses Early Consideration of Design}
\begin{itemize}
\item Identification of significant issues early will improve the design
\item Section for considering sensitivity
\begin{itemize}
\item Conditioning?
\item Buckling of beam
\end{itemize}
\item Non-functional requirements
\begin{itemize}
\item Tradeoffs in design
\item Speed efficiency versus accuracy
\end{itemize}
\item Tolerance allowed for solution: $|\sum{F_{xi}}| / \sqrt{\sum{F_{xi}}^2} \le \epsilon$
\item Solution validation strategies (now in a separate document)
\item List of possible changes in requirements
\end{itemize}
\end{frame}

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

\begin{frame}
\frametitle{Reduces Ambiguity}
\begin{itemize}
\item Unambiguous requirements allow communication between experts, requirements review, designers do not have to
make arbitrary decisions
\item Tabular expressions allow automatic verification of completeness
\item Table of symbols
\item Abbreviations and acronyms
\item Scope of software product and system context
\item User characteristics
\item Terminology definition and data definition
\item Ends arguments about the relative merits of different designs
\end{itemize}
\end{frame}

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

\begin{frame}
\frametitle{Identifies Range of Model Applicability}
\begin{itemize}
\item Clear documentation as to when model applies
\item Can make the design specific to the problem
\item Input data constraints are identified
\begin{itemize}
\item Physically meaningful: $0 \leq x_1 \leq L$
\item Maintain physical description: PS1.a, $0 < h \leq 0.1 L$
\item Reasonable requirements: $0 \leq \theta_3 \leq 180$
\end{itemize}
\item The constraints for each variable are documented by tables, which are later composed together
\item $(min_f \le |F_{ax}| \le max_f) 
\land (|F_{ax}| \ne 0) \Rightarrow \forall ({FF}|{@{FF} \in S_F} \cdot {FF \ne 0
\land  \frac{max\{{|F_{ax}|,|FF|}\}}{min\{{|F_{ax}|, |FF|}\}} \le 10 ^ {r_f}})$
\end{itemize}
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}

\frametitle{Summary of Variables}

\begin{table}
\begin{center}
\scalebox{0.9}{
\begin{tabular}{|l|l|p{3.0cm}|p{3.3cm}|l|}
\multicolumn{5}{c}{} \\
\hline
\textbf{Var} & \textbf{Type} & \textbf{Physical\newline Constraints} & \textbf{System\newline Constraints} &
\textbf{Prop} \\
\hline $x$ & $Real$ & $x\ge 0 \land x\le L$ & $min_d \le x \le max_d$ & NIV \\
\hline $x_1$ & $Real$ & $x_1\ge0 \land x_1\le L$ & $min_d \le x_1 \le max_d$ & IN \\
\hline $x_2$ & $Real$ & $x_2\ge0 \land x_2\le L$ & $min_d \le x_2 \le max_d$ & IN \\
\hline $e$ & $Real$ & $e>0 \land e \le h$ & $min_e \le e \le max_e$ & IN \\
\hline $h$ & $Real$ & $h>0 \land h\le 0.1L$ & $min_h \le h \le max_h$ & IN \\
\hline $L$ & $Real$ & $L>0$ & $min_d \le L \le max_d$ & IN \\
\hline $E$ & $Real$ & $E>0$ & $min_E \le E \le max_E$ & IN \\
\hline $\theta_3$ & $Real$ & $-\infty < \theta_3 < +\infty$ & $0 \le \theta_3 \le 180$ & IN \\
\hline $\theta_4$ & $Real$ & $-\infty < \theta_4 < +\infty$ & $0 \le \theta_4 \le 180$ & IN \\
\hline $V$ & $Real$ & $-\infty < V < +\infty$ & - & OUT \\
\hline $M$ & $Real$ & $-\infty < M < +\infty$ & - & OUT \\
\hline $y$ & $Real$ & $-\infty < y < +\infty$ & - & OUT \\
\hline $...$ & $...$ & $...$ & ... & ... \\
\hline
\end{tabular} }
\end{center}
\end{table}

\end{frame}

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

\begin{frame}
\frametitle{Clear Documentation of Assumptions}
\scalebox{0.82}{
\begin{tabular}{| p{1.3cm} | p{1.3cm} | l | l | l | l | l | l | l | l | l | l | l | l |}
\hhline{--------------}
Phy. Sys. /Goal & Data /Model & \multicolumn{10}{c|}{Assumption} & \multicolumn{2}{c|}{Model} \\
\hhline{~~------------}
&  & A1 & A2 & ... & A4 & ... & A8 & A9 & A10 & ...  & A14 & \textbf{M1} & ... \\
\hhline{--------------}
\textbf{G1} & \textbf{T1} & $\surd$ & & ... &  & ... & $\surd$ & $\surd$ &  & ... & & $\surd$ & ...\\
\hhline{--------------}
\textbf{G2} & \textbf{T2} & $\surd$ & & ... & &... & $\surd$ & $\surd$ &  & ... & &  & ... \\
\hhline{--------------}
\textbf{G3} & \textbf{T3} & $\surd$ & & ... &  &... &  & $\surd$ & $\surd$ & ... & &  & ...\\
\hhline{--------------}
~ & \textbf{M1} &  & $\surd$ & ...  &  & ... &  & &  & ... & & $\surd$ &... \\
\hhline{--------------}
PS1.a & $L$ &  & &... & &...  & & & $\surd$  & ... & & ... & ... \\
\hhline{--------------}
... & ... & ... & ... & ... & ... & ... & ... & ... & ... & ... & ... & ... & ... \\
\hhline{--------------}
\end{tabular}
}
~\newline
~\newline
\textbf{A10}. The deflection of the beam is caused by bending moment only, the
shear does not contribute.\\
%\textbf{A15}. The beam behaves as a rigid body
\end{frame}

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

% \frame{\frametitle{More on the Template}
% \begin{itemize}%[<+-| alert@+>]%[iacolor=gray]
% \item Why a new template?
% \item The new template
% \begin{itemize}
% \item Overview of changes from existing templates
% \item Goal $\rightarrow$ Theoretical Model $\rightarrow$ Instanced Model hierarchy
% \item Traceability matrix
% \item System behaviour, including input constraints
% \end{itemize}
% \end{itemize}
% }

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

% \frame{\frametitle{Why a New Template?}
% From \cite{SmithAndLai2005, Lai2004}
% \begin{enumerate}%[<+-| alert@+>]%[iacolor=gray]
% %\item Reasons for a new template also form principles for its design
% \item One user viewpoint for the physical model
% \item Assumptions distinguish models
% \item High potential for reuse of functional requirements
% \item Characteristic hierarchical nature facilitates change
% \item Continuous mathematics presents a challenge
% \end{enumerate}
% }

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

% \frame{\frametitle{Overview of the New Template}

% \begin{itemize}

% \item{Reference Material}

% \item{Introduction:} 
% {a) Purpose of the Document}
% {b) Scope of the Software Product}
% {c) Organization of the Document}

% \item General System Description:
% {a) System Context}
% {b) User Characteristics}
% {c) System Constraints}

% \item \structure<2->{Specific System Description:
% a) Problem Description 
% b) Solution Characteristics Specification
% c) Non-functional Requirements}

% \item{Other System Issues}

% \item \structure<2->{Traceability Matrix}

% \item List of Possible Changes in the Requirements

% \item{Values of Auxiliary Constants}

% \item{References}

% \end{itemize}
% }

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

% \begin{frame}
% \frametitle{Excerpts from Specific System Description}

% \begin{itemize}

% \item Problem Description
% \begin{itemize}
% \item Physical system description (\textbf{PS}) 
% \item Goals (\textbf{G})
% \end{itemize}
 
% \item Solution Characteristics Specification
% \begin{itemize}
% \item Assumptions (\textbf{A})
% \item Theoretical models (\textbf{T})
% \item Data definitions
% \item Instanced models (\textbf{M})
% \item Data constraints
% \item System behaviour
% \end{itemize}

% \item Non-functional Requirements
% \begin{itemize}
% \item Accuracy of input data
% \item Sensitivity of the model
% \item Tolerance of the solution
% \item Solution validation strategies (now moved to a separate document)
% \end{itemize}

% \end{itemize}

% \end{frame}

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

\begin{frame}
\frametitle{Refinement from Abstract to Concrete}

\begin{overlayarea}{\textwidth}{5.3cm}
\begin{figure}[H]
\includegraphics<1>[scale=0.41]{../Figures/RefinementHierarchy.pdf}
\includegraphics<2>[scale=0.41]{../Figures/RefinementG1.pdf}
\includegraphics<3>[scale=0.41]{../Figures/RefinementT11.pdf}
\includegraphics<4>[scale=0.41]{../Figures/RefinementM111.pdf}
\includegraphics<5>[scale=0.41]{../Figures/RefinementT12.pdf}
\end{figure}
\end{overlayarea}

\begin{overlayarea}{\textwidth}{1cm}

\only<2>{\textbf{G1}: Solve for unknown forces}

\only<3>{
\begin{center} 
$%\begin{displaymath}
\mathbf{(T1_1)}~\left\{ 
\begin{array}{lll}
\textrm{$\sum{F_{xi}} = 0$}\\  
\textrm{$\sum{F_{yi}} = 0$}\\
\textrm{$\sum{M_i} = 0$}\\
\end{array} \right. $%\end{displaymath}
\end{center}
}

\only<4>{
\begin{center} $%\begin{displaymath}
\textbf{(M1)}~\left\{ 
\begin{array}{lll}
\textrm{$F_{ax} - F_1\cdot \cos\theta_3 - F_2\cdot \cos\theta_4 - F_{bx} = 0$} \\ 
\textrm{$F_{ay} - F_1\cdot \sin\theta_3 - F_2\cdot \sin\theta_4 + F_{by} = 0$}\\
\textrm{$- F_1\cdot x_1\sin\theta_3 - F_2\cdot x_2\sin\theta_4 + F_{by}\cdot L = 0$}\\
\end{array} \right. 
$%\end{displaymath}
\end{center}
}

\only<5>{ The virtual work done by all the external forces and couples acting on
the system is zero for each independent virtual displacement of the system, or
mathematically $\delta U = 0$ }
\end{overlayarea}

\end{frame}

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

\begin{frame}
\frametitle{Other goals and models}
\begin{itemize}
\item \textbf{G2}: Solve for the functions of shear force and bending moment along the beam
\item \textbf{G3}: Solve for the function of deflection along the beam
\item $\mathbf{T3_1}$: $\frac{d^2 y}{d x^2} = \frac{M}{EI}$, $y(0) = y(L) = 0$
\item $\mathbf{T3_2}$: $y$ determined by moment area method
\item $\mathbf{T3_3}$: $y$ determined using Castigliano's theorem
\item $\mathbf{M3_{11}}$: $y = \frac{12 \int_0^L (\int_0^L M dx) dx}{Eeh^3}$, $y(0) = y(L) = 0$
\end{itemize}
\end{frame}

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

\begin{frame}
\frametitle{Kreyman and Parnas Five Variable Model}
\begin{itemize}
\item See \cite{KreymanAndParnas2002}
\item An alternative approach
\item Unfortunately the numerical algorithm is not hidden in the requirements specification
\item The analogy with real-time systems leads to some confusion
\end{itemize}
\end{frame}

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

\begin{frame}
\frametitle{Links to Papers}

\begin{itemize}
\item
\href{https://gitlab.cas.mcmaster.ca/smiths/pub/-/blob/master/SmithAndChen2004.pdf}
{SmithAndChen2004} \cite{SmithAndChen2004} Commonality Analysis overview
\item
\href{https://gitlab.cas.mcmaster.ca/smiths/pub/-/blob/master/SmithAndChen2004b.pdf}
{SmithAndChen2004b} \cite{SmithAndChen2004b} CA example MG
\item
\href{https://gitlab.cas.mcmaster.ca/smiths/pub/-/blob/master/SmithAndLai_2005.pdf}
{SmithAndLai2005} \cite{SmithAndLai2005} New requirements template
\item
\href{https://gitlab.cas.mcmaster.ca/smiths/pub/-/blob/master/Smith2006_VersionAsPublished.pdf}
{Smith2006} \cite{Smith2006} General purpose tool template
\item
\href{https://gitlab.cas.mcmaster.ca/smiths/pub/-/blob/master/SmithEtAl2007.pdf}
{SmithEtAl2007} \cite{SmithEtAl2007} Template for SC audience
\item
\href{https://gitlab.cas.mcmaster.ca/smiths/pub/-/blob/master/SmithAndKoothoor2016.pdf}{SmithAndKoothoor2016} \cite{SmithAndKoothoor2016} Nuclear fuelpin example
\item
\href{https://gitlab.cas.mcmaster.ca/smiths/pub/-/blob/master/SmithEtAl2019_arXiv.pdf}
{SmithEtAl2019\_arXiv} \cite{SmithEtAl2019_arXiv} Debunk upfront myth
\item
\href{https://gitlab.cas.mcmaster.ca/smiths/pub/-/blob/master/Smith2016.pdf}
{Smith2016} \cite{Smith2016} Overview of artifacts
\item
\href{https://gitlab.cas.mcmaster.ca/smiths/pub/-/blob/master/KreymanAndParnas2002.pdf}
{KreymanAndParnas2002} \cite{KreymanAndParnas2002} 4 variable method
\end{itemize}
\end{frame}

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

\begin{frame}
\frametitle{Refined Theories Version of SRS}

\begin{itemize}
\item Shortcomings of the template
\begin{itemize}
  \item Tedious to write and maintain (addressed by Drasil)
  \item Three levels of refinement is arbitrary
  \item Sloppy for notation ($T$ should be $T(t)$ etc.)
  \item Assumptions are not systematically propagated
\end{itemize}
\item Future refined theories version
\begin{itemize}
  \item Arbitrary levels of refinement
  \item Pre and post conditions for theories
  \item Assumptions are inherited
  \item Proof (rationale) obligations for final theories
  \item Example for
  \href{https://github.com/smiths/caseStudies/blob/master/CaseStudies/noPCM/docs/SRS/TheoriesVersion_NoPCM_SRS.pdf}
  {noPCM}
\end{itemize}
\end{itemize}
\end{frame}

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

% \begin{frame}
% \frametitle{Summary of Template}
% \begin{itemize}
% \item Quality is a concern for scientific computing software
% \item Software engineering methodologies can help
% \item Motivated, justified and illustrated a method of writing requirements specification for engineering computation
% to improve reliability
% \item Also improve quality with respect to usability, verifiability, maintainability, reusability and portability
% \item Tabular expressions to reduce ambiguity, encourage systematic approach
% \item Conclusions can be generalized because other computation problems follow the same pattern of \emph{Input} then
% \emph{Calculate} then \emph{Output}
% \item Benefits of approach should increase as the number of details and the number of people involved increase
% \end{itemize}
% \end{frame}

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

% \begin{frame}
% \frametitle{Summary of Template (Continued)}
% \begin{itemize}
% \item A new template for scientific computing has been developed
% \item Characteristics of scientific software guided the design
% \item Designed for reuse
% \item Functional requirements split into ``Problem Description'' and ``Solution Characteristics Specification''
% \item Traceability matrix
% \item Addresses nonfunctional requirements (but room for improvement)
% \end{itemize}

% \end{frame}

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

% \begin{frame}[allowframebreaks]
% \frametitle{References}

% %\bibliography{../../ReferenceMaterial/References}

% \end{frame}

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

\begin{frame}
\frametitle{Specification Qualities}

\begin{itemize}

\item \structure{What are the important qualities for a specification?  What
    makes a specification a good specification?}

\end{itemize}

\end{frame}

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

\begin{frame}
\frametitle{Specification Qualities}

\begin{itemize}
% \item The qualities we previously discussed (usability, maintainability,
%   reusability, verifiability etc.)
\item Clear, unambiguous,  understandable
\item Consistent
\item Complete
\begin{itemize}
\item Internal completeness
\item External completeness
\end{itemize}
\item Incremental
\item Validatable
\item Abstract
\item Traceable
\end{itemize}

Summarized in \cite[p.\ 406]{SmithAndKoothoor2016}

\end{frame}

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

\begin{frame}
\frametitle{Clear, Unambiguous, Understandable}

\begin{itemize}

\item Specification fragment for a word-processor
\begin{itemize}
\item \structure{Selecting is the process of designating 
areas of the document that you want to 
work on. Most editing and formatting 
actions require two steps: first you 
select what you want to work on, 
such as text or graphics; then you 
initiate the appropriate action.}
\end{itemize}
\item What are the potential problems with this specification?
\begin{itemize}
\item<2-> {\alert{Can an area be scattered?}}
\item<2->{\alert{Can both text and graphics be selected?}}
\end{itemize}
\end{itemize}

\end{frame}

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

\begin{frame}
\frametitle{Clear, Unambiguous, Understandable}

\begin{itemize}

\item Specification fragment from a real safety-critical system
\begin{itemize}
\item \structure{The message must be triplicated. The three
copies must be forwarded through three 
different physical channels. The receiver 
accepts the message on the basis of a 
two-out-of-three voting policy.}
\end{itemize}
\item What is a potential problems with this specification?
\begin{itemize}
\item<2-> {\alert{Can a message be accepted as soon as we receive 2 out of 3
      identical copies, or do we need to wait for receipt of the 3rd}}
\end{itemize}
\end{itemize}

\end{frame}

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

\begin{frame}
\frametitle{Unambiguous, Validatable}

\begin{itemize}

\item Specification fragment for an end-user program
\begin{itemize}
\item \structure{The program shall be user friendly.}
\end{itemize}
\item What is a potential problems with this specification?
\begin{itemize}
\item<2-> {\alert{What does it mean to be user friendly?}}
\item<2-> {\alert{Who is a typical user?}}
\item<2-> {\alert{How would you measure success or failure in meeting this requirement?}}
\end{itemize}

\end{itemize}

\end{frame}

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

\begin{frame}
\frametitle{Unambiguous, Validatable}

\begin{itemize}

\item Specification fragment for a linear solver
\begin{itemize}
\item \structure{Given $A$ and $b$, solve the linear system $A x = b$ for $x$,
    such that the error in any entry of $x$ is less than 5 \%.}
\end{itemize}
\item What is a potential problems with this specification?
\begin{itemize}
\item<2-> {\alert{Is $A$ constrained to be square?}}
\item<2-> {\alert{Can $A$ be singular?}}
\item<2-> {\alert{Even if the problem is made completely unambiguous, the requirement cannot be validated.}}
\end{itemize}

\end{itemize}

\end{frame}

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

\begin{frame}
\frametitle{Consistent}

\begin{itemize}

\item Specification fragment for a word-processor
\begin{itemize}
\item \structure{The whole text should be kept in lines 
of equal length. The length is specified 
by the user. Unless the user gives an 
explicit hyphenation command, 
a carriage return should occur only 
at the end of a word.}
\end{itemize}
\item What is a potential problems with this specification?
\begin{itemize}
\item<2-> {\alert{What if the length of a word exceeds the length of the line?}}
\end{itemize}

\end{itemize}

\end{frame}

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

\begin{frame}
\frametitle{Same Symbol/Term Different Meaning}

\begin{itemize}

\item \structure{Can you think of some symbols/terms that have different
    meanings depending on the context?}

\end{itemize}

\end{frame}

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

\begin{frame}
\frametitle{Consistent}

\begin{itemize}

\item Language and terminology must be consistent within the specification
\item Potential problem with homonyms, for instance consider the symbol $\sigma$
\begin{itemize}
\item Represents standard deviation
\item Represents stress
\item Represents the Stefan-Boltzmann constant (for radiative heat transfer)
\end{itemize}
\item Changing the symbol may be necessary for consistency, but it could
  adversely effect understandability
\item Potential problem with synonyms
\begin{itemize}
\item Externally funded graduate students, versus eligible graduate students,
  versus non-VISA students
%ask who would think about graduate school?
\item Material behaviour model versus constitutive equation
\end{itemize}
\end{itemize}

\end{frame}

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

\begin{frame}
\frametitle{Complete}

\begin{itemize}

\item Internal completeness
\begin{itemize}
\item The specification must define any new concept or terminology that it uses
\begin{itemize}
\item A glossary is helpful for this purpose
\end{itemize}
\end{itemize}
\item External completeness
\begin{itemize}
\item The specification must document all the needed requirements
\begin{itemize}
\item Difficulty: when should one stop?
\end{itemize}
\end{itemize}

\end{itemize}

\end{frame}

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

\begin{frame}
\frametitle{Incremental}

\begin{itemize}

\item Referring to the specification process
\begin{itemize}
\item Start from a sketchy document and progressively add details
\item A document template can help with this
\end{itemize}
\item Referring to the specification document
\begin{itemize}
\item Document is structured and can be understood in increments
\item Again a document template can help with this
\end{itemize}

\end{itemize}

\end{frame}

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

\begin{frame}
\frametitle{Traceable}

\begin{itemize}

\item Explicit links
\bi
\item Within document
\item Between documents
\ei
\item Use labels, cross-references, traceability matricies
\item Common sense suggests traceability improves maintainability
\item Shows consequence of change
\item Minimizes cost of recertification
\item Additional advantages
\bi
\item Program comprehension
\item Impact analysis
\item Reuse
\ei
\item \structure{Why is traceability important?} %design for change
\end{itemize}

\end{frame}

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

\begin{frame}
\frametitle{Accuracy Versus Precision}

\begin{center}
 \includegraphics[width=1.0\textwidth]{../Figures/AccuracyPrecision_FromUniversityOfHawaiiAtManoa.png}
\end{center}

\structure{What is the distinction between accuracy and precision?}

\end{frame}

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

%\hoffset=-.8in
\begin{frame}[plain, fragile]

\frametitle{Program Family Examples}

% if time add another program family example

\begin{tikzpicture}[remember picture,overlay]
\node [xshift=0cm,yshift=-3.cm] at (current page.center)
{
\includegraphics[width=1.2\textwidth]{../Figures/apple-mac-products-450x128.jpg}
};
\end{tikzpicture}

\begin{tikzpicture}[remember picture,overlay]
\node [xshift=0cm,yshift=1.cm] at (current page.center)
{
\includegraphics[width=0.8\textwidth]{../Figures/dodge-lineup.jpg}
};
\end{tikzpicture}

\end{frame}
\hoffset=0in

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

\begin{frame}
\frametitle{Program Families}

\begin{itemize}

\item Can think of general purpose (or multi-purpose) SC software as a program
  family
\item Some examples of physical models are also appropriate for consideration as
  a family
\item A program family is a set of programs where it makes more sense to develop
  them together as opposed to separately
\item Analogous to families in other domains
\begin{itemize}
\item Automobiles
\item Computers
\item ...
\end{itemize}
\item Need to identify the commonalities
\item Need to identify the variabilities
\item Discussed in general in \cite{ClementsAndNorthrop2001,PohlEtAl2005}
\end{itemize}

\end{frame}

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

\begin{frame}
\frametitle{Background}

\begin{itemize}

\item Program family idea since the 1970s (Dijkstra, Parnas, Weiss, Pohl, ...) --
variabilities are often from a finite set of simple options \cite{Parnas1976,
Parnas1979, Dijkstra1972}
\item Families of algorithms and code generation in SC (Carette, ATLAS, Blitz++,
...) -- not much emphasis on requirements \cite{Carette2006, WhaleyEtAl2001,
Veldhuizen1998, Blitz2010}
%\item Problem Solving Environments (PSEs)
\item Work on requirements for SC
\begin{itemize}
\item Template for a single physical model \cite{SmithEtAl2007, SmithAndLai2005}
\item Template for a family of multi-purpose tool \cite{Smith2006,
    SmithAndChen2004, SmithAndChen2004b}
\item Template for a family of physical models
  \cite{SmithMcCutchanAndCarette2017, SmithEtAl2008, McCutchan2007}
\end{itemize}
\end{itemize}

\end{frame}

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

\begin{frame}

\frametitle{Motivation}
%:Improve Quality of Product and Process
\begin{itemize}

\item Requirements documentation
\begin{itemize}
\item Allows judgement of quality %need to know what require, 
\item Improves communication
\begin{itemize}
\item Between domain experts% and domain experts %missing models etc.
\item Between domain experts and programmers %experts on num algos
\item Explicit assumptions
\item Range of applicability
%\item Tradeoffs between nonfunctional requirements %ends arguments about best, 
% need to know what is most imp, might not need same accuracy for every aspect of the problem
\end{itemize}
%\item Provides a foundation for incremental delivery
\end{itemize}

\item A family approach, potentially including a DSL to allow generation of specialized programs
\begin{itemize}
\item Improves efficiency of product and process
\item Facilitates reuse of requirements and design, which improves reliability
\item Improves usability and learnability%DSL
%\item Improves learnability for non-experts %DSL
\item Clarifies the state of the art
\end{itemize}

\end{itemize}

\end{frame}

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

\begin{frame}

\frametitle{Advantages of Program Families to SC?}

\begin{itemize}
\item Usual benefits
\begin{itemize}
\item Reduced development time
\item Improved quality
\item Reduced maintenance effort
\item Increased ability to cope with complexity
\end{itemize}
\item Reusability
\begin{itemize}
\item Underused potential for reuse in SC
\item Reuse commonalities
\item Systematically handle variabilities
\end{itemize}
\item Usability
\begin{itemize}
\item Documentation often lacking in SC
\item Documentation part of program family methodology
\item Create family members that are only as general purpose as necessary
\end{itemize}
\item Improved performance
\end{itemize}

\end{frame}

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

\begin{frame}

\frametitle{Is SC Suited to a Program Family Approach?}

Based on criteria from Weiss \cite{ArdisAndWeiss1997, Weiss1997, Weiss1998,
  CukaAndWeiss1997,WeissAndLai1999}
\begin{itemize}
\item The redevelopment hypothesis
\begin{itemize}
\item A significant portion of requirements, design and code should be common between family members
\item Common model of software development in SC is to rework an existing program
\item Progress is made by removing assumptions
\end{itemize}

\item The oracle hypothesis
\begin{itemize}
\item Likely changes should be predictable
\item Literature on SC, example systems, mathematics
\end{itemize}

\item The organizational hypothesis
\begin{itemize}
\item Design so that predicted changes can be made independently
\item Tight coupling between data structures and algorithms
\item Need a suitable abstraction
\end{itemize}

\end{itemize}

\end{frame}

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

\begin{frame}

\frametitle{Challenges}

\begin{enumerate}
\setcounter{enumi}{\value{temp}}
\item Validatable
\begin{itemize}
\item Requirements can be complete, consistent, traceable and unambiguous, but still not validatable
\item Input and outputs are continuously valued variables
%\item Examples continuously valued variables: time, velocity, temperature, displacement, concentration, stress, etc.
%\item Infinite number of inputs and outputs
\item Correct solution is unknown a priori %difficult to have a test oracle
\item Given $dy/dt = f(t, y)$ and $y(t_0) = y_0$, find $y(t_n)$ 
%, where $y(t)$ is a function ($y:\mathbb{R} \rightarrow 
%\mathbb{R}$), $f(t,y)$ is a function ($f:\mathbb{R}\times \mathbb{R} \rightarrow \mathbb{R}$), $t$ is an independent
%variable (often time), $t_0$ is an initial value for $t$ and $t_n$ is the final value for $t$
%\item For arbitrary $f(t, y)$ the true solution is unknown, correct value is often not known a priori
%\item Same problem with $Ax = b$
%\item $\int e^{x^2} dx$
%\item Passing one test does not imply passing a nearby test
\end{itemize}
\item Abstract
\begin{itemize}
% \item Not difficult to be abstract
\item If too abstract, then difficult to meet NFRs for accuracy and speed
\item Assumptions can help restrict scope, but possibly as much work as solving the original problem
\begin{itemize}
\item $A x = b$
\item $x^T A x > 0, \forall x$
\end{itemize}
%say output should be solution, or say cannot compute, possibly with a reason
\item Algorithm selection should occur at the design stage

\end{itemize}

\setcounter{temp}{\value{enumi}}
\end{enumerate}

\end{frame}

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

\begin{frame}

\frametitle{Challenges (Continued)}

\begin{enumerate}
\setcounter{enumi}{\value{temp}}
\item Nonfunctional requirements
\begin{itemize}
\item Proving accuracy requirements with a priori error analysis is a difficult mathematical exercise that generally
leads to weak error bounds
% mention Wilkinson
\item Context sensitive tradeoffs between NFRs can be difficult to specify
\item Absolute quantitative requirements are often unrealistic
% make the point about relative requirements elsewhere
\end{itemize}
\item Capture and Reuse Existing Knowledge
\begin{itemize}
\item Cannot ignore the enormous wealth of information that currently exists %not a green field development
\item A good design will often involve integrating existing software libraries
\item Reuse software and the requirements documentation
% scientific software is stable
\end{itemize}

\setcounter{temp}{\value{enumi}}
\end{enumerate}

\end{frame}

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

\begin{frame}
\frametitle{Goal Statements for a Family of Linear Solvers?}

\structure{What would be a good goal statement for a library of linear solvers?}

\end{frame}

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

\begin{frame}
\frametitle{Goal Statements for a Family of Linear Solvers}

\begin{itemize}
	
\item[G1] Given a system of $n$ linear equations represented by matrix $A$ and
  column vector $b$, return $x$ such that $Ax = b$, if possible

\end{itemize}

\end{frame}

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

\begin{frame}
\frametitle{Theoretical Model for a Family of Linear Solvers?}

\begin{itemize}
	
\item \structure{Is the theoretical model a commonality or a variability?}
\item \structure{What is the theoretical model for a family of linear solvers?}
    
\end{itemize}

\end{frame}

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

\begin{frame}
\frametitle{Theoretical Model for a Family of Linear Solvers}

Given a square matrix $A$ and column vector $b$, the possible
solutions for $x$ are as follows:

\begin{enumerate}
\item A unique solution $x = A^{-1} b$, if $A$ is nonsingular
\item An infinite number of solutions if $A$ is singular and $b \in span(A)$
\item No solution if $A$ is singular and $b \notin span(A)$
\end{enumerate}

\cite{Anton1987}

\end{frame}

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

\begin{frame}
\frametitle{Instance Model for a Family of Linear Solvers?}

\begin{itemize}
	
\item \structure{Is there an instance model for a family of linear solvers?}
    
\end{itemize}

% No

\end{frame}

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

\begin{frame}
\frametitle{Symbols and Terminology for a Family of Linear Solvers?}

\begin{itemize}
	
\item \structure{What symbols and terminology will you need to define?}
    
\end{itemize}

\end{frame}

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

\begin{frame}
\frametitle{Sample Symbols and Terminology}

\begin{table}[h]
\begin{tabular}{ l p{7.5cm}}
$n: \mathbb{N}$ & number of linear equations/number of unknowns\\
$A: \mathbb{R}^{n \times n}$ & $n \times n$ real matrix\\
$x: \mathbb{R}^{n \times 1}$ & $n \times 1$ real column vector\\
$b: \mathbb{R}^{n \times 1}$ & $n \times 1$ real column vector\\
$I: \mathbb{R}^{n \times n}$ & an $n \times n$ matrix where all entries are $0$,
except for the diagonal entries, which are $1$\\
$|| v || $ & the norm (estimate of magnitude) of vector $v$\\
$A^{-1}: \mathbb{R}^{n \times n}$ & the inverse matrix, with the property that
$A^{-1} A = I$\\
singular & matrix $A$ is singular if $A^{-1}$ does not exist\\
residual & $|| b - A x ||$\\
\end{tabular}
%\caption{Terminology for a Linear Solver}\label{Term_LinSolv}
\end{table}

\end{frame}

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

\begin{frame}
\frametitle{What Would be the Most General Binding Time?}

\begin{itemize}
	
\item \structure{What would be the most general binding time for the
variabilities?}
    
\end{itemize}

% build time or run time
% scope time has already set some variabilities - a different sub-family could
% have different variabilities

\end{frame}

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

\begin{frame}
\frametitle{What Are Some Potential Input Variabilities?}

\begin{itemize}
	
\item \structure{What are some potential input variabilities?  What are the
    associated parameters of variation?}
    
\end{itemize}

\end{frame}

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

%\newcommand{\colA}{1.7cm}
%\newcommand{\colB}{5.6cm}
%\newcommand{\colC}{1.1cm} %do not need this column if binding time is not listed

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

\begin{frame}
%\frametitle{Input Variabilities}

\begin{table}
\begin{tabular}{| p{\colA} | p{\colB} | }
\hline
\textbf{Variability} & \textbf{Parameter of Variation} \\
\hline
Allowed structure of $A$ & Set of \{ full, sparse, banded, tridiagonal, block triangular,
block structured, diagonal, upper triangular, lower triangular, Hessenberg \} \\
\hline
Allowed definiteness for $A$ & Set of \{ not definite, positive definite, positive semi-definite,
negative definite, negative semi-definite \} \\
\hline
Allowed class of $A$ & Set of \{ diagonally dominant, Toeplitz, Vandermonde \} \\
\hline
Symmetric? & boolean \\
\hline
Values for $n$ & set of $\mathbb{N}$ \\
\hline
Entries in $A$ & set of $\mathbb{R}$ \\
\hline
Entries in $b$ & set of $\mathbb{R}$ \\
\hline
\end{tabular}
%cl\caption{Variabilities for Input Assumptions}\label{Var_Table_Input}
\end{table}

\end{frame}

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

\begin{frame}
%\frametitle{Input Variabilities}

\begin{table}
\begin{tabular}{| p{\colA} | p{\colB} | }
\hline
\textbf{Variability} & \textbf{Parameter of Variation} \\
\hline
Source\newline of input & Set of \{ from a file, through the user interface, passed in memory \} \\
\hline
Encoding of input & Set of \{binary, text \} \\
\hline
Format\newline of input $A$ & Set of \{arbitrary, by row, by column, by diagonal \} \\
\hline
Format\newline of input $b$ & Set of \{arbitrary, ordered \} \\
\hline
\end{tabular}
%cl\caption{Variabilities for Input Assumptions}\label{Var_Table_Input}
\end{table}

\end{frame}

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

\begin{frame}
\frametitle{What Are Some Potential Output Variabilities?}

\begin{itemize}
	
\item \structure{What are some potential output variabilities? What are the
    associated parameters of variation?}
    
\end{itemize}

\end{frame}

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

\begin{frame}
\frametitle{Output Variabilities}

\begin{table}
\begin{tabular}{| p{\colA} | p{\colB} | }
\hline
\textbf{Variability} & \textbf{Parameter of Variation} \\
\hline
Destination for output $x$ & Set of \{ to a file, to the screen, to memory \} \\
\hline
Encoding of output $x$ & Set of \{binary, text \} \\
\hline
Format of output $x$ & Set of \{arbitrary, ordered \} \\
\hline
Output residual & boolean (true if the program returns the residual) \\
\hline
Possible entries in $x$ & set of $\mathbb{R}$ \\
\hline
\end{tabular}
%\caption{Variabilities for Output}\label{Var_Table_Output}
\end{table}

\end{frame}

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

\begin{frame}
\frametitle{What Are Some Potential Calculation Variabilities?}

\begin{itemize}
	
\item \structure{What are some potential calculation variabilities? What are the
    associated parameters of variation?}
    
\end{itemize}

\end{frame}

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

\begin{frame}
\frametitle{Calculation Variabilities}

\begin{table}
\begin{tabular}{| p{\colA} | p{\colB} | }
\hline
\textbf{Variability} & \textbf{Parameter of Variation} \\
\hline
Check input? & boolean (false if the input is assumed to satisfy the input assumptions)\\ 
\hline
Exceptions generated? & boolean (false if the goal is non-stop arithmetic)\\ 
\hline
Norm used for residual & Set of \{1-norm, 2-norm, $\infty$-norm \} \\
\hline
\end{tabular}
%\caption{Variabilities for Calculation}\label{Var_Table_Calc}
\end{table}

\end{frame}

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

\begin{frame}[allowframebreaks]
\frametitle{References}

\bibliography{../../ReferenceMaterial/References}

\end{frame}

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

\end{document}