\documentstyle[11pt]{article}
% frob with the margins
\addtolength{\topmargin}{-1in}
\addtolength{\footskip}{-1in}
\addtolength{\textheight}{2in}
\addtolength{\oddsidemargin}{-.5in}
\addtolength{\evensidemargin}{-.5in}
\addtolength{\textwidth}{1in}
% no page numbers
\pagestyle{empty}
% counter for page numbers
\newcounter{pg}
\setcounter{pg}{2}

% DEFINE THE PROBLEM SET NUMBER
\def\psnum{3}

% DEFINE THE DUE DATE
\def\due{March 11, 1991}

% title command
\newcommand{\mytitle}{{\large\noindent 6.170 \hfill{} Juliet Bourne \\
Problem Set \psnum \hfill{} \due \\}
\vspace{-.6in}
\begin{center} \rule{6in}{.25mm} \end{center}}
\newcommand{\mypage}{\newpage{\large\noindent 6.170 \hfill{} Juliet Bourne \\
Problem Set \psnum \hfill{} \due \\}
\vspace{-.6in}
\begin{center} \rule{6in}{.25mm} \end{center}}
% problem command
\newcommand{\prob}[1]{\noindent{\fbox{\large\bf Problem #1}}\vspace{.25in}}
% subproblem command
\newcommand{\subprob}[1]{\vspace{.15in} \noindent{\large\bf #1.}}
% equations commands
\newcommand{\beq}{\vspace*{-.3in}\begin{eqnarray*}}
\newcommand{\eeq}{\end{eqnarray*}}

\begin{document}

\mytitle

\begin{center}
{\Large\bf Designing with Data Abstractions}
\end{center}

{\bf\large\noindent Problem Specification Amendments}

I modified the specs for {\bf analyze\_connection} to be as follows:

\begin{verbatim}
analyze_connection = proc (fname: string) 
    signals(not_possible(string), bad_format, no_origin, no_goal, no_path)
    % modifies primary_output
    % requires fname names a network file
    % effects Reads network file named by fname and displays the shortest
    %         path, the minimal latency, and the maximal throughput between
    %         the sites named "origin" and "goal". Signals no_possible if it
    %         can't access fname. Signals bad_format if the network file
    %         fname is not in the correct format. Signals no_origin if no
    %         site called "origin" exists. Signals no_goal is no site called
    %         "goal" exists. Signals no_path if no path between "origin" and
    %         "goal" is found.
\end{verbatim}

{\bf\large\noindent Overall Design}

I decided to create the data abstractions {\bf fifo\_queue}, {\bf
priority\_queue}, and {\bf computer\_network}. I decided to put {\bf
shortest\_path}, {\bf min\_latency}, and {\bf max\_thruput} into the 
{\bf computer\_network} cluster so that I would not have to break the
abstraction of {\bf computer\_network} in order to implement them. The
separate procedure {\bf analyze\_connection} used the {\bf
computer\_network} cluster.

Specifications, abstraction functions, and rep invariants can be found
along with the code.

Test cases and test runs for each cluster and for {\bf
analyze\_connection} are attached. I used the tests in
\verb+/mit/6.170/lib/ps3-test+ to augment my own tests of {\bf
analyze\_connection}. My strategy was to test all paths through the code
if possible. 

\end{document}
