Commits

David Barker committed 6ff2662

Finished evaluation

Comments (0)

Files changed (7)

Dissertation/Dissertation.aux

 \@writefile{toc}{\contentsline {subsection}{\numberline {4.1.1}Automated testing}{27}}
 \@writefile{toc}{\contentsline {subsubsection}{Simple arrows}{28}}
 \@writefile{toc}{\contentsline {subsubsection}{Invertible arrows}{28}}
-\@writefile{toc}{\contentsline {subsection}{\numberline {4.1.2}Correctness proof by decomposing into lambda calculus}{29}}
 \@writefile{toc}{\contentsline {section}{\numberline {4.2}Syntax evaluation}{29}}
 \@writefile{toc}{\contentsline {subsection}{\numberline {4.2.1}Arrow syntax}{29}}
 \@writefile{toc}{\contentsline {subsubsection}{Comparison with Haskell}{30}}
-\@writefile{toc}{\contentsline {subsection}{\numberline {4.2.2}Binding syntax}{30}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {4.2.2}Binding syntax}{31}}
 \@writefile{toc}{\contentsline {subsubsection}{Username two-way binding}{31}}
-\@writefile{lof}{\contentsline {figure}{\numberline {4.1}{\ignorespaces The username two-way binding application}}{31}}
-\newlabel{fig:case_study_name}{{4.1}{31}}
-\@writefile{toc}{\contentsline {subsubsection}{List binding from a mock database}{32}}
+\@writefile{lof}{\contentsline {figure}{\numberline {4.1}{\ignorespaces The username two-way binding application}}{32}}
+\newlabel{fig:case_study_name}{{4.1}{32}}
+\@writefile{toc}{\contentsline {subsubsection}{List binding from a mock database}{33}}
 \@writefile{lof}{\contentsline {figure}{\numberline {4.2}{\ignorespaces The list binding application}}{33}}
 \newlabel{fig:case_study_list}{{4.2}{33}}
-\@writefile{toc}{\contentsline {subsubsection}{Some other demo}{33}}
-\@writefile{toc}{\contentsline {section}{\numberline {4.3}Performance testing}{33}}
-\@writefile{toc}{\contentsline {subsection}{\numberline {4.3.1}Arrow performance}{33}}
+\@writefile{toc}{\contentsline {section}{\numberline {4.3}Performance testing}{34}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {4.3.1}Arrow performance}{34}}
 \@writefile{toc}{\contentsline {subsubsection}{Measuring technique}{34}}
-\@writefile{toc}{\contentsline {subsubsection}{Simple function results}{34}}
-\@writefile{lof}{\contentsline {figure}{\numberline {4.3}{\ignorespaces Performance of arrows, Funcs and normal functions in implementing simple functionality}}{35}}
-\newlabel{fig:simple_function_performance}{{4.3}{35}}
+\@writefile{toc}{\contentsline {subsubsection}{Simple function results}{35}}
+\@writefile{lof}{\contentsline {figure}{\numberline {4.3}{\ignorespaces Performance of arrows, Funcs and normal functions in implementing simple functionality}}{36}}
+\newlabel{fig:simple_function_performance}{{4.3}{36}}
 \@writefile{toc}{\contentsline {subsubsection}{List function results}{36}}
-\@writefile{toc}{\contentsline {subsubsection}{Overhead due to arrow chaining}{36}}
-\newlabel{sec:arrow_chaining_overhead}{{4.3.1}{36}}
 \@writefile{lof}{\contentsline {figure}{\numberline {4.4}{\ignorespaces Performance of arrows, Linq queries and normal (loop-based) functions in implementing simple list functionality}}{37}}
 \newlabel{fig:list_function_performance}{{4.4}{37}}
-\@writefile{toc}{\contentsline {subsection}{\numberline {4.3.2}Binding performance}{37}}
+\@writefile{toc}{\contentsline {subsubsection}{Overhead due to arrow chaining}{37}}
+\newlabel{sec:arrow_chaining_overhead}{{4.3.1}{37}}
 \@writefile{lof}{\contentsline {figure}{\numberline {4.5}{\ignorespaces Execution times of chains of identity functions}}{38}}
 \newlabel{fig:arrow_chaining_overhead}{{4.5}{38}}
 \@writefile{toc}{\contentsline {chapter}{\numberline {5}Conclusion}{39}}
 \@writefile{toc}{\contentsline {subsection}{\numberline {C.2.1}Creating the bindable `database'}{49}}
 \@writefile{toc}{\contentsline {subsection}{\numberline {C.2.2}Filtering and mapping the list}{49}}
 \@writefile{toc}{\contentsline {subsection}{\numberline {C.2.3}Creating the binding}{50}}
-\@writefile{toc}{\contentsline {section}{\numberline {C.3}Some other demo}{51}}
 \citation{arrow_calculus}
 \citation{hughes_arrows}
 \citation{arrows_robots_frp}

Dissertation/Dissertation.lof

 \contentsline {figure}{\numberline {3.7}{\ignorespaces Marshalling a list of BindPoint sources to pass to an arrow and unmarshalling the result}}{23}
 \contentsline {figure}{\numberline {3.8}{\ignorespaces WPF integration demo}}{25}
 \addvspace {10\p@ }
-\contentsline {figure}{\numberline {4.1}{\ignorespaces The username two-way binding application}}{31}
+\contentsline {figure}{\numberline {4.1}{\ignorespaces The username two-way binding application}}{32}
 \contentsline {figure}{\numberline {4.2}{\ignorespaces The list binding application}}{33}
-\contentsline {figure}{\numberline {4.3}{\ignorespaces Performance of arrows, Funcs and normal functions in implementing simple functionality}}{35}
+\contentsline {figure}{\numberline {4.3}{\ignorespaces Performance of arrows, Funcs and normal functions in implementing simple functionality}}{36}
 \contentsline {figure}{\numberline {4.4}{\ignorespaces Performance of arrows, Linq queries and normal (loop-based) functions in implementing simple list functionality}}{37}
 \contentsline {figure}{\numberline {4.5}{\ignorespaces Execution times of chains of identity functions}}{38}
 \addvspace {10\p@ }

Dissertation/Dissertation.log

-This is pdfTeX, Version 3.1415926-2.3-1.40.12 (MiKTeX 2.9 64-bit) (preloaded format=pdflatex 2012.10.5)  29 APR 2013 20:39
+This is pdfTeX, Version 3.1415926-2.3-1.40.12 (MiKTeX 2.9 64-bit) (preloaded format=pdflatex 2012.10.5)  29 APR 2013 21:15
 entering extended mode
 **Dissertation.tex
 
 Missing character: There is no � in font cmr12!
 Missing character: There is no � in font cmr12!
 LaTeX Font Info:    External font `cmex10' loaded for size
-(Font)              <5> on input line 142.
+(Font)              <5> on input line 143.
 Missing character: There is no � in font cmr12!
 Missing character: There is no � in font cmr12!
 Missing character: There is no � in font cmr12!
 
 ]
 LaTeX Font Info:    Font shape `OT1/cmtt/bx/n' in size <8> not available
-(Font)              Font shape `OT1/cmtt/m/n' tried instead on input line 230.
+(Font)              Font shape `OT1/cmtt/m/n' tried instead on input line 232.
  <fig/ArrOperator.pdf, id=72, 259.19409pt x 106.89937pt>
 File: fig/ArrOperator.pdf Graphic file (type pdf)
 
 <use fig/ArrOperator.pdf>
-Package pdftex.def Info: fig/ArrOperator.pdf used on input line 235.
+Package pdftex.def Info: fig/ArrOperator.pdf used on input line 237.
 (pdftex.def)             Requested size: 142.26378pt x 58.67412pt.
 
 <fig/CompositionOperator.pdf, id=73, 349.81836pt x 107.12521pt>
 File: fig/CompositionOperator.pdf Graphic file (type pdf)
 
 <use fig/CompositionOperator.pdf>
-Package pdftex.def Info: fig/CompositionOperator.pdf used on input line 248.
+Package pdftex.def Info: fig/CompositionOperator.pdf used on input line 250.
 (pdftex.def)             Requested size: 142.26378pt x 43.56526pt.
  [10]
 <fig/FirstOperator.pdf, id=78, 262.49013pt x 219.44516pt>
 File: fig/FirstOperator.pdf Graphic file (type pdf)
 
 <use fig/FirstOperator.pdf>
-Package pdftex.def Info: fig/FirstOperator.pdf used on input line 267.
+Package pdftex.def Info: fig/FirstOperator.pdf used on input line 269.
 (pdftex.def)             Requested size: 142.26378pt x 118.93391pt.
  [11 <C:/Users/David/Documents/Visual Studio 2010/Projects/ArrowDataBinding/Dis
 sertation/fig/ArrOperator.pdf> <C:/Users/David/Documents/Visual Studio 2010/Pro
 File: fig/AndOperator.pdf Graphic file (type pdf)
 
 <use fig/AndOperator.pdf>
-Package pdftex.def Info: fig/AndOperator.pdf used on input line 282.
+Package pdftex.def Info: fig/AndOperator.pdf used on input line 284.
 (pdftex.def)             Requested size: 142.26378pt x 62.50134pt.
  [12 <C:/Users/David/Documents/Visual Studio 2010/Projects/ArrowDataBinding/Dis
 sertation/fig/AndOperator.pdf>] [13] [14]
 File: fig/BindingFramework.pdf Graphic file (type pdf)
 
 <use fig/BindingFramework.pdf>
-Package pdftex.def Info: fig/BindingFramework.pdf used on input line 419.
+Package pdftex.def Info: fig/BindingFramework.pdf used on input line 422.
 (pdftex.def)             Requested size: 411.93877pt x 189.23434pt.
  [17 <C:/Users/David/Documents/Visual Studio 2010/Projects/ArrowDataBinding/Dis
 sertation/fig/BindingFramework.pdf>] [18]
 [19] [20]
-LaTeX Font Info:    Try loading font information for OMS+cmr on input line 484.
+LaTeX Font Info:    Try loading font information for OMS+cmr on input line 487.
 
  ("C:\Program Files\MiKTeX 2.9\tex\latex\base\omscmr.fd"
 File: omscmr.fd 1999/05/25 v2.5h Standard LaTeX font definitions
 )
 LaTeX Font Info:    Font shape `OMS/cmr/m/n' in size <12> not available
-(Font)              Font shape `OMS/cmsy/m/n' tried instead on input line 484.
+(Font)              Font shape `OMS/cmsy/m/n' tried instead on input line 487.
  [21]
 [22] <fig/ArgumentMarshalling.pdf, id=179, 511.24123pt x 147.77261pt>
 File: fig/ArgumentMarshalling.pdf Graphic file (type pdf)
 
 <use fig/ArgumentMarshalling.pdf>
-Package pdftex.def Info: fig/ArgumentMarshalling.pdf used on input line 516.
+Package pdftex.def Info: fig/ArgumentMarshalling.pdf used on input line 519.
 (pdftex.def)             Requested size: 411.93877pt x 119.07281pt.
  [23 <C:/Users/David/Documents/Visual Studio 2010/Projects/ArrowDataBinding/Dis
 sertation/fig/ArgumentMarshalling.pdf>]
 File: fig/WPFIntegrationDemo.png Graphic file (type png)
 
 <use fig/WPFIntegrationDemo.png>
-Package pdftex.def Info: fig/WPFIntegrationDemo.png used on input line 551.
+Package pdftex.def Info: fig/WPFIntegrationDemo.png used on input line 554.
 (pdftex.def)             Requested size: 411.93877pt x 146.96603pt.
  [25 <C:/Users/David/Documents/Visual Studio 2010/Projects/ArrowDataBinding/Dis
 sertation/fig/WPFIntegrationDemo.png>] [26
 File: fig/CaseStudyNameBinding.png Graphic file (type png)
 
 <use fig/CaseStudyNameBinding.png>
-Package pdftex.def Info: fig/CaseStudyNameBinding.png used on input line 640.
+Package pdftex.def Info: fig/CaseStudyNameBinding.png used on input line 679.
 (pdftex.def)             Requested size: 283.0568pt x 210.78699pt.
- [31 <C:/Users/David/Documents/Visual Studio 2010/Projects/ArrowDataBinding/Dis
-sertation/fig/CaseStudyNameBinding.png>]
-<fig/CaseStudyListBinding.png, id=221, 596.2275pt x 423.5825pt>
+ [31] [32 <C:/Users/David/Documents/Visual Studio 2010/Projects/ArrowDataBindin
+g/Dissertation/fig/CaseStudyNameBinding.png>] <fig/CaseStudyListBinding.png, id
+=224, 596.2275pt x 423.5825pt>
 File: fig/CaseStudyListBinding.png Graphic file (type png)
 
 <use fig/CaseStudyListBinding.png>
-Package pdftex.def Info: fig/CaseStudyListBinding.png used on input line 661.
+Package pdftex.def Info: fig/CaseStudyListBinding.png used on input line 700.
 (pdftex.def)             Requested size: 411.93877pt x 292.66003pt.
- [32] [33 <C:/Users/David/Documents/Visual Studio 2010/Projects/ArrowDataBindin
-g/Dissertation/fig/CaseStudyListBinding.png>] [34]
-<fig/SimpleFunctionPerformanceChart.pdf, id=232, 496.44887pt x 258.75552pt>
+ [33 <C:/Users/David/Documents/Visual Studio 2010/Projects/ArrowDataBinding/Dis
+sertation/fig/CaseStudyListBinding.png>]
+[34] [35]
+<fig/SimpleFunctionPerformanceChart.pdf, id=235, 496.44887pt x 258.75552pt>
 File: fig/SimpleFunctionPerformanceChart.pdf Graphic file (type pdf)
 
 <use fig/SimpleFunctionPerformanceChart.pdf>
 Package pdftex.def Info: fig/SimpleFunctionPerformanceChart.pdf used on input l
-ine 719.
+ine 757.
 (pdftex.def)             Requested size: 411.93877pt x 214.71175pt.
- [35 <C:/Users/David/Documents/Visual Studio 2010/Projects/ArrowDataBinding/Dis
+ [36 <C:/Users/David/Documents/Visual Studio 2010/Projects/ArrowDataBinding/Dis
 sertation/fig/SimpleFunctionPerformanceChart.pdf>]
-<fig/ListFunctionPerformanceChart.pdf, id=306, 496.4172pt x 244.72725pt>
+<fig/ListFunctionPerformanceChart.pdf, id=309, 496.4172pt x 244.72725pt>
 File: fig/ListFunctionPerformanceChart.pdf Graphic file (type pdf)
 
 <use fig/ListFunctionPerformanceChart.pdf>
 Package pdftex.def Info: fig/ListFunctionPerformanceChart.pdf used on input lin
-e 738.
+e 776.
 (pdftex.def)             Requested size: 411.93877pt x 203.08247pt.
- [36]
-<fig/IdentityChains.pdf, id=310, 496.51498pt x 216.57913pt>
+ [37 <C:/Users/David/Documents/Visual Studio 2010/Projects/ArrowDataBinding/Dis
+sertation/fig/ListFunctionPerformanceChart.pdf>] <fig/IdentityChains.pdf, id=37
+7, 496.51498pt x 216.57913pt>
 File: fig/IdentityChains.pdf Graphic file (type pdf)
 
 <use fig/IdentityChains.pdf>
-Package pdftex.def Info: fig/IdentityChains.pdf used on input line 752.
+Package pdftex.def Info: fig/IdentityChains.pdf used on input line 790.
 (pdftex.def)             Requested size: 411.93877pt x 179.69122pt.
- [37 <C:/Users/David/Documents/Visual Studio 2010/Projects/ArrowDataBinding/Dis
-sertation/fig/ListFunctionPerformanceChart.pdf>]
-[38 <C:/Users/David/Documents/Visual Studio 2010/Projects/ArrowDataBinding/Diss
-ertation/fig/IdentityChains.pdf>]
+ [38 <C:/Users/David/Documents/Visual Studio 2010/Projects/ArrowDataBinding/Dis
+sertation/fig/IdentityChains.pdf>]
 Chapter 5.
 [39
 
 \pc@column@2=\box30
 \pc@column@width@2=\dimen120
 Package parcolumns Info: Width of column 1 calculated as 194.2195pt on input li
-ne 942.
+ne 979.
 Package parcolumns Info: Width of column 2 calculated as 194.2195pt on input li
-ne 942.
+ne 979.
 [45
 
 ]
 Package parcolumns Info: Width of column 1 calculated as 194.2195pt on input li
-ne 997.
+ne 1034.
 Package parcolumns Info: Width of column 2 calculated as 194.2195pt on input li
-ne 997.
+ne 1034.
  [46]
 Package parcolumns Info: Width of column 1 calculated as 194.2195pt on input li
-ne 1042.
+ne 1079.
 Package parcolumns Info: Width of column 2 calculated as 194.2195pt on input li
-ne 1042.
+ne 1079.
  [47] [48]
 Package parcolumns Info: Width of column 1 calculated as 194.2195pt on input li
-ne 1084.
+ne 1121.
 Package parcolumns Info: Width of column 2 calculated as 194.2195pt on input li
-ne 1084.
+ne 1121.
  [49
 
 ]
 Package parcolumns Info: Width of column 1 calculated as 194.2195pt on input li
-ne 1126.
+ne 1163.
 Package parcolumns Info: Width of column 2 calculated as 194.2195pt on input li
-ne 1126.
- [50] [51
-
-] [52
-
-]
+ne 1163.
+ [50]
 ("C:\Users\David\Documents\Visual Studio 2010\Projects\ArrowDataBinding\Dissert
 ation\Dissertation.bbl"
 Underfull \hbox (badness 5417) in paragraph at lines 46--50
 a-tion.
  []
 
-[53
+[51
+
 
-]) [54]
+]) [52]
 ("C:\Users\David\Documents\Visual Studio 2010\Projects\ArrowDataBinding\Dissert
 ation\Dissertation.aux") ) 
 Here is how much of TeX's memory you used:
- 2973 strings out of 494045
- 43745 string characters out of 3148387
+ 2976 strings out of 494045
+ 43778 string characters out of 3148387
  270622 words of memory out of 3000000
- 6243 multiletter control sequences out of 15000+200000
+ 6246 multiletter control sequences out of 15000+200000
  12938 words of font info for 46 fonts, out of 3000000 for 9000
  715 hyphenation exceptions out of 8191
  27i,8n,40p,1429b,1520s stack positions out of 5000i,500n,10000p,200000b,50000s
 ogram Files/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmtt10.pfb><C:/Program Fi
 les/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmtt12.pfb><C:/Program Files/MiKT
 eX 2.9/fonts/type1/public/amsfonts/cm/cmtt8.pfb>
-Output written on Dissertation.pdf (64 pages, 564149 bytes).
+Output written on Dissertation.pdf (62 pages, 566570 bytes).
 PDF statistics:
- 625 PDF objects out of 1000 (max. 8388607)
+ 619 PDF objects out of 1000 (max. 8388607)
  0 named destinations out of 1000 (max. 500000)
  61 words of extra memory for PDF output out of 10000 (max. 10000000)
 

Dissertation/Dissertation.pdf

Binary file modified.

Dissertation/Dissertation.synctex.gz

Binary file modified.

Dissertation/Dissertation.tex

 
 All the original goals were met: a general-purpose data binding framework based on arrows has been implemented, and an extensive arrow implementation has been completed. As well as the standard operators, a series of more complex extra operators have also been added, and some additional arrow types have been included -- for instance, 'list arrows' which map between enumerable data types. The framework allows bindings in both directions, between multiple sources and multiple destinations, and the arrows can be used in conjunction with WPF data binding with reasonable ease.
 
+%TODO
 %Continue this?
 
 \section*{Special Difficulties}
 
 A further problem was how best to allow arrows from multiple inputs to multiple outputs. Simply having a \texttt{Func} with multiple inputs would not have worked as the arrow would have had to be rewritten for every given number of inputs, and to make matters worse \texttt{Func} is limited to one output. For some time I debated writing a generic binary-tree-structured type\footnote{All arrows work on nested pairs} to handle this, but on discovering C$\sharp$'s built-in \texttt{Tuple<T1, T2>} type I felt this would be the simplest option. This ended up complicating the data binding (as I will discuss later), but was entirely sufficient for supporting the arrow implementation.
 
+%TODO
 %Maybe mention arrow intercompatibility?
 
 \subsection{Simple arrows} \label{sec:simple_arrow_implementation}
 
 Figures~\ref{fig:arr_operator},~\ref{fig:combine_operator},~\ref{fig:first_operator} and~\ref{fig:and_operator} give a visual representation of some of the arrow operators, to make their effects more clear. A correspondence between Haskell arrow operators and the C$\sharp$ equivalents is given in Figure \ref{fig:operator_correspondence}.
 
-%Include table showing correspondence between C$\sharp$ arrow operators and Haskell ones?
-
 \begin{figure}
 \centering
 \begin{tabular}{| l | l |}
                    .Reverse();
 \end{lstlisting}
 
+%TODO
 %More on foldl and foldr?
 
-%\subsection{Choice arrows}
+%TODO
+%\subsection{Choice arrows}?
 
 %\begin{itemize}
 %	\item Not deeply implemented or tested but could be handy for some things, most likely convenient exception handling
 	\item[Tuple reassociation arrows] The tuple operations \texttt{assoc} and \texttt{cossa}\footnote{\texttt{assoc} takes a tuple ((a, b), c) and returns (a, (b, c)), whilst \texttt{cossa} does the opposite} turn up reasonably frequently in functional programming, and feature in several of the arrow laws. As these are fairly fiddly to implement I decided it would make sense to create utility arrows for both these functions.
 \end{description}
 
+%TODO
 %\subsection{Feedback in arrows}
 
 %Discuss whether this would be useful or not, reasons for it not being there (lack of real-world use cases?) and how one might implement it.
 
 As invertible arrows conform to a slightly different set of arrow laws (which put extra requirements on their inverses), both one-way arrows and invertible arrows had to be tested separately. List and choice arrows were not separately tested as they are entirely built upon normal one-way arrows, and so will conform to the arrow laws for free if simple arrows do.
 
+%TODO
 %Mention correctness proof by decomposition into lambda calculus?
 
 \subsection{Automated testing}
 
 Including minor variations from different sources, 24 different arrow laws were tested in total, and all passed on large quantities of random input data. This gives a reasonably good indication that the arrow implementation is correct.
 
-\subsection{Correctness proof by decomposing into lambda calculus}
+%TODO
+%\subsection{Correctness proof by decomposing into lambda calculus}?
 
-Explain the technique used to translate into lambda calculus and the likely correctness of this, and give a few sample proofs for some non-trivial arrow laws.
+%Explain the technique used to translate into lambda calculus and the likely correctness of this, and give a few sample proofs for some non-trivial arrow laws.
 
 \section{Syntax evaluation}
 
 
 \subsubsection{Comparison with Haskell}
 
-Firstly, mention difference in specifying lambdas and shizz (C sharp stunted from the start). From there, show how C sharp arrows create arrows from them (need types specified somewhere is an issue (no type inference like Haskell gets), C sharp also has a strict function calling syntax which doesn't allow Haskell's pretty currying syntax). Go on to give a few examples of complicated-ish arrows expressed in both? Also, maaaybe mention the shiny new syntax Haskell has for arrows, but the C sharp implementation can't really battle that so it's not worth going into much detail about.
+While the syntax is certainly quite concise as C$\sharp$ allows, it certainly doesn't compare to Haskell for a number of reasons. However, this is of course due to a fundamental difference between the languages.
+
+Primarily, Haskell has an incredibly complex type inference system with a lot of features C$\sharp$ lacks. The main problem on that front was not having polymorphic types, as these are vital in implementing a general-purpose identity arrow or swap arrow. The lack of polymorphic types was also the reason the \texttt{First} operator was so difficult to cleanly implement. Another issue was the fact that C$\sharp$ methods must always be called on an object or class, and have strict syntax rules meaning the arguments must be bracketed after the call (precluding neat currying syntax). Thirdly, C$\sharp$ doesn't allow the programmer to create custom operators like `\texttt{>>>}' for arrow composition.
+
+For illustration, consider a fairly elaborate arrow constructed to compute the value $2x^2$ given an input $x$. In Haskell this might be rendered as follows:
+
+\begin{lstlisting}
+(arr split) >>> (square *** square) >>> (unsplit (+))
+\end{lstlisting}
+
+(Assume that \texttt{square} is an appropriately-defined arrow, and \texttt{split} and \texttt{unsplit} are methods for duplicating an input and recombining it using a binary operator respectively.)
+
+Meanwhile, C$\sharp$ syntax leads to the following definition:
+
+\begin{lstlisting}
+Op.Split<int>().Combine(square.And(square)).Unsplit(add)
+\end{lstlisting}
+
+Now, imagine if C$\sharp$ had the ability to define polymorphic \texttt{Split} and \texttt{Unsplit} functions. This would give us:
+
+\begin{lstlisting}
+Op.Arr(Split).Combine(square.And(square)).Combine(Op.Arr(Unsplit))
+\end{lstlisting}
+
+Now assume the ability to define custom operators, such as `\texttt{a >>> b}' for `\texttt{a.Combine(b)}':
+
+\begin{lstlisting}
+Op.Arr(Split) >>> (square *** square) >>> Op.Arr(Unsplit)
+\end{lstlisting}
+
+Now just add curried function arguments and the ability to have methods not called on a class or object, and the result is very similar to the original Haskell syntax:
+
+\begin{lstlisting}
+Arr Split >>> (square *** square) >>> Arr Unsplit
+\end{lstlisting}
 
-%While the syntax is reasonably concise in
+It therefore seems reasonable to conclude that the syntax is as clean as C$\sharp$ allows without significant workarounds, and though it may not match the cleaner Haskell syntax this is largely due to the differences between the languages. One option which was considered for improving syntax was Miscrosoft's Roslyn library\footnote{http://msdn.microsoft.com/en-us/vstudio/hh500769}, which allows the programmer to modify the syntax tree of the code being compiled and thus introduce extra syntactic constructs. However, Roslyn is not yet fully functional and it was decided that the complexity involved would almost be a second project in its own right. The possibility remains for future work to attempt this direction once Roslyn is complete.
 
 \subsection{Binding syntax}
 
 
 For a second case study, a simple `database' (a \texttt{List} of data for simplicity) containing information on orders placed for certain products was created. The objective for this was to bind this data to a list view, filtering it to only the orders with volume greater than one and mapping the result to a list of user-friendly strings describing the order (of the form ``Order from [name] in [location] for [volume] `[product]' from [supplier]''). The simple application is pictured in Figure \ref{fig:case_study_list}, and its source code is given in Appendix \ref{sec:case_study_list}.
 
-%Should sort too?
+%TODO Should sort too?
 
 \begin{figure}[!ht]
   \centering
 
 The code for creating the binding is much simpler this time, and the arrow-based code is very short: only a single line calling the \texttt{GetBindPoint} methods of the source and destination and passing in the arrow. The WPF binding is again more verbose, requiring the programmer to create a new \texttt{Binding}; individually set the \texttt{Source}, \texttt{Path} and \texttt{Converter} properties\footnote{\texttt{Source} is the object to bind to, \texttt{Path} is the name of the property being bound and \texttt{Converter} is the \texttt{IValueConverter} used to convert the source value into the destination value} and attach it to the list view. The main advantage of arrow data binding here is the \texttt{GetBindPoint} method provided by \texttt{Bindable} objects, which simplifies specifying the bound variable to one call and means the variable name is `attached' to the object it belongs to.
 
-\subsubsection{Some other demo}
-
-Todo
+%TODO
+%\subsubsection{Some other demo}?
 
 \section{Performance testing}
 
   \label{fig:arrow_chaining_overhead}
 \end{figure}
 
-\subsection{Binding performance}
-
-Todo...
+%TODO
+%\subsection{Binding performance}?
 
 \cleardoublepage
 
 
 \cleardoublepage
 
-\section{Some other demo}
-
-Todo
-
-\cleardoublepage
+%\section{Some other demo}?
 
 
 \nocite{arrow_calculus}

Dissertation/Dissertation.toc

 \contentsline {subsection}{\numberline {4.1.1}Automated testing}{27}
 \contentsline {subsubsection}{Simple arrows}{28}
 \contentsline {subsubsection}{Invertible arrows}{28}
-\contentsline {subsection}{\numberline {4.1.2}Correctness proof by decomposing into lambda calculus}{29}
 \contentsline {section}{\numberline {4.2}Syntax evaluation}{29}
 \contentsline {subsection}{\numberline {4.2.1}Arrow syntax}{29}
 \contentsline {subsubsection}{Comparison with Haskell}{30}
-\contentsline {subsection}{\numberline {4.2.2}Binding syntax}{30}
+\contentsline {subsection}{\numberline {4.2.2}Binding syntax}{31}
 \contentsline {subsubsection}{Username two-way binding}{31}
-\contentsline {subsubsection}{List binding from a mock database}{32}
-\contentsline {subsubsection}{Some other demo}{33}
-\contentsline {section}{\numberline {4.3}Performance testing}{33}
-\contentsline {subsection}{\numberline {4.3.1}Arrow performance}{33}
+\contentsline {subsubsection}{List binding from a mock database}{33}
+\contentsline {section}{\numberline {4.3}Performance testing}{34}
+\contentsline {subsection}{\numberline {4.3.1}Arrow performance}{34}
 \contentsline {subsubsection}{Measuring technique}{34}
-\contentsline {subsubsection}{Simple function results}{34}
+\contentsline {subsubsection}{Simple function results}{35}
 \contentsline {subsubsection}{List function results}{36}
-\contentsline {subsubsection}{Overhead due to arrow chaining}{36}
-\contentsline {subsection}{\numberline {4.3.2}Binding performance}{37}
+\contentsline {subsubsection}{Overhead due to arrow chaining}{37}
 \contentsline {chapter}{\numberline {5}Conclusion}{39}
 \contentsline {section}{\numberline {5.1}Future work}{39}
 \contentsline {subsection}{\numberline {5.1.1}Performance enhancements}{39}
 \contentsline {subsection}{\numberline {C.2.1}Creating the bindable `database'}{49}
 \contentsline {subsection}{\numberline {C.2.2}Filtering and mapping the list}{49}
 \contentsline {subsection}{\numberline {C.2.3}Creating the binding}{50}
-\contentsline {section}{\numberline {C.3}Some other demo}{51}