CTP decompose-isar
authorGeorg Schafhauser <georg.schafhauser@student.tugraz.at>
Tue, 11 Jan 2011 08:08:37 +0100
branchdecompose-isar
changeset 3810589510a21f9c4
parent 38104 67b6ead8d8b4
child 38106 90c4c3bb47d9
CTP
doc-src/isac/CTP-userinterfaces.tex
     1.1 --- a/doc-src/isac/CTP-userinterfaces.tex	Mon Jan 10 12:53:38 2011 +0100
     1.2 +++ b/doc-src/isac/CTP-userinterfaces.tex	Tue Jan 11 08:08:37 2011 +0100
     1.3 @@ -50,35 +50,32 @@
     1.4  %\cite{pl:milner97}
     1.5  %for developing CTP
     1.6  \subsubsection{Standard ML}
     1.7 -Standard ML is a general-purpose, modular, functional programming language. 
     1.8 +Standard ML is a general-purpose, modular, functional programming language. \cite{pl:milner97}
     1.9  Programs written in Standard ML consist of expressions to be evaluated, as opposed to statements or commands. 
    1.10 -Function programming languages constitude a ???? very differnt of object orientated languages, see Sect.\ref{ctp-techn}. ML originated from the LCF-project(Logic for Computable Functions), where it had been developed as a meta language. Since ML has been standardised this family of language is called Standard ML. Important for the logical foundation of SML is the $\lamda$-calclism.
    1.11 +Functional programming languages constitude a ???? very differnt of object orientated languages, see Sect. \ref{ml-users}. ML originated from the LCF-project(Logic for Computable Functions)\cite{meta-Ml}, where it had been developed as a meta language. Since ML has been standardised this family of language is called Standard ML. Important for the logical foundation of SML is the $\lambda$-calculus.
    1.12  %http://en.wikipedia.org/wiki/Standard_M 
    1.13  \subsubsection{Coq}
    1.14  Coq is an interactive theorem prover, developed in France.
    1.15  It is programmed in Objective Caml, an ML based programming language.
    1.16  It has the ability to express  mathematical  assertions and check proof of mathematical assertions. 
    1.17  Furthermore Coq includes automatic theorem proving tactics and decision procedures.
    1.18 -Properties, programs and proofs are written a functional programming language called the Calculus of Inductive Constructions (CIC) \cite{todo}, .
    1.19 -Proof development in Coq is done through a language of tactics that allows a user-guided proof process.
    1.20 +Properties, programs and proofs are written a functional programming language called the Calculus of Inductive Constructions (CIC).
    1.21 +Proof development in Coq is done through a language of tactics that allows a user-guided proof process.\cite{coq1999}
    1.22    
    1.23  Another feature of Coq is “that it can automatically extract executable programs from specifications, as either Objective Caml 
    1.24  or Haskell source code.“
    1.25  
    1.26  There are many easy-to-read introductions to Coq \footnote{http://coq.inria.fr/a-short-introduction-to-coq} on the internet.
    1.27 -
    1.28  \subsubsection{Isabelle}
    1.29  Isabelle is an interactive theorem proving framework for high-level natural deduction proofs \cite{Paulson:Isa94}, written in Standard ML. 
    1.30  Isabelle is developed at University of Cambridge (Larry Paulson), Technische Universit\"at M\"unchen
    1.31 -and Université Paris-Sud.
    1.32 -The most widespread instance of Isabelle nowadays is Isabelle/HOL, providing a higher-order logic theorem proving environment.
    1.33 +and Université Paris-Sud. Isabelle is called a framework, because it implements serveral object logics.
    1.34 +The most widespread logic of Isabelle is Isabelle/HOL, short for higher-order logic.
    1.35  Isabelle/HOL includes several  specification tools, e.g. for datatypes, inductive definitions and functions with complex pattern matching.
    1.36 -Proofs are written in the structured proof language Isar. Isabelle implements several tools to increase the user's productivity in theorem proving. 
    1.37 -Isabelle's classical reasoner is used to check formulas. The simplifier can reason with and about equations. 
    1.38 -Linear arithmetic facts are proved automatically.
    1.39 +Proofs are written in the structured proof language Isar.\cite{wenzel:isar} Isabelle implements several tools, e.g. a reasoner, a simplifier and powerful automatic provers(Slegehammer), increase the user's productivity in theorem proving. 
    1.40  Isabelle provides notational support: new notations can be introduced, using normal mathematical symbols.
    1.41  Definitions and proofs may include LaTeX source, from which Isabelle can automatically generate typeset documents.
    1.42 -Isabelle/HOL allows to turn executable specifications directly into code in SML, OCaml, and Haskell.
    1.43 +Isabelle/HOL allows to turn executable specifications directly into code in SML, OCaml, and Haskell.\cite{Haftmann-Nipkow:2010:code}
    1.44  (http://www.cl.cam.ac.uk/research/hvg/Isabelle/overview.html)
    1.45  \subsection{Userinterfaces for CTP: Coq and Isabelle}\label{gui-coq-isa}
    1.46  %     CoqIDE, ..
    1.47 @@ -136,7 +133,7 @@
    1.48  Compared to fully-featured IDEs, such as Eclipse or Netbeans, jEdit is much 
    1.49  smaller and better focused on its primary task of text editing.
    1.50  The general look of the Isabelle/jEdit plugin is similar to existing Java IDEs.
    1.51 -The main Isabelle/jEdit plugin consists of ≈ 10 small Scala files  that augment some key jEdit components in order to provide a metaphor of asynchronous 
    1.52 +The main Isabelle/jEdit plugin consists of ten small Scala files  that augment some key jEdit components in order to provide a metaphor of asynchronous 
    1.53  proof document editing. 
    1.54  Isabelle/jEdit integrates the jEdit 4.3.2 framework  and some further  jEdit plugins. 
    1.55  It also implements custom-made IsabelleText Unicode font that actually contains the usual Isabelle symbols that users expect from long 
    1.56 @@ -276,7 +273,7 @@
    1.57  receive:         def receive[R](f: PartialFunction[Any, R]): R
    1.58  The current actor's mailbox get scanned and if there is one message which matches one of the patterns declared in the partial function, the message is removed from the mailbox and the partial function is applied to the message, the result is returned. Otherwise the current thread blocks. Thus the receiving actor has the ability to execute normally when receiving a message which matches.  Note that receive retains the complete call stack of the receiving actor; the actor’s behavior is therefore a sequential program which corresponds to thread-based programming [2.P]. \\
    1.59  react:          
    1.60 -$$\mathit{def}\;\mathit{react}(f: \mathit{PartialFunction}[Any, Unit]): \mathit{Nothing$$
    1.61 +$$\mathit{def}\;\mathit{react}(f: \mathit{PartialFunction}[Any, Unit]): \mathit{Nothing}$$
    1.62  The action which is specified in the partial function is the last code that the current actor executes, if the message is matching. The partial function gets registered by the current actor and the underlying thread gets released. React has the return type Nothing, this means that the method never returns normally. When the actor receives a matching message, the earlier registered partial function gets called and the actor's execution gets continued. The partial function f which corresponds to a set of event handlers [2.P]. \\
    1.63  For this implementation multiple acotrs are executed by multiple threads and therefore a thread pool is used. Whenever it is necessary the pool can be re sized, to support the operations of the thread-based and event-based model. If only operations of the event-based model are executed then the thread pool could be fixed. To avoid system-included deadlocks, if some actors use thread-based operations, the thread pool has to grow, because if there are outstanding tasks and every worker thread is occupied by a blocked actor, new threads are necessary. \\
    1.64  Since the communication between actors takes place through asynchronous message passing, asynchronous operations get executed, tasks have to be created and submitted to a thread pool for execution. A new task is created, when an actor spawns a new actor or a message, which enables an actor to continue, is send to an actor which is suspended in a react operation or by calling react, where a message can be immediately removed from the mailbox.\\
    1.65 @@ -313,46 +310,39 @@
    1.66  \subsection{Add a plug-in to jEdit}\label{plugin}
    1.67      % file structure, copied from example project ...
    1.68  %Die von jEdit verfolgte Strategie im Bezug auf Plugin-Management und natürlich generell die totale Offenlegegung des Codes ist für ein Projekt wie Isabelle und auch für das Isac-Project an der TU ideal. Plugins lassen sich sehr einfach anfügen und durch die riesige Vielfalt von bereits bestehenden Plugins ist auch die Adaption von Plugins möglich bzw. zu empfehlen, denn warum sollte nicht bereits funktionierender Code verwendet werden?\\
    1.69 -The importance of connecting the ML-world with the world of user interfaces has been is discussed in Sect.\ref{ml-users}. jEdit follows these lines, it is an open-source, Java-based text editor that works on Windows, Mac OS X, and Linux. A big advantage of jEdit is, that there is a very good and also simple way to use and write a Plugin. There are a lot of useful and powerful Plugins available in the net and it is also possible to use a existing Plugin as part of a new one. Because of this facts, jEdit is very suitable for a project like Isabelle and also for the \sisac-project at TU-Graz.
    1.70 -
    1.71 -Each jEdit-Plugin\footnote{To get more information about the jEdit infrastructure see: http://jedit.org/users-guide/plugin-intro} basically consists of source files, written in Java or Scala, XML-files and property files. The XML-Files are important for the administration of a Plugin and provides information like the name, author, ... of the Plugin. They are also containing small pieces of BeanShell code which is executed upon a user request. (Like pressing the 'start plugin' button.) So the XML-files provide the “glue” between user input and specific Plugin routines located in the source files. As you see, this files are used as interface between the Plugin and the jEdit engine itself.
    1.72 -
    1.73 +The importance of connecting the ML-world with the world of user interfaces has been is discussed in Sect.\ref{ml-users}. jEdit follows these lines, it is an open-source, Java-based text editor that works on Windows, Mac OS X, and Linux. A big advantage of jEdit is, that there is a very good and also simple way to use and write a Plugin. There are a lot of useful and powerful Plugins available in the net and it is also possible to use a existing Plugin as part of a new one. Because of this facts, jEdit is very suitable for a project like Isabelle and also for the Isac-project at TU-Graz. \\\\
    1.74 +Each jEdit-Plugin basically consists of source files, written in Java or Scala, XML-files and property files. The XML-Files are important for the administration of a Plugin and provides information like the name, author, ... of the Plugin. They are also containing small pieces of BeanShell code which is executed upon a user request. (Like pressing the 'start plugin' button.) So the XML-files provide the “glue” between user input and specific Plugin routines located in the source files. As you see, this files are used as interface between the Plugin and the jEdit engine itself.\\
    1.75  Based on the jEdit API, you are allowed to design your code quit freely and don't have to use a prescribed way to implement your ideas.    
    1.76 -
    1.77 -
    1.78 +To get more information about the jEdit infrastructure see: http://jedit.org/users-guide/plugin-intro
    1.79 +\\\\
    1.80  %isabell plugin beschreiben!!!!!!!!
    1.81  The Isabelle-team also follow use this Plugin-structure. In the next paragraph the involved files will be described. The jEdit-Isabelle-Plugin consists of:
    1.82  \begin{itemize}
    1.83 +\item 14 Scala-source-files
    1.84 +\item three XML-files
    1.85  \item one property file
    1.86 -\item three XML-files
    1.87 -\item 14 Scala-source-files
    1.88  \end{itemize}
    1.89  %Das vom Isabelle-Team erstellte jEdit-Plugin folgt natürlich auch dem oben erklärten Muster. Es wird nun genauer auf dieses Plugin eingegangen. The plugin consits of 14 scala-source-files, three xml-files and one property-file. 
    1.90 -\begin{description}
    1.91 -\item[Isabelle.props] The property-file \textit{Isabelle.props} contains general informations about the Isabelle-Plugin and the needed dependencies between Isabelle and the other used Plugins like sidekick.
    1.92 -\item[dockables.xml] The XML-file \textit{dockables.xml} is used to create the needed dock-able windows which are important to set up the GUI of the Plugin.
    1.93 -\item[actions.xml] In the file \textit{actions.xml}, the dockable windows are added to the window-manager \textit{wm} and there is also some Beanshell-code to activate the Isabelle-GUI.
    1.94 -\item[services.xml] The last XML-file is \textit{services.xml} and is used to create instances of needed jEdit-Plugins.
    1.95 -\end{description}
    1.96 -This four files are located in the folder \textit{plugin}.\\
    1.97 -
    1.98 -The more interesting files, the scala-files of the Plugin, can be found in the 'src/jedit'-directory. In this directory you can find the file \textit{Dummy.java} which is a dummy class and is simply used to make javadoc work. Just forget about this file. Also there is a folder/package \textit{jedit} which contains all Scala-source-files. Now it is time to take a closer look on the source-files: 
    1.99 -\begin{description}
   1.100 -\item[plugin.scala] The file \textit{plugin.scala} is the main-file of the Isabelle-Plugin and there are two important parts. First the \textit{Isabelle object}. This object contains data like name and path and also few basic functions. The second part is the \textit{class Plugin} which is derived from EBPlugin. Here the basic methods \textit{handleMessage}, \textit{start} and \textit{stop} are implemented. Each jEdit-Plugin should have this methods because they are very important for the handling of the Plugin!
   1.101 -\item[dockable.scala] jEdit and also the Isabelle Plugin work with dock-able windows. This means that you can move around each single window and dock it somewhere on the screen. So it is possible to individualize the jEdit-GUI. To support this, the file \textit{dockable.scala} is needed. The file \textit{output-dockable.scala} is derived from \textit{dockable.scala} and is used to print the result/output in a dock-able window. The same thing with \textit{protocol-dockable.scala} and \textit{raw-output-dockable.scala}.
   1.102 -\item[scala-console.scala] The next interesting file is \textit{scala-console.scala} with the main-class Scala-Console. This class is used to expand the Console-Plugin in a way, that it is possible to interpret Scala-code with a Shell inside of jEdit.
   1.103 -\item[isabelle-sidekick.scala] The file \textit{isabelle-sidekick.scala} is related to the file \textit{scala-console.scala} because it is also used to adapt the Plugin Sidekick for Isabelle.
   1.104 -\item[document-model.scala, document-view.scala] The files \textit{document-model.scala} and \textit{document-view.scala} are used to connect the jEdit-buffer/the text-area to Isabelle. Both classes offer, upon others, methods to activate and deactivate this features.
   1.105 -\end{description}
   1.106 -There also some other source-files but they aren’t discussed here, because the main goal of this paragraph is to give a basic idea how a jEdit-Plugin should be set up and the remaining files are not as important for the Isabelle-Plugin-structure.
   1.107 -%\begin{itemize}
   1.108 -%\item $html_panel.scala$
   1.109 -%\item $isabelle_encoding.scala$
   1.110 -%\item $isabelle_hyperlinks.scala$
   1.111 -%\item $isabelle_options.scala$
   1.112 -%\item $isabelle_token_maker.scala$
   1.113 -%\item $isabelle_hyperlinks.scala$
   1.114 -%\end{itemize}
   1.115 +The property-file \textit{Isabelle.props} contains general informations about the Isabelle-Plugin and the needed dependencies between Isabelle and the other used Plugins like sidekick. \\
   1.116 +The XML-file \textit{dockables.xml} is used to create the needed dock-able windows which are important to set up the GUI of the Plugin.\\
   1.117 +In the file \textit{actions.xml}, the dockable windows are added to the window-manager \textit{wm} and there is also some Beanshell-code to activate the Isabelle-GUI.\\
   1.118 +The last XML-file is \textit{services.xml} and is used to create instances of needed jEdit-Plugins.\\
   1.119 +This four files are located in the folder \textit{plugin}.\\\\
   1.120 +The more interesting files, the scala-files of the Plugin, can be found in the 'src/jedit'-directory. In this directory you can find the file \textit{Dummy.java} which is a dummy class and is simply used to make javadoc work. Just forget about this file. Also there is a folder/package \textit{jedit} which contains all Scala-source-files. Now it is time to take a closer look on the source-files: \\
   1.121 +The file \textit{plugin.scala} is the main-file of the Isabelle-Plugin and there are two important parts. First the \textit{Isabelle object}. This object contains data like name and path and also few basic functions. The second part is the \textit{class Plugin} which is derived from EBPlugin. Here the basic methods \textit{handleMessage}, \textit{start} and \textit{stop} are implemented. Each jEdit-Plugin should have this methods because they are very important for the handling of the Plugin! \\
   1.122 +jEdit and also the Isabelle Plugin work with dock-able windows. This means that you can move around each single window and dock it somewhere on the screen. So it is possible to individualize the jEdit-GUI. To support this, the file \textit{dockable.scala} is needed. The file \textit{output-dockable.scala} is derived from \textit{dockable.scala} and is used to print the result/output in a dock-able window. The same thing with \textit{protocol-dockable.scala} and \textit{raw-output-dockable.scala}.\\
   1.123 +The next interesting file is \textit{scala-console.scala} with the main-class Scala-Console. This class is used to expand the Console-Plugin in a way, that it is possible to interpret Scala-code with a Shell inside of jEdit.\\ 
   1.124 +The file \textit{isabelle-sidekick.scala} is related to the file \textit{scala-console.scala} because it is also used to adapt the Plugin Sidekick for Isabelle.\\
   1.125 +The files \textit{document-model.scala} and \textit{document-view.scala1} are used to connect the jEdit-buffer/the text-area to Isabelle. Both classes offer, upon others, methods to activate and deactivate this features.\\
   1.126 +There also some other source-files but they aren’t discussed here, because the main goal of this paragraph is to give a basic idea how a jEdit-Plugin should be set up and the remaining files are not as important for the Isabelle-Plugin-structure:
   1.127 +\begin{itemize}
   1.128 +\item $html_panel.scala$
   1.129 +\item $isabelle_encoding.scala$
   1.130 +\item $isabelle_hyperlinks.scala$
   1.131 +\item $isabelle_options.scala$
   1.132 +\item $isabelle_token_maker.scala$
   1.133 +\item $isabelle_hyperlinks.scala$
   1.134 +\end{itemize}
   1.135  
   1.136  
   1.137  %  Like each other jEdit-Plugin also this 
   1.138 @@ -361,14 +351,13 @@
   1.139  
   1.140  \subsection{Details of NetBeans projects}\label{netbeans}
   1.141  %     Scala + Java: html project files
   1.142 -As described in the last paragraph, jEdit is a open-source-project. The jEdit-developers use a NetBeans-project to produce the source-code and so it is beneficial to use a NetBeans project too, because there is a quite good documentation about setting up a NetBeans-project with the jEdit-source.\footnote{See http://wiki.netbeans.org/NetbeansedJEdit for further information.} 
   1.143 -
   1.144 +As described in the last paragraph, jEdit is a open-source-project. The jEdit-developers use a NetBeans-project to produce the source-code and so it is beneficial to use a NetBeans project too, because there is a quite good documentation about setting up a NetBeans-project with the jEdit-source. See http://wiki.netbeans.org/NetbeansedJEdit for further information.\\\\
   1.145  If you want to set up a new jEdit-Plugin-project you have to attend that you have to create some source-files and that there must be a connection to the jEdit-source because you will need to exchange data with the jEdit engine. This could probably look like: \textit{jEdit.getProperty("options.isabelle.isabelle")}\\
   1.146  As shown above, the jEdit-source is needed to compile and build your Plugin. There are two ways to organize your project:
   1.147 -%\begin{itemize}
   1.148 -%\item with jEdit source code - two projects in one
   1.149 -%\item with jedit.jar library
   1.150 -%\end{itemize}
   1.151 +\begin{itemize}
   1.152 +\item with jEdit source code - two projects in one
   1.153 +\item with jedit.jar library
   1.154 +\end{itemize}
   1.155  \subsubsection{Plugin with jEdit-source}
   1.156  It is a good way to download the jEdit source as Netbeans project because then it is possible to add another subproject to the existing jEdit-NetBeans-project. As you see it is also possible to mix Scala and Java. A big advantage is, that debugging will now work really fine. If you want to set up a project like this, you should complete the following steps.
   1.157  \begin{enumerate}
   1.158 @@ -398,21 +387,15 @@
   1.159  \end{itemize}
   1.160  %* kurze aufzählung der xml-netbeans-files + erklärung\\
   1.161  \subsubsection{NetBeans project files}
   1.162 -As you see in the paragraph above, it is also important to have basic knowledge about NetBeans, the project structure and how to change the operational sequences. A typical NetBeans-project consist of the source- and library-files and administrative XML- and property-files. In this paragraph the administrative part of the project is of note. The most important file is \textit{build.xml}. This file can be found in the project directory. There is also a folder \textit{nbproject} which contains the remaining XML- and property-files and also a folder \textit{private}, where individual user informations about the project is stored. The files in this \textit{private} folder are not important to describe (and they should not be pushed on the repository!).
   1.163 -
   1.164 -A build-file like \textit{build.xml} contains one project and at least one (default) target. Targets contain task elements. Each task element of the build-file can have an id attribute and can later be referred to by the value supplied to this. So the id has to be unique. Such targets can be "run", "debug", "build", ... and can have dependencies to other targets. Tasks define what should happen, if a target is executed. So like in the example above, the target is \textit{pre-jar}, that means that this things will happen before the jar-package is packed. The tasks of this target are copying some files into the package.
   1.165 -
   1.166 +As you see in the paragraph above, it is also important to have basic knowledge about NetBeans, the project structure and how to change the operational sequences. A typical NetBeans-project consist of the source- and library-files and administrative XML- and property-files. In this paragraph the administrative part of the project is of note. The most important file is \textit{build.xml}. This file can be found in the project directory. There is also a folder \textit{nbproject} which contains the remaining XML- and property-files and also a folder \textit{private}, where individual user informations about the project is stored. The files in this \textit{private} folder are not important to describe (and they should not be pushed on the repository!).\\
   1.167 +A build-file like \textit{build.xml} contains one project and at least one (default) target. Targets contain task elements. Each task element of the build-file can have an id attribute and can later be referred to by the value supplied to this. So the id has to be unique. Such targets can be "run", "debug", "build", ... and can have dependencies to other targets. Tasks define what should happen, if a target is executed. So like in the example above, the target is \textit{pre-jar}, that means that this things will happen before the jar-package is packed. The tasks of this target are copying some files into the package.\\
   1.168  The files inside the \textit{nbproject}-folder are not so important because some of it are generated from \textit{build.xml} and changes in this files are useless. Just the file project.properties is really interesting because this file gives a nice and tight overview about the project settings.
   1.169  
   1.170  \subsection{Use interfaces between Java and Scala}\label{java-scala}
   1.171  %     how are data exchanged between Scala and Java ...
   1.172 -jEdit is completely written in Java and the required plugin(s) for \sisac{ }will be coded in Scala - so there must be ways to exchange data between Java and Scala. One way is to connect this two worlds with the in 4.2 described XML-files. Here you need to use a third type of code to get an interface between Java and Scala code. But there is also a way to get a direct connection.
   1.173 -
   1.174 -This link should be shown on the graphic-library \textit{Swing}. In both languages it is possible to use Swing which provides a lot of different shapes and useful functionality. So there is a Java-Swing and also a Scala-Swing-library. Now it is interesting to examine the connection between this two libraries.
   1.175 -
   1.176 -In Scala a direct use of Java-Libs (like Java-Swing) is possible. So if you are Java-Programmer and want to use Java-Swing in Scala, you can simply type\\ \textit{import javax.swing.JButton}\footnote{http://download.oracle.com/javase/1.4.2/docs/api/javax/swing/JButton.html} to work with a Java-button. But you can also use the Scala-equivalent \textit{scala.swing.Button}\footnote{http://www.scala-lang.org/api/current/scala/swing/Button.html}. This two button-types will provide nearly the same functionality.
   1.177 -
   1.178 -So what is the idea of creating a nearly similar library a second time? Why have the Scala-developers done such extra work? The answer is, that they have tried to improve and simplify the usage of the Swing-library(and many other libs too!). So big parts of this Scala-Libraries are just Wrapper-objects, Wrapper-Classes and Wrapper-Methods of already existing parts in Java-Libraries. Needless to say that they also added new useful shapes and functionality.
   1.179 +jEdit is completely written in Java and the required plugin(s) for Isac will be coded in Scala - so there must be ways to exchange data between Java and Scala. One way is to connect this two worlds with the in 4.2 described XML-files. Here you need to use a third type of code to get an interface between Java and Scala code. But there is also a way to get a direct connection.\\
   1.180 +This link should be shown on the graphic-library \textit{Swing}. In both languages it is possible to use Swing which provides a lot of different shapes and useful functionality. So there is a Java-Swing and also a Scala-Swing-library. Now it is interesting to examine the connection between this two libraries.\\
   1.181 +In Scala a direct use of Java-Libs (like Java-Swing) is possible. So if you are Java-Programmer and want to use Java-Swing in Scala, you can simply type \textit{import javax.swing.JButton} to work with a Java-button. But you can also use the Scala-equivalent \textit{scala.swing.Button}. This two button-types will provide nearly the same functionality.\\So what is the idea of creating a nearly similar library a second time? Why have the Scala-developers done such extra work? The answer is, that they have tried to improve and simplify the usage of the Swing-library(and many other libs too!). So big parts of this Scala-Libraries are just Wrapper-objects, Wrapper-Classes and Wrapper-Methods of already existing parts in Java-Libraries. Needless to say that they also added new useful shapes and functionality.\\
   1.182  But there is one important question left: Is it possible to mix Scala- and Java-objects? And yes, it is possible. There is a really easy way to convert a Scala-object to the Java-equivalent:
   1.183  \begin{enumerate}
   1.184  \item \textit{import javax.swing.JButton}
   1.185 @@ -423,6 +406,9 @@
   1.186  \end{enumerate}
   1.187  As the example above illustrates, a conversion of Scala- to Java-objects is possible. It looks easy but also a little bit useless. Why should you need this? Just imagine that there is a Plugin written in Scala and one coded in Java. With this connection between Scala and Java, it would be easy to connect this two Plugins! 
   1.188  %Diesen direkten Zusammenhang zwischen Java und Scala soll anhand der Grafik-Bibliotheken Swing. Beide Sprachen stellen diese Grafik-Bibliotheken zur Verfügung (und darin auch eigene Shapes und Funktionalität). Es ist jedoch möglich, Java-Bibliotheken, wie eben auch Java-Swing in Scala zu verwenden. Ein JButton kann zum Beispiel mittels \textit{import javax.swing.JButton} eingebunden und damit sofort auch verwendet werden. Auch Scala stellt in seiner Swing-Bibliothek zur Verfügung: \textit{scala.swing.Button}. Es wird nahezu die selbe Funktionalität angeboten und teilweise die Erzeugung bzw. Verwendung vereinfacht(???). Man kann sich nun fragen, warum sich die Scala-Entwickler einerseit die Mühe gemacht haben die Verwendung Java-Swing, wie in Java selbst, möglich zu machen und andererseits mit Scala-Swing eine nahezu idente Alternative geschaffen haben. Die Antwort darauf zeigt wie der objektorientierte Teil von Scala in vielen Bereichen aufgebaut wurden. Es wurde kein neues Konzept für diese Grafikklassen entworfen sondern Wrapper-Objekte/Methoden/Klassen erstellt, die das Arbeiten mit diesen Grafikkomponenten erleichtern soll. Ein Letztes Problem bleibt noch: Es ist zwar sehr einfach ein Java-Swing-Objekt an einen Scala-Swing-Container (zb. Frame) anzubinden, da eine Konvertierung von Java-Komponente in ein Scala-Äquivalent ist problemlos möglich. ...
   1.189 +http://www.scala-lang.org/api/current/scala/swing/Button.html\\
   1.190 +http://download.oracle.com/javase/1.4.2/docs/api/javax/swing/JButton.html
   1.191 +
   1.192  \section{Conclusion and future work}
   1.193  
   1.194