update hfst 1 2
[tt2015.git] / a3 / 1modelingTCP.tex
index 6846389..0db7faf 100644 (file)
@@ -2,45 +2,57 @@ In previous assignments our group has viewed the SUT as a stateful input-output
 system. 
 
 \subsection{Behaviour of the SUT}
-When considering the behaviour of the SUT we will only consider it's behaviour 
-with regards to correct input and output. In this case some models are more
-fitting than others. 
-
-\paragraph{Labeled Transition System} A Labeled Transition System (LTS) would 
-be a fitting model for our SUT as the 
-behaviour of TCP is such that a TCP client is in a certain state (connection 
-closed, listening, connection established, etc.) and the TCP client transitions
-between those states based upon input coming from another connected client.
-In this case an LTS, would be a fitting model for our SUT. 
-
-An LTS would not be a fitting model in case it would be desirable to model the
-behaviour when wrong input (such as wrong sequence numbers) is given to the SUT.
-
-\paragraph{Mealy Machines} 
-Mealy Machines are a variant of LTS in which each label is a tuple of input
-and output. This forces each state transition to consume both input and 
-produce output. The model for the SUT (see Section~\ref{subsec:sut_model}) 
-however contains state transitions with sequences of output which do not
-require new input.
-
-Due to this limitation Mealy Machines are not a very suitable model to model
-the SUT. Instead we choose to model the SUT as a LTS. Since LTSs provide the 
-functionality to express the desired properties of the SUT, that is, that the
-SUT transitions through states depending on input as described in the TCP
-specification and produces the output described by the TCP specification.
-
-\subsection{A LTS model of TCP} \label{subsec:sut_model}
-With these model based tests two major parts of the TCP specification will be 
-tested. These are (a) the establishment of connection (three-way handshake)
-between the SUT -which 
-will receive the connection- and an external host -which will initiate the 
-connection- and (b) the closing of a connection (tear down) initiated by the
-external host.
-
-Figure~\ref{fig:model_connection} shows the LTS model of the SUT.
+When considering the behaviour of the SUT we abstract away from some details to
+limit the scope of the project. We will only consider the behaviour as the
+sequence of input output flags. All other details required will be implemented
+in the adapter and are invisible to the model. We also do not test erroneous
+client behaviour such as dropping packets on purpose or tampering with hashes.
+TCP inherently is a state based system and thus we have considered the
+following models.
+
+\paragraph{Labeled Transition System (LTS)}. A LTS would 
+be a fitting technique to model the SUT in since the 
+behaviour of TCP is that both the server and the client have internal states to
+which they transition based upon input coming from the other.
+Because of this behaviour and the characteristics of LTSs it would be a fitting
+technique to model our SUT in.
+
+LTS would not be a compelling choice if we would test tampering with data and
+erroneous clients or servers since LTS is purely input output and by default
+there is no data involved.
+
+\paragraph{Properties}. Describing TCP in terms of properties would in theory
+be possible but it would require a very different adapter. The adapter should
+be handed a trace and it should run the entire trace and return the sequence of
+flags sent and received. Because of the high adapter complexity and the
+difficult test generation Properties is not a technique that we consider.
+
+% Ik snap niet waarom mealy en LTS beter of slechter zijn dan elkaar...
+
+%\paragraph{Mealy Machines} 
+%Mealy Machines are a variant of LTS in which each label is a tuple of input
+%and output. This forces each state transition to consume both input and 
+%produce output. The model for the SUT (see Section~\ref{subsec:sut_model}) 
+%however contains state transitions with sequences of output which do not
+%require new input.
+%
+%Due to this limitation Mealy Machines are not a very suitable model to model
+%the SUT. Instead we choose to model the SUT as a LTS. Since LTSs provide the 
+%functionality to express the desired properties of the SUT, that is, that the
+%SUT transitions through states depending on input as described in the TCP
+%specification and produces the output described by the TCP specification.
+
+\subsection{A LTS model of TCP}\label{subsec:sut_model}
+As said in Section~\ref{subsec:behaviour} we only test the handshake and the
+connection termination. These actions are visualized in Figure~\ref{fig:model}.
+To touch a little bit of the data transfer we have included with dotted arrows
+a hypothetical extra path that depicts data transfer. The \texttt{DAT?} output
+label is basically \texttt{ACK} followed by a \texttt{PSH+ACK} including some
+random data. The starting state is marked with the number one. The states are
+named to match the original RFC the most.
 
 \begin{figure}[H]
        \centering
        \includegraphics[scale=.75]{lts-jtorx.eps}
-       \caption{LTS system}\label{fig:model}
+       \caption{LTS model of the SUT}\label{fig:model}
 \end{figure}