From 4667dca6ef504768516eada3bcdddf05e1b172e1 Mon Sep 17 00:00:00 2001 From: bnewbold Date: Mon, 11 May 2009 17:43:14 -0400 Subject: draft done --- final_project/paper/bnewbold_lch_report_draft.lyx | 220 +++++++++++++++++----- final_project/paper/bnewbold_lch_report_draft.pdf | Bin 0 -> 282368 bytes 2 files changed, 171 insertions(+), 49 deletions(-) create mode 100644 final_project/paper/bnewbold_lch_report_draft.pdf (limited to 'final_project') diff --git a/final_project/paper/bnewbold_lch_report_draft.lyx b/final_project/paper/bnewbold_lch_report_draft.lyx index 61a97ca..870317e 100644 --- a/final_project/paper/bnewbold_lch_report_draft.lyx +++ b/final_project/paper/bnewbold_lch_report_draft.lyx @@ -101,16 +101,28 @@ operator discovery \begin_layout Standard The generic operator system we have built upon uses predicate dispatch; - for an overview of this strategy see [TODO: cite]. + for an overview of this strategy see Ernst, Kaplan, and Chamber's paper + +\begin_inset Quotes eld +\end_inset + +Predicate dispatching: A unified theory of dispatch +\begin_inset Quotes erd +\end_inset + + (1998). The version we used for MIT/GNU Scheme was distributed by the 6.945 staff and is included in the appendix as \family typewriter ghelper.scm \family default . - The exact same dispatch system is used in the scmutils classical mechanics - software package, which allowed us to experiment with an existing software - system. + The exact same dispatch system is used in the +\family typewriter +scmutils +\family default + classical mechanics software package, which allowed us to experiment with + an existing software system. \end_layout \begin_layout Section @@ -222,7 +234,11 @@ This procedure creates a new record in the \begin_layout Standard This procedure adds a new predicate/handler pair to an operator's tree in - the *generic-operator-table*. + the +\family typewriter +*generic-operator-table* +\family default +. The binding is done with \family typewriter bind-in-tree @@ -418,7 +434,7 @@ The code for all of these procedures is rather ugly and complicated due first argument being a list of arguments (always a single element after the first application of operators) and all subsequent operators being a record of the operators applied to obtain those arguments. - This could almost certainly be reimplemented in a more elegant functional + This could almost certainly be re-implemented in a more elegant functional style. \end_layout @@ -452,7 +468,32 @@ scmutils Package \end_layout \begin_layout Standard -hold + +\family typewriter +scmutils +\family default + is an MIT/GNU Scheme package for math and physics, focused on classical + mechanics +\begin_inset Foot +status collapsed + +\begin_layout Standard +See http://groups.csail.mit.edu/mac/users/gjs/6946/linux-install.htm +\end_layout + +\end_inset + +. + It uses the predicate dispatch system defined in +\family typewriter +ghelper.scm +\family default +, so it is a natural candidate for experimentation with the discovery tools. +\end_layout + +\begin_layout Standard +The default scmutils band file has over 90 generic operators; the named + ones can be discovered: \end_layout \begin_layout Quotation @@ -498,7 +539,7 @@ make-rectangular type-predicate atan1) \end_layout \begin_layout Standard -hold +The operators applicable on the 3x3 identity matrix are: \end_layout \begin_layout Quotation @@ -535,7 +576,11 @@ type-predicate) \end_layout \begin_layout Standard -hold +The operators applicable for a single variable +\begin_inset Formula $'a$ +\end_inset + + are: \end_layout \begin_layout Quotation @@ -563,7 +608,11 @@ negate identity-like sqrt log type-predicate atan1) \end_layout \begin_layout Standard -hold + +\family typewriter +scmutils +\family default + has special treatment for mathematical functions: \end_layout \begin_layout Quotation @@ -594,13 +643,117 @@ negate identity-like sqrt log square type-predicate atan1) Other Applications \end_layout +\begin_layout Standard +The discovery system combined with the predicate satisfaction search makes + a very useful general purpose tool. + Even when using such a simple system as Scheme, it can be difficult to + remember the particular names of simple procedures. + For instance, you might have list of hundreds of numbers and want to turn + it into a vector, or a 20 digit floating point number that you want to + print as a string: are the desired operations +\family typewriter +list->vector +\family default + and +\family typewriter +number->string +\family default +? Are they generic +\family typewriter +to-string +\family default + and +\family typewriter +to-vector +\family default +? You could read the documentation or search by hand through the bound procedure +s in the environment, or you could do a search with the predicates +\family typewriter + vector? +\family default + and +\family typewriter +string? +\family default +. + +\end_layout + +\begin_layout Standard +With proper memoization and error catching, predicate satisfaction could + be the basis for robust computing: if compiled code ever failed, the system + could elegantly search for an alternative (perhaps much less efficient + but still satisfactory) procedure from the system libraries or even among + network peers in a network instead of halting computation and giving the + user an error. +\end_layout + \begin_layout Section A Graphical User Interface \end_layout \begin_layout Standard -The graphical user interface (GUI) was implemented using a new foriegn function - interface (FFI) and GUI toolkit bindings for MIT/GNU Scheme writen by [TODO]. +\begin_inset Float figure +wide false +sideways false +status collapsed + +\begin_layout Standard +\begin_inset Graphics + filename /home/bnewbold/6.945/final_project/presentation/gui1.png + width 6in + keepAspectRatio + +\end_inset + + +\end_layout + +\begin_layout Caption +GUI Screenshot +\begin_inset LatexCommand \label{fig:Screenshot} + +\end_inset + + +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +The graphical user interface (GUI) was implemented using a new foreign function + interface (FFI) and GUI toolkit bindings for MIT/GNU Scheme written by + Matt Birkholz +\begin_inset Foot +status collapsed + +\begin_layout Standard +See http://birkholz.chandler.az.us/~matt/Scheme/ +\end_layout + +\end_inset + +. +\end_layout + +\begin_layout Standard +The GUI essentially displays a object (a collection of arguments) and allows + the user to select an applicable operator from a drop down box. + The result of this operation is then itself displayed as an object and + the user can recursively select an operation for +\emph on +that +\emph default + object. + Figure +\begin_inset LatexCommand \ref{fig:Screenshot} + +\end_inset + + shows a screenshot of the interface with a chain of example operations. \end_layout \begin_layout Subsection @@ -608,8 +761,12 @@ Procedures \end_layout \begin_layout Standard -Most of the scheme GUI code is included in the appendix as prhello.scm; additiona -l declaration and shim files were used for compilation but are not included. +Most of the scheme GUI code is included in the appendix as +\family typewriter +prhello.scm +\family default +; additional declaration and shim files were used for compilation but are + not included. \end_layout \begin_layout Paragraph* @@ -652,41 +809,6 @@ discover-gui on the result. \end_layout -\begin_layout Subsection -Screenshots -\end_layout - -\begin_layout Standard -\begin_inset Float figure -wide false -sideways false -status collapsed - -\begin_layout Standard -\begin_inset Graphics - filename /home/bnewbold/6.945/final_project/presentation/gui1.png - width 6in - keepAspectRatio - -\end_inset - - -\end_layout - -\begin_layout Caption -GUI Screenshot -\begin_inset LatexCommand \label{fig:Screenshot} - -\end_inset - - -\end_layout - -\end_inset - - -\end_layout - \begin_layout Section \start_of_appendix Appendix: Code Listing diff --git a/final_project/paper/bnewbold_lch_report_draft.pdf b/final_project/paper/bnewbold_lch_report_draft.pdf new file mode 100644 index 0000000..c6990ec Binary files /dev/null and b/final_project/paper/bnewbold_lch_report_draft.pdf differ -- cgit v1.2.3