Просмотр исходного кода

Changed DEVSGenerator to newest verison, problem with tkinter

sampieters 1 год назад
Родитель
Сommit
c15cf032d2
49 измененных файлов с 11553 добавлено и 41 удалено
  1. 14 14
      input.xml
  2. 17 0
      examples/BouncingBalls/Python/runner.py
  3. 733 0
      examples/BouncingBalls/Python/target.py
  4. 117 0
      examples/BouncingBalls/Python/widget.py
  5. 12 0
      examples/TrafficLight/Python/runner.py
  6. 316 0
      examples/TrafficLight/Python/target.py
  7. 175 0
      examples/TrafficLight/TrafficLight.xml
  8. 5 0
      paper/00-Abstract.tex
  9. 5 0
      paper/00-Acknowledgements.tex
  10. 5 0
      paper/00-NedSamenvatting.tex
  11. 4 0
      paper/00-Preface.tex
  12. 7 0
      paper/01-Introduction.tex
  13. 7 0
      paper/02-Background.tex
  14. 43 0
      paper/03-Methodology.tex
  15. 6 0
      paper/04-Implementation.tex
  16. 6 0
      paper/05-Examples.tex
  17. 3 0
      paper/99-Conclusions.tex
  18. 5 0
      paper/AA-Testcode.tex
  19. 96 0
      paper/Makefile
  20. 69 0
      paper/MasterThesis.aux
  21. 8 0
      paper/MasterThesis.bbl
  22. 121 0
      paper/MasterThesis.fdb_latexmk
  23. 189 0
      paper/MasterThesis.fls
  24. 8 0
      paper/MasterThesis.lof
  25. 8 0
      paper/MasterThesis.lot
  26. 23 0
      paper/MasterThesis.out
  27. BIN
      paper/MasterThesis.pdf
  28. BIN
      paper/MasterThesis.synctex.gz
  29. 70 0
      paper/MasterThesis.tex
  30. 24 0
      paper/MasterThesis.toc
  31. 2122 0
      paper/algorithm2e.sty
  32. 302 0
      paper/appendix.sty
  33. 897 0
      paper/comp.sty
  34. 683 0
      paper/fncychap.sty
  35. BIN
      paper/images/UA-LogoText.png
  36. BIN
      paper/images/UA-LogoTextC.png
  37. BIN
      paper/images/ansymo_logo.pdf
  38. BIN
      paper/images/ansymo_logo_medium.png
  39. BIN
      paper/images/lore.png
  40. 1517 0
      paper/lineno.sty
  41. 964 0
      paper/oz.sty
  42. 472 0
      paper/paralist.sty
  43. 747 0
      paper/picinpar.sty
  44. 27 0
      paper/references.bib
  45. 1529 0
      paper/titlesec.sty
  46. 141 23
      sccd/compiler/DEVS_generator.py
  47. 1 0
      sccd/compiler/sccdc.py
  48. 52 3
      sccd/runtime/DEVS_statecharts_core.py
  49. 3 1
      sccd/runtime/libs/DEVui.py

+ 14 - 14
input.xml

@@ -26,7 +26,7 @@
                     <state id="main_behaviour" initial="initializing">
                         <state id="initializing">
                             <transition target="../running">
-                                <raise event="create_field" />
+                                <raise event="create_field" />        
                             </transition>
                         </state>
                         <state id="running">
@@ -105,7 +105,7 @@
             <body>
                 <![CDATA[
                 self.field_window = ui.new_window(800,600,"BouncingBalls");
-                self.canvas = ui.append_canvas(self.field_window,800,600,{'background':'#eee'});
+                self.canvas = ui.append_canvas(self.field_window,800,550,{'background':'#eee'});
                 ui.bind_event(self.field_window, ui.EVENTS.WINDOW_CLOSE, self.controller, 'window_close', self.inports['field_ui']);
                 ui.bind_event(self.field_window, ui.EVENTS.KEY_PRESS, self.controller, 'key_press', self.inports['field_ui']);
                 ui.bind_event(self.canvas.element, ui.EVENTS.MOUSE_RIGHT_CLICK,    self.controller, 'right_click', self.inports['field_ui']);
@@ -138,7 +138,7 @@
                         <raise scope="cd" event="create_instance">
                             <parameter expr='"buttons"' />
                             <parameter expr='"Button"' />
-                            <parameter expr="self" />
+                            <parameter expr="self.field_window" />
                             <parameter expr="'create_new_field'" />
                             <parameter expr="'Spawn New Window'" />
                         </raise>
@@ -232,20 +232,20 @@
             </state>
         </scxml>
     </class>
-
+    
     <class name="Button">
         <relationships>
             <association name="parent" class="Field" min="1" max="1" />
         </relationships>
         <inport name="button_ui"/>
         <constructor>
-            <parameter name="parent" type="Field" />
+            <parameter name="tkparent" type="object" />
             <parameter name="event_name" type="str" />
             <parameter name="button_text" type="str" />
             <body>
                 <![CDATA[
                 self.event_name = event_name;
-                button = ui.append_button(parent.field_window, event_name);
+                button = ui.append_button(tkparent, event_name);
                 ui.bind_event(button.element, ui.EVENTS.MOUSE_CLICK, self.controller, 'mouse_click', self.inports['button_ui']);
                 ]]>
             </body>
@@ -269,7 +269,7 @@
             </state>
         </scxml>
     </class>
-
+    
     <class name="Ball">
         <atrribute name="element" />
         <attribute name="canvas" />
@@ -312,7 +312,7 @@
                         <script>
                             <![CDATA[
                             self.association_name = association_name
-                            ]]>
+                            ]]>                            
                         </script>
                     </transition>
                 </state>
@@ -320,13 +320,13 @@
                     <transition after="(20 - self.getSimulatedTime() % 20) / 1000.0" target=".">
                         <script>
                             <![CDATA[
-                            pos = self.element.get_position();
+                            pos = self.element.get_position();    
                             if pos.x-self.r <= 0 or pos.x+self.r >= self.canvas.get_width():
                                 self.vel['x'] = -self.vel['x'];
                             if pos.y-self.r <= 0 or pos.y+self.r >= self.canvas.get_height():
                                 self.vel['y'] = -self.vel['y'];
                             self.element.move(self.vel['x'], self.vel['y']);
-                            ]]>
+                            ]]>                            
                         </script>
                     </transition>
                     <transition port="ball_ui" event="mouse_press" target="../selected" cond="button == ui.MOUSE_BUTTONS.LEFT">
@@ -336,7 +336,7 @@
                         <script>
                             <![CDATA[
                             self.element.set_color("#ff0");
-                            ]]>
+                            ]]>                            
                         </script>
                     </transition>
                 </state>
@@ -377,7 +377,7 @@
                         <script>
                             <![CDATA[
                             self.element.set_color("#f00");
-                            ]]>
+                            ]]>                            
                         </script>
                     </transition>
                 </state>
@@ -392,7 +392,7 @@
                             ]]>
                         </script>
                     </transition>
-                    <transition event="delete_self" target='../../deleted'>
+                    <transition event="delete_self" target='../../deleted'>                    
                         <raise event="delete_ball" scope="narrow" target="'parent'">
                             <parameter expr='self.association_name' />
                         </raise>
@@ -402,4 +402,4 @@
             <state id='deleted' />
         </scxml>
     </class>
-</diagram>
+</diagram>

+ 17 - 0
examples/BouncingBalls/Python/runner.py

@@ -0,0 +1,17 @@
+'''
+Created on 27-jul.-2014
+
+@author: Simon
+'''
+import tkinter as tk
+import target as target
+from sccd.runtime.libs.ui import ui
+from sccd.runtime.statecharts_core import Event
+from sccd.runtime.tkinter_eventloop import *
+
+if __name__ == '__main__':
+	ui.window = tk.Tk()
+	ui.window.withdraw()
+	controller = target.Controller(TkEventLoop(ui.window))
+	controller.start()
+	ui.window.mainloop()

+ 733 - 0
examples/BouncingBalls/Python/target.py

@@ -0,0 +1,733 @@
+"""
+Generated by Statechart compiler by Glenn De Jonghe, Joeri Exelmans, Simon Van Mierlo, and Yentl Van Tendeloo (for the inspiration)
+
+Model author: Simon Van Mierlo+Raphael Mannadiar
+Model name:   Bouncing_Balls_Python_Version
+Model description:
+Tkinter frame with bouncing balls in it.
+"""
+
+from sccd.runtime.statecharts_core import *
+from sccd.runtime.libs.ui import ui
+from sccd.runtime.libs.utils import utils
+import random
+
+# package "Bouncing_Balls_Python_Version"
+
+class MainApp(RuntimeClassBase):
+    def __init__(self, controller):
+        RuntimeClassBase.__init__(self, controller)
+        
+        
+        self.semantics.big_step_maximality = StatechartSemantics.TakeMany
+        self.semantics.internal_event_lifeline = StatechartSemantics.Queue
+        self.semantics.input_event_lifeline = StatechartSemantics.FirstComboStep
+        self.semantics.priority = StatechartSemantics.SourceParent
+        self.semantics.concurrency = StatechartSemantics.Single
+        
+        # build Statechart structure
+        self.build_statechart_structure()
+        
+        # call user defined constructor
+        MainApp.user_defined_constructor(self)
+    
+    def user_defined_constructor(self):
+        self.nr_of_fields = 0
+    
+    def user_defined_destructor(self):
+        pass
+    
+    
+    # builds Statechart structure
+    def build_statechart_structure(self):
+        
+        # state <root>
+        self.states[""] = State(0, "", self)
+        
+        # state /running
+        self.states["/running"] = State(1, "/running", self)
+        
+        # state /running/root
+        self.states["/running/root"] = ParallelState(2, "/running/root", self)
+        
+        # state /running/root/main_behaviour
+        self.states["/running/root/main_behaviour"] = State(3, "/running/root/main_behaviour", self)
+        
+        # state /running/root/main_behaviour/initializing
+        self.states["/running/root/main_behaviour/initializing"] = State(4, "/running/root/main_behaviour/initializing", self)
+        
+        # state /running/root/main_behaviour/running
+        self.states["/running/root/main_behaviour/running"] = State(5, "/running/root/main_behaviour/running", self)
+        
+        # state /running/root/cd_behaviour
+        self.states["/running/root/cd_behaviour"] = State(6, "/running/root/cd_behaviour", self)
+        
+        # state /running/root/cd_behaviour/waiting
+        self.states["/running/root/cd_behaviour/waiting"] = State(7, "/running/root/cd_behaviour/waiting", self)
+        
+        # state /running/root/cd_behaviour/creating
+        self.states["/running/root/cd_behaviour/creating"] = State(8, "/running/root/cd_behaviour/creating", self)
+        
+        # state /running/root/cd_behaviour/check_nr_of_fields
+        self.states["/running/root/cd_behaviour/check_nr_of_fields"] = State(9, "/running/root/cd_behaviour/check_nr_of_fields", self)
+        self.states["/running/root/cd_behaviour/check_nr_of_fields"].setEnter(self._running_root_cd_behaviour_check_nr_of_fields_enter)
+        self.states["/running/root/cd_behaviour/check_nr_of_fields"].setExit(self._running_root_cd_behaviour_check_nr_of_fields_exit)
+        
+        # state /running/root/cd_behaviour/stopped
+        self.states["/running/root/cd_behaviour/stopped"] = State(10, "/running/root/cd_behaviour/stopped", self)
+        
+        # state /running/stopped
+        self.states["/running/stopped"] = State(11, "/running/stopped", self)
+        
+        # add children
+        self.states[""].addChild(self.states["/running"])
+        self.states["/running"].addChild(self.states["/running/root"])
+        self.states["/running"].addChild(self.states["/running/stopped"])
+        self.states["/running/root"].addChild(self.states["/running/root/main_behaviour"])
+        self.states["/running/root"].addChild(self.states["/running/root/cd_behaviour"])
+        self.states["/running/root/main_behaviour"].addChild(self.states["/running/root/main_behaviour/initializing"])
+        self.states["/running/root/main_behaviour"].addChild(self.states["/running/root/main_behaviour/running"])
+        self.states["/running/root/cd_behaviour"].addChild(self.states["/running/root/cd_behaviour/waiting"])
+        self.states["/running/root/cd_behaviour"].addChild(self.states["/running/root/cd_behaviour/creating"])
+        self.states["/running/root/cd_behaviour"].addChild(self.states["/running/root/cd_behaviour/check_nr_of_fields"])
+        self.states["/running/root/cd_behaviour"].addChild(self.states["/running/root/cd_behaviour/stopped"])
+        self.states[""].fixTree()
+        self.states[""].default_state = self.states["/running"]
+        self.states["/running"].default_state = self.states["/running/root"]
+        self.states["/running/root/main_behaviour"].default_state = self.states["/running/root/main_behaviour/initializing"]
+        self.states["/running/root/cd_behaviour"].default_state = self.states["/running/root/cd_behaviour/waiting"]
+        
+        # transition /running/root/main_behaviour/initializing
+        _running_root_main_behaviour_initializing_0 = Transition(self, self.states["/running/root/main_behaviour/initializing"], [self.states["/running/root/main_behaviour/running"]])
+        _running_root_main_behaviour_initializing_0.setAction(self._running_root_main_behaviour_initializing_0_exec)
+        _running_root_main_behaviour_initializing_0.setTrigger(None)
+        self.states["/running/root/main_behaviour/initializing"].addTransition(_running_root_main_behaviour_initializing_0)
+        
+        # transition /running/root/main_behaviour/running
+        _running_root_main_behaviour_running_0 = Transition(self, self.states["/running/root/main_behaviour/running"], [self.states["/running/root/main_behaviour/running"]])
+        _running_root_main_behaviour_running_0.setAction(self._running_root_main_behaviour_running_0_exec)
+        _running_root_main_behaviour_running_0.setTrigger(Event("button_pressed", None))
+        _running_root_main_behaviour_running_0.setGuard(self._running_root_main_behaviour_running_0_guard)
+        self.states["/running/root/main_behaviour/running"].addTransition(_running_root_main_behaviour_running_0)
+        
+        # transition /running/root/cd_behaviour/waiting
+        _running_root_cd_behaviour_waiting_0 = Transition(self, self.states["/running/root/cd_behaviour/waiting"], [self.states["/running/root/cd_behaviour/creating"]])
+        _running_root_cd_behaviour_waiting_0.setAction(self._running_root_cd_behaviour_waiting_0_exec)
+        _running_root_cd_behaviour_waiting_0.setTrigger(Event("create_field", None))
+        self.states["/running/root/cd_behaviour/waiting"].addTransition(_running_root_cd_behaviour_waiting_0)
+        _running_root_cd_behaviour_waiting_1 = Transition(self, self.states["/running/root/cd_behaviour/waiting"], [self.states["/running/root/cd_behaviour/check_nr_of_fields"]])
+        _running_root_cd_behaviour_waiting_1.setAction(self._running_root_cd_behaviour_waiting_1_exec)
+        _running_root_cd_behaviour_waiting_1.setTrigger(Event("delete_field", None))
+        self.states["/running/root/cd_behaviour/waiting"].addTransition(_running_root_cd_behaviour_waiting_1)
+        
+        # transition /running/root/cd_behaviour/creating
+        _running_root_cd_behaviour_creating_0 = Transition(self, self.states["/running/root/cd_behaviour/creating"], [self.states["/running/root/cd_behaviour/waiting"]])
+        _running_root_cd_behaviour_creating_0.setAction(self._running_root_cd_behaviour_creating_0_exec)
+        _running_root_cd_behaviour_creating_0.setTrigger(Event("instance_created", None))
+        self.states["/running/root/cd_behaviour/creating"].addTransition(_running_root_cd_behaviour_creating_0)
+        
+        # transition /running/root/cd_behaviour/check_nr_of_fields
+        _running_root_cd_behaviour_check_nr_of_fields_0 = Transition(self, self.states["/running/root/cd_behaviour/check_nr_of_fields"], [self.states["/running/root/cd_behaviour/stopped"]])
+        _running_root_cd_behaviour_check_nr_of_fields_0.setAction(self._running_root_cd_behaviour_check_nr_of_fields_0_exec)
+        _running_root_cd_behaviour_check_nr_of_fields_0.setTrigger(Event("_0after"))
+        _running_root_cd_behaviour_check_nr_of_fields_0.setGuard(self._running_root_cd_behaviour_check_nr_of_fields_0_guard)
+        self.states["/running/root/cd_behaviour/check_nr_of_fields"].addTransition(_running_root_cd_behaviour_check_nr_of_fields_0)
+        _running_root_cd_behaviour_check_nr_of_fields_1 = Transition(self, self.states["/running/root/cd_behaviour/check_nr_of_fields"], [self.states["/running/root/cd_behaviour/waiting"]])
+        _running_root_cd_behaviour_check_nr_of_fields_1.setTrigger(None)
+        _running_root_cd_behaviour_check_nr_of_fields_1.setGuard(self._running_root_cd_behaviour_check_nr_of_fields_1_guard)
+        self.states["/running/root/cd_behaviour/check_nr_of_fields"].addTransition(_running_root_cd_behaviour_check_nr_of_fields_1)
+        
+        # transition /running/root
+        _running_root_0 = Transition(self, self.states["/running/root"], [self.states["/running/stopped"]])
+        _running_root_0.setAction(self._running_root_0_exec)
+        _running_root_0.setTrigger(Event("stop", None))
+        self.states["/running/root"].addTransition(_running_root_0)
+    
+    def _running_root_cd_behaviour_check_nr_of_fields_enter(self):
+        self.addTimer(0, 0.05)
+    
+    def _running_root_cd_behaviour_check_nr_of_fields_exit(self):
+        self.removeTimer(0)
+    
+    def _running_root_0_exec(self, parameters):
+        ui.close_window(ui.window)
+    
+    def _running_root_main_behaviour_initializing_0_exec(self, parameters):
+        self.raiseInternalEvent(Event("create_field", None, []))
+    
+    def _running_root_main_behaviour_running_0_exec(self, parameters):
+        event_name = parameters[0]
+        self.raiseInternalEvent(Event("create_field", None, []))
+    
+    def _running_root_main_behaviour_running_0_guard(self, parameters):
+        event_name = parameters[0]
+        return event_name == "create_new_field"
+    
+    def _running_root_cd_behaviour_waiting_0_exec(self, parameters):
+        self.big_step.outputEventOM(Event("create_instance", None, [self, "fields"]))
+    
+    def _running_root_cd_behaviour_waiting_1_exec(self, parameters):
+        association_name = parameters[0]
+        self.big_step.outputEventOM(Event("delete_instance", None, [self, association_name]))
+        self.nr_of_fields -= 1
+    
+    def _running_root_cd_behaviour_creating_0_exec(self, parameters):
+        association_name = parameters[0]
+        self.big_step.outputEventOM(Event("start_instance", None, [self, association_name]))
+        self.big_step.outputEventOM(Event("narrow_cast", None, [self, association_name, Event("set_association_name", None, [association_name])]))
+        self.nr_of_fields += 1
+    
+    def _running_root_cd_behaviour_check_nr_of_fields_0_exec(self, parameters):
+        self.raiseInternalEvent(Event("stop", None, []))
+    
+    def _running_root_cd_behaviour_check_nr_of_fields_0_guard(self, parameters):
+        return self.nr_of_fields == 0
+    
+    def _running_root_cd_behaviour_check_nr_of_fields_1_guard(self, parameters):
+        return self.nr_of_fields != 0
+    
+    def initializeStatechart(self):
+        # enter default state
+        self.default_targets = self.states["/running"].getEffectiveTargetStates()
+        RuntimeClassBase.initializeStatechart(self)
+
+class Field(RuntimeClassBase):
+    def __init__(self, controller):
+        RuntimeClassBase.__init__(self, controller)
+        
+        self.inports["field_ui"] = controller.addInputPort("field_ui", self)
+        
+        self.semantics.big_step_maximality = StatechartSemantics.TakeMany
+        self.semantics.internal_event_lifeline = StatechartSemantics.Queue
+        self.semantics.input_event_lifeline = StatechartSemantics.FirstComboStep
+        self.semantics.priority = StatechartSemantics.SourceParent
+        self.semantics.concurrency = StatechartSemantics.Single
+        
+        # build Statechart structure
+        self.build_statechart_structure()
+        
+        # user defined attributes
+        self.canvas = None
+        self.field_window = None
+        
+        # call user defined constructor
+        Field.user_defined_constructor(self)
+    
+    def user_defined_constructor(self):
+        self.field_window = ui.new_window(800,600,"BouncingBalls");
+        self.canvas = ui.append_canvas(self.field_window,800,550,{'background':'#eee'});
+        ui.bind_event(self.field_window, ui.EVENTS.WINDOW_CLOSE, self.controller, 'window_close', self.inports['field_ui']);
+        ui.bind_event(self.field_window, ui.EVENTS.KEY_PRESS, self.controller, 'key_press', self.inports['field_ui']);
+        ui.bind_event(self.canvas.element, ui.EVENTS.MOUSE_RIGHT_CLICK,    self.controller, 'right_click', self.inports['field_ui']);
+        ui.bind_event(self.canvas.element, ui.EVENTS.MOUSE_MOVE, self.controller, 'mouse_move', self.inports['field_ui']);
+        ui.bind_event(self.canvas.element, ui.EVENTS.MOUSE_RELEASE, self.controller, 'mouse_release', self.inports['field_ui']);
+    
+    def user_defined_destructor(self):
+        ui.close_window(self.field_window);
+    
+    
+    # builds Statechart structure
+    def build_statechart_structure(self):
+        
+        # state <root>
+        self.states[""] = State(0, "", self)
+        
+        # state /root
+        self.states["/root"] = State(1, "/root", self)
+        
+        # state /root/waiting
+        self.states["/root/waiting"] = State(2, "/root/waiting", self)
+        
+        # state /root/initializing
+        self.states["/root/initializing"] = State(3, "/root/initializing", self)
+        
+        # state /root/creating
+        self.states["/root/creating"] = State(4, "/root/creating", self)
+        
+        # state /root/packing
+        self.states["/root/packing"] = State(5, "/root/packing", self)
+        
+        # state /root/running
+        self.states["/root/running"] = ParallelState(6, "/root/running", self)
+        
+        # state /root/running/main_behaviour
+        self.states["/root/running/main_behaviour"] = State(7, "/root/running/main_behaviour", self)
+        
+        # state /root/running/main_behaviour/running
+        self.states["/root/running/main_behaviour/running"] = State(8, "/root/running/main_behaviour/running", self)
+        
+        # state /root/running/main_behaviour/creating
+        self.states["/root/running/main_behaviour/creating"] = State(9, "/root/running/main_behaviour/creating", self)
+        
+        # state /root/running/deleting_behaviour
+        self.states["/root/running/deleting_behaviour"] = State(10, "/root/running/deleting_behaviour", self)
+        
+        # state /root/running/deleting_behaviour/running
+        self.states["/root/running/deleting_behaviour/running"] = State(11, "/root/running/deleting_behaviour/running", self)
+        
+        # state /root/running/child_behaviour
+        self.states["/root/running/child_behaviour"] = State(12, "/root/running/child_behaviour", self)
+        
+        # state /root/running/child_behaviour/listening
+        self.states["/root/running/child_behaviour/listening"] = State(13, "/root/running/child_behaviour/listening", self)
+        
+        # state /root/running/deleting_balls_behaviour
+        self.states["/root/running/deleting_balls_behaviour"] = State(14, "/root/running/deleting_balls_behaviour", self)
+        
+        # state /root/running/deleting_balls_behaviour/listening
+        self.states["/root/running/deleting_balls_behaviour/listening"] = State(15, "/root/running/deleting_balls_behaviour/listening", self)
+        
+        # state /root/deleting
+        self.states["/root/deleting"] = State(16, "/root/deleting", self)
+        
+        # state /root/deleted
+        self.states["/root/deleted"] = State(17, "/root/deleted", self)
+        
+        # add children
+        self.states[""].addChild(self.states["/root"])
+        self.states["/root"].addChild(self.states["/root/waiting"])
+        self.states["/root"].addChild(self.states["/root/initializing"])
+        self.states["/root"].addChild(self.states["/root/creating"])
+        self.states["/root"].addChild(self.states["/root/packing"])
+        self.states["/root"].addChild(self.states["/root/running"])
+        self.states["/root"].addChild(self.states["/root/deleting"])
+        self.states["/root"].addChild(self.states["/root/deleted"])
+        self.states["/root/running"].addChild(self.states["/root/running/main_behaviour"])
+        self.states["/root/running"].addChild(self.states["/root/running/deleting_behaviour"])
+        self.states["/root/running"].addChild(self.states["/root/running/child_behaviour"])
+        self.states["/root/running"].addChild(self.states["/root/running/deleting_balls_behaviour"])
+        self.states["/root/running/main_behaviour"].addChild(self.states["/root/running/main_behaviour/running"])
+        self.states["/root/running/main_behaviour"].addChild(self.states["/root/running/main_behaviour/creating"])
+        self.states["/root/running/deleting_behaviour"].addChild(self.states["/root/running/deleting_behaviour/running"])
+        self.states["/root/running/child_behaviour"].addChild(self.states["/root/running/child_behaviour/listening"])
+        self.states["/root/running/deleting_balls_behaviour"].addChild(self.states["/root/running/deleting_balls_behaviour/listening"])
+        self.states[""].fixTree()
+        self.states[""].default_state = self.states["/root"]
+        self.states["/root"].default_state = self.states["/root/waiting"]
+        self.states["/root/running/main_behaviour"].default_state = self.states["/root/running/main_behaviour/running"]
+        self.states["/root/running/deleting_behaviour"].default_state = self.states["/root/running/deleting_behaviour/running"]
+        self.states["/root/running/child_behaviour"].default_state = self.states["/root/running/child_behaviour/listening"]
+        self.states["/root/running/deleting_balls_behaviour"].default_state = self.states["/root/running/deleting_balls_behaviour/listening"]
+        
+        # transition /root/waiting
+        _root_waiting_0 = Transition(self, self.states["/root/waiting"], [self.states["/root/initializing"]])
+        _root_waiting_0.setAction(self._root_waiting_0_exec)
+        _root_waiting_0.setTrigger(Event("set_association_name", None))
+        self.states["/root/waiting"].addTransition(_root_waiting_0)
+        
+        # transition /root/initializing
+        _root_initializing_0 = Transition(self, self.states["/root/initializing"], [self.states["/root/creating"]])
+        _root_initializing_0.setAction(self._root_initializing_0_exec)
+        _root_initializing_0.setTrigger(None)
+        self.states["/root/initializing"].addTransition(_root_initializing_0)
+        
+        # transition /root/creating
+        _root_creating_0 = Transition(self, self.states["/root/creating"], [self.states["/root/packing"]])
+        _root_creating_0.setAction(self._root_creating_0_exec)
+        _root_creating_0.setTrigger(Event("instance_created", None))
+        self.states["/root/creating"].addTransition(_root_creating_0)
+        
+        # transition /root/packing
+        _root_packing_0 = Transition(self, self.states["/root/packing"], [self.states["/root/running"]])
+        _root_packing_0.setTrigger(Event("button_created", None))
+        self.states["/root/packing"].addTransition(_root_packing_0)
+        
+        # transition /root/running/main_behaviour/running
+        _root_running_main_behaviour_running_0 = Transition(self, self.states["/root/running/main_behaviour/running"], [self.states["/root/running/main_behaviour/creating"]])
+        _root_running_main_behaviour_running_0.setAction(self._root_running_main_behaviour_running_0_exec)
+        _root_running_main_behaviour_running_0.setTrigger(Event("right_click", self.getInPortName("field_ui")))
+        self.states["/root/running/main_behaviour/running"].addTransition(_root_running_main_behaviour_running_0)
+        
+        # transition /root/running/main_behaviour/creating
+        _root_running_main_behaviour_creating_0 = Transition(self, self.states["/root/running/main_behaviour/creating"], [self.states["/root/running/main_behaviour/running"]])
+        _root_running_main_behaviour_creating_0.setAction(self._root_running_main_behaviour_creating_0_exec)
+        _root_running_main_behaviour_creating_0.setTrigger(Event("instance_created", None))
+        self.states["/root/running/main_behaviour/creating"].addTransition(_root_running_main_behaviour_creating_0)
+        
+        # transition /root/running/deleting_behaviour/running
+        _root_running_deleting_behaviour_running_0 = Transition(self, self.states["/root/running/deleting_behaviour/running"], [self.states["/root/running/deleting_behaviour/running"]])
+        _root_running_deleting_behaviour_running_0.setAction(self._root_running_deleting_behaviour_running_0_exec)
+        _root_running_deleting_behaviour_running_0.setTrigger(Event("delete_ball", None))
+        self.states["/root/running/deleting_behaviour/running"].addTransition(_root_running_deleting_behaviour_running_0)
+        
+        # transition /root/running/child_behaviour/listening
+        _root_running_child_behaviour_listening_0 = Transition(self, self.states["/root/running/child_behaviour/listening"], [self.states["/root/running/child_behaviour/listening"]])
+        _root_running_child_behaviour_listening_0.setAction(self._root_running_child_behaviour_listening_0_exec)
+        _root_running_child_behaviour_listening_0.setTrigger(Event("button_pressed", None))
+        self.states["/root/running/child_behaviour/listening"].addTransition(_root_running_child_behaviour_listening_0)
+        
+        # transition /root/running/deleting_balls_behaviour/listening
+        _root_running_deleting_balls_behaviour_listening_0 = Transition(self, self.states["/root/running/deleting_balls_behaviour/listening"], [self.states["/root/running/deleting_balls_behaviour/listening"]])
+        _root_running_deleting_balls_behaviour_listening_0.setAction(self._root_running_deleting_balls_behaviour_listening_0_exec)
+        _root_running_deleting_balls_behaviour_listening_0.setTrigger(Event("key_press", self.getInPortName("field_ui")))
+        _root_running_deleting_balls_behaviour_listening_0.setGuard(self._root_running_deleting_balls_behaviour_listening_0_guard)
+        self.states["/root/running/deleting_balls_behaviour/listening"].addTransition(_root_running_deleting_balls_behaviour_listening_0)
+        
+        # transition /root/deleting
+        _root_deleting_0 = Transition(self, self.states["/root/deleting"], [self.states["/root/deleted"]])
+        _root_deleting_0.setAction(self._root_deleting_0_exec)
+        _root_deleting_0.setTrigger(None)
+        self.states["/root/deleting"].addTransition(_root_deleting_0)
+        
+        # transition /root/running
+        _root_running_0 = Transition(self, self.states["/root/running"], [self.states["/root/deleting"]])
+        _root_running_0.setAction(self._root_running_0_exec)
+        _root_running_0.setTrigger(Event("window_close", self.getInPortName("field_ui")))
+        self.states["/root/running"].addTransition(_root_running_0)
+    
+    def _root_running_0_exec(self, parameters):
+        self.big_step.outputEventOM(Event("delete_instance", None, [self, "buttons"]))
+        self.big_step.outputEventOM(Event("delete_instance", None, [self, "balls"]))
+    
+    def _root_waiting_0_exec(self, parameters):
+        association_name = parameters[0]
+        self.association_name = association_name
+    
+    def _root_initializing_0_exec(self, parameters):
+        self.big_step.outputEventOM(Event("create_instance", None, [self, "buttons", "Button", self.field_window, 'create_new_field', 'Spawn New Window']))
+    
+    def _root_creating_0_exec(self, parameters):
+        association_name = parameters[0]
+        self.big_step.outputEventOM(Event("start_instance", None, [self, association_name]))
+    
+    def _root_running_main_behaviour_running_0_exec(self, parameters):
+        x = parameters[0]
+        y = parameters[1]
+        button = parameters[2]
+        self.big_step.outputEventOM(Event("create_instance", None, [self, "balls", "Ball", self.canvas, x, y]))
+    
+    def _root_running_main_behaviour_creating_0_exec(self, parameters):
+        association_name = parameters[0]
+        self.big_step.outputEventOM(Event("start_instance", None, [self, association_name]))
+        self.big_step.outputEventOM(Event("narrow_cast", None, [self, association_name, Event("set_association_name", None, [association_name])]))
+    
+    def _root_running_deleting_behaviour_running_0_exec(self, parameters):
+        association_name = parameters[0]
+        self.big_step.outputEventOM(Event("delete_instance", None, [self, association_name]))
+    
+    def _root_running_child_behaviour_listening_0_exec(self, parameters):
+        event_name = parameters[0]
+        self.big_step.outputEventOM(Event("narrow_cast", None, [self, 'parent', Event("button_pressed", None, [event_name])]))
+    
+    def _root_running_deleting_balls_behaviour_listening_0_exec(self, parameters):
+        key = parameters[0]
+        self.big_step.outputEventOM(Event("narrow_cast", None, [self, 'balls', Event("delete_self", None, [])]))
+    
+    def _root_running_deleting_balls_behaviour_listening_0_guard(self, parameters):
+        key = parameters[0]
+        return key == ui.KEYCODES.DELETE
+    
+    def _root_deleting_0_exec(self, parameters):
+        self.big_step.outputEventOM(Event("narrow_cast", None, [self, 'parent', Event("delete_field", None, [self.association_name])]))
+    
+    def initializeStatechart(self):
+        # enter default state
+        self.default_targets = self.states["/root"].getEffectiveTargetStates()
+        RuntimeClassBase.initializeStatechart(self)
+
+class Button(RuntimeClassBase):
+    def __init__(self, controller, tkparent, event_name, button_text):
+        RuntimeClassBase.__init__(self, controller)
+        
+        self.inports["button_ui"] = controller.addInputPort("button_ui", self)
+        
+        self.semantics.big_step_maximality = StatechartSemantics.TakeMany
+        self.semantics.internal_event_lifeline = StatechartSemantics.Queue
+        self.semantics.input_event_lifeline = StatechartSemantics.FirstComboStep
+        self.semantics.priority = StatechartSemantics.SourceParent
+        self.semantics.concurrency = StatechartSemantics.Single
+        
+        # build Statechart structure
+        self.build_statechart_structure()
+        
+        # call user defined constructor
+        Button.user_defined_constructor(self, tkparent, event_name, button_text)
+    
+    def user_defined_constructor(self, tkparent, event_name, button_text):
+        self.event_name = event_name;
+        button = ui.append_button(tkparent, event_name);
+        ui.bind_event(button.element, ui.EVENTS.MOUSE_CLICK, self.controller, 'mouse_click', self.inports['button_ui']);
+    
+    def user_defined_destructor(self):
+        pass
+    
+    
+    # builds Statechart structure
+    def build_statechart_structure(self):
+        
+        # state <root>
+        self.states[""] = State(0, "", self)
+        
+        # state /initializing
+        self.states["/initializing"] = State(1, "/initializing", self)
+        
+        # state /running
+        self.states["/running"] = State(2, "/running", self)
+        
+        # add children
+        self.states[""].addChild(self.states["/initializing"])
+        self.states[""].addChild(self.states["/running"])
+        self.states[""].fixTree()
+        self.states[""].default_state = self.states["/initializing"]
+        
+        # transition /initializing
+        _initializing_0 = Transition(self, self.states["/initializing"], [self.states["/running"]])
+        _initializing_0.setAction(self._initializing_0_exec)
+        _initializing_0.setTrigger(None)
+        self.states["/initializing"].addTransition(_initializing_0)
+        
+        # transition /running
+        _running_0 = Transition(self, self.states["/running"], [self.states["/running"]])
+        _running_0.setAction(self._running_0_exec)
+        _running_0.setTrigger(Event("mouse_click", self.getInPortName("button_ui")))
+        _running_0.setGuard(self._running_0_guard)
+        self.states["/running"].addTransition(_running_0)
+    
+    def _initializing_0_exec(self, parameters):
+        self.big_step.outputEventOM(Event("narrow_cast", None, [self, 'parent', Event("button_created", None, [])]))
+    
+    def _running_0_exec(self, parameters):
+        x = parameters[0]
+        y = parameters[1]
+        button = parameters[2]
+        self.big_step.outputEventOM(Event("narrow_cast", None, [self, 'parent', Event("button_pressed", None, [self.event_name])]))
+    
+    def _running_0_guard(self, parameters):
+        x = parameters[0]
+        y = parameters[1]
+        button = parameters[2]
+        return button == ui.MOUSE_BUTTONS.LEFT
+    
+    def initializeStatechart(self):
+        # enter default state
+        self.default_targets = self.states["/initializing"].getEffectiveTargetStates()
+        RuntimeClassBase.initializeStatechart(self)
+
+class Ball(RuntimeClassBase):
+    def __init__(self, controller, canvas, x, y):
+        RuntimeClassBase.__init__(self, controller)
+        
+        self.inports["ball_ui"] = controller.addInputPort("ball_ui", self)
+        
+        self.semantics.big_step_maximality = StatechartSemantics.TakeMany
+        self.semantics.internal_event_lifeline = StatechartSemantics.Queue
+        self.semantics.input_event_lifeline = StatechartSemantics.FirstComboStep
+        self.semantics.priority = StatechartSemantics.SourceParent
+        self.semantics.concurrency = StatechartSemantics.Single
+        
+        # build Statechart structure
+        self.build_statechart_structure()
+        
+        # user defined attributes
+        self.canvas = None
+        
+        # call user defined constructor
+        Ball.user_defined_constructor(self, canvas, x, y)
+    
+    def user_defined_constructor(self, canvas, x, y):
+        self.canvas = canvas;
+        self.r = 20.0;
+        self.vel = {'x': random.uniform(-5.0, 5.0), 'y': random.uniform(-5.0, 5.0)};
+        self.mouse_pos = {};
+        self.smooth = 0.4; # value between 0 and 1
+        
+        circle = self.canvas.add_circle(x, y, self.r, {'fill':'#000'});
+        ui.bind_event(circle, ui.EVENTS.MOUSE_PRESS, self.controller, 'mouse_press', self.inports["ball_ui"]);
+        ui.bind_event(circle, ui.EVENTS.MOUSE_MOVE, self.controller, 'mouse_move', self.inports['ball_ui']);
+        ui.bind_event(circle, ui.EVENTS.MOUSE_RELEASE, self.controller, 'mouse_release', self.inports['ball_ui']);
+        self.element = circle;
+    
+    def user_defined_destructor(self):
+        self.canvas.remove_element(self.element);
+    
+    
+    # builds Statechart structure
+    def build_statechart_structure(self):
+        
+        # state <root>
+        self.states[""] = State(0, "", self)
+        
+        # state /main_behaviour
+        self.states["/main_behaviour"] = State(1, "/main_behaviour", self)
+        
+        # state /main_behaviour/initializing
+        self.states["/main_behaviour/initializing"] = State(2, "/main_behaviour/initializing", self)
+        
+        # state /main_behaviour/bouncing
+        self.states["/main_behaviour/bouncing"] = State(3, "/main_behaviour/bouncing", self)
+        self.states["/main_behaviour/bouncing"].setEnter(self._main_behaviour_bouncing_enter)
+        self.states["/main_behaviour/bouncing"].setExit(self._main_behaviour_bouncing_exit)
+        
+        # state /main_behaviour/dragging
+        self.states["/main_behaviour/dragging"] = State(4, "/main_behaviour/dragging", self)
+        
+        # state /main_behaviour/selected
+        self.states["/main_behaviour/selected"] = State(5, "/main_behaviour/selected", self)
+        
+        # state /deleted
+        self.states["/deleted"] = State(6, "/deleted", self)
+        
+        # add children
+        self.states[""].addChild(self.states["/main_behaviour"])
+        self.states[""].addChild(self.states["/deleted"])
+        self.states["/main_behaviour"].addChild(self.states["/main_behaviour/initializing"])
+        self.states["/main_behaviour"].addChild(self.states["/main_behaviour/bouncing"])
+        self.states["/main_behaviour"].addChild(self.states["/main_behaviour/dragging"])
+        self.states["/main_behaviour"].addChild(self.states["/main_behaviour/selected"])
+        self.states[""].fixTree()
+        self.states[""].default_state = self.states["/main_behaviour"]
+        self.states["/main_behaviour"].default_state = self.states["/main_behaviour/initializing"]
+        
+        # transition /main_behaviour/initializing
+        _main_behaviour_initializing_0 = Transition(self, self.states["/main_behaviour/initializing"], [self.states["/main_behaviour/bouncing"]])
+        _main_behaviour_initializing_0.setAction(self._main_behaviour_initializing_0_exec)
+        _main_behaviour_initializing_0.setTrigger(Event("set_association_name", None))
+        self.states["/main_behaviour/initializing"].addTransition(_main_behaviour_initializing_0)
+        
+        # transition /main_behaviour/bouncing
+        _main_behaviour_bouncing_0 = Transition(self, self.states["/main_behaviour/bouncing"], [self.states["/main_behaviour/bouncing"]])
+        _main_behaviour_bouncing_0.setAction(self._main_behaviour_bouncing_0_exec)
+        _main_behaviour_bouncing_0.setTrigger(Event("_0after"))
+        self.states["/main_behaviour/bouncing"].addTransition(_main_behaviour_bouncing_0)
+        _main_behaviour_bouncing_1 = Transition(self, self.states["/main_behaviour/bouncing"], [self.states["/main_behaviour/selected"]])
+        _main_behaviour_bouncing_1.setAction(self._main_behaviour_bouncing_1_exec)
+        _main_behaviour_bouncing_1.setTrigger(Event("mouse_press", self.getInPortName("ball_ui")))
+        _main_behaviour_bouncing_1.setGuard(self._main_behaviour_bouncing_1_guard)
+        self.states["/main_behaviour/bouncing"].addTransition(_main_behaviour_bouncing_1)
+        
+        # transition /main_behaviour/dragging
+        _main_behaviour_dragging_0 = Transition(self, self.states["/main_behaviour/dragging"], [self.states["/main_behaviour/dragging"]])
+        _main_behaviour_dragging_0.setAction(self._main_behaviour_dragging_0_exec)
+        _main_behaviour_dragging_0.setTrigger(Event("mouse_move", self.getInPortName("ball_ui")))
+        self.states["/main_behaviour/dragging"].addTransition(_main_behaviour_dragging_0)
+        _main_behaviour_dragging_1 = Transition(self, self.states["/main_behaviour/dragging"], [self.states["/main_behaviour/bouncing"]])
+        _main_behaviour_dragging_1.setAction(self._main_behaviour_dragging_1_exec)
+        _main_behaviour_dragging_1.setTrigger(Event("mouse_release", self.getInPortName("ball_ui")))
+        self.states["/main_behaviour/dragging"].addTransition(_main_behaviour_dragging_1)
+        
+        # transition /main_behaviour/selected
+        _main_behaviour_selected_0 = Transition(self, self.states["/main_behaviour/selected"], [self.states["/main_behaviour/dragging"]])
+        _main_behaviour_selected_0.setAction(self._main_behaviour_selected_0_exec)
+        _main_behaviour_selected_0.setTrigger(Event("mouse_press", self.getInPortName("ball_ui")))
+        _main_behaviour_selected_0.setGuard(self._main_behaviour_selected_0_guard)
+        self.states["/main_behaviour/selected"].addTransition(_main_behaviour_selected_0)
+        _main_behaviour_selected_1 = Transition(self, self.states["/main_behaviour/selected"], [self.states["/deleted"]])
+        _main_behaviour_selected_1.setAction(self._main_behaviour_selected_1_exec)
+        _main_behaviour_selected_1.setTrigger(Event("delete_self", None))
+        self.states["/main_behaviour/selected"].addTransition(_main_behaviour_selected_1)
+    
+    def _main_behaviour_bouncing_enter(self):
+        self.addTimer(0, (20 - self.getSimulatedTime() % 20) / 1000.0)
+    
+    def _main_behaviour_bouncing_exit(self):
+        self.removeTimer(0)
+    
+    def _main_behaviour_initializing_0_exec(self, parameters):
+        association_name = parameters[0]
+        self.association_name = association_name
+    
+    def _main_behaviour_bouncing_0_exec(self, parameters):
+        pos = self.element.get_position();    
+        if pos.x-self.r <= 0 or pos.x+self.r >= self.canvas.get_width():
+            self.vel['x'] = -self.vel['x'];
+        if pos.y-self.r <= 0 or pos.y+self.r >= self.canvas.get_height():
+            self.vel['y'] = -self.vel['y'];
+        self.element.move(self.vel['x'], self.vel['y']);
+    
+    def _main_behaviour_bouncing_1_exec(self, parameters):
+        x = parameters[0]
+        y = parameters[1]
+        button = parameters[2]
+        self.element.set_color("#ff0");
+    
+    def _main_behaviour_bouncing_1_guard(self, parameters):
+        x = parameters[0]
+        y = parameters[1]
+        button = parameters[2]
+        return button == ui.MOUSE_BUTTONS.LEFT
+    
+    def _main_behaviour_dragging_0_exec(self, parameters):
+        x = parameters[0]
+        y = parameters[1]
+        button = parameters[2]
+        dx = x - self.mouse_pos['x'];
+        dy = y - self.mouse_pos['y'];
+        
+        self.element.move(dx, dy);
+        
+        # keep ball within boundaries
+        pos = self.element.get_position();
+        if pos.x-self.r <= 0 :
+            pos.x = self.r + 1;
+        elif pos.x+self.r >= self.canvas.width :
+            pos.x = self.canvas.width-self.r-1;
+        if pos.y-self.r <= 0 :
+            pos.y = self.r + 1;
+        elif pos.y+self.r >= self.canvas.height :
+            pos.y = self.canvas.height-self.r-1;
+        self.element.set_position(pos.x, pos.y);
+        self.mouse_pos = {'x':x, 'y':y};
+        self.vel = {
+            'x': (1-self.smooth)*dx + self.smooth*self.vel['x'],
+            'y': (1-self.smooth)*dy + self.smooth*self.vel['y']
+        };
+    
+    def _main_behaviour_dragging_1_exec(self, parameters):
+        x = parameters[0]
+        y = parameters[1]
+        self.element.set_color("#f00");
+    
+    def _main_behaviour_selected_0_exec(self, parameters):
+        x = parameters[0]
+        y = parameters[1]
+        button = parameters[2]
+        self.mouse_pos = {'x':x, 'y':y};
+    
+    def _main_behaviour_selected_0_guard(self, parameters):
+        x = parameters[0]
+        y = parameters[1]
+        button = parameters[2]
+        return button == ui.MOUSE_BUTTONS.LEFT
+    
+    def _main_behaviour_selected_1_exec(self, parameters):
+        self.big_step.outputEventOM(Event("narrow_cast", None, [self, 'parent', Event("delete_ball", None, [self.association_name])]))
+    
+    def initializeStatechart(self):
+        # enter default state
+        self.default_targets = self.states["/main_behaviour"].getEffectiveTargetStates()
+        RuntimeClassBase.initializeStatechart(self)
+
+class ObjectManager(ObjectManagerBase):
+    def __init__(self, controller):
+        ObjectManagerBase.__init__(self, controller)
+    
+    def instantiate(self, class_name, construct_params):
+        if class_name == "MainApp":
+            instance = MainApp(self.controller)
+            instance.associations = {}
+            instance.associations["fields"] = Association("Field", 0, -1)
+        elif class_name == "Field":
+            instance = Field(self.controller)
+            instance.associations = {}
+            instance.associations["balls"] = Association("Ball", 0, -1)
+            instance.associations["buttons"] = Association("Button", 0, -1)
+            instance.associations["parent"] = Association("MainApp", 1, 1)
+        elif class_name == "Button":
+            instance = Button(self.controller, construct_params[0], construct_params[1], construct_params[2])
+            instance.associations = {}
+            instance.associations["parent"] = Association("Field", 1, 1)
+        elif class_name == "Ball":
+            instance = Ball(self.controller, construct_params[0], construct_params[1], construct_params[2])
+            instance.associations = {}
+            instance.associations["parent"] = Association("Field", 1, 1)
+        else:
+            raise Exception("Cannot instantiate class " + class_name)
+        return instance
+
+class Controller(EventLoopControllerBase):
+    def __init__(self, event_loop_callbacks, finished_callback = None, behind_schedule_callback = None):
+        if finished_callback == None: finished_callback = None
+        if behind_schedule_callback == None: behind_schedule_callback = None
+        EventLoopControllerBase.__init__(self, ObjectManager(self), event_loop_callbacks, finished_callback, behind_schedule_callback)
+        self.addInputPort("ui")
+        self.object_manager.createInstance("MainApp", [])

+ 117 - 0
examples/BouncingBalls/Python/widget.py

@@ -0,0 +1,117 @@
+import tkinter as tk
+from sccd.runtime.statecharts_core import Event
+
+class Widget:
+	controller = None
+
+	def __init__(self, configure_later=False):
+		if not configure_later:
+			self.set_bindable_and_tagorid(None, None)
+
+	def set_bindable_and_tagorid(self, bindable=None, tagorid=None):
+		if bindable is None:
+			bindable = self
+		self.bindable = bindable
+		self.mytagorid = tagorid
+		if isinstance(self, tk.Toplevel):
+			self.protocol("WM_DELETE_WINDOW", self.window_close)
+		if tagorid is not None:
+			if not isinstance(tagorid, list):
+				tagorid = [tagorid]
+			for t in tagorid:
+				self.bindable.tag_bind(t, "<Button>", self.on_click)
+				self.bindable.tag_bind(t, "<ButtonRelease>", self.on_release)
+				self.bindable.tag_bind(t, "<Motion>", self.on_motion)
+				self.bindable.tag_bind(t, "<Enter>", self.on_enter)
+				self.bindable.tag_bind(t, "<Leave>", self.on_leave)
+				self.bindable.tag_bind(t, "<Key>", self.on_key)
+				self.bindable.tag_bind(t, "<KeyRelease>", self.on_key_release)
+		else:
+			self.bindable.bind("<Button>", self.on_click)
+			self.bindable.bind("<ButtonRelease>", self.on_release)
+			self.bindable.bind("<Motion>", self.on_motion)
+			self.bindable.bind("<Enter>", self.on_enter)
+			self.bindable.bind("<Leave>", self.on_leave)
+			self.bindable.bind("<Key>", self.on_key)
+			self.bindable.bind("<KeyRelease>", self.on_key_release)
+		self.last_x = 50
+		self.last_y = 50
+		self.selected_type = None
+
+	def on_click(self, event):
+		event_name = None
+
+		if event.num == 1:
+			event_name = "left-click"
+		elif event.num == 2:
+			event_name = "middle-click"
+		elif event.num == 3:
+			event_name = "right-click"
+
+		if event_name:
+			self.last_x = event.x
+			self.last_y = event.y
+			Widget.controller.addInput(Event(event_name, "input", [id(self)]))
+
+	def on_release(self, event):
+		event_name = None
+
+		if event.num == 1:
+			event_name = "left-release"
+		elif event.num == 2:
+			event_name = "middle-release"
+		elif event.num == 3:
+			event_name = "right-release"
+
+		if event_name:
+			self.last_x = event.x
+			self.last_y = event.y
+			Widget.controller.addInput(Event(event_name, "input", [id(self)]))
+
+	def on_motion(self, event):
+		self.last_x = event.x
+		self.last_y = event.y
+		Widget.controller.addInput(Event("motion", "input", [id(self)]))
+
+	def on_enter(self, event):
+		Widget.controller.addInput(Event("enter", "input", [id(self)]))
+
+	def on_leave(self, event):
+		Widget.controller.addInput(Event("leave", "input", [id(self)]))
+
+	def on_key(self, event):
+		event_name = None
+
+		if event.keysym == 'Escape':
+			event_name = "escape"
+		elif event.keysym == 'Return':
+			event_name = "return"
+		elif event.keysym == 'Delete':
+			event_name = "delete"
+		elif event.keysym == 'Shift_L':
+			event_name = "shift"
+		elif event.keysym == 'Control_L':
+			event_name = "control"
+
+		if event_name:
+			Widget.controller.addInput(Event(event_name, "input", [id(self)]))
+
+	def on_key_release(self, event):
+		event_name = None
+
+		if event.keysym == 'Escape':
+			event_name = "escape-release"
+		elif event.keysym == 'Return':
+			event_name = "return-release"
+		elif event.keysym == 'Delete':
+			event_name = "delete-release"
+		elif event.keysym == 'Shift_L':
+			event_name = "shift-release"
+		elif event.keysym == 'Control_L':
+			event_name = "control-release"
+
+		if event_name:
+			Widget.controller.addInput(Event(event_name, "input", [id(self)]))
+
+	def window_close(self):
+		Widget.controller.addInput(Event("window-close", "input", [id(self)]))

+ 12 - 0
examples/TrafficLight/Python/runner.py

@@ -0,0 +1,12 @@
+import tkinter as tk
+import target as target
+from sccd.runtime.libs.ui import ui
+from sccd.runtime.statecharts_core import Event
+from sccd.runtime.tkinter_eventloop import *
+
+if __name__ == '__main__':
+	ui.window = tk.Tk()
+
+	controller = target.Controller(TkEventLoop(ui.window))
+	controller.start()
+	ui.window.mainloop()

+ 316 - 0
examples/TrafficLight/Python/target.py

@@ -0,0 +1,316 @@
+"""
+Generated by Statechart compiler by Glenn De Jonghe, Joeri Exelmans, Simon Van Mierlo, and Yentl Van Tendeloo (for the inspiration)
+
+Model author: Raphael Mannadiar
+Model name:   Traffic_Light_Python_Version
+
+"""
+
+from sccd.runtime.statecharts_core import *
+from sccd.runtime.libs.ui import ui
+
+# package "Traffic_Light_Python_Version"
+
+class MainApp(RuntimeClassBase):
+    def __init__(self, controller):
+        RuntimeClassBase.__init__(self, controller)
+        
+        
+        self.semantics.big_step_maximality = StatechartSemantics.TakeMany
+        self.semantics.internal_event_lifeline = StatechartSemantics.Queue
+        self.semantics.input_event_lifeline = StatechartSemantics.FirstComboStep
+        self.semantics.priority = StatechartSemantics.SourceParent
+        self.semantics.concurrency = StatechartSemantics.Single
+        
+        # build Statechart structure
+        self.build_statechart_structure()
+        
+        # call user defined constructor
+        MainApp.user_defined_constructor(self)
+    
+    def user_defined_constructor(self):
+        self.canvas   = ui.append_canvas(ui.window,100,310,{'background':'#eee'});
+        police_button = ui.append_button(ui.window, 'Police interrupt');
+        quit_button   = ui.append_button(ui.window, 'Quit');
+        ui.bind_event(police_button.element, ui.EVENTS.MOUSE_CLICK, self.controller, 'police_interrupt_clicked');
+        ui.bind_event(quit_button.element, ui.EVENTS.MOUSE_CLICK, self.controller, 'quit_clicked');
+    
+    def user_defined_destructor(self):
+        pass
+    
+    
+    # builds Statechart structure
+    def build_statechart_structure(self):
+        
+        # state <root>
+        self.states[""] = State(0, "", self)
+        
+        # state /initializing
+        self.states["/initializing"] = State(1, "/initializing", self)
+        
+        # state /creating
+        self.states["/creating"] = State(2, "/creating", self)
+        
+        # state /initialized
+        self.states["/initialized"] = State(3, "/initialized", self)
+        
+        # add children
+        self.states[""].addChild(self.states["/initializing"])
+        self.states[""].addChild(self.states["/creating"])
+        self.states[""].addChild(self.states["/initialized"])
+        self.states[""].fixTree()
+        self.states[""].default_state = self.states["/initializing"]
+        
+        # transition /initializing
+        _initializing_0 = Transition(self, self.states["/initializing"], [self.states["/creating"]])
+        _initializing_0.setAction(self._initializing_0_exec)
+        _initializing_0.setTrigger(None)
+        self.states["/initializing"].addTransition(_initializing_0)
+        
+        # transition /creating
+        _creating_0 = Transition(self, self.states["/creating"], [self.states["/initialized"]])
+        _creating_0.setAction(self._creating_0_exec)
+        _creating_0.setTrigger(Event("instance_created", None))
+        self.states["/creating"].addTransition(_creating_0)
+    
+    def _initializing_0_exec(self, parameters):
+        self.big_step.outputEventOM(Event("create_instance", None, [self, "trafficlight", "TrafficLight", self.canvas]))
+    
+    def _creating_0_exec(self, parameters):
+        association_name = parameters[0]
+        self.big_step.outputEventOM(Event("start_instance", None, [self, association_name]))
+        self.big_step.outputEventOM(Event("narrow_cast", None, [self, association_name, Event("set_association_name", None, [association_name])]))
+    
+    def initializeStatechart(self):
+        # enter default state
+        self.default_targets = self.states["/initializing"].getEffectiveTargetStates()
+        RuntimeClassBase.initializeStatechart(self)
+
+class TrafficLight(RuntimeClassBase):
+    def __init__(self, controller, canvas):
+        RuntimeClassBase.__init__(self, controller)
+        
+        
+        self.semantics.big_step_maximality = StatechartSemantics.TakeMany
+        self.semantics.internal_event_lifeline = StatechartSemantics.Queue
+        self.semantics.input_event_lifeline = StatechartSemantics.FirstComboStep
+        self.semantics.priority = StatechartSemantics.SourceParent
+        self.semantics.concurrency = StatechartSemantics.Single
+        
+        # build Statechart structure
+        self.build_statechart_structure()
+        
+        # call user defined constructor
+        TrafficLight.user_defined_constructor(self, canvas)
+    
+    def user_defined_constructor(self, canvas):
+        size        = 100;
+        offset      = size+5;
+        self.RED    = 0;
+        self.YELLOW = 1;
+        self.GREEN  = 2;
+        self.colors = ['#f00','#ff0','#0f0']
+        self.lights = [
+            canvas.add_rectangle(size/2, size/2, size, size, {'fill':'#000'}),
+            canvas.add_rectangle(size/2, size/2+offset,     size, size, {'fill':'#000'}),
+            canvas.add_rectangle(size/2, size/2+2*offset, size, size, {'fill':'#000'})];
+    
+    def user_defined_destructor(self):
+        pass
+    
+    
+    # user defined method
+    def clear(self):
+        self.lights[self.RED].set_color('#000');
+        self.lights[self.YELLOW].set_color('#000');
+        self.lights[self.GREEN].set_color('#000');
+    
+    
+    # user defined method
+    def setGreen(self):
+        self.clear();
+        self.lights[self.GREEN].set_color(self.colors[self.GREEN]);
+    
+    
+    # user defined method
+    def setYellow(self):
+        self.clear();
+        self.lights[self.YELLOW].set_color(self.colors[self.YELLOW]);
+    
+    
+    # user defined method
+    def setRed(self):
+        self.clear();
+        self.lights[self.RED].set_color(self.colors[self.RED]);
+    
+    
+    # builds Statechart structure
+    def build_statechart_structure(self):
+        
+        # state <root>
+        self.states[""] = State(0, "", self)
+        
+        # state /on
+        self.states["/on"] = State(1, "/on", self)
+        
+        # state /on/normal
+        self.states["/on/normal"] = State(2, "/on/normal", self)
+        
+        # state /on/normal/red
+        self.states["/on/normal/red"] = State(3, "/on/normal/red", self)
+        self.states["/on/normal/red"].setEnter(self._on_normal_red_enter)
+        self.states["/on/normal/red"].setExit(self._on_normal_red_exit)
+        
+        # state /on/normal/green
+        self.states["/on/normal/green"] = State(4, "/on/normal/green", self)
+        self.states["/on/normal/green"].setEnter(self._on_normal_green_enter)
+        self.states["/on/normal/green"].setExit(self._on_normal_green_exit)
+        
+        # state /on/normal/yellow
+        self.states["/on/normal/yellow"] = State(5, "/on/normal/yellow", self)
+        self.states["/on/normal/yellow"].setEnter(self._on_normal_yellow_enter)
+        self.states["/on/normal/yellow"].setExit(self._on_normal_yellow_exit)
+        
+        # state /on/normal/history
+        self.states["/on/normal/history"] = ShallowHistoryState(6, "/on/normal/history", self)
+        
+        # state /on/interrupted
+        self.states["/on/interrupted"] = State(7, "/on/interrupted", self)
+        
+        # state /on/interrupted/yellow
+        self.states["/on/interrupted/yellow"] = State(8, "/on/interrupted/yellow", self)
+        self.states["/on/interrupted/yellow"].setEnter(self._on_interrupted_yellow_enter)
+        self.states["/on/interrupted/yellow"].setExit(self._on_interrupted_yellow_exit)
+        
+        # state /on/interrupted/black
+        self.states["/on/interrupted/black"] = State(9, "/on/interrupted/black", self)
+        self.states["/on/interrupted/black"].setEnter(self._on_interrupted_black_enter)
+        self.states["/on/interrupted/black"].setExit(self._on_interrupted_black_exit)
+        
+        # state /off
+        self.states["/off"] = State(10, "/off", self)
+        self.states["/off"].setEnter(self._off_enter)
+        
+        # add children
+        self.states[""].addChild(self.states["/on"])
+        self.states[""].addChild(self.states["/off"])
+        self.states["/on"].addChild(self.states["/on/normal"])
+        self.states["/on"].addChild(self.states["/on/interrupted"])
+        self.states["/on/normal"].addChild(self.states["/on/normal/red"])
+        self.states["/on/normal"].addChild(self.states["/on/normal/green"])
+        self.states["/on/normal"].addChild(self.states["/on/normal/yellow"])
+        self.states["/on/normal"].addChild(self.states["/on/normal/history"])
+        self.states["/on/interrupted"].addChild(self.states["/on/interrupted/yellow"])
+        self.states["/on/interrupted"].addChild(self.states["/on/interrupted/black"])
+        self.states[""].fixTree()
+        self.states[""].default_state = self.states["/on"]
+        self.states["/on"].default_state = self.states["/on/normal"]
+        self.states["/on/normal"].default_state = self.states["/on/normal/red"]
+        self.states["/on/interrupted"].default_state = self.states["/on/interrupted/yellow"]
+        
+        # transition /on/normal/red
+        _on_normal_red_0 = Transition(self, self.states["/on/normal/red"], [self.states["/on/normal/green"]])
+        _on_normal_red_0.setTrigger(Event("_0after"))
+        self.states["/on/normal/red"].addTransition(_on_normal_red_0)
+        
+        # transition /on/normal/green
+        _on_normal_green_0 = Transition(self, self.states["/on/normal/green"], [self.states["/on/normal/yellow"]])
+        _on_normal_green_0.setTrigger(Event("_1after"))
+        self.states["/on/normal/green"].addTransition(_on_normal_green_0)
+        
+        # transition /on/normal/yellow
+        _on_normal_yellow_0 = Transition(self, self.states["/on/normal/yellow"], [self.states["/on/normal/red"]])
+        _on_normal_yellow_0.setTrigger(Event("_2after"))
+        self.states["/on/normal/yellow"].addTransition(_on_normal_yellow_0)
+        
+        # transition /on/interrupted/yellow
+        _on_interrupted_yellow_0 = Transition(self, self.states["/on/interrupted/yellow"], [self.states["/on/interrupted/black"]])
+        _on_interrupted_yellow_0.setTrigger(Event("_3after"))
+        self.states["/on/interrupted/yellow"].addTransition(_on_interrupted_yellow_0)
+        
+        # transition /on/interrupted/black
+        _on_interrupted_black_0 = Transition(self, self.states["/on/interrupted/black"], [self.states["/on/interrupted/yellow"]])
+        _on_interrupted_black_0.setTrigger(Event("_4after"))
+        self.states["/on/interrupted/black"].addTransition(_on_interrupted_black_0)
+        
+        # transition /on
+        _on_0 = Transition(self, self.states["/on"], [self.states["/off"]])
+        _on_0.setTrigger(Event("quit_clicked", self.getInPortName("ui")))
+        self.states["/on"].addTransition(_on_0)
+        
+        # transition /on/normal
+        _on_normal_0 = Transition(self, self.states["/on/normal"], [self.states["/on/interrupted"]])
+        _on_normal_0.setTrigger(Event("police_interrupt_clicked", self.getInPortName("ui")))
+        self.states["/on/normal"].addTransition(_on_normal_0)
+        
+        # transition /on/interrupted
+        _on_interrupted_0 = Transition(self, self.states["/on/interrupted"], [self.states["/on/normal/history"]])
+        _on_interrupted_0.setTrigger(Event("police_interrupt_clicked", self.getInPortName("ui")))
+        self.states["/on/interrupted"].addTransition(_on_interrupted_0)
+    
+    def _on_normal_red_enter(self):
+        self.setRed();
+        self.addTimer(0, 3)
+    
+    def _on_normal_red_exit(self):
+        self.removeTimer(0)
+    
+    def _on_normal_green_enter(self):
+        self.setGreen();
+        self.addTimer(1, 2)
+    
+    def _on_normal_green_exit(self):
+        self.removeTimer(1)
+    
+    def _on_normal_yellow_enter(self):
+        self.setYellow();
+        self.addTimer(2, 1)
+    
+    def _on_normal_yellow_exit(self):
+        self.removeTimer(2)
+    
+    def _on_interrupted_yellow_enter(self):
+        self.setYellow();
+        self.addTimer(3, .5)
+    
+    def _on_interrupted_yellow_exit(self):
+        self.removeTimer(3)
+    
+    def _on_interrupted_black_enter(self):
+        self.clear();
+        self.addTimer(4, .5)
+    
+    def _on_interrupted_black_exit(self):
+        self.removeTimer(4)
+    
+    def _off_enter(self):
+        self.clear();
+    
+    def initializeStatechart(self):
+        # enter default state
+        self.default_targets = self.states["/on"].getEffectiveTargetStates()
+        RuntimeClassBase.initializeStatechart(self)
+
+class ObjectManager(ObjectManagerBase):
+    def __init__(self, controller):
+        ObjectManagerBase.__init__(self, controller)
+    
+    def instantiate(self, class_name, construct_params):
+        if class_name == "MainApp":
+            instance = MainApp(self.controller)
+            instance.associations = {}
+            instance.associations["trafficlight"] = Association("TrafficLight", 0, -1)
+        elif class_name == "TrafficLight":
+            instance = TrafficLight(self.controller, construct_params[0])
+            instance.associations = {}
+        else:
+            raise Exception("Cannot instantiate class " + class_name)
+        return instance
+
+class Controller(EventLoopControllerBase):
+    def __init__(self, event_loop_callbacks, finished_callback = None, behind_schedule_callback = None):
+        if finished_callback == None: finished_callback = None
+        if behind_schedule_callback == None: behind_schedule_callback = None
+        EventLoopControllerBase.__init__(self, ObjectManager(self), event_loop_callbacks, finished_callback, behind_schedule_callback)
+        self.addInputPort("ui")
+        self.object_manager.createInstance("MainApp", [])

+ 175 - 0
examples/TrafficLight/TrafficLight.xml

@@ -0,0 +1,175 @@
+<?xml version="1.0" ?>
+<diagram author="Raphael Mannadiar" name="Traffic_Light_Python_Version">
+    <top>
+        from sccd.runtime.libs.ui import ui
+    </top>
+
+    <inport name="ui" />
+
+    <class name="MainApp" default="true">
+        <relationships>
+            <association name="trafficlight" class="TrafficLight" />
+        </relationships>
+        <method name="MainApp">
+            <body>
+                <![CDATA[
+                self.canvas   = ui.append_canvas(ui.window,100,310,{'background':'#eee'});
+                police_button = ui.append_button(ui.window, 'Police interrupt');
+                quit_button   = ui.append_button(ui.window, 'Quit');
+                ui.bind_event(police_button.element, ui.EVENTS.MOUSE_CLICK, self.controller, 'police_interrupt_clicked');
+                ui.bind_event(quit_button.element, ui.EVENTS.MOUSE_CLICK, self.controller, 'quit_clicked');
+                ]]>
+            </body>
+        </method>
+        <scxml initial="initializing">
+            <state id="initializing">
+                <transition target="../creating">
+                    <raise scope="cd" event="create_instance">
+                        <parameter expr='"trafficlight"' />
+                        <parameter expr='"TrafficLight"' />
+                        <parameter expr="self.canvas" />
+                    </raise>
+                </transition>
+            </state>
+            <state id="creating">
+                <transition event="instance_created" target="../initialized">
+                    <parameter name="association_name" type="string"/>
+                    <raise scope="cd" event="start_instance">
+                        <parameter expr="association_name" />
+                    </raise>
+                    <raise scope="narrow" event="set_association_name" target="association_name">
+                        <parameter expr="association_name" />
+                    </raise>
+                </transition>
+            </state>
+            <state id="initialized">
+            </state>
+        </scxml>
+    </class>
+
+    <class name="TrafficLight">
+        <relationships>
+        </relationships>
+        <method name="TrafficLight">
+            <parameter name="canvas" />
+            <body>
+                <![CDATA[
+                size        = 100;
+                offset      = size+5;
+                self.RED    = 0;
+                self.YELLOW = 1;
+                self.GREEN  = 2;
+                self.colors = ['#f00','#ff0','#0f0']
+                self.lights = [
+                    canvas.add_rectangle(size/2, size/2, size, size, {'fill':'#000'}),
+                    canvas.add_rectangle(size/2, size/2+offset,     size, size, {'fill':'#000'}),
+                    canvas.add_rectangle(size/2, size/2+2*offset, size, size, {'fill':'#000'})];
+                ]]>
+            </body>
+        </method>
+        <method name="clear">
+            <body>
+                <![CDATA[
+                self.lights[self.RED].set_color('#000');
+                self.lights[self.YELLOW].set_color('#000');
+                self.lights[self.GREEN].set_color('#000');
+                ]]>
+            </body>
+        </method>
+        <method name="setGreen">
+            <body>
+                <![CDATA[
+                self.clear();
+                self.lights[self.GREEN].set_color(self.colors[self.GREEN]);
+                ]]>
+            </body>
+        </method>
+        <method name="setYellow">
+            <body>
+                <![CDATA[
+                self.clear();
+                self.lights[self.YELLOW].set_color(self.colors[self.YELLOW]);
+                ]]>
+            </body>
+        </method>
+        <method name="setRed">
+            <body>
+                <![CDATA[
+                self.clear();
+                self.lights[self.RED].set_color(self.colors[self.RED]);
+                ]]>
+            </body>
+        </method>
+        <scxml initial="on">
+            <state id="on" initial="normal">
+                <state id="normal" initial="red">
+                    <state id="red">
+                        <onentry>
+                            <script>
+                                <![CDATA[
+                                self.setRed();
+                                ]]>
+                            </script>
+                        </onentry>
+                        <transition after='3' target='../green'/>
+                    </state>
+                    <state id="green">
+                        <onentry>
+                            <script>
+                                <![CDATA[
+                                self.setGreen();
+                                ]]>
+                            </script>
+                        </onentry>
+                        <transition after='2' target='../yellow'/>
+                    </state>
+                    <state id="yellow">
+                        <onentry>
+                            <script>
+                                <![CDATA[
+                                self.setYellow();
+                                ]]>
+                            </script>
+                        </onentry>
+                    <transition after='1' target='../red'/>
+                    </state>
+                    <transition event='police_interrupt_clicked' port='ui' target='../interrupted'/>
+                    <history id="history"/>
+                </state>
+                <state id="interrupted" initial="yellow">
+                    <state id="yellow">
+                        <onentry>
+                            <script>
+                                <![CDATA[
+                                self.setYellow();
+                                ]]>
+                            </script>
+                        </onentry>
+                        <transition after='.5' target='../black'/>
+                    </state>
+                    <state id="black">
+                        <onentry>
+                            <script>
+                                <![CDATA[
+                                self.clear();
+                                ]]>
+                            </script>
+                        </onentry>
+                        <transition after='.5' target='../yellow'/>
+                    </state>
+                    <transition event='police_interrupt_clicked' port='ui' target='../normal/history'/>
+                </state>
+                <transition event='quit_clicked' port='ui' target='../off'/>
+            </state>
+            <state id="off">
+                <onentry>
+                    <script>
+                        <![CDATA[
+                        self.clear();
+                        ]]>
+                    </script>
+                </onentry>
+            </state>
+        </scxml>
+    </class>
+</diagram>

+ 5 - 0
paper/00-Abstract.tex

@@ -0,0 +1,5 @@
+\clearpage 
+\phantomsection 
+\addcontentsline{toc}{chapter}{Abstract}
+\chapter*{Abstract}
+Write Abstract here

+ 5 - 0
paper/00-Acknowledgements.tex

@@ -0,0 +1,5 @@
+\clearpage 
+\phantomsection 
+\addcontentsline{toc}{chapter}{Acknowledgements}
+\chapter*{Acknowledgements}
+Write Acknowledgements here

+ 5 - 0
paper/00-NedSamenvatting.tex

@@ -0,0 +1,5 @@
+\clearpage 
+\phantomsection 
+\addcontentsline{toc}{chapter}{Nederlandstalige Samenvatting}
+\chapter*{Nederlandstalige Samenvatting}
+Nederlandse samenvatting komt hier.

+ 4 - 0
paper/00-Preface.tex

@@ -0,0 +1,4 @@
+\chapter*{Preface}
+\addcontentsline{toc}{chapter}{Preface}
+
+The preface can give some extra information about how and why this thesis was written, and can include acknowledments.

+ 7 - 0
paper/01-Introduction.tex

@@ -0,0 +1,7 @@
+\chapter{Introduction}
+\label{chapt:Introduction}
+Blablabla
+
+\section{Definitions}
+Some introductory section
+

+ 7 - 0
paper/02-Background.tex

@@ -0,0 +1,7 @@
+\chapter{Background}
+\label{chapt:Background}
+
+\section{Blabla}
+\subsection{Bliep using references}
+
+\cite{Demeyer2008} was not mentioned in chapter \ref{chapt:Introduction}

Разница между файлами не показана из-за своего большого размера
+ 43 - 0
paper/03-Methodology.tex


+ 6 - 0
paper/04-Implementation.tex

@@ -0,0 +1,6 @@
+\chapter{Implementation}
+\label{chapt:Implementation}
+Blablabla
+
+\section{Definitions}
+Some introductory section

+ 6 - 0
paper/05-Examples.tex

@@ -0,0 +1,6 @@
+\chapter{Examples}
+\label{chapt:Examples}
+Blablabla
+
+\section{Definitions}
+Some introductory section

+ 3 - 0
paper/99-Conclusions.tex

@@ -0,0 +1,3 @@
+\chapter{Conclusions}
+\label{chapt:Conclusions}
+Example of todo: \todo{Write conclusions here.} 

+ 5 - 0
paper/AA-Testcode.tex

@@ -0,0 +1,5 @@
+\chapter{An appendix}
+\label{chapt:appendix}
+
+
+An Appendix is just like another chapter.

+ 96 - 0
paper/Makefile

@@ -0,0 +1,96 @@
+LATEX	= latex
+BIBTEX	= bibtex
+MAKEINDEX = makeindex
+XDVI	= xdvi -gamma 4
+DVIPS	= dvips
+DVIPDF  = dvipdft
+L2H	= latex2html
+GH	= gv
+
+RERUN = "(There were undefined references|Rerun to get (cross-references|the bars) right)"
+RERUNBIB = "No file.*\.bbl|Citation.*undefined"
+MAKEIDX = "^[^%]*\\makeindex"
+MPRINT = "^[^%]*print"
+USETHUMBS = "^[^%]*thumbpdf"
+
+DATE=$(shell date +%Y-%m-%d)
+
+COPY = if test -r $(<:%.tex=%.toc); then cp $(<:%.tex=%.toc) $(<:%.tex=%.toc.bak); fi 
+RM = rm -f
+
+SRC	:= $(shell egrep -l '^[^%]*\\begin\{document\}' *.tex)
+TRG	= $(SRC:%.tex=%.dvi)
+PSF	= $(SRC:%.tex=%.ps)
+PDF	= $(SRC:%.tex=%.pdf)
+
+define run-latex
+	$(COPY);$(LATEX) $<
+	egrep $(MAKEIDX) $< && ($(MAKEINDEX) $(<:%.tex=%);$(COPY);$(LATEX) $<) >/dev/null; true
+	egrep -c $(RERUNBIB) $(<:%.tex=%.log) && ($(BIBTEX) $(<:%.tex=%);$(COPY);$(LATEX) $<) ; true
+	egrep $(RERUN) $(<:%.tex=%.log) && ($(COPY);$(LATEX) $<) >/dev/null; true
+	egrep $(RERUN) $(<:%.tex=%.log) && ($(COPY);$(LATEX) $<) >/dev/null; true
+	if cmp -s $(<:%.tex=%.toc) $(<:%.tex=%.toc.bak); then true ;else $(LATEX) $< ; fi
+	$(RM) $(<:%.tex=%.toc.bak)
+	# Display relevant warnings
+	egrep -i "(Reference|Citation).*undefined" $(<:%.tex=%.log) ; true
+endef
+
+define run-pdflatex
+	LATEX=pdflatex
+	@$(run-latex)
+endef
+
+define get_dependencies
+	deps=`perl -ne '($$_)=/^[^%]*\\\(?:include|input)\{(.*?)\}/;@_=split /,/;foreach $$t (@_) {print "$$t.tex "}' $<`
+endef
+
+define getbibs
+	bibs=`perl -ne '($$_)=/^[^%]*\\\bibliography\{(.*?)\}/;@_=split /,/;foreach $$b (@_) {print "$$b.bib "}' $< $$deps`
+endef
+
+define manconf
+	mandeps=`if test -r $(basename $@).cnf ; then cat $(basename $@).cnf |tr -d '\n\r' ; fi`
+endef
+
+all 	: veryclean $(TRG) wordcount 
+		acroread $(PDF) &
+
+.PHONY	: all show clean ps pdf showps veryclean wordcount
+
+clean	:
+	  -rm -f $(TRG) $(PSF) $(PDF) $(TRG:%.dvi=%.aux) $(TRG:%.dvi=%.bbl) $(TRG:%.dvi=%.blg) $(TRG:%.dvi=%.log) $(TRG:%.dvi=%.out) $(TRG:%.dvi=%.idx) $(TRG:%.dvi=%.ilg) $(TRG:%.dvi=%.ind) $(TRG:%.dvi=%.toc) $(TRG:%.dvi=%.d)
+
+veryclean	: clean
+	  -rm -f *.log *.aux *.dvi *.bbl *.blg *.ilg *.toc *.lof *.lot *.idx *.ind *.ps  *~ *.tdo *.lol
+
+%.d	: %.tex
+	$(get_dependencies) ; echo $$deps ; \
+	$(getbibs) ; echo $$bibs ; \
+	$(manconf) ; echo  $$mandeps  ;\
+	echo "$*.dvi $@ : $< $$deps $$bibs $$mandeps" > $@ 
+
+include $(SRC:.tex=.d)
+
+$(TRG)	: %.dvi : %.tex
+	  @$(run-latex)
+
+$(PSF)	: %.ps : %.dvi
+	  @$(DVIPS) $< -o $@
+
+$(PDF) : %.pdf : %.tex
+	@$(run-pdflatex)
+
+
+show	: $(TRG)
+	  @for i in $(TRG) ; do $(XDVI) $$i & done
+
+showps	: $(PSF)
+	  @for i in $(PSF) ; do $(GH) $$i & done
+
+ps	: $(PSF) 
+
+pdf	: $(PDF) 
+
+wordcount:
+	@echo "counting words in tex files"
+	detex MasterThesis.tex | wc -w

+ 69 - 0
paper/MasterThesis.aux

@@ -0,0 +1,69 @@
+\relax 
+\providecommand\hyper@newdestlabel[2]{}
+\providecommand\HyperFirstAtBeginDocument{\AtBeginDocument}
+\HyperFirstAtBeginDocument{\ifx\hyper@anchor\@undefined
+\global\let\oldcontentsline\contentsline
+\gdef\contentsline#1#2#3#4{\oldcontentsline{#1}{#2}{#3}}
+\global\let\oldnewlabel\newlabel
+\gdef\newlabel#1#2{\newlabelxx{#1}#2}
+\gdef\newlabelxx#1#2#3#4#5#6{\oldnewlabel{#1}{{#2}{#3}}}
+\AtEndDocument{\ifx\hyper@anchor\@undefined
+\let\contentsline\oldcontentsline
+\let\newlabel\oldnewlabel
+\fi}
+\fi}
+\global\let\hyper@last\relax 
+\gdef\HyperFirstAtBeginDocument#1{#1}
+\providecommand\HyField@AuxAddToFields[1]{}
+\providecommand\HyField@AuxAddToCoFields[2]{}
+\babel@aux{english}{}
+\@writefile{toc}{\contentsline {chapter}{List of Figures}{ii}{section*.2}\protected@file@percent }
+\@writefile{toc}{\contentsline {chapter}{List of Tables}{iii}{section*.4}\protected@file@percent }
+\@writefile{toc}{\contentsline {chapter}{Nederlandstalige Samenvatting}{iv}{section*.6}\protected@file@percent }
+\@writefile{toc}{\contentsline {chapter}{Acknowledgements}{v}{section*.8}\protected@file@percent }
+\@writefile{toc}{\contentsline {chapter}{Abstract}{vi}{section*.10}\protected@file@percent }
+\@writefile{toc}{\contentsline {chapter}{\numberline {1}Introduction}{1}{chapter.1}\protected@file@percent }
+\@writefile{lof}{\addvspace {10\p@ }}
+\@writefile{lot}{\addvspace {10\p@ }}
+\newlabel{chapt:Introduction}{{1}{1}{Introduction}{chapter.1}{}}
+\@writefile{toc}{\contentsline {section}{\numberline {1.1}Definitions}{1}{section.1.1}\protected@file@percent }
+\citation{Demeyer2008}
+\@writefile{toc}{\contentsline {chapter}{\numberline {2}Background}{2}{chapter.2}\protected@file@percent }
+\@writefile{lof}{\addvspace {10\p@ }}
+\@writefile{lot}{\addvspace {10\p@ }}
+\newlabel{chapt:Background}{{2}{2}{Background}{chapter.2}{}}
+\@writefile{toc}{\contentsline {section}{\numberline {2.1}Blabla}{2}{section.2.1}\protected@file@percent }
+\@writefile{toc}{\contentsline {subsection}{\numberline {2.1.1}Bliep using references}{2}{subsection.2.1.1}\protected@file@percent }
+\@writefile{toc}{\contentsline {chapter}{\numberline {3}Methodology}{3}{chapter.3}\protected@file@percent }
+\@writefile{lof}{\addvspace {10\p@ }}
+\@writefile{lot}{\addvspace {10\p@ }}
+\newlabel{chapt:Methodology}{{3}{3}{Methodology}{chapter.3}{}}
+\@writefile{toc}{\contentsline {section}{\numberline {3.1}Translation Tools}{4}{section.3.1}\protected@file@percent }
+\@writefile{toc}{\contentsline {section}{\numberline {3.2}Considered Translation Approaches}{5}{section.3.2}\protected@file@percent }
+\@writefile{toc}{\contentsline {subsection}{\numberline {3.2.1}First approach: Implementing everything into one AtomicDEVS}{5}{subsection.3.2.1}\protected@file@percent }
+\@writefile{toc}{\contentsline {subsection}{\numberline {3.2.2}Second approach: Setting every component to AtomicDEVS}{5}{subsection.3.2.2}\protected@file@percent }
+\@writefile{toc}{\contentsline {chapter}{\numberline {4}Implementation}{6}{chapter.4}\protected@file@percent }
+\@writefile{lof}{\addvspace {10\p@ }}
+\@writefile{lot}{\addvspace {10\p@ }}
+\newlabel{chapt:Implementation}{{4}{6}{Implementation}{chapter.4}{}}
+\@writefile{toc}{\contentsline {section}{\numberline {4.1}Definitions}{6}{section.4.1}\protected@file@percent }
+\@writefile{toc}{\contentsline {chapter}{\numberline {5}Examples}{7}{chapter.5}\protected@file@percent }
+\@writefile{lof}{\addvspace {10\p@ }}
+\@writefile{lot}{\addvspace {10\p@ }}
+\newlabel{chapt:Examples}{{5}{7}{Examples}{chapter.5}{}}
+\@writefile{toc}{\contentsline {section}{\numberline {5.1}Definitions}{7}{section.5.1}\protected@file@percent }
+\bibstyle{plain}
+\@writefile{toc}{\contentsline {chapter}{\numberline {6}Conclusions}{8}{chapter.6}\protected@file@percent }
+\@writefile{lof}{\addvspace {10\p@ }}
+\@writefile{lot}{\addvspace {10\p@ }}
+\newlabel{chapt:Conclusions}{{6}{8}{Conclusions}{chapter.6}{}}
+\@writefile{tdo}{\contentsline {todo}{{Write conclusions here.}}{8}{chapter.6}\protected@file@percent }
+\bibdata{references}
+\bibcite{Demeyer2008}{{1}{}{{}}{{}}}
+\@writefile{toc}{\contentsline {chapter}{Bibliography}{9}{section*.12}\protected@file@percent }
+\@writefile{toc}{\contentsline {chapter}{Appendices}{10}{section*.14}\protected@file@percent }
+\providecommand\NAT@force@numbers{}\NAT@force@numbers
+\@writefile{toc}{\contentsline {chapter}{Appendix \numberline {A}An appendix}{11}{Appendix.a.A}\protected@file@percent }
+\@writefile{lof}{\addvspace {10\p@ }}
+\@writefile{lot}{\addvspace {10\p@ }}
+\newlabel{chapt:appendix}{{A}{11}{An appendix}{Appendix.a.A}{}}

+ 8 - 0
paper/MasterThesis.bbl

@@ -0,0 +1,8 @@
+\begin{thebibliography}{1}
+
+\bibitem{Demeyer2008}
+Serge Demeyer, St{\'e}phane Ducasse, and Oscar Nierstrasz.
+\newblock {\em Object-Oriented Reengineering Patterns}.
+\newblock Square Bracket Associates, 2008.
+
+\end{thebibliography}

+ 121 - 0
paper/MasterThesis.fdb_latexmk

@@ -0,0 +1,121 @@
+# Fdb version 3
+["bibtex MasterThesis"] 0 "MasterThesis.aux" "MasterThesis.bbl" "MasterThesis" 1709043350
+  "/usr/local/texlive/2019/texmf-dist/bibtex/bst/base/plain.bst" 1292289607 20613 bd3fbfa9f64872b81ac57a0dd2ed855f ""
+  "MasterThesis.aux" 1709043350 4540 3ae627a8073df124b50d64a5af04e125 "pdflatex"
+  "references.bib" 1312367667 789 20803d158fccdc749b2e64f161e2607a ""
+  (generated)
+  "MasterThesis.blg"
+  "MasterThesis.bbl"
+["pdflatex"] 1709043350 "/Users/sampieters/Desktop/SCCD2DEVS/paper/MasterThesis.tex" "/Users/sampieters/Desktop/SCCD2DEVS/paper/MasterThesis.pdf" "MasterThesis" 1709043350
+  "/Users/sampieters/Desktop/SCCD2DEVS/paper/MasterThesis.aux" 0 -1 0 ""
+  "/Users/sampieters/Desktop/SCCD2DEVS/paper/MasterThesis.tex" 1708595575 2030 b07d38d40f55a12ddbb2150cd1cb0161 ""
+  "/usr/local/texlive/2019/texmf-dist/fonts/map/fontname/texfonts.map" 1511824771 3332 103109f5612ad95229751940c61aada0 ""
+  "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmbx12.tfm" 1136768653 1324 c910af8c371558dc20f2d7822f66fe64 ""
+  "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmcsc10.tfm" 1136768653 1300 63a6111ee6274895728663cf4b4e7e81 ""
+  "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmmi12.tfm" 1136768653 1524 4414a8315f39513458b80dfc63bff03a ""
+  "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmmi6.tfm" 1136768653 1512 f21f83efb36853c0b70002322c1ab3ad ""
+  "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmmi8.tfm" 1136768653 1520 eccf95517727cb11801f4f1aee3a21b4 ""
+  "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmr12.tfm" 1136768653 1288 655e228510b4c2a1abe905c368440826 ""
+  "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmr17.tfm" 1136768653 1292 296a67155bdbfc32aa9c636f21e91433 ""
+  "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmr6.tfm" 1136768653 1300 b62933e007d01cfd073f79b963c01526 ""
+  "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmr8.tfm" 1136768653 1292 21c1c5bfeaebccffdb478fd231a0997d ""
+  "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmss12.tfm" 1136768653 1324 37b971caf729d7edd9cbb9f9b0ea76eb ""
+  "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmss17.tfm" 1136768653 1320 ed93d62c5f2c16343826001f03341dbc ""
+  "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmssbx10.tfm" 1136768653 1272 e2d13f0df30bf3ad990bb9d028e37f34 ""
+  "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmsy10.tfm" 1136768653 1124 6c73e740cf17375f03eec0ee63599741 ""
+  "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmsy6.tfm" 1136768653 1116 933a60c408fc0a863a92debe84b2d294 ""
+  "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmsy8.tfm" 1136768653 1120 8b7d695260f3cff42e636090a8002094 ""
+  "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmti12.tfm" 1136768653 1484 ed72f8f5cf654cda15ecc8e32bfcbee5 ""
+  "/usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx12.pfb" 1248133631 32080 340ef9bf63678554ee606688e7b5339d ""
+  "/usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/cm/cmr12.pfb" 1248133631 32722 d7379af29a190c3f453aba36302ff5a9 ""
+  "/usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/cm/cmssbx10.pfb" 1248133631 28902 2f5c04fd2884d1878057baa5aad22765 ""
+  "/usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/cm/cmti12.pfb" 1248133631 36118 fad905eba93cff5bce1e185fe980a177 ""
+  "/usr/local/texlive/2019/texmf-dist/tex/context/base/mkii/supp-pdf.mkii" 1461363279 71627 94eb9990bed73c364d7f53f960cc8c5b ""
+  "/usr/local/texlive/2019/texmf-dist/tex/generic/babel-english/english.ldf" 1496785618 7008 9ff5fdcc865b01beca2b0fe4a46231d4 ""
+  "/usr/local/texlive/2019/texmf-dist/tex/generic/babel/babel.def" 1557004175 78303 c54368864528e704f6f347e670e631cd ""
+  "/usr/local/texlive/2019/texmf-dist/tex/generic/babel/babel.sty" 1557004175 17694 218403ecedc79eb72e8ecde7bc3b3f87 ""
+  "/usr/local/texlive/2019/texmf-dist/tex/generic/babel/switch.def" 1557004175 14454 24b05ffde1fce7ca761904a613e8ce1f ""
+  "/usr/local/texlive/2019/texmf-dist/tex/generic/babel/txtbabel.def" 1554327732 7435 ef73091c345c1e2e85b0f9a441eb1f7d ""
+  "/usr/local/texlive/2019/texmf-dist/tex/generic/ifxetex/ifxetex.sty" 1284331290 1458 43ab4710dc82f3edeabecd0d099626b2 ""
+  "/usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/gettitlestring.sty" 1463608860 8237 3b62ef1f7e2c23a328c814b3893bc11f ""
+  "/usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty" 1536701967 185392 b99a6d53180e04300c35e18725f31231 ""
+  "/usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty" 1465595255 70864 bcd5b216757bd619ae692a151d90085d ""
+  "/usr/local/texlive/2019/texmf-dist/tex/latex/base/ifthen.sty" 1523050425 5161 c004ea5a189d4bdcf42e86754ad75a58 ""
+  "/usr/local/texlive/2019/texmf-dist/tex/latex/base/report.cls" 1544567569 22992 ac205d2578ad3f18cf73b50579632d1c ""
+  "/usr/local/texlive/2019/texmf-dist/tex/latex/base/size12.clo" 1544567569 8305 6a682ae291edd56e2d7accbf95eca451 ""
+  "/usr/local/texlive/2019/texmf-dist/tex/latex/colortbl/colortbl.sty" 1544741426 10678 47854138cd4fdca1d7b24b0290c999d4 ""
+  "/usr/local/texlive/2019/texmf-dist/tex/latex/eso-pic/eso-pic.sty" 1526160256 11991 c1669f88e13f8bb6243df144e456b477 ""
+  "/usr/local/texlive/2019/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty" 1548974385 11128 a53805799bebfed6358fc1658a18e41f ""
+  "/usr/local/texlive/2019/texmf-dist/tex/latex/graphics-cfg/color.cfg" 1459978653 1213 620bba36b25224fa9b7e1ccb4ecb76fd ""
+  "/usr/local/texlive/2019/texmf-dist/tex/latex/graphics-cfg/graphics.cfg" 1465944070 1224 978390e9c2234eab29404bc21b268d1e ""
+  "/usr/local/texlive/2019/texmf-dist/tex/latex/graphics-def/pdftex.def" 1515537368 17334 520b9b85ad8a2a48eda3f643e27a5179 ""
+  "/usr/local/texlive/2019/texmf-dist/tex/latex/graphics/color.sty" 1523134385 7028 112f909feb676788e7ea1c5b0b76320f ""
+  "/usr/local/texlive/2019/texmf-dist/tex/latex/graphics/epsfig.sty" 1523134385 3390 371f3edde417b3763d7e25ed5bb647ec ""
+  "/usr/local/texlive/2019/texmf-dist/tex/latex/graphics/graphics.sty" 1523134385 15272 5a97061616e0c8b2aa79c6615ff769f4 ""
+  "/usr/local/texlive/2019/texmf-dist/tex/latex/graphics/graphicx.sty" 1523134385 9063 d0a305975932762117cd1f06a582f896 ""
+  "/usr/local/texlive/2019/texmf-dist/tex/latex/graphics/keyval.sty" 1523134385 2591 6404d0c7d28505fb38ce0d86c2e28ae7 ""
+  "/usr/local/texlive/2019/texmf-dist/tex/latex/graphics/lscape.sty" 1523134385 1754 456e1ddf48323a62f9e0fbc379de63a3 ""
+  "/usr/local/texlive/2019/texmf-dist/tex/latex/graphics/trig.sty" 1523134385 3977 cb9221976ed8a183afad65b59aa8629a ""
+  "/usr/local/texlive/2019/texmf-dist/tex/latex/hyperref/hpdftex.def" 1543704539 51744 477aad43ad6a7ba8c462d20c3e0808e0 ""
+  "/usr/local/texlive/2019/texmf-dist/tex/latex/hyperref/hyperref.sty" 1543704539 236074 d994150943d35d6af0d586a60cc78dd1 ""
+  "/usr/local/texlive/2019/texmf-dist/tex/latex/hyperref/nameref.sty" 1465687530 12949 81e4e808884a8f0e276b69410e234656 ""
+  "/usr/local/texlive/2019/texmf-dist/tex/latex/hyperref/pd1enc.def" 1543704539 14098 b4e1ecab4699a0341b8e1349e4c53fb1 ""
+  "/usr/local/texlive/2019/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg" 1279039959 678 4792914a8f45be57bb98413425e4c7af ""
+  "/usr/local/texlive/2019/texmf-dist/tex/latex/latexconfig/hyperref.cfg" 1254097189 235 6031e5765137be07eed51a510b2b8fb7 ""
+  "/usr/local/texlive/2019/texmf-dist/tex/latex/listings/listings.cfg" 1551393442 1830 8ebf24b6078970a5f7b81814f96ef6bc ""
+  "/usr/local/texlive/2019/texmf-dist/tex/latex/listings/listings.sty" 1551393442 80450 ccf6250c881393368e27f23b483782ab ""
+  "/usr/local/texlive/2019/texmf-dist/tex/latex/listings/lstmisc.sty" 1551393442 77022 9205b75844150972cc4077e78ec26b25 ""
+  "/usr/local/texlive/2019/texmf-dist/tex/latex/natbib/natbib.sty" 1291685959 45456 1c8843383c0bd05870c45fa0ebea6cc2 ""
+  "/usr/local/texlive/2019/texmf-dist/tex/latex/oberdiek/auxhook.sty" 1463608860 3834 4363110eb0ef1eb2b71c8fcbcdb6c357 ""
+  "/usr/local/texlive/2019/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty" 1463608860 12095 5337833c991d80788a43d3ce26bd1c46 ""
+  "/usr/local/texlive/2019/texmf-dist/tex/latex/oberdiek/grfext.sty" 1463608860 7075 2fe3d848bba95f139de11ded085e74aa ""
+  "/usr/local/texlive/2019/texmf-dist/tex/latex/oberdiek/hypcap.sty" 1463608860 3720 63669daeb0b67d5fbec899824e2f1491 ""
+  "/usr/local/texlive/2019/texmf-dist/tex/latex/oberdiek/kvoptions.sty" 1463608860 22417 1d9df1eb66848aa31b18a593099cf45c ""
+  "/usr/local/texlive/2019/texmf-dist/tex/latex/oberdiek/pdflscape.sty" 1463348357 6688 c84de1eae6cda82865a6d3d09e339ec9 ""
+  "/usr/local/texlive/2019/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty" 1463608860 9581 023642318cef9f4677efe364de1e2a27 ""
+  "/usr/local/texlive/2019/texmf-dist/tex/latex/pdfpages/pdfpages.sty" 1509485055 52989 80e784f009ef46fd8220535bd14a7d82 ""
+  "/usr/local/texlive/2019/texmf-dist/tex/latex/pdfpages/pppdftex.def" 1509485055 6364 ca3f15bd79c5439d528d1a286b3405c1 ""
+  "/usr/local/texlive/2019/texmf-dist/tex/latex/shadow/shadow.sty" 1288893655 4274 0483d04191c1937afb7f81210c4767b0 ""
+  "/usr/local/texlive/2019/texmf-dist/tex/latex/titlesec/block.tss" 1458858524 1410 f5fabf556740993e1391ddd9561033c8 ""
+  "/usr/local/texlive/2019/texmf-dist/tex/latex/tools/array.sty" 1546812253 12527 31ab547f6520657998ecf91709f950ac ""
+  "/usr/local/texlive/2019/texmf-dist/tex/latex/tools/calc.sty" 1523050425 10212 357072c1d20578a30d6387d8a22e72ab ""
+  "/usr/local/texlive/2019/texmf-dist/tex/latex/tools/xspace.sty" 1523050425 4542 5251001fb2c96205905dbac86c51c5ab ""
+  "/usr/local/texlive/2019/texmf-dist/tex/latex/url/url.sty" 1388531844 12796 8edb7d69a20b857904dd0ea757c14ec9 ""
+  "/usr/local/texlive/2019/texmf-dist/web2c/texmf.cnf" 1557092114 35484 cb1661360667bf4db662a8895053b554 ""
+  "/usr/local/texlive/2019/texmf-var/fonts/map/pdftex/updmap/pdftex.map" 1557342064 3277517 23507ed665b4dd9046f0f2a94bbef2be ""
+  "/usr/local/texlive/2019/texmf-var/web2c/pdftex/pdflatex.fmt" 1581889033 4259636 d37c56afa7e03d15fcc5f2788a45c45a ""
+  "/usr/local/texlive/2019/texmf.cnf" 1557341546 577 d150fef99ac436ad1156e86b0892f6ef ""
+  "00-Abstract.tex" 1312367667 109 0156ab9bf98f2b7444d2664eeb4a4a24 ""
+  "00-Acknowledgements.tex" 1312367667 134 74cc9bb4494a6282239f34e7cb65ad6e ""
+  "00-NedSamenvatting.tex" 1312367667 167 8399376b625bface729d36e4e2250554 ""
+  "01-Introduction.tex" 1312367667 110 d7ee8b8c3f070ba0d55f0a809660ac58 ""
+  "02-Background.tex" 1708594440 173 580aafc5d1b71c2ed9e484ffc48056a5 ""
+  "03-Methodology.tex" 1708865037 5239 30d99e6e522d5663924569fc8bdf8d22 ""
+  "04-Implementation.tex" 1708595418 112 55cb6455e2f9f0104ec4d8e6d0f49273 ""
+  "05-Examples.tex" 1708595429 100 9e94dd9a3549d797588d04c14167759b ""
+  "99-Conclusions.tex" 1312367667 96 14738e95e1c9f65e878257a213a68c0e ""
+  "AA-Testcode.tex" 1312367667 88 92b0f084449dc6404f28e8aa563e51d2 ""
+  "MasterThesis.aux" 0 -1 0 "pdflatex"
+  "MasterThesis.bbl" 1708594014 231 de400b7dcca806f26018f05e817af9f6 "bibtex MasterThesis"
+  "MasterThesis.out" 0 -1 0 "pdflatex"
+  "MasterThesis.tex" 1708595575 2030 b07d38d40f55a12ddbb2150cd1cb0161 ""
+  "algorithm2e.sty" 1312367667 90314 30002475f17985f6891a4234c2b3fb79 ""
+  "appendix.sty" 1312367667 8966 36f3fb990db085b747e9212d3dddd969 ""
+  "comp.sty" 1322491102 22573 32f91057d0cde4d85b672e75fe038916 ""
+  "fncychap.sty" 1312367667 18802 524a3e548e4cea4360a6ecd21ff1dd71 ""
+  "images/UA-LogoText.png" 1312367667 22386 866b3200128b22ab32dffaddf861ffb2 ""
+  "images/ansymo_logo.pdf" 1322491050 32116 b297edcffd787b5dfbbcd42653b6f5a7 ""
+  "lineno.sty" 1312367667 62108 fd7538fc2f881bc48827cacfb8a55424 ""
+  "paralist.sty" 1312367667 14612 3f6ffd5c93ae0d11f6a016f56fd319e1 ""
+  "picinpar.sty" 1312367667 24409 c0cc078f3063909ee9f34b5dc9ae71ef ""
+  "titlesec.sty" 1312367667 47627 5593f18067f6da9a34ba2dc08abaee8e ""
+  (generated)
+  "MasterThesis.pdf"
+  "/Users/sampieters/Desktop/SCCD2DEVS/paper/MasterThesis.log"
+  "MasterThesis.aux"
+  "MasterThesis.log"
+  "MasterThesis.lot"
+  "MasterThesis.out"
+  "/Users/sampieters/Desktop/SCCD2DEVS/paper/MasterThesis.pdf"
+  "MasterThesis.lof"
+  "MasterThesis.toc"

+ 189 - 0
paper/MasterThesis.fls

@@ -0,0 +1,189 @@
+PWD /Users/sampieters/Desktop/SCCD2DEVS/paper
+INPUT /usr/local/texlive/2019/texmf.cnf
+INPUT /usr/local/texlive/2019/texmf-dist/web2c/texmf.cnf
+INPUT /usr/local/texlive/2019/texmf-var/web2c/pdftex/pdflatex.fmt
+INPUT /Users/sampieters/Desktop/SCCD2DEVS/paper/MasterThesis.tex
+OUTPUT /Users/sampieters/Desktop/SCCD2DEVS/paper/MasterThesis.log
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/base/report.cls
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/base/report.cls
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/base/size12.clo
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/base/size12.clo
+INPUT /usr/local/texlive/2019/texmf-dist/fonts/map/fontname/texfonts.map
+INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmr12.tfm
+INPUT /Users/sampieters/Desktop/SCCD2DEVS/paper/comp.sty
+INPUT /Users/sampieters/Desktop/SCCD2DEVS/paper/comp.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/graphics/graphicx.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/graphics/graphicx.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/graphics/keyval.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/graphics/keyval.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/graphics/graphics.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/graphics/graphics.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/graphics/trig.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/graphics/trig.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/graphics-cfg/graphics.cfg
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/graphics-cfg/graphics.cfg
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/graphics-def/pdftex.def
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/graphics-def/pdftex.def
+INPUT /Users/sampieters/Desktop/SCCD2DEVS/paper/fncychap.sty
+INPUT /Users/sampieters/Desktop/SCCD2DEVS/paper/fncychap.sty
+INPUT /Users/sampieters/Desktop/SCCD2DEVS/paper/titlesec.sty
+INPUT /Users/sampieters/Desktop/SCCD2DEVS/paper/titlesec.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty
+INPUT /Users/sampieters/Desktop/SCCD2DEVS/paper/paralist.sty
+INPUT /Users/sampieters/Desktop/SCCD2DEVS/paper/paralist.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/listings/listings.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/listings/listings.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/listings/lstmisc.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/listings/lstmisc.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/listings/listings.cfg
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/listings/listings.cfg
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/graphics/color.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/graphics/color.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/graphics-cfg/color.cfg
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/graphics-cfg/color.cfg
+INPUT /Users/sampieters/Desktop/SCCD2DEVS/paper/appendix.sty
+INPUT /Users/sampieters/Desktop/SCCD2DEVS/paper/appendix.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/natbib/natbib.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/natbib/natbib.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/url/url.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/url/url.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/babel/babel.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/babel/babel.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/babel/switch.def
+INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/babel-english/english.ldf
+INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/babel-english/english.ldf
+INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/babel/babel.def
+INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/babel/txtbabel.def
+INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/babel-english/english.ldf
+INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/babel-english/english.ldf
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/base/ifthen.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/base/ifthen.sty
+INPUT /Users/sampieters/Desktop/SCCD2DEVS/paper/picinpar.sty
+INPUT /Users/sampieters/Desktop/SCCD2DEVS/paper/picinpar.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/colortbl/colortbl.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/colortbl/colortbl.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/tools/array.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/tools/array.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/shadow/shadow.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/shadow/shadow.sty
+INPUT /Users/sampieters/Desktop/SCCD2DEVS/paper/lineno.sty
+INPUT /Users/sampieters/Desktop/SCCD2DEVS/paper/lineno.sty
+INPUT /Users/sampieters/Desktop/SCCD2DEVS/paper/algorithm2e.sty
+INPUT /Users/sampieters/Desktop/SCCD2DEVS/paper/algorithm2e.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/tools/xspace.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/tools/xspace.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/graphics/epsfig.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/graphics/epsfig.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/hyperref/hyperref.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/hyperref/hyperref.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/ifxetex/ifxetex.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/ifxetex/ifxetex.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/oberdiek/auxhook.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/oberdiek/auxhook.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/oberdiek/kvoptions.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/oberdiek/kvoptions.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/hyperref/pd1enc.def
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/hyperref/pd1enc.def
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/latexconfig/hyperref.cfg
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/latexconfig/hyperref.cfg
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/hyperref/hpdftex.def
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/hyperref/hpdftex.def
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/pdfpages/pdfpages.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/pdfpages/pdfpages.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/tools/calc.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/tools/calc.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/eso-pic/eso-pic.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/eso-pic/eso-pic.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/pdfpages/pppdftex.def
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/pdfpages/pppdftex.def
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/oberdiek/hypcap.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/oberdiek/hypcap.sty
+OUTPUT /Users/sampieters/Desktop/SCCD2DEVS/paper/MasterThesis.aux
+INPUT /usr/local/texlive/2019/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
+INPUT /usr/local/texlive/2019/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/oberdiek/grfext.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/oberdiek/grfext.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/hyperref/nameref.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/hyperref/nameref.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/gettitlestring.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/gettitlestring.sty
+OUTPUT /Users/sampieters/Desktop/SCCD2DEVS/paper/MasterThesis.out
+OUTPUT /Users/sampieters/Desktop/SCCD2DEVS/paper/MasterThesis.pdf
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/oberdiek/pdflscape.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/oberdiek/pdflscape.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/graphics/lscape.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/graphics/lscape.sty
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/titlesec/block.tss
+INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/titlesec/block.tss
+INPUT /Users/sampieters/Desktop/SCCD2DEVS/paper/images/UA-LogoText.png
+INPUT /Users/sampieters/Desktop/SCCD2DEVS/paper/images/UA-LogoText.png
+INPUT /Users/sampieters/Desktop/SCCD2DEVS/paper/images/UA-LogoText.png
+INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmr17.tfm
+INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmbx12.tfm
+INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmr8.tfm
+INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmr6.tfm
+INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmmi12.tfm
+INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmmi8.tfm
+INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmmi6.tfm
+INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmsy10.tfm
+INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmsy8.tfm
+INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmsy6.tfm
+INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmbx12.tfm
+INPUT /Users/sampieters/Desktop/SCCD2DEVS/paper/images/ansymo_logo.pdf
+INPUT /Users/sampieters/Desktop/SCCD2DEVS/paper/images/ansymo_logo.pdf
+INPUT /Users/sampieters/Desktop/SCCD2DEVS/paper/images/ansymo_logo.pdf
+INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmcsc10.tfm
+INPUT /usr/local/texlive/2019/texmf-var/fonts/map/pdftex/updmap/pdftex.map
+INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmss12.tfm
+INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmr17.tfm
+INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmss17.tfm
+INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmssbx10.tfm
+OUTPUT /Users/sampieters/Desktop/SCCD2DEVS/paper/MasterThesis.toc
+OUTPUT /Users/sampieters/Desktop/SCCD2DEVS/paper/MasterThesis.lof
+OUTPUT /Users/sampieters/Desktop/SCCD2DEVS/paper/MasterThesis.lot
+INPUT /Users/sampieters/Desktop/SCCD2DEVS/paper/00-NedSamenvatting.tex
+INPUT /Users/sampieters/Desktop/SCCD2DEVS/paper/00-NedSamenvatting.tex
+INPUT /Users/sampieters/Desktop/SCCD2DEVS/paper/00-Acknowledgements.tex
+INPUT /Users/sampieters/Desktop/SCCD2DEVS/paper/00-Acknowledgements.tex
+INPUT /Users/sampieters/Desktop/SCCD2DEVS/paper/00-Abstract.tex
+INPUT /Users/sampieters/Desktop/SCCD2DEVS/paper/00-Abstract.tex
+INPUT /Users/sampieters/Desktop/SCCD2DEVS/paper/01-Introduction.tex
+INPUT /Users/sampieters/Desktop/SCCD2DEVS/paper/01-Introduction.tex
+INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmssbx10.tfm
+INPUT /Users/sampieters/Desktop/SCCD2DEVS/paper/02-Background.tex
+INPUT /Users/sampieters/Desktop/SCCD2DEVS/paper/02-Background.tex
+INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmr12.tfm
+INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmss12.tfm
+INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmssbx10.tfm
+INPUT /Users/sampieters/Desktop/SCCD2DEVS/paper/03-Methodology.tex
+INPUT /Users/sampieters/Desktop/SCCD2DEVS/paper/03-Methodology.tex
+INPUT /Users/sampieters/Desktop/SCCD2DEVS/paper/04-Implementation.tex
+INPUT /Users/sampieters/Desktop/SCCD2DEVS/paper/04-Implementation.tex
+INPUT /Users/sampieters/Desktop/SCCD2DEVS/paper/05-Examples.tex
+INPUT /Users/sampieters/Desktop/SCCD2DEVS/paper/05-Examples.tex
+INPUT /Users/sampieters/Desktop/SCCD2DEVS/paper/99-Conclusions.tex
+INPUT /Users/sampieters/Desktop/SCCD2DEVS/paper/99-Conclusions.tex
+INPUT /Users/sampieters/Desktop/SCCD2DEVS/paper/MasterThesis.bbl
+INPUT /Users/sampieters/Desktop/SCCD2DEVS/paper/MasterThesis.bbl
+INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmti12.tfm
+INPUT /Users/sampieters/Desktop/SCCD2DEVS/paper/AA-Testcode.tex
+INPUT /Users/sampieters/Desktop/SCCD2DEVS/paper/AA-Testcode.tex
+INPUT /Users/sampieters/Desktop/SCCD2DEVS/paper/MasterThesis.aux
+INPUT /Users/sampieters/Desktop/SCCD2DEVS/paper/MasterThesis.out
+INPUT /Users/sampieters/Desktop/SCCD2DEVS/paper/MasterThesis.out
+INPUT /usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx12.pfb
+INPUT /usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/cm/cmr12.pfb
+INPUT /usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/cm/cmssbx10.pfb
+INPUT /usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/cm/cmti12.pfb

+ 8 - 0
paper/MasterThesis.lof

@@ -0,0 +1,8 @@
+\babel@toc {english}{}
+\addvspace {10\p@ }
+\addvspace {10\p@ }
+\addvspace {10\p@ }
+\addvspace {10\p@ }
+\addvspace {10\p@ }
+\addvspace {10\p@ }
+\addvspace {10\p@ }

+ 8 - 0
paper/MasterThesis.lot

@@ -0,0 +1,8 @@
+\babel@toc {english}{}
+\addvspace {10\p@ }
+\addvspace {10\p@ }
+\addvspace {10\p@ }
+\addvspace {10\p@ }
+\addvspace {10\p@ }
+\addvspace {10\p@ }
+\addvspace {10\p@ }

+ 23 - 0
paper/MasterThesis.out

@@ -0,0 +1,23 @@
+\BOOKMARK [0][-]{section*.2}{List of Figures}{}% 1
+\BOOKMARK [0][-]{section*.4}{List of Tables}{}% 2
+\BOOKMARK [0][-]{section*.6}{Nederlandstalige Samenvatting}{}% 3
+\BOOKMARK [0][-]{section*.8}{Acknowledgements}{}% 4
+\BOOKMARK [0][-]{section*.10}{Abstract}{}% 5
+\BOOKMARK [0][-]{chapter.1}{Introduction}{}% 6
+\BOOKMARK [1][-]{section.1.1}{Definitions}{chapter.1}% 7
+\BOOKMARK [0][-]{chapter.2}{Background}{}% 8
+\BOOKMARK [1][-]{section.2.1}{Blabla}{chapter.2}% 9
+\BOOKMARK [2][-]{subsection.2.1.1}{Bliep using references}{section.2.1}% 10
+\BOOKMARK [0][-]{chapter.3}{Methodology}{}% 11
+\BOOKMARK [1][-]{section.3.1}{Translation Tools}{chapter.3}% 12
+\BOOKMARK [1][-]{section.3.2}{Considered Translation Approaches}{chapter.3}% 13
+\BOOKMARK [2][-]{subsection.3.2.1}{First approach: Implementing everything into one AtomicDEVS}{section.3.2}% 14
+\BOOKMARK [2][-]{subsection.3.2.2}{Second approach: Setting every component to AtomicDEVS}{section.3.2}% 15
+\BOOKMARK [0][-]{chapter.4}{Implementation}{}% 16
+\BOOKMARK [1][-]{section.4.1}{Definitions}{chapter.4}% 17
+\BOOKMARK [0][-]{chapter.5}{Examples}{}% 18
+\BOOKMARK [1][-]{section.5.1}{Definitions}{chapter.5}% 19
+\BOOKMARK [0][-]{chapter.6}{Conclusions}{}% 20
+\BOOKMARK [0][-]{section*.12}{Bibliography}{}% 21
+\BOOKMARK [0][-]{section*.14}{Appendices}{}% 22
+\BOOKMARK [0][-]{Appendix.a.A}{Appendix An appendix}{}% 23

BIN
paper/MasterThesis.pdf


BIN
paper/MasterThesis.synctex.gz


+ 70 - 0
paper/MasterThesis.tex

@@ -0,0 +1,70 @@
+\documentclass[a4paper,12pt]{report}
+
+\usepackage[masterthesis,english]{comp}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\title{Translating statecharts and class diagrams to DEVS}
+\author{Sam Pieters}
+\principaladviser{Hans Vangheluwe}
+\assistantadviser{Joeri Exelmans}
+\submitdate{May 2024}
+\bibfile{references}
+\bibpunct{[}{]}{;}{a}{,}{,}
+%\bibliographystyle{alpha}
+
+% Make hyperref package use black links
+\hypersetup{
+	pdfauthor={Author of this thesis},
+	pdftitle={Title of this masterThesis},
+	pdfkeywords={some keywords},
+    colorlinks,
+    citecolor=black,
+    filecolor=black,
+    linkcolor=black,
+    urlcolor=black
+}
+
+%correct faulty hyphenation here, most usefull for "nederlandstalige samenvatting" as english is hyphenated automatically
+\hyphenation{die-nen}
+
+% Make sure links to images link correctly to the image and not the text
+\usepackage[all]{hypcap}
+
+%TODO COMMANDS
+\newcommand{\todo}[1]{
+	\addcontentsline{tdo}{todo}{\protect{#1}}
+    \textcolor{blue}{TODO: #1} %\marginpar{#1}
+}
+
+\makeatletter \newcommand \listoftodos{\section*{Todo list} \@starttoc{tdo}}
+  \newcommand\l@todo[2]
+    {\par\noindent \textit{#2}, \parbox{14cm}{#1}\par} \makeatother
+
+%Make sure that subenumerations are also numbered and referenced correctly
+\renewcommand{\theenumii}{.\arabic{enumii}}
+\renewcommand{\labelenumii}{\labelenumi\arabic{enumii}}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\begin{document}
+%\listoftodos
+%\newpage
+\frontpages
+\input{00-NedSamenvatting}
+\input{00-Acknowledgements}
+\input{00-Abstract}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\mainbodypages
+\input{01-Introduction}
+\input{02-Background.tex}
+\input{03-Methodology.tex}
+\input{04-Implementation.tex}
+\input{05-Examples.tex}
+\input{99-Conclusions}
+\backpages
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\begin{appendices}
+\input{AA-Testcode}
+\end{appendices}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\end{document}

+ 24 - 0
paper/MasterThesis.toc

@@ -0,0 +1,24 @@
+\babel@toc {english}{}
+\contentsline {chapter}{List of Figures}{ii}{section*.2}% 
+\contentsline {chapter}{List of Tables}{iii}{section*.4}% 
+\contentsline {chapter}{Nederlandstalige Samenvatting}{iv}{section*.6}% 
+\contentsline {chapter}{Acknowledgements}{v}{section*.8}% 
+\contentsline {chapter}{Abstract}{vi}{section*.10}% 
+\contentsline {chapter}{\numberline {1}Introduction}{1}{chapter.1}% 
+\contentsline {section}{\numberline {1.1}Definitions}{1}{section.1.1}% 
+\contentsline {chapter}{\numberline {2}Background}{2}{chapter.2}% 
+\contentsline {section}{\numberline {2.1}Blabla}{2}{section.2.1}% 
+\contentsline {subsection}{\numberline {2.1.1}Bliep using references}{2}{subsection.2.1.1}% 
+\contentsline {chapter}{\numberline {3}Methodology}{3}{chapter.3}% 
+\contentsline {section}{\numberline {3.1}Translation Tools}{4}{section.3.1}% 
+\contentsline {section}{\numberline {3.2}Considered Translation Approaches}{5}{section.3.2}% 
+\contentsline {subsection}{\numberline {3.2.1}First approach: Implementing everything into one AtomicDEVS}{5}{subsection.3.2.1}% 
+\contentsline {subsection}{\numberline {3.2.2}Second approach: Setting every component to AtomicDEVS}{5}{subsection.3.2.2}% 
+\contentsline {chapter}{\numberline {4}Implementation}{6}{chapter.4}% 
+\contentsline {section}{\numberline {4.1}Definitions}{6}{section.4.1}% 
+\contentsline {chapter}{\numberline {5}Examples}{7}{chapter.5}% 
+\contentsline {section}{\numberline {5.1}Definitions}{7}{section.5.1}% 
+\contentsline {chapter}{\numberline {6}Conclusions}{8}{chapter.6}% 
+\contentsline {chapter}{Bibliography}{9}{section*.12}% 
+\contentsline {chapter}{Appendices}{10}{section*.14}% 
+\contentsline {chapter}{Appendix \numberline {A}An appendix}{11}{Appendix.a.A}% 

Разница между файлами не показана из-за своего большого размера
+ 2122 - 0
paper/algorithm2e.sty


+ 302 - 0
paper/appendix.sty

@@ -0,0 +1,302 @@
+%%
+%% This is file `appendix.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% appendix.dtx  (with options: `usc')
+%% 
+%% -----------------------------------------------------------------
+%%   Author: Peter Wilson (CUA) now at peter.r.wilson@boeing.com until June 2004
+%%                              (or at: pandgwilson at earthlink dot net)
+%%   Copyright 1998 --- 2004 Peter R. Wilson
+%% 
+%%   This work may be distributed and/or modified under the
+%%   conditions of the LaTeX Project Public License, either
+%%   version 1.3 of this license or (at your option) any
+%%   later version.
+%%   The latest version of the license is in
+%%      http://www.latex-project.org/lppl.txt
+%%   and version 1.3 or later is part of all distributions of
+%%   LaTeX version 2003/06/01 or later.
+%% 
+%%   This work has the LPPL maintenance status "author-maintained".
+%% 
+%%   This work consists of the files listed in the README file.
+%% -----------------------------------------------------------------
+%% 
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{appendix}[2002/08/06 v1.2 extra appendix facilities]
+
+\newif\if@chapter@pp\@chapter@ppfalse
+\newif\if@knownclass@pp\@knownclass@ppfalse
+\@ifundefined{chapter}{%
+  \@ifundefined{section}{}{\@knownclass@pptrue}}{%
+  \@chapter@pptrue\@knownclass@pptrue}
+\providecommand{\phantomsection}{}
+\newcounter{@pps}
+  \renewcommand{\the@pps}{\alph{@pps}}
+\newif\if@pphyper
+  \@pphyperfalse
+\AtBeginDocument{%
+  \@ifpackageloaded{hyperref}{\@pphypertrue}{}}
+
+\newif\if@dotoc@pp\@dotoc@ppfalse
+\newif\if@dotitle@pp\@dotitle@ppfalse
+\newif\if@dotitletoc@pp\@dotitletoc@ppfalse
+\newif\if@dohead@pp\@dohead@ppfalse
+\newif\if@dopage@pp\@dopage@ppfalse
+\DeclareOption{toc}{\@dotoc@pptrue}
+\DeclareOption{title}{\@dotitle@pptrue}
+\DeclareOption{titletoc}{\@dotitletoc@pptrue}
+\DeclareOption{header}{\@dohead@pptrue}
+\DeclareOption{page}{\@dopage@pptrue}
+\ProcessOptions\relax
+\newcommand{\@ppendinput}{}
+\if@knownclass@pp\else
+  \PackageWarningNoLine{appendix}%
+    {There is no \protect\chapter\space or \protect\section\space command.\MessageBreak
+     The appendix package will not be used}
+  \renewcommand{\@ppendinput}{\endinput}
+\fi
+\@ppendinput
+
+\newcommand{\appendixtocon}{\@dotoc@pptrue}
+\newcommand{\appendixtocoff}{\@dotoc@ppfalse}
+\newcommand{\appendixpageon}{\@dopage@pptrue}
+\newcommand{\appendixpageoff}{\@dopage@ppfalse}
+\newcommand{\appendixtitleon}{\@dotitle@pptrue}
+\newcommand{\appendixtitleoff}{\@dotitle@ppfalse}
+\newcommand{\appendixtitletocon}{\@dotitletoc@pptrue}
+\newcommand{\appendixtitletocoff}{\@dotitletoc@ppfalse}
+\newcommand{\appendixheaderon}{\@dohead@pptrue}
+\newcommand{\appendixheaderoff}{\@dohead@ppfalse}
+\newcounter{@ppsavesec}
+\newcounter{@ppsaveapp}
+\setcounter{@ppsaveapp}{0}
+\newcommand{\@ppsavesec}{%
+  \if@chapter@pp \setcounter{@ppsavesec}{\value{chapter}} \else
+                 \setcounter{@ppsavesec}{\value{section}} \fi}
+\newcommand{\@pprestoresec}{%
+  \if@chapter@pp \setcounter{chapter}{\value{@ppsavesec}} \else
+                 \setcounter{section}{\value{@ppsavesec}} \fi}
+\newcommand{\@ppsaveapp}{%
+  \if@chapter@pp \setcounter{@ppsaveapp}{\value{chapter}} \else
+                 \setcounter{@ppsaveapp}{\value{section}} \fi}
+\newcommand{\restoreapp}{%
+  \if@chapter@pp \setcounter{chapter}{\value{@ppsaveapp}} \else
+                 \setcounter{section}{\value{@ppsaveapp}} \fi}
+\providecommand{\appendixname}{Appendix}
+\newcommand{\appendixtocname}{Appendices}
+\newcommand{\appendixpagename}{Appendices}
+\newcommand{\appendixpage}{%
+  \if@chapter@pp \@chap@pppage \else \@sec@pppage \fi
+}
+\newcommand{\clear@ppage}{%
+  \if@openright\cleardoublepage\else\clearpage\fi}
+
+\newcommand{\@chap@pppage}{%
+  \clear@ppage
+  \thispagestyle{plain}%
+  \if@twocolumn\onecolumn\@tempswatrue\else\@tempswafalse\fi
+  \null\vfil
+  \markboth{}{}%
+  {\centering
+   \interlinepenalty \@M
+   \normalfont
+   \Huge \bfseries \appendixpagename\par}%
+  \if@dotoc@pp
+    \addappheadtotoc
+  \fi
+  \vfil\newpage
+  \if@twoside
+    \if@openright
+      \null
+      \thispagestyle{empty}%
+      \newpage
+    \fi
+  \fi
+  \if@tempswa
+    \twocolumn
+  \fi
+}
+
+\newcommand{\@sec@pppage}{%
+  \par
+  \addvspace{4ex}%
+  \@afterindentfalse
+  {\parindent \z@ \raggedright
+   \interlinepenalty \@M
+   \normalfont
+   \huge \bfseries \appendixpagename%
+   \markboth{}{}\par}%
+  \if@dotoc@pp
+    \addappheadtotoc
+  \fi
+  \nobreak
+  \vskip 3ex
+  \@afterheading
+}
+
+\newif\if@pptocpage
+  \@pptocpagetrue
+\newcommand{\noappendicestocpagenum}{\@pptocpagefalse}
+\newcommand{\appendicestocpagenum}{\@pptocpagetrue}
+\newcommand{\addappheadtotoc}{%
+  \phantomsection
+  \if@chapter@pp
+    \if@pptocpage
+      \addcontentsline{toc}{chapter}{\appendixtocname}%
+    \else
+      \if@pphyper
+        \addtocontents{toc}%
+          {\protect\contentsline{chapter}{\appendixtocname}{}{\@currentHref}}%
+      \else
+        \addtocontents{toc}%
+          {\protect\contentsline{chapter}{\appendixtocname}{}}%
+      \fi
+    \fi
+  \else
+    \if@pptocpage
+      \addcontentsline{toc}{section}{\appendixtocname}%
+    \else
+      \if@pphyper
+        \addtocontents{toc}%
+          {\protect\contentsline{section}{\appendixtocname}{}{\@currentHref}}%
+      \else
+        \addtocontents{toc}%
+          {\protect\contentsline{section}{\appendixtocname}{}}%
+      \fi
+    \fi
+  \fi
+}
+
+\providecommand{\theH@pps}{\alph{@pps}}
+
+\newcommand{\@resets@pp}{\par
+  \@ppsavesec
+  \stepcounter{@pps}
+  \setcounter{section}{0}%
+  \if@chapter@pp
+    \setcounter{chapter}{0}%
+    \renewcommand\@chapapp{\appendixname}%
+    \renewcommand\thechapter{\@Alph\c@chapter}%
+  \else
+    \setcounter{subsection}{0}%
+    \renewcommand\thesection{\@Alph\c@section}%
+  \fi
+  \if@pphyper
+    \if@chapter@pp
+      \renewcommand{\theHchapter}{\theH@pps.\Alph{chapter}}%
+    \else
+      \renewcommand{\theHsection}{\theH@pps.\Alph{section}}%
+    \fi
+    \def\Hy@chapapp{\appendixname}%
+  \fi
+  \restoreapp
+}
+
+\newenvironment{appendices}{%
+  \@resets@pp
+  \if@dotoc@pp
+    \if@dopage@pp              % both page and toc
+      \if@chapter@pp           % chapters
+        \clear@ppage
+      \fi
+      \appendixpage
+    \else                      % toc only
+       \if@chapter@pp          % chapters
+         \clear@ppage
+       \fi
+      \addappheadtotoc
+    \fi
+  \else
+    \if@dopage@pp              % page only
+      \appendixpage
+    \fi
+  \fi
+  \if@chapter@pp
+    \if@dotitletoc@pp \@redotocentry@pp{chapter} \fi
+  \else
+    \if@dotitletoc@pp \@redotocentry@pp{section} \fi
+    \if@dohead@pp
+      \def\sectionmark##1{%
+        \if@twoside
+          \markboth{\@formatsecmark@pp{##1}}{}
+        \else
+          \markright{\@formatsecmark@pp{##1}}{}
+        \fi}
+    \fi
+    \if@dotitle@pp
+      \def\sectionname{\appendixname}
+      \def\@seccntformat##1{\@ifundefined{##1name}{}{\csname ##1name\endcsname\ }%
+        \csname the##1\endcsname\quad}
+    \fi
+  \fi}{%
+  \@ppsaveapp\@pprestoresec}
+
+\newcommand{\setthesection}{\thechapter.\Alph{section}}
+\newcommand{\setthesubsection}{\thesection.\Alph{subsection}}
+
+\newcommand{\@resets@ppsub}{\par
+  \stepcounter{@pps}
+  \if@chapter@pp
+    \setcounter{section}{0}
+    \renewcommand{\thesection}{\setthesection}
+  \else
+    \setcounter{subsection}{0}
+    \renewcommand{\thesubsection}{\setthesubsection}
+  \fi
+  \if@pphyper
+    \if@chapter@pp
+      \renewcommand{\theHsection}{\theH@pps.\setthesection}%
+    \else
+      \renewcommand{\theHsubsection}{\theH@pps.\setthesubsection}%
+    \fi
+    \def\Hy@chapapp{\appendixname}%
+  \fi
+}
+
+\newenvironment{subappendices}{%
+  \@resets@ppsub
+  \if@chapter@pp
+    \if@dotitletoc@pp \@redotocentry@pp{section} \fi
+    \if@dotitle@pp
+      \def\sectionname{\appendixname}
+      \def\@seccntformat##1{\@ifundefined{##1name}{}{\csname ##1name\endcsname\ }%
+        \csname the##1\endcsname\quad}
+    \fi
+  \else
+    \if@dotitletoc@pp \@redotocentry@pp{subsection} \fi
+    \if@dotitle@pp
+      \def\subsectionname{\appendixname}
+      \def\@seccntformat##1{\@ifundefined{##1name}{}{\csname ##1name\endcsname\ }%
+        \csname the##1\endcsname\quad}
+    \fi
+  \fi}{}
+
+\newcommand{\@formatsecmark@pp}[1]{%
+  \MakeUppercase{\appendixname\space
+    \ifnum \c@secnumdepth >\z@
+      \thesection\quad
+    \fi
+    #1}}
+\newcommand{\@redotocentry@pp}[1]{%
+  \let\oldacl@pp=\addcontentsline
+  \def\addcontentsline##1##2##3{%
+    \def\@pptempa{##1}\def\@pptempb{toc}%
+    \ifx\@pptempa\@pptempb
+      \def\@pptempa{##2}\def\@pptempb{#1}%
+      \ifx\@pptempa\@pptempb
+\oldacl@pp{##1}{##2}{\appendixname\space ##3}%
+      \else
+        \oldacl@pp{##1}{##2}{##3}%
+      \fi
+    \else
+      \oldacl@pp{##1}{##2}{##3}%
+    \fi}
+}
+
+\endinput
+%%
+%% End of file `appendix.sty'.

+ 897 - 0
paper/comp.sty

@@ -0,0 +1,897 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%  IDENTIFICATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ProvidesPackage{comp}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%   SETUP MACROS AND SWITCHES
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\def\@title{}
+\def\@author{}
+
+\def\titlepageblurb#1{\gdef\@titlepageblurb{#1}}
+\def\principaladviser#1{\gdef\@principaladviser{#1}}
+\def\@principaladviser{*}
+\def\coprincipaladviser#1{\gdef\@coprincipaladviser{#1}}
+\def\@coprincipaladviser{*}
+\def\assistantadviser#1{\gdef\@assistantadviser{#1}}
+\def\@assistantadviser{*}
+\def\submitdate#1{\gdef\@submitdate{#1}}
+\def\copyrightyear#1{\gdef\@copyrightyear{#1}} 
+\def\@copyrightyear{\number\the\year}
+\def\reportnumber#1{\gdef\@reportnumber{#1}}
+%\def\tocdepthvalue#1{\gdef\@tocdepthvalue{#1}}
+%\def\secnumdepthvalue#1{\gdef\@secnumdepthvalue{#1}}
+\def\@tocdepthvalue{}
+\def\@secnumdepthvalue{}
+
+\def\bibfile#1{\gdef\@bibfile{#1}}
+
+\newif\ifw@ntsignature
+\newif\ifw@ntcopyright
+\newif\ifw@nttableofcontents
+\newif\ifw@ntlistoffigures
+\newif\ifw@ntlistoftables
+\newif\ifw@ntbibliography
+\newif\ifw@ntindex
+\newif\ifw@ntnumbers
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%  OPTION DECLARATION PART
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%-------------------
+%%%%  ENGLISH OPTION
+%-------------------
+\DeclareOption{english}{%
+		\PassOptionsToPackage{english}{babel}
+		%
+		\def\@submitdate{%
+				\ifcase\the\month\or
+				January\or February\or March\or April\or May\or June\or
+				July\or August\or September\or October\or November\or December\fi
+				\space \number\the\year
+		}
+		%
+		\def\@phddegree{Doctor}
+		%
+		\def\@masterdegree{Master}
+		%
+		\def\@bachelordegree{Bachelor}
+		%
+		\def\@advisername{Principal Adviser}
+		%
+		\def\@coadvisername{Principal Co-Adviser}
+		%
+		\def\@assistantadvisername{Assistant Adviser}
+		%
+		\def\@dissertationblurb{
+		   	Dissertation Submitted in \@submitdate\ to the\\
+		   	Department of Mathematics and Computer Science\\
+		   	of the Faculty of Sciences, University of Antwerp,\\
+		   	in Partial Fulfillment of the Requirements\\
+		   	for the Degree of \@thesisdegree\ of Science.
+		}
+		%
+		\def\@techreportblurb{
+		   	Technical Report \@reportnumber , submitted \@submitdate . \\
+		   	Department of Mathematics and Computer Science\\
+		   	of the Faculty of Sciences, University of Antwerp.
+		}
+		%
+		\def\@advisersblurb{%
+				\if*\@principaladviser \else
+		  			{\@advisername: \@principaladviser} \\
+		  	\fi
+		  	\if*\@coprincipaladviser \else
+		  			{\@coadvisername : \@coprincipaladviser}\\
+		  	\fi
+		  	\if*\@assistantadviser \else
+		  			{\@assistantadvisername : \@assistantadviser}\\
+		  	\fi
+		}
+		%
+		\def\@courseblurb{
+		   	\@coursedegree\ of Computer Science curriculum,\\
+		   	Faculty of Sciences, University of Antwerp.\\
+		   	Course notes for academic year \@submitdate.
+		}
+		%
+		\def\@researchgroupblurb{%
+				
+		}
+		%
+		\def\@signatureblurb{%
+				I certify that I have read this dissertation and that, 
+    		in my opinion, it is fully adequate in scope and quality as a 
+        dissertation for the degree of \@thesisdegree.
+		}
+		%
+		\def\@copyrightblurb{%
+				All rights reserved.
+		}
+}
+
+%-----------------
+%%%%  DUTCH OPTION
+%-----------------
+\DeclareOption{dutch}{%
+		\PassOptionsToPackage{dutch}{babel}
+		%
+		\def\@submitdate{%
+				\ifcase\the\month\or
+				Januari\or Februari\or Maart\or April\or Mei\or Juni\or
+				Juli\or Augustus\or September\or Oktober\or November\or December\fi
+				\space \number\the\year
+		}
+		%
+		\def\@phddegree{Doctor}
+		%
+		\def\@masterdegree{Master}
+		%
+		\def\@bachelordegree{Bachelor}
+		%
+		\def\@advisername{Promotor}
+		%
+		\def\@coadvisername{Co-Promotor}
+		%
+		\def\@assistantadvisername{Begeleider}
+		%
+		\def\@dissertationblurb{
+		   	Thesis ingediend in \@submitdate\ bij het\\
+		   	Departement Wiskunde en Informatica van de\\
+		   	Faculteit Wetenschappen, Universiteit Antwerpen,\\
+		   	ter vervulling van de vereisten voor het bekomen\\
+		   	van het Diploma van \@thesisdegree\ in de Wetenschappen.
+		   	\newline
+		}
+		%
+		\def\@advisersblurb{%
+				\if*\@principaladviser \else
+		  			{\@advisername: \@principaladviser} \\
+		  	\fi
+		  	\if*\@coprincipaladviser \else
+		  			{\@coadvisername : \@coprincipaladviser}\\
+		  	\fi
+		  	\if*\@assistantadviser \else
+		  			{\@assistantadvisername : \@assistantadviser}\\
+		  	\fi
+		}
+		%
+		\def\@courseblurb{
+		   	Opleiding \@coursedegree\ of Science in Informatica, van de\\
+		   	Faculteit Wetenschappen, Universiteit Antwerpen.\\
+		   	Nota's bij de cursus voor academiejaar \@submitdate.
+		   	\newline
+		}
+		%
+		\def\@researchgroupblurb{% 
+				
+		}
+		%
+		\def\@signatureblurb{%
+				Ik verklaar dat ik deze thesis heb gelezen en dat, naar mijn
+				mening, het werk in draagwijdte en kwaliteit beantwoordt
+				aan de vereisten voor een thesis voor het diploma van  
+    	  \@thesisdegree.
+		}
+		%
+		\def\@copyrightblurb{%
+				Alle rechten voorbehouden.
+		}
+}
+
+
+%---------------------
+%%%%  PHDTHESIS OPTION
+%---------------------
+\DeclareOption{phdthesis}{%
+   	\def\@thesisdegree{\@phddegree}
+   	\def\@titlepageblurb{\@dissertationblurb}
+   	\w@ntcopyrighttrue
+   	\w@ntsignaturetrue
+   	\w@nttableofcontentstrue
+   	\def\@tocdepthvalue{2}
+   	\w@nttableofcontentstrue
+   	\w@ntlistoffigurestrue		
+   	\w@ntlistoftablestrue
+   	%	
+   	\def\@secnumdepthvalue{2}
+   	%
+   	\w@ntbibliographytrue
+   	\w@ntindextrue		
+}
+
+
+%------------------------
+%%%%  MASTERTHESIS OPTION
+%------------------------
+\DeclareOption{masterthesis}{%
+   	\def\@thesisdegree{\@masterdegree}
+   	\def\@titlepageblurb{\@dissertationblurb}
+   	\w@ntcopyrightfalse
+   	\w@ntsignaturefalse
+   	\w@nttableofcontentstrue
+   	\def\@tocdepthvalue{2}
+   	\w@ntlistoffigurestrue		
+   	\w@ntlistoftablestrue		
+   	%	
+   	\def\@secnumdepthvalue{2}
+   	%
+   	\w@ntbibliographytrue
+   	\w@ntindexfalse		
+}
+
+
+%--------------------------
+%%%%  BACHELORTHESIS OPTION
+%--------------------------
+\DeclareOption{bachelorthesis}{%
+   	\def\@thesisdegree{\@bachelordegree}
+   	\def\@titlepageblurb{\@dissertationblurb}
+   	\w@ntsopyrightfalse
+   	\w@ntsignaturefalse
+   	\w@nttableofcontentstrue
+   	\def\@tocdepthvalue{1}
+   	\w@ntlistoffiguresfalse		
+   	\w@ntlistofoablesfalse		
+   	%	
+   	\def\@secnumdepthvalue{2}
+   	%
+   	\w@ntbibliographytrue
+   	\w@ntindexfalse		
+}
+
+%------------------------
+%%%%  MASTERCOURSE OPTION
+%------------------------
+\DeclareOption{mastercourse}{%
+   	\def\@coursedegree{\@masterdegree}
+   	\def\@titlepageblurb{\@courseblurb}
+   	\w@ntcopyrightfalse
+   	\w@ntsignaturefalse
+   	\w@nttableofcontentstrue
+   	\def\@tocdepthvalue{1}
+   	\w@ntlistoffiguresfalse		
+   	\w@ntlistoftablesfalse
+   	%	
+   	\def\@secnumdepthvalue{2}
+   	%
+   	\w@ntbibliographytrue
+   	\w@ntindexfalse		
+}
+
+%--------------------------
+%%%%  BACHELORCOURSE OPTION
+%--------------------------
+\DeclareOption{bachelorcourse}{%
+   	\def\@coursedegree{\@bachelordegree}
+   	\def\@titlepageblurb{\@courseblurb}
+   	\w@nttableofcontentstrue
+   	\w@ntcopyrightfalse
+   	\w@ntsignaturefalse
+   	\def\@tocdepthvalue{1}
+   	\w@ntlistoffiguresfalse		
+   	\w@ntlistoftablesfalse
+   	%	
+   	\def\@secnumdepthvalue{2}
+   	%
+   	\w@ntbibliographytrue
+   	\w@ntindexfalse		
+}
+
+%----------------------
+%%%%  TECHREPORT OPTION
+%----------------------
+\DeclareOption{techreport}{%
+   	\def\@titlepageblurb{\@techreportblurb}
+   	\w@nttableofcontentstrue
+   	\w@ntcopyrightfalse
+   	\w@ntsignaturefalse
+   	\def\@tocdepthvalue{1}
+   	\w@ntlistoffiguresfalse		
+   	\w@ntlistoftablesfalse
+   	%	
+   	\def\@secnumdepthvalue{2}
+   	%
+   	\w@ntbibliographytrue
+   	\w@ntindexfalse		
+}
+
+%-------------------
+%%%%  GENERIC OPTION
+%-------------------
+\DeclareOption{generic}{%
+   	\def\@titlepageblurb{}
+   	\w@nttableofcontentsfalse
+   	\w@ntcopyrightfalse
+   	\w@ntsignaturefalse
+   	\def\@tocdepthvalue{1}
+   	\w@ntlistoffiguresfalse		
+   	\w@ntlistoftablesfalse
+   	%	
+   	\def\@secnumdepthvalue{2}
+   	%
+   	\w@ntbibliographytrue
+   	\w@ntindexfalse		
+}
+
+%---------------------------------
+%%%%  COPYRIGHT/NOCOPYRIGHT OPTION
+%---------------------------------
+\DeclareOption{copyright}{%
+		\w@ntcopyrighttrue
+}
+
+\DeclareOption{nocopyright}{%
+		\w@ntcopyrightfalse
+}
+
+%---------------------------------
+%%%%  SIGNATURE/NOSIGNATURE OPTION
+%---------------------------------
+\DeclareOption{signature}{%
+		\w@ntsignaturetrue
+}
+
+\DeclareOption{nosignature}{%
+		\w@ntsignaturefalse
+}
+
+%---------------------------------
+%%%%  TABLEOFCONTENTS/NOTABLEOFCONTENTS OPTION
+%---------------------------------
+\DeclareOption{tableofcontents}{%
+		\w@nttableofcontentstrue
+}
+
+\DeclareOption{notableofcontents}{%
+		\w@nttableofcontentsfalse
+}
+
+%-----------------------------------------
+%%%%  LISTOFFIGURES/NOLISTOFFIGURES OPTION
+%-----------------------------------------
+\DeclareOption{listoffigures}{%
+		\w@ntlistoffigurestrue
+}
+
+\DeclareOption{nolistoffigures}{%
+		\w@ntlistoffiguresfalse
+}
+
+
+%---------------------------------------
+%%%%  LISTOFTABLES/NOLISTOFTABLES OPTION
+%---------------------------------------
+\DeclareOption{listoftables}{%
+		\w@ntlistoftablestrue
+}
+
+\DeclareOption{nolistoftables}{%
+		\w@ntlistoftablesfalse
+}
+
+%---------------------------------------
+%%%%  BIBLIOGRAPHY/NOBIBLIOGRAPHY OPTION
+%---------------------------------------
+\DeclareOption{bibliograpy}{%
+		\w@ntbibliographytrue
+}
+
+\DeclareOption{nobibliography}{%
+		\w@ntbibliographyfalse
+}
+
+%-------------------------
+%%%%  INDEX/NOINDEX OPTION
+%-------------------------
+\DeclareOption{index}{%
+		\makeindex
+		\w@ntindextrue
+}
+
+\DeclareOption{noindex}{%
+		\w@ntindexfalse
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%  EXECUTION OF OPTIONS PART
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\ExecuteOptions{phdthesis,english}
+\ProcessOptions
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%  PACKAGE LOADING PART
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%\RequirePackage{graphicx}
+\RequirePackage[dvips,dvipdf,pdftex]{graphicx}
+%\DeclareGraphicsRule{*}{mps}{*}{}
+%\DeclareGraphicsExtensions{.jpg,.mps,.pdf,.png,.ps}
+\DeclareGraphicsRule{*}{eps}{*}{}
+\RequirePackage[Sonny]{fncychap}
+\RequirePackage[noindentafter,calcwidth]{titlesec}
+\RequirePackage{fancyhdr}
+\RequirePackage{paralist}
+\RequirePackage{listings,color}
+\RequirePackage[toc,page,title,titletoc]{appendix}
+\RequirePackage[round]{natbib}
+\RequirePackage{url}
+\RequirePackage{babel}
+\RequirePackage{ifthen}
+\RequirePackage{picinpar}
+\RequirePackage{colortbl}
+\RequirePackage{shadow}
+\RequirePackage{lineno}
+\RequirePackage{algorithm2e}
+\RequirePackage{epsfig}
+\RequirePackage{hyperref}
+% make sure to link CORRECTLY to images and tables, and not to the caption
+% needs to be loaded AFTER the hyperref package
+
+%
+\ifw@ntindex
+		\RequirePackage{makeidx}
+\fi
+%
+\ifcase\pdfoutput
+\else
+\RequirePackage{pdfpages}
+\fi
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%   MAIN CODE PART: TEXTPAGE FORMATTING
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+%---------------
+%%%% PAGE LAYOUT
+%---------------
+\oddsidemargin=1.80cm 
+\textwidth=14cm 
+\setlength{\voffset}{-10mm}
+\setlength{\textheight}{215mm}
+\setlength{\headheight}{14pt}
+%\setlength{\parindent}{0.0mm}
+%\addtolength{\parskip}{0.3\baselineskip}
+
+%--------------
+%%%% PAGE STYLE
+%--------------
+\fancypagestyle{compP@geStyle}{%
+		\fancyhf{}	
+		\rhead{\thepage}
+		\lhead{\rightmark}
+		\renewcommand{\headrulewidth}{0.5pt}
+		\renewcommand{\footrulewidth}{0pt}
+		\addtolength{\headheight}{0.5pt}
+}
+
+\fancypagestyle{plain}{%
+		\fancyhead{}
+		\renewcommand{\headrulewidth}{0pt}
+}
+
+%------------------
+%%%% SECTION TITLES
+%------------------
+\newenvironment{unnumbered}
+{	\setcounter{secnumdepth}{0}%
+	\addtocontents{toc}{\protect\setcounter{tocdepth}{0}\ignorespaces}%
+	\w@ntnumbersfalse
+}
+{	\setcounter{secnumdepth}{2}%
+	\addtocontents{toc}{\protect\setcounter{tocdepth}{2}\ignorespaces}%
+	\w@ntnumberstrue
+}
+
+\AtBeginDocument{
+		\w@ntnumberstrue
+		\setcounter{secnumdepth}{\@secnumdepthvalue}
+
+		\titleformat{\section}[block]
+				{\Large\sffamily\bfseries}
+				{}{0ex}
+				{\titleline*[l]{\titlerule[1pt]}\vspace{4pt} \thesection\quad}
+				[{\titleline*[l]{\vspace{18pt}\titlerule[1pt]}}]
+		\titlespacing*{\section}{0pc}{*3}{*2}
+		%
+		\titleformat{\subsection}[block]
+				{\large\sffamily\bfseries}
+				{}{0ex}
+				%{\ifthenelse{\@secnumdepthvalue<2}{}{\thesubsection\quad}}
+				{\ifw@ntnumbers \thesubsection\quad \else \quad \fi}
+				%[]
+		\titlespacing*{\subsection}{0pc}{*2}{*1}
+		%
+		\titleformat{\subsubsection}[block]
+				{\large\sffamily\bfseries}
+				{}{0ex}
+				{\ifthenelse{\@secnumdepthvalue<3}{}{\thesubsubsection\quad}}
+				[]
+		\titlespacing*{\subsubsection}{0pc}{*1}{*0}
+		%
+		%
+%		\myCppCodeFormat
+%		\myJavaCodeFormat
+		\myShabox
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%% MAIN CODE PART : MAKING THE FRONT PAGES
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%--------------
+%%%% TITLE PAGE
+%--------------
+\newcommand{\makeTitlePage}{%
+    \begin{titlepage}
+    		\null
+		    \hbox{  
+			\ifcase\pdfoutput
+				%\includegraphics[scale=0.2]{UA-LogoText.eps} 
+				\includegraphics[5cm,7.2cm][9cm,8.5cm]{images/UA-LogoText.png}
+			\else
+				%\includegraphics[width=50mm, height=10mm, keepaspectratio]{UA-LogoText.jpg}
+				\includegraphics[scale=0.2]{images/UA-LogoText.png}
+				%\includegraphics[5cm,7.2cm][9cm,8.5cm]{UA-LogoText.jpg}
+			\fi
+                    }
+		    \hbox{
+		      	\vrule depth 0.87\textheight%
+		      	\mbox{\hspace{2pt}}
+		      	\vtop{%
+		        	\vskip 70\p@
+		       		\raisebox{0mm}[5ex][0ex]{
+		       				\parbox{12cm}{  {\huge \bfseries \@title  \par}  }
+		       		}
+		       		\vskip 120\p@
+			        \mbox{\hspace{2pt} \bfseries \@author \par}			        
+			        \vskip 120\p@
+					\mbox{\hspace{2pt} \@advisername :\quad \@principaladviser \par}
+					\vskip 5\p@
+					\mbox{\hspace{2pt} \@assistantadvisername :\quad \@assistantadviser \par}
+					\vskip 45\p@
+					\raisebox{0mm}[6ex][0ex]{
+			        		\parbox{10cm}{{\@titlepageblurb} }
+				    }
+			        \vskip 50\p@
+			        \mbox{ 
+					\ifcase\pdfoutput 
+						%\includegraphics[scale=0.5]{CoMP-logo-embedfont.eps} 
+						\includegraphics[bb = 7cm 7.8cm 9.5cm 8.8cm, keepaspectratio]{images/ansymo_logo.pdf} 
+					\else
+						%\includegraphics[width=25mm, height=8mm, keepaspectratio]{CoMP-logo-embedfont.jpg} 
+						\includegraphics[scale=0.5]{images/ansymo_logo.pdf} 
+						%\includegraphics[7cm,7cm][9cm,8cm]{CoMP-logo-embedfont.jpg} 
+					\fi
+                             	}
+			        \raisebox{4mm}{
+					\resizebox{!}{0.37cm}{
+					\parbox{8cm}{ \scshape \@researchgroupblurb }
+					}
+			        }
+		        }
+		    } 
+		    \vfill                   
+  	\end{titlepage}
+}
+
+%-------------------
+%%%%% COPYRIGHT PAGE
+%-------------------
+\newcommand{\makeCopyrightPage}{%
+		\begin{titlepage}
+        \null
+        \vfill
+        \begin{center}
+                \large
+                Copyright\ \copyright\ \@copyrightyear\ \@author\\
+                \@copyrightblurb
+        \end{center}
+        \vfill
+    \end{titlepage}
+}		
+
+%-------------------
+%%%%% SIGNATURE PAGE
+%-------------------
+\newcommand{\signature}[1]{%
+    \vspace{1.0in}
+    \hbox to 5in{\hfil\begin{tabular}{@{}l@{}}
+    \vrule width 4in height 0.4pt depth 0pt\\ #1\end{tabular}}
+}
+
+\newcommand{\makeSignaturePage}{%
+    \begin{titlepage}
+				\begin{flushright}
+		    		\begin{minipage}{5in}
+		      			\vspace{7cm}
+		        	  \@signatureblurb
+		            \par
+		            % pricipal adviser
+		            \signature{\@advisername ,\quad \@principaladviser}
+		            \vfill
+		            % if second principal advisor
+		            \if*\@coprincipaladviser \else
+		            \signature{\@coadvisername ,\quad \@coprincipaladviser}
+		            \vfill\fi
+		            \if*\@assistantadviser \else
+		            \signature{\@assistantadvisername ,\quad \@assistantadviser}
+		            \vfill\fi
+
+		        \end{minipage}
+		    \end{flushright}
+    \end{titlepage}
+}
+
+%---------------------------
+%%%%% TABLE OF CONTENTS PAGE
+%---------------------------
+\AtBeginDocument{
+		\setcounter{tocdepth}{\@tocdepthvalue}
+}
+\newcommand{\makeTableOfContentsPage}{%
+    {\sffamily \tableofcontents}
+}
+
+%-------------------------
+%%%%% LIST OF FIGURES PAGE
+%-------------------------
+\newcommand{\makeListOfFiguresPage}{%
+	\clearpage
+    \phantomsection
+  	\addcontentsline{toc}{chapter}{\listfigurename}
+	\listoffigures
+}
+
+%------------------------
+%%%%% LIST OF TABLES PAGE
+%------------------------
+\newcommand{\makeListOfTablesPage}{%
+	\clearpage
+    \phantomsection
+   	\addcontentsline{toc}{chapter}{\listtablename}
+	\listoftables
+}
+
+%------------------------
+%%%%% LIST OF LISTINGS PAGE
+%------------------------
+\newcommand{\makeListOfListingsPage}{%
+	\renewcommand{\lstlistlistingname}{List of Listings}
+   	\clearpage
+	\phantomsection
+   	\addcontentsline{toc}{chapter}{\lstlistlistingname}
+	\lstlistoflistings%
+}
+
+%---------------
+%%%% FRONT PAGES
+%---------------
+\newcommand{\frontpages}{%    
+	\pagenumbering{roman}
+    \pagestyle{plain}
+   	\makeTitlePage
+   	\ifw@ntcopyright \makeCopyrightPage \fi
+   	\ifw@ntsignature \makeSignaturePage \fi 
+		\ifw@nttableofcontents \makeTableOfContentsPage \fi
+   	\ifw@ntlistoffigures \makeListOfFiguresPage \fi
+   	\ifw@ntlistoftables \makeListOfTablesPage \fi
+	%\makeListOfListingsPage
+}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%% MAIN CODE PART : MAKING THE MAIN BODY PAGES
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%-------------------
+%%%% MAIN BODY PAGES
+%-------------------	
+\newcommand{\mainbodypages}{%
+		\clearpage
+		\pagestyle{compP@geStyle}
+		\pagenumbering{arabic}
+		%\setlength{\parindent}{0.0mm}
+		%\addtolength{\parskip}{0.5\baselineskip} 
+}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%% MAIN CODE PART : MAKING THE BACK PAGES
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%----------------------
+%%%%% BIBLIOGRAPHY PAGE
+%----------------------
+\newcommand{\makeBibliographyPage}{%
+  	\bibliographystyle{plain}
+	\clearpage
+	\phantomsection
+	\addcontentsline{toc}{chapter}{Bibliography}
+  	\bibliography{\@bibfile}
+}
+
+%---------------------
+%%%%%   THE INDEX PAGE
+%---------------------
+\newcommand{\makeIndexPage}{%
+		\addcontentsline{toc}{chapter}{Index}  	
+		\printindex
+}
+
+%--------------
+%%%% BACK PAGES
+%--------------
+\newcommand{\backpages}{%
+		\pagestyle{plain}
+		\ifw@ntbibliography
+				\makeBibliographyPage
+		\fi
+		\ifw@ntindex
+				\makeIndexPage
+		\fi
+}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%% MISCELLANEOUS COMMANDS TO BE USED IN THE MAIN BODY
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%---------
+%%%% myDef
+%---------
+\newcommand{\myDef}[2]{
+    \begin{flushright}
+        \parbox{3.3cm}{
+            \begin{flushleft}
+                {\emph Definitie:\\ \vspace{1mm}}{\bf  #1 }
+            \end{flushleft}
+        }
+        \parbox{10.5cm}{ #2 }
+    \end{flushright}
+}
+
+%---------
+%%%% myTxt
+%---------
+\newcommand{\myTxt}[2]{
+    \begin{flushright}
+        \parbox{3.3cm}{
+            \begin{flushleft}
+                {\bf  #1 }
+            \end{flushleft}
+        }
+        \parbox{10.5cm}{ #2 }
+    \end{flushright}
+}
+
+%------------
+%%%% myMarTxt
+%------------
+\newcommand{\myMarTxt}[1]{
+    \reversemarginpar
+	  \setlength{\marginparwidth}{5cm}
+	  \marginpar[\ \\ \begin{minipage}{5cm}{\begin{flushright} { #1 } \end{flushright}}\end{minipage}]{}
+}
+
+%-------------
+% mySidebarTxt
+%-------------
+\newcommand{\mySidebarTxt}[1]{%
+		\newlength{\temptabcolsep}
+		\setlength{\temptabcolsep}{\tabcolsep}%
+\setlength{\tabcolsep}{0pt}%
+\begin{tabular}{r|>{\columncolor[gray]{0.75}}cr}%
+\begin{minipage}{4cm}%
+						\begin{flushright}
+    #1%
+            \end{flushright}
+\end{minipage}%
+        \hspace*{0.15cm} &%
+		\hspace*{0.15cm} &%
+\end{tabular}%
+\setlength{\tabcolsep}{\temptabcolsep}%
+}
+
+%---------------------
+% myShadedParagraphTxt
+%---------------------
+\newcommand{\shadedparagraph}[1]{%
+\begin{tabular}{>{\columncolor[gray]{.75}}l}%
+\begin{minipage}{0.96\textwidth}%
+\vspace*{0.2cm}%
+#1%
+\vspace*{0.2cm}%
+\end{minipage}%
+\end{tabular}%
+}
+
+%-----------
+% myBoxedTxt
+%-----------
+\newcommand{\framedparagraph}[1]{
+		\setlength{\fboxsep}{0.5cm}
+		\begin{center}
+ 				\framebox { \parbox{13cm}{#1}}
+		\end{center}
+}
+
+%----------------
+% myCppCodeFormat
+%----------------
+\newcommand{\myCppCodeFormat}{%
+		\lstloadlanguages{C++}
+		\lstset{language=C++,commentstyle=\scriptsize\color{green}, identifierstyle=\color{red},tabsize=4, xleftmargin=2ex,captionpos=b}
+}
+
+%-----------------
+% myJavaCodeFormat
+%-----------------
+\newcommand{\myJavaCodeFormat}{%
+		\lstloadlanguages{Java}
+		\lstset{language=Java,commentstyle=\scriptsize,identifierstyle=\color{red},tabsize=4, xleftmargin=2ex,captionpos=b}
+}
+
+%-----------------
+% myShabox
+%-----------------
+\newcommand{\myShabox}{%
+		\setlength{\sdim}{6pt}
+}
+
+% graphviz.tex
+% originally written by Derek Rayside, November 2003
+% following an idea that Daniel Jackson implemented in his Tagger program
+%
+% parameters to \digraph:
+% 1 - parameters for \includegraphics (optional; default value is "scale=1")
+% 2 - name of the digraph
+% 3 - body of the digraph
+\newcommand{\digraph}[3][scale=1]{
+\newwrite\dotfile
+\immediate\openout\dotfile=#2.dot
+\immediate\write\dotfile{digraph #2 {\string#3}}
+\immediate\closeout\dotfile
+\IfFileExists{#2.ps}
+% the postscript exists: include it
+{ \includegraphics[#1]{#2} }
+% the postscript doesn't exist: tell the user how to create it
+{ \fbox{ \begin{tabular}{l}
+The file \texttt{#2.ps} hasn't been created from
+\texttt{#2.dot} yet. \\
+Run `\texttt{dot -Tps -o #2.ps #2.dot}' to create it. \\
+Here is a \textsf{bash} loop to process all \textsf{dot} files
+in the current directory: \\
+\texttt{
+for f in *.dot do ;
+dot -Tps -o \$\{f\%dot\}ps \$f ;
+done
+}
+\end{tabular}}
+}
+}
+
+
+% BoxedGraph
+%
+% 1 - parameters for \includegraphics (optional; default value is "scale=1")
+% 2 - name of the digraph
+\newcommand{\psgraphboxed}[4][scale=1]
+{
+	\begin{figure}[h]
+		\begin{center}
+			%\fbox{
+			\includegraphics[#1]{#2}
+			\caption{#3}
+			\label{#4}
+			%}
+		\end{center}
+	\end{figure}
+}
+
+

+ 683 - 0
paper/fncychap.sty

@@ -0,0 +1,683 @@
+%%% Copyright   Ulf A. Lindgren
+%%%
+%%% Note        Premission is granted to modify this file under
+%%%             the condition that it is saved using another
+%%%             file and package name.
+%%%
+%%% Revision    1.1 (1997)
+%%%
+%%%             Jan. 8th Modified package name base date option
+%%%             Jan. 22th Modified FmN and FmTi for error in book.cls
+%%%                  \MakeUppercase{#}->{\MakeUppercase#}
+%%%             Apr. 6th Modified Lenny option to prevent undesired 
+%%%                  skip of line.
+%%%             Nov. 8th Fixed \@chapapp for AMS
+%%%
+%%% Revision    1.2 (1998)
+%%%
+%%%             Feb. 11th Fixed appendix problem related to Bjarne
+%%%             Aug. 11th Fixed problem related to 11pt and 12pt 
+%%%                  suggested by Tomas Lundberg. THANKS!
+%%%
+%%% Revision    1.3 (2004)
+%%%             Sep. 20th problem with frontmatter, mainmatter and
+%%%                  backmatter, pointed out by Lapo Mori
+%%%
+%%% Revision    1.31 (2004)
+%%%             Sep. 21th problem with the Rejne definition streched text
+%%%                  caused ugly gaps in the vrule aligned with the title
+%%%                  text. Kindly pointed out to me by Hendri Adriaens
+%%%
+%%% Revision    1.32 (2005)
+%%%             Jun. 23th compatibility problem with the KOMA class 'scrbook.cls'
+%%%                  a remedy is a redefinition of '\@schapter' in
+%%%                  line with that used in KOMA. The problem was pointed
+%%%                  out to me by Mikkel Holm Olsen
+%%%
+%%% Revision    1.33 (2005)
+%%%             Aug. 9th misspelled ``TWELV'' corrected, the error was pointed
+%%%                  out to me by George Pearson
+%%%
+%%% Revision    1.34 (2007)
+%%%             Added an alternative to Lenny provided by Peter
+%%%             Osborne (2005-11-28)
+%%%             Corrected front, main and back matter, based on input
+%%%             from Bas van Gils (2006-04-24)
+%%%             Jul. 30th Added Bjornstrup option provided by Jean-Marc
+%%%             Francois (2007-01-05).
+%%%             Reverted to \MakeUppercase{#} see rev 1.1, solved
+%%%             problem with MakeUppercase and MakeLowercase pointed
+%%%             out by Marco Feuerstein  (2007-06-06) 
+
+
+%%% Last modified   Jul. 2007
+
+\NeedsTeXFormat{LaTeX2e}[1995/12/01]
+\ProvidesPackage{fncychap}
+             [2007/07/30 v1.34
+                 LaTeX package (Revised chapters)]
+
+%%%% For conditional inclusion of color
+\newif\ifusecolor
+\usecolorfalse
+
+
+
+%%%% DEFINITION OF Chapapp variables
+\newcommand{\CNV}{\huge\bfseries}
+\newcommand{\ChNameVar}[1]{\renewcommand{\CNV}{#1}}
+
+
+%%%% DEFINITION OF TheChapter variables
+\newcommand{\CNoV}{\huge\bfseries}
+\newcommand{\ChNumVar}[1]{\renewcommand{\CNoV}{#1}}
+
+\newif\ifUCN
+\UCNfalse
+\newif\ifLCN
+\LCNfalse
+\def\ChNameLowerCase{\LCNtrue\UCNfalse}
+\def\ChNameUpperCase{\UCNtrue\LCNfalse}
+\def\ChNameAsIs{\UCNfalse\LCNfalse}
+
+%%%%% Fix for AMSBook 971008
+
+\@ifundefined{@chapapp}{\let\@chapapp\chaptername}{}
+
+
+%%%%% Fix for Bjarne and appendix 980211
+
+\newif\ifinapp
+\inappfalse
+\renewcommand\appendix{\par
+  \setcounter{chapter}{0}%
+  \setcounter{section}{0}%
+  \inapptrue%
+  \renewcommand\@chapapp{\appendixname}%
+  \renewcommand\thechapter{\@Alph\c@chapter}}
+
+%%%%% Fix for frontmatter, mainmatter, and backmatter 040920
+
+\@ifundefined{@mainmatter}{\newif\if@mainmatter \@mainmattertrue}{}
+
+%%%%%
+
+
+
+\newcommand{\FmN}[1]{%
+\ifUCN
+   {\MakeUppercase{#1}}\LCNfalse
+\else
+   \ifLCN
+      {\MakeLowercase{#1}}\UCNfalse
+   \else #1
+   \fi
+\fi}
+
+
+%%%% DEFINITION OF Title variables
+\newcommand{\CTV}{\Huge\bfseries}
+\newcommand{\ChTitleVar}[1]{\renewcommand{\CTV}{#1}}
+
+%%%% DEFINITION OF the basic rule width
+\newlength{\RW}
+\setlength{\RW}{1pt}
+\newcommand{\ChRuleWidth}[1]{\setlength{\RW}{#1}}
+
+\newif\ifUCT
+\UCTfalse
+\newif\ifLCT
+\LCTfalse
+\def\ChTitleLowerCase{\LCTtrue\UCTfalse}
+\def\ChTitleUpperCase{\UCTtrue\LCTfalse}
+\def\ChTitleAsIs{\UCTfalse\LCTfalse}
+\newcommand{\FmTi}[1]{%
+\ifUCT
+   {\MakeUppercase{#1}}\LCTfalse
+\else
+   \ifLCT
+      {\MakeLowercase{#1}}\UCTfalse
+   \else {#1}
+   \fi
+\fi}
+
+
+
+\newlength{\mylen}
+\newlength{\myhi}
+\newlength{\px}
+\newlength{\py}
+\newlength{\pyy}
+\newlength{\pxx}
+
+
+\def\mghrulefill#1{\leavevmode\leaders\hrule\@height #1\hfill\kern\z@}
+
+\newcommand{\DOCH}{%
+  \CNV\FmN{\@chapapp}\space \CNoV\thechapter
+  \par\nobreak
+  \vskip 20\p@
+  }
+\newcommand{\DOTI}[1]{%
+    \CTV\FmTi{#1}\par\nobreak
+    \vskip 40\p@
+    }
+\newcommand{\DOTIS}[1]{%
+    \CTV\FmTi{#1}\par\nobreak
+    \vskip 40\p@
+    }
+
+%%%%%% SONNY DEF
+
+\DeclareOption{Sonny}{%
+  \ChNameVar{\Large\sf\bfseries}
+  \ChNumVar{\Huge\bfseries}
+  \ChTitleVar{\Large\sf\bfseries}
+  \ChRuleWidth{0.5pt}
+  \ChNameUpperCase
+  \renewcommand{\DOCH}{%
+    \raggedleft
+    \CNV\FmN{\@chapapp}\space \CNoV\thechapter
+    \par\nobreak
+    \vskip 40\p@}
+  \renewcommand{\DOTI}[1]{%
+    \CTV\raggedleft\mghrulefill{\RW}\par\nobreak
+    \vskip 5\p@
+    \CTV\FmTi{#1}\par\nobreak
+    \mghrulefill{\RW}\par\nobreak
+    \vskip 40\p@}
+  \renewcommand{\DOTIS}[1]{%
+    \CTV\raggedleft\mghrulefill{\RW}\par\nobreak
+    \vskip 5\p@
+    \CTV\FmTi{#1}\par\nobreak
+    \mghrulefill{\RW}\par\nobreak
+    \vskip 40\p@}
+}
+
+%%%%%% LENNY DEF
+
+\DeclareOption{Lenny}{%
+
+  \ChNameVar{\fontsize{14}{16}\usefont{OT1}{phv}{m}{n}\selectfont}
+  \ChNumVar{\fontsize{60}{62}\usefont{OT1}{ptm}{m}{n}\selectfont}
+  \ChTitleVar{\Huge\bfseries\rm}
+  \ChRuleWidth{1pt}
+  \renewcommand{\DOCH}{%
+    \settowidth{\px}{\CNV\FmN{\@chapapp}}
+    \addtolength{\px}{2pt}
+    \settoheight{\py}{\CNV\FmN{\@chapapp}}
+    \addtolength{\py}{1pt}
+
+    \settowidth{\mylen}{\CNV\FmN{\@chapapp}\space\CNoV\thechapter}
+    \addtolength{\mylen}{1pt}
+    \settowidth{\pxx}{\CNoV\thechapter}
+    \addtolength{\pxx}{-1pt}
+
+    \settoheight{\pyy}{\CNoV\thechapter}
+    \addtolength{\pyy}{-2pt}
+    \setlength{\myhi}{\pyy}
+    \addtolength{\myhi}{-1\py}
+    \par
+    \parbox[b]{\textwidth}{%
+    \rule[\py]{\RW}{\myhi}%
+    \hskip -\RW%
+    \rule[\pyy]{\px}{\RW}%
+    \hskip -\px%
+    \raggedright%
+    \CNV\FmN{\@chapapp}\space\CNoV\thechapter%
+    \hskip1pt%
+    \mghrulefill{\RW}%
+    \rule{\RW}{\pyy}\par\nobreak%
+    \vskip -\baselineskip%
+    \vskip -\pyy%
+    \hskip \mylen%
+    \mghrulefill{\RW}\par\nobreak%
+    \vskip \pyy}%
+    \vskip 20\p@}
+ 
+
+  \renewcommand{\DOTI}[1]{%
+    \raggedright
+    \CTV\FmTi{#1}\par\nobreak
+    \vskip 40\p@}
+
+  \renewcommand{\DOTIS}[1]{%
+    \raggedright
+    \CTV\FmTi{#1}\par\nobreak
+    \vskip 40\p@}
+ }
+
+%%%%%% Peter Osbornes' version of LENNY DEF
+
+\DeclareOption{PetersLenny}{%
+
+% five new lengths 
+\newlength{\bl}                           %  bottom left   : orig \space
+\setlength{\bl}{6pt}
+\newcommand{\BL}[1]{\setlength{\bl}{#1}}
+\newlength{\br}                           %  bottom right  : orig 1pt
+\setlength{\br}{1pt}
+\newcommand{\BR}[1]{\setlength{\br}{#1}}
+\newlength{\tl}                           %  top left      : orig 2pt
+\setlength{\tl}{2pt}
+\newcommand{\TL}[1]{\setlength{\tl}{#1}}
+\newlength{\trr}                           %  top right      :orig 1pt 
+\setlength{\trr}{1pt}
+\newcommand{\TR}[1]{\setlength{\trr}{#1}}
+\newlength{\blrule}                           %  top right      :orig 1pt 
+\setlength{\trr}{0pt}
+\newcommand{\BLrule}[1]{\setlength{\blrule}{#1}}
+
+
+  \ChNameVar{\fontsize{14}{16}\usefont{OT1}{phv}{m}{n}\selectfont}
+  \ChNumVar{\fontsize{60}{62}\usefont{OT1}{ptm}{m}{n}\selectfont}
+  \ChTitleVar{\Huge\bfseries\rm}
+  \ChRuleWidth{1pt}
+\renewcommand{\DOCH}{%
+
+
+%%%%%%%                                   tweaks for 1--9 and A--Z
+\ifcase\c@chapter\relax%
+\or\BL{-3pt}\TL{-4pt}\BR{0pt}\TR{-6pt}%1
+\or\BL{0pt}\TL{-4pt}\BR{2pt}\TR{-4pt}%2
+\or\BL{0pt}\TL{-4pt}\BR{2pt}\TR{-4pt}%3
+\or\BL{0pt}\TL{5pt}\BR{2pt}\TR{-4pt}%4
+\or\BL{0pt}\TL{3pt}\BR{2pt}\TR{-4pt}%5
+\or\BL{-1pt}\TL{0pt}\BR{2pt}\TR{-2pt}%6
+\or\BL{0pt}\TL{-3pt}\BR{2pt}\TR{-2pt}%7
+\or\BL{0pt}\TL{-3pt}\BR{2pt}\TR{-2pt}%8
+\or\BL{0pt}\TL{-3pt}\BR{-4pt}\TR{-2pt}%9
+\or\BL{-3pt}\TL{-3pt}\BR{2pt}\TR{-7pt}%10
+\or\BL{-6pt}\TL{-6pt}\BR{0pt}\TR{-9pt}%11
+\or\BL{-6pt}\TL{-6pt}\BR{2pt}\TR{-7pt}%12
+\or\BL{-5pt}\TL{-5pt}\BR{0pt}\TR{-9pt}%13
+\or\BL{-6pt}\TL{-6pt}\BR{0pt}\TR{-9pt}%14
+\or\BL{-3pt}\TL{-3pt}\BR{3pt}\TR{-6pt}%15
+\or\BL{-3pt}\TL{-3pt}\BR{3pt}\TR{-6pt}%16
+\or\BL{-5pt}\TL{-3pt}\BR{-8pt}\TR{-6pt}%17
+\or\BL{-5pt}\TL{-5pt}\BR{0pt}\TR{-9pt}%18
+\or\BL{-3pt}\TL{-3pt}\BR{-6pt}\TR{-9pt}%19
+\or\BL{0pt}\TL{0pt}\BR{0pt}\TR{-5pt}%20
+\fi
+
+\ifinapp\ifcase\c@chapter\relax%
+\or\BL{0pt}\TL{14pt}\BR{5pt}\TR{-19pt}%A
+\or\BL{0pt}\TL{-5pt}\BR{-3pt}\TR{-8pt}%B
+\or\BL{-3pt}\TL{-2pt}\BR{1pt}\TR{-6pt}\BLrule{0pt}%C
+\or\BL{0pt}\TL{-5pt}\BR{-3pt}\TR{-8pt}\BLrule{0pt}%D
+\or\BL{0pt}\TL{-5pt}\BR{2pt}\TR{-3pt}%E
+\or\BL{0pt}\TL{-5pt}\BR{-10pt}\TR{-1pt}%F
+\or\BL{-3pt}\TL{0pt}\BR{0pt}\TR{-7pt}%G
+\or\BL{0pt}\TL{-5pt}\BR{3pt}\TR{-1pt}%H
+\or\BL{0pt}\TL{-5pt}\BR{3pt}\TR{-1pt}%I
+\or\BL{2pt}\TL{0pt}\BR{-3pt}\TR{1pt}%J
+\or\BL{0pt}\TL{-5pt}\BR{3pt}\TR{-1pt}%K
+\or\BL{0pt}\TL{-5pt}\BR{2pt}\TR{-19pt}%L
+\or\BL{0pt}\TL{-5pt}\BR{3pt}\TR{-1pt}%M
+\or\BL{0pt}\TL{-5pt}\BR{-2pt}\TR{-1pt}%N
+\or\BL{-3pt}\TL{-2pt}\BR{-3pt}\TR{-11pt}%O
+\or\BL{0pt}\TL{-5pt}\BR{-9pt}\TR{-3pt}%P
+\or\BL{-3pt}\TL{-2pt}\BR{-3pt}\TR{-11pt}%Q
+\or\BL{0pt}\TL{-5pt}\BR{4pt}\TR{-8pt}%R
+\or\BL{-2pt}\TL{-2pt}\BR{-2pt}\TR{-7pt}%S
+\or\BL{-3pt}\TL{0pt}\BR{-5pt}\TR{4pt}\BLrule{8pt}%T
+\or\BL{-7pt}\TL{-11pt}\BR{-5pt}\TR{-7pt}\BLrule{0pt}%U
+\or\BL{-14pt}\TL{-5pt}\BR{-14pt}\TR{-1pt}\BLrule{14pt}%V
+\or\BL{-10pt}\TL{-9pt}\BR{-13pt}\TR{-3pt}\BLrule{7pt}%W
+\or\BL{0pt}\TL{-5pt}\BR{3pt}\TR{-1pt}\BLrule{0pt}%X
+\or\BL{-6pt}\TL{-4pt}\BR{-7pt}\TR{1pt}\BLrule{7pt}%Y
+\or\BL{0pt}\TL{-5pt}\BR{3pt}\TR{-1pt}\BLrule{0pt}%Z
+\fi\fi
+%%%%%%%
+    \settowidth{\px}{\CNV\FmN{\@chapapp}}
+    \addtolength{\px}{\tl}        %MOD change 2pt to \tl
+    \settoheight{\py}{\CNV\FmN{\@chapapp}}
+    \addtolength{\py}{1pt}
+
+    \settowidth{\mylen}{\CNV\FmN{\@chapapp}\space\CNoV\thechapter}
+    \addtolength{\mylen}{\trr}% MOD change 1pt to \tr
+    \settowidth{\pxx}{\CNoV\thechapter}
+    \addtolength{\pxx}{-1pt}
+
+    \settoheight{\pyy}{\CNoV\thechapter}
+    \addtolength{\pyy}{-2pt}
+    \setlength{\myhi}{\pyy}
+    \addtolength{\myhi}{-1\py}
+    \par
+    \parbox[b]{\textwidth}{%
+    \rule[\py]{\RW}{\myhi}%
+    \hskip -\RW%
+    \rule[\pyy]{\px}{\RW}% 
+    \hskip -\px%
+    \raggedright%
+    \CNV\FmN{\@chapapp}\rule{\blrule}{\RW}\hskip\bl\CNoV\thechapter%MOD 
+%    \CNV\FmN{\@chapapp}\space\CNoV\thechapter                     %ORIGINAL
+    \hskip\br%                           %MOD 1pt to \br
+    \mghrulefill{\RW}% 
+    \rule{\RW}{\pyy}\par\nobreak% 
+    \vskip -\baselineskip%
+    \vskip -\pyy%
+    \hskip \mylen%
+    \mghrulefill{\RW}\par\nobreak%
+    \vskip \pyy}%
+    \vskip 20\p@}
+ 
+
+  \renewcommand{\DOTI}[1]{%
+    \raggedright
+    \CTV\FmTi{#1}\par\nobreak
+    \vskip 40\p@}
+
+  \renewcommand{\DOTIS}[1]{%
+    \raggedright
+    \CTV\FmTi{#1}\par\nobreak
+    \vskip 40\p@}
+ }
+
+
+%
+
+
+%%%%%% BJORNSTRUP DEF
+
+\DeclareOption{Bjornstrup}{%
+  \usecolortrue
+  % pzc (Zapf Chancelery) is nice.  ppl (Palatino) is cool too.
+  \ChNumVar{\fontsize{76}{80}\usefont{OT1}{pzc}{m}{n}\selectfont}
+  \ChTitleVar{\raggedleft\Large\sffamily\bfseries}
+
+  \setlength{\myhi}{10pt}         % Space between grey box border and text
+  \setlength{\mylen}{\textwidth}
+  \addtolength{\mylen}{-2\myhi}
+  \renewcommand{\DOCH}{%
+    \settowidth{\py}{\CNoV\thechapter}
+    \addtolength{\py}{-10pt}      % Amount of space by which the
+%                                  % number is shifted right
+    \fboxsep=0pt%
+    \colorbox[gray]{.85}{\rule{0pt}{40pt}\parbox[b]{\textwidth}{\hfill}}%
+    \kern-\py\raise20pt%
+    \hbox{\color[gray]{.5}\CNoV\thechapter}\\%
+  }
+  
+  \renewcommand{\DOTI}[1]{%
+    \nointerlineskip\raggedright%
+    \fboxsep=\myhi%
+    \vskip-1ex%
+    \colorbox[gray]{.85}{\parbox[t]{\mylen}{\CTV\FmTi{#1}}}\par\nobreak%
+    \vskip 40\p@%
+  }
+
+  \renewcommand{\DOTIS}[1]{%
+    \fboxsep=0pt
+    \colorbox[gray]{.85}{\rule{0pt}{40pt}\parbox[b]{\textwidth}{\hfill}}\\%
+    \nointerlineskip\raggedright%
+    \fboxsep=\myhi%
+    \colorbox[gray]{.85}{\parbox[t]{\mylen}{\CTV\FmTi{#1}}}\par\nobreak%
+    \vskip 40\p@%
+  }
+}
+
+
+%%%%%%% GLENN DEF
+
+
+\DeclareOption{Glenn}{%
+  \ChNameVar{\bfseries\Large\sf}
+  \ChNumVar{\Huge}
+  \ChTitleVar{\bfseries\Large\rm}
+  \ChRuleWidth{1pt}
+  \ChNameUpperCase
+  \ChTitleUpperCase
+  \renewcommand{\DOCH}{%
+    \settoheight{\myhi}{\CTV\FmTi{Test}}
+    \setlength{\py}{\baselineskip}
+    \addtolength{\py}{\RW}
+    \addtolength{\py}{\myhi}
+    \setlength{\pyy}{\py}
+    \addtolength{\pyy}{-1\RW}
+     
+    \raggedright
+    \CNV\FmN{\@chapapp}\space\CNoV\thechapter
+    \hskip 3pt\mghrulefill{\RW}\rule[-1\pyy]{2\RW}{\py}\par\nobreak}
+
+  \renewcommand{\DOTI}[1]{%
+    \addtolength{\pyy}{-4pt}
+    \settoheight{\myhi}{\CTV\FmTi{#1}}
+    \addtolength{\myhi}{\py}
+    \addtolength{\myhi}{-1\RW}
+    \vskip -1\pyy
+    \rule{2\RW}{\myhi}\mghrulefill{\RW}\hskip 2pt
+    \raggedleft\CTV\FmTi{#1}\par\nobreak
+    \vskip 80\p@}
+
+\newlength{\backskip}
+  \renewcommand{\DOTIS}[1]{%
+%    \setlength{\py}{10pt}
+%    \setlength{\pyy}{\py}
+%    \addtolength{\pyy}{\RW}
+%    \setlength{\myhi}{\baselineskip}
+%    \addtolength{\myhi}{\pyy}
+%    \mghrulefill{\RW}\rule[-1\py]{2\RW}{\pyy}\par\nobreak
+%    \addtolength{}{}
+%\vskip -1\baselineskip
+%    \rule{2\RW}{\myhi}\mghrulefill{\RW}\hskip 2pt
+%    \raggedleft\CTV\FmTi{#1}\par\nobreak
+%    \vskip 60\p@}
+%% Fix suggested by Tomas Lundberg
+    \setlength{\py}{25pt}  % eller vad man vill
+    \setlength{\pyy}{\py}
+    \setlength{\backskip}{\py}
+    \addtolength{\backskip}{2pt}
+    \addtolength{\pyy}{\RW}
+    \setlength{\myhi}{\baselineskip}
+    \addtolength{\myhi}{\pyy}
+    \mghrulefill{\RW}\rule[-1\py]{2\RW}{\pyy}\par\nobreak
+    \vskip -1\backskip
+    \rule{2\RW}{\myhi}\mghrulefill{\RW}\hskip 3pt %
+    \raggedleft\CTV\FmTi{#1}\par\nobreak
+    \vskip 40\p@}
+ }
+
+%%%%%%% CONNY DEF
+
+\DeclareOption{Conny}{%
+  \ChNameUpperCase
+  \ChTitleUpperCase  
+  \ChNameVar{\centering\Huge\rm\bfseries}
+  \ChNumVar{\Huge}
+  \ChTitleVar{\centering\Huge\rm}
+  \ChRuleWidth{2pt}
+
+  \renewcommand{\DOCH}{%
+    \mghrulefill{3\RW}\par\nobreak
+    \vskip -0.5\baselineskip
+    \mghrulefill{\RW}\par\nobreak
+    \CNV\FmN{\@chapapp}\space \CNoV\thechapter
+    \par\nobreak
+    \vskip -0.5\baselineskip
+   }
+  \renewcommand{\DOTI}[1]{%
+    \mghrulefill{\RW}\par\nobreak
+    \CTV\FmTi{#1}\par\nobreak
+    \vskip 60\p@
+    }
+  \renewcommand{\DOTIS}[1]{%
+    \mghrulefill{\RW}\par\nobreak
+    \CTV\FmTi{#1}\par\nobreak
+    \vskip 60\p@
+    }
+  }
+
+%%%%%%% REJNE DEF
+
+\DeclareOption{Rejne}{%
+
+  \ChNameUpperCase
+  \ChTitleUpperCase  
+  \ChNameVar{\centering\Large\rm}
+  \ChNumVar{\Huge}
+  \ChTitleVar{\centering\Huge\rm}
+  \ChRuleWidth{1pt}
+  \renewcommand{\DOCH}{%
+    \settoheight{\py}{\CNoV\thechapter}
+    \parskip=0pt plus 1pt % Set parskip to default, just in case v1.31
+    \addtolength{\py}{-1pt}
+    \CNV\FmN{\@chapapp}\par\nobreak
+    \vskip 20\p@
+    \setlength{\myhi}{2\baselineskip}
+    \setlength{\px}{\myhi}
+    \addtolength{\px}{-1\RW}
+    \rule[-1\px]{\RW}{\myhi}\mghrulefill{\RW}\hskip
+    10pt\raisebox{-0.5\py}{\CNoV\thechapter}\hskip 10pt\mghrulefill{\RW}\rule[-1\px]{\RW}{\myhi}\par\nobreak
+     \vskip -3\p@% Added -2pt vskip to correct for streched text v1.31
+    }
+  \renewcommand{\DOTI}[1]{%
+    \setlength{\mylen}{\textwidth}
+    \parskip=0pt plus 1pt % Set parskip to default, just in case v1.31
+    \addtolength{\mylen}{-2\RW}
+    {\vrule width\RW}\parbox{\mylen}{\CTV\FmTi{#1}}{\vrule width\RW}\par\nobreak%
+    \vskip -3pt\rule{\RW}{2\baselineskip}\mghrulefill{\RW}\rule{\RW}{2\baselineskip}%
+    \vskip 60\p@% Added -2pt in vskip to correct for streched text v1.31
+    }
+  \renewcommand{\DOTIS}[1]{%
+    \setlength{\py}{\fboxrule}
+    \setlength{\fboxrule}{\RW}
+    \setlength{\mylen}{\textwidth}
+    \addtolength{\mylen}{-2\RW}
+    \fbox{\parbox{\mylen}{\vskip 2\baselineskip\CTV\FmTi{#1}\par\nobreak\vskip \baselineskip}} 
+    \setlength{\fboxrule}{\py}
+    \vskip 60\p@
+    }
+  }
+
+
+%%%%%%% BJARNE DEF
+
+\DeclareOption{Bjarne}{%
+  \ChNameUpperCase
+  \ChTitleUpperCase  
+  \ChNameVar{\raggedleft\normalsize\rm}
+  \ChNumVar{\raggedleft \bfseries\Large}
+  \ChTitleVar{\raggedleft \Large\rm}
+  \ChRuleWidth{1pt}
+
+
+%% Note thechapter -> c@chapter fix appendix bug
+%% Fixed misspelled 12
+
+  \newcounter{AlphaCnt}
+  \newcounter{AlphaDecCnt}
+  \newcommand{\AlphaNo}{%
+    \ifcase\number\theAlphaCnt
+      \ifnum\c@chapter=0
+        ZERO\else{}\fi
+    \or ONE\or TWO\or THREE\or FOUR\or FIVE
+    \or SIX\or SEVEN\or EIGHT\or NINE\or TEN
+    \or ELEVEN\or TWELVE\or THIRTEEN\or FOURTEEN\or FIFTEEN
+    \or SIXTEEN\or SEVENTEEN\or EIGHTEEN\or NINETEEN\fi
+}
+
+  \newcommand{\AlphaDecNo}{%
+    \setcounter{AlphaDecCnt}{0}
+    \@whilenum\number\theAlphaCnt>0\do
+      {\addtocounter{AlphaCnt}{-10}
+       \addtocounter{AlphaDecCnt}{1}}
+     \ifnum\number\theAlphaCnt=0
+     \else
+       \addtocounter{AlphaDecCnt}{-1}
+       \addtocounter{AlphaCnt}{10}
+     \fi
+     
+     
+    \ifcase\number\theAlphaDecCnt\or TEN\or TWENTY\or THIRTY\or
+    FORTY\or FIFTY\or SIXTY\or SEVENTY\or EIGHTY\or NINETY\fi
+    }
+  \newcommand{\TheAlphaChapter}{%
+    
+    \ifinapp 
+      \thechapter
+    \else
+      \setcounter{AlphaCnt}{\c@chapter}
+      \ifnum\c@chapter<20
+        \AlphaNo
+      \else
+        \AlphaDecNo\AlphaNo
+      \fi
+    \fi
+    }  
+  \renewcommand{\DOCH}{%
+    \mghrulefill{\RW}\par\nobreak
+    \CNV\FmN{\@chapapp}\par\nobreak 
+    \CNoV\TheAlphaChapter\par\nobreak
+    \vskip -1\baselineskip\vskip 5pt\mghrulefill{\RW}\par\nobreak
+    \vskip 20\p@
+    }
+  \renewcommand{\DOTI}[1]{%
+    \CTV\FmTi{#1}\par\nobreak
+    \vskip 40\p@
+    }
+  \renewcommand{\DOTIS}[1]{%
+    \CTV\FmTi{#1}\par\nobreak
+    \vskip 40\p@
+    }
+}
+
+\DeclareOption*{%
+  \PackageWarning{fancychapter}{unknown style option}
+  }
+
+\ProcessOptions* \relax
+
+\ifusecolor
+  \RequirePackage{color} 
+\fi
+\def\@makechapterhead#1{%
+  \vspace*{50\p@}%
+  {\parindent \z@ \raggedright \normalfont
+    \ifnum \c@secnumdepth >\m@ne
+      \if@mainmatter%%%%% Fix for frontmatter, mainmatter, and backmatter 040920
+        \DOCH
+      \fi
+    \fi
+    \interlinepenalty\@M
+    \if@mainmatter%%%%% Fix for frontmatter, mainmatter, and backmatter 060424
+      \DOTI{#1}%
+    \else%
+      \DOTIS{#1}%
+    \fi
+  }}
+
+
+%%% Begin: To avoid problem with scrbook.cls (fncychap version 1.32)
+
+%%OUT:
+%\def\@schapter#1{\if@twocolumn
+%                   \@topnewpage[\@makeschapterhead{#1}]%
+%                 \else
+%                   \@makeschapterhead{#1}%
+%                   \@afterheading
+%                 \fi}
+
+%%IN:
+\def\@schapter#1{%
+\if@twocolumn%
+  \@makeschapterhead{#1}%
+\else%
+  \@makeschapterhead{#1}%
+  \@afterheading%
+\fi}
+
+%%% End: To avoid problem with scrbook.cls (fncychap version 1.32)
+
+\def\@makeschapterhead#1{%
+  \vspace*{50\p@}%
+  {\parindent \z@ \raggedright
+    \normalfont
+    \interlinepenalty\@M
+    \DOTIS{#1}
+    \vskip 40\p@
+  }}
+
+\endinput
+
+

BIN
paper/images/UA-LogoText.png


BIN
paper/images/UA-LogoTextC.png


BIN
paper/images/ansymo_logo.pdf


BIN
paper/images/ansymo_logo_medium.png


BIN
paper/images/lore.png


Разница между файлами не показана из-за своего большого размера
+ 1517 - 0
paper/lineno.sty


+ 964 - 0
paper/oz.sty

@@ -0,0 +1,964 @@
+%%
+%% This is file `oz.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% oz.dtx  (with options: `package')
+%% Copyright (C) 1993 Sebastian Rahtz. All rights reserved.
+%% This is a generated file for Object Z.  Permission is granted to to
+%% customize the declarations in this file to serve the needs of your
+%% installation.  However, no permission is granted to distribute a
+%% modified version of this file under its original name.
+%% 
+\def\fileversion{2.46}
+\def\filedate{1999/05/24}
+\def\docdate {1994/08/13}
+%% File: oz.dtx Copyright (C) 1995-1999 Sebastian Rahtz
+\NeedsTeXFormat{LaTeX2e}[1994/12/01]
+\ProvidesPackage{oz}[\filedate\space\fileversion\space Object Z macros]
+\message{`Object-Z Macros' \fileversion\space <\filedate>}
+\RequirePackage{calc}
+\def\oz@parbox{\@ifnextchar [{\oz@iparbox}{\oz@iparbox[c]}}
+\long\def\oz@iparbox[#1]#2#3{\leavevmode \@pboxswfalse
+   \if #1b\vbox
+     \else \if #1t\vtop
+              \else \vbox
+                     %\ifmmode \vcenter \else \@pboxswtrue $\vcenter \fi
+           \fi
+    \fi
+{\hsize #2\@parboxrestore #3}
+                     %\if@pboxsw \m@th$\fi
+}
+\@ifpackageloaded{lucbr}{}{%
+\DeclareMathVersion{oz}
+\SetMathAlphabet{\mathrm}{oz}{\encodingdefault}{\rmdefault}{m}{n}%
+\SetMathAlphabet{\mathbf}{oz}{\encodingdefault}{\rmdefault}{bx}{n}%
+\SetMathAlphabet{\mathsf}{oz}{\encodingdefault}{\sfdefault}{m}{n}%
+\DeclareSymbolFont{italics}{\encodingdefault}{\rmdefault}{m}{it}%
+\DeclareSymbolFontAlphabet{\mathrm}{operators}
+\DeclareSymbolFontAlphabet{\mathit}{letters}
+\DeclareSymbolFontAlphabet{\mathcal}{symbols}
+\DeclareSymbolFontAlphabet{\ozit}{italics}
+\DeclareSymbolFont{lasy}{U}{lasy}{m}{n}
+\DeclareSymbolFont{AMSa}{U}{msa}{m}{n}
+\DeclareSymbolFont{AMSb}{U}{msb}{m}{n}
+\let\mho\undefined
+\let\Join\undefined
+\let\Box\undefined
+\let\Diamond\undefined
+\let\leadsto\undefined
+\let\sqsubset\undefined
+\let\sqsupset\undefined
+\let\lhd\undefined
+\let\unlhd\undefined
+\let\rhd\undefined
+\let\unrhd\undefined
+\DeclareMathSymbol{\mho}{\mathord}{lasy}{"30}
+\DeclareMathSymbol{\Join}{\mathrel}{lasy}{"31}
+\DeclareMathSymbol{\Box}{\mathord}{lasy}{"32}
+\DeclareMathSymbol{\Diamond}{\mathord}{lasy}{"33}
+\DeclareMathSymbol{\leadsto}{\mathrel}{lasy}{"3B}
+\DeclareMathSymbol{\sqsubset}{\mathrel}{lasy}{"3C}
+\DeclareMathSymbol{\sqsupset}{\mathrel}{lasy}{"3D}
+\DeclareMathSymbol{\lhd}{\mathrel}{lasy}{"01}
+\DeclareMathSymbol{\unlhd}{\mathrel}{lasy}{"02}
+\DeclareMathSymbol{\rhd}{\mathrel}{lasy}{"03}
+\DeclareMathSymbol{\unrhd}{\mathrel}{lasy}{"04}
+\DeclareSymbolFontAlphabet{\mathbb}{AMSb}
+\DeclareSymbolFontAlphabet{\bbold}{AMSb}
+\mathversion{oz}
+}
+\newbox\strutbox@
+\def\strut@{\copy\strutbox@}
+\addto@hook\every@math@size{%
+    \setbox\strutbox@\hbox{\lower.5\normallineskiplimit
+ \vbox{\kern-\normallineskiplimit\copy\strutbox}}}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% NOTE: bBigg is used to define the font size for zbig etc
+%% however it defines these as fixed sizes.
+%% The 209 definitions set the font size dependent on the
+%% current point size.
+%%
+%% Hence in 209 you can do \Large\cnj and the symbol is bigger
+%% But in 2e it remains a fixed size!
+%%
+%% This is a problem for the Object-Z operators as originally
+%% defined in the 209 oz.sty `96 file.
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\def\bBigg@#1#2{%
+\mbox{\ifcase#1\or\large\or\Large\or\LARGE\or\small\or\footnotesize\fi
+$#2$}\nulldelimiterspace\z@ \m@th}
+\addto@hook\every@math@size{\setbox\z@\vbox{\hbox{$($}\kern\z@}%
+  \big@size 1.2\ht\z@}
+\newdimen\big@size
+\def\zBIG{\bBigg@{3}}
+\def\zBig{\bBigg@{2}}
+\def\zbig{\bBigg@{1}}
+\def\zsmall{\bBigg@{4}}
+\def\zSmall{\bBigg@{5}}
+\def\String#1{\hbox{`\texttt{#1}'}}
+\def\STRING#1{\hbox{``\texttt{#1}''}}
+\def\infix#1{\z@rel{{\underline{#1}}}}
+\def\word#1{\z@op{#1}}
+\def\keyword#1{\z@op{\mbox{\textrm{#1}}}}
+\def\boldword#1{\z@op{\mbox{\textbf{#1}}}}
+\def\underword#1{\z@op{{\underline{#1}}}}
+\def\underkeyword#1{\z@op{{\underline{\mbox{\textrm{#1}}}}}}
+\def\underboldword#1{\z@op{{\underline{\mbox{\textbf{#1}}}}}}
+\def\@setmcodes#1#2#3{{\count0=#1 \count1=#3
+    \loop \global\mathcode\count0=\count1 \ifnum \count0<#2
+    \advance\count0 by1 \advance\count1 by1 \repeat}}
+\@setmcodes{`A}{`Z}{"7\hexnumber@\symitalics41}
+\@setmcodes{`a}{`z}{"7\hexnumber@\symitalics61}
+\let\@mc=\mathchardef
+\mathcode`\;="8000 % Makes ; active in math mode
+{\catcode`\;=\active \gdef;{\semicolon\;}}
+\@mc\semicolon="603B
+\def\z@op#1{\mathop{\mathstrut{#1}}\nolimits}
+\def\z@bin#1{\mathbin{\mathstrut{#1}}}
+\def\z@rel#1{\mathrel{\mathstrut{#1}}}
+\def\z@bigop#1{\z@op{\zbig{#1}}}
+\def\z@bigbin#1{\z@bin{\zbig{#1}}}
+\def\z@bigrel#1{\z@rel{\zbig{#1}}}
+\def\z@Bigop#1{\z@op{\zBig{#1}}}
+\def\z@Bigbin#1{\z@bin{\zBig{#1}}}
+\def\z@Bigrel#1{\z@rel{\zBig{#1}}}
+\def\z@smallop#1{\z@op{\zsmall{#1}}}
+\def\z@smallbin#1{\z@bin{\zsmall{#1}}}
+\def\z@smallrel#1{\z@rel{\zsmall{#1}}}
+\def\_{\leavevmode \vbox{\hrule width0.4em}}
+\let\xforall=\forall
+\let\xexists=\exists
+\let\xlambda=\lambda
+\let\xmu=\mu
+\let\xsucc\succ
+\let\xprec\prec
+\let\dotaccent=\dot
+\let\sectionsymbol=\S
+\let\integral=\int
+\let\product\prod
+\def\p#1{\mathrel{\ooalign{\hfil$\mapstochar\mkern 5mu$\hfil\cr$#1$}}}
+\def\f#1{\mathrel{\ooalign{\hfil
+    $\mapstochar\mkern 3mu\mapstochar\mkern 5mu$\hfil\cr$#1$}}}
+\@ifpackageloaded{lucbr}{%
+ \DeclareMathSymbol{\doublebarwedge}{\mathbin}{symbols}{"D4}
+ \DeclareMathSymbol{\lll}{\mathrel}{letters}{"DE}
+ \DeclareMathSymbol{\ggg}{\mathrel}{letters}{"DF}
+ \DeclareMathSymbol{\eth}{\mathrel}{operators}{"F0}
+}{%
+\let\rightleftharpoons\undefined
+\let\angle\undefined
+\DeclareMathSymbol\boxdot{\mathbin}{AMSa}{"00}
+\DeclareMathSymbol\boxplus{\mathbin}{AMSa}{"01}
+\DeclareMathSymbol\boxtimes{\mathbin}{AMSa}{"02}
+\DeclareMathSymbol\square{\mathord}{AMSa}{"03}
+\DeclareMathSymbol\blacksquare{\mathord}{AMSa}{"04}
+\DeclareMathSymbol\centerdot{\mathbin}{AMSa}{"05}
+\DeclareMathSymbol\lozenge{\mathord}{AMSa}{"06}
+\DeclareMathSymbol\blacklozenge{\mathord}{AMSa}{"07}
+\DeclareMathSymbol\circlearrowright{\mathrel}{AMSa}{"08}
+\DeclareMathSymbol\circlearrowleft{\mathrel}{AMSa}{"09}
+\DeclareMathSymbol\rightleftharpoons{\mathrel}{AMSa}{"0A}
+\DeclareMathSymbol\leftrightharpoons{\mathrel}{AMSa}{"0B}
+\DeclareMathSymbol\boxminus{\mathbin}{AMSa}{"0C}
+\DeclareMathSymbol\Vdash{\mathrel}{AMSa}{"0D}
+\DeclareMathSymbol\Vvdash{\mathrel}{AMSa}{"0E}
+\DeclareMathSymbol\vDash{\mathrel}{AMSa}{"0F}
+\DeclareMathSymbol\twoheadrightarrow{\mathrel}{AMSa}{"10}
+\DeclareMathSymbol\twoheadleftarrow{\mathrel}{AMSa}{"11}
+\DeclareMathSymbol\leftleftarrows{\mathrel}{AMSa}{"12}
+\DeclareMathSymbol\rightrightarrows{\mathrel}{AMSa}{"13}
+\DeclareMathSymbol\upuparrows{\mathrel}{AMSa}{"14}
+\DeclareMathSymbol\downdownarrows{\mathrel}{AMSa}{"15}
+\DeclareMathSymbol\upharpoonright{\mathrel}{AMSa}{"16}
+\DeclareMathSymbol\downharpoonright{\mathrel}{AMSa}{"17}
+\DeclareMathSymbol\upharpoonleft{\mathrel}{AMSa}{"18}
+\DeclareMathSymbol\downharpoonleft{\mathrel}{AMSa}{"19}
+\DeclareMathSymbol\rightarrowtail{\mathrel}{AMSa}{"1A}
+\DeclareMathSymbol\leftarrowtail{\mathrel}{AMSa}{"1B}
+\DeclareMathSymbol\leftrightarrows{\mathrel}{AMSa}{"1C}
+\DeclareMathSymbol\rightleftarrows{\mathrel}{AMSa}{"1D}
+\DeclareMathSymbol\Lsh{\mathrel}{AMSa}{"1E}
+\DeclareMathSymbol\Rsh{\mathrel}{AMSa}{"1F}
+\DeclareMathSymbol\rightsquigarrow{\mathrel}{AMSa}{"20}
+\DeclareMathSymbol\leftrightsquigarrow{\mathrel}{AMSa}{"21}
+\DeclareMathSymbol\looparrowleft{\mathrel}{AMSa}{"22}
+\DeclareMathSymbol\looparrowright{\mathrel}{AMSa}{"23}
+\DeclareMathSymbol\circeq{\mathrel}{AMSa}{"24}
+\DeclareMathSymbol\succsim{\mathrel}{AMSa}{"25}
+\DeclareMathSymbol\gtrsim{\mathrel}{AMSa}{"26}
+\DeclareMathSymbol\gtrapprox{\mathrel}{AMSa}{"27}
+\DeclareMathSymbol\multimap{\mathrel}{AMSa}{"28}
+\DeclareMathSymbol\therefore{\mathrel}{AMSa}{"29}
+\DeclareMathSymbol\because{\mathrel}{AMSa}{"2A}
+\DeclareMathSymbol\doteqdot{\mathrel}{AMSa}{"2B}
+\DeclareMathSymbol\triangleq{\mathrel}{AMSa}{"2C}
+\DeclareMathSymbol\precsim{\mathrel}{AMSa}{"2D}
+\DeclareMathSymbol\lesssim{\mathrel}{AMSa}{"2E}
+\DeclareMathSymbol\lessapprox{\mathrel}{AMSa}{"2F}
+\DeclareMathSymbol\eqslantless{\mathrel}{AMSa}{"30}
+\DeclareMathSymbol\eqslantgtr{\mathrel}{AMSa}{"31}
+\DeclareMathSymbol\curlyeqprec{\mathrel}{AMSa}{"32}
+\DeclareMathSymbol\curlyeqsucc{\mathrel}{AMSa}{"33}
+\DeclareMathSymbol\preccurlyeq{\mathrel}{AMSa}{"34}
+\DeclareMathSymbol\leqq{\mathrel}{AMSa}{"35}
+\DeclareMathSymbol\leqslant{\mathrel}{AMSa}{"36}
+\DeclareMathSymbol\lessgtr{\mathrel}{AMSa}{"37}
+\DeclareMathSymbol\backprime{\mathord}{AMSa}{"38}
+\DeclareMathSymbol\risingdotseq{\mathrel}{AMSa}{"3A}
+\DeclareMathSymbol\fallingdotseq{\mathrel}{AMSa}{"3B}
+\DeclareMathSymbol\succcurlyeq{\mathrel}{AMSa}{"3C}
+\DeclareMathSymbol\geqq{\mathrel}{AMSa}{"3D}
+\DeclareMathSymbol\geqslant{\mathrel}{AMSa}{"3E}
+\DeclareMathSymbol\gtrless{\mathrel}{AMSa}{"3F}
+\DeclareMathSymbol\sqsubset{\mathrel}{AMSa}{"40}
+\DeclareMathSymbol\sqsupset{\mathrel}{AMSa}{"41}
+\DeclareMathSymbol\vartriangleright{\mathrel}{AMSa}{"42}
+\DeclareMathSymbol\vartriangleleft{\mathrel}{AMSa}{"43}
+\DeclareMathSymbol\trianglerighteq{\mathrel}{AMSa}{"44}
+\DeclareMathSymbol\trianglelefteq{\mathrel}{AMSa}{"45}
+\DeclareMathSymbol\bigstar{\mathord}{AMSa}{"46}
+\DeclareMathSymbol\between{\mathrel}{AMSa}{"47}
+\DeclareMathSymbol\blacktriangledown{\mathord}{AMSa}{"48}
+\DeclareMathSymbol\blacktriangleright{\mathrel}{AMSa}{"49}
+\DeclareMathSymbol\blacktriangleleft{\mathrel}{AMSa}{"4A}
+\DeclareMathSymbol\vartriangle{\mathord}{AMSa}{"4D}
+\DeclareMathSymbol\blacktriangle{\mathord}{AMSa}{"4E}
+\DeclareMathSymbol\triangledown{\mathord}{AMSa}{"4F}
+\DeclareMathSymbol\eqcirc{\mathrel}{AMSa}{"50}
+\DeclareMathSymbol\lesseqgtr{\mathrel}{AMSa}{"51}
+\DeclareMathSymbol\gtreqless{\mathrel}{AMSa}{"52}
+\DeclareMathSymbol\lesseqqgtr{\mathrel}{AMSa}{"53}
+\DeclareMathSymbol\gtreqqless{\mathrel}{AMSa}{"54}
+\DeclareMathSymbol\Rrightarrow{\mathrel}{AMSa}{"56}
+\DeclareMathSymbol\Lleftarrow{\mathrel}{AMSa}{"57}
+\DeclareMathSymbol\veebar{\mathbin}{AMSa}{"59}
+\DeclareMathSymbol\barwedge{\mathbin}{AMSa}{"5A}
+\DeclareMathSymbol\doublebarwedge{\mathbin}{AMSa}{"5B}
+\DeclareMathSymbol\angle{\mathord}{AMSa}{"5C}
+\DeclareMathSymbol\measuredangle{\mathord}{AMSa}{"5D}
+\DeclareMathSymbol\sphericalangle{\mathord}{AMSa}{"5E}
+\DeclareMathSymbol\varpropto{\mathrel}{AMSa}{"5F}
+\DeclareMathSymbol\smallsmile{\mathrel}{AMSa}{"60}
+\DeclareMathSymbol\smallfrown{\mathrel}{AMSa}{"61}
+\DeclareMathSymbol\Subset{\mathrel}{AMSa}{"62}
+\DeclareMathSymbol\Supset{\mathrel}{AMSa}{"63}
+\DeclareMathSymbol\Cup{\mathbin}{AMSa}{"64}
+\DeclareMathSymbol\Cap{\mathbin}{AMSa}{"65}
+\DeclareMathSymbol\curlywedge{\mathbin}{AMSa}{"66}
+\DeclareMathSymbol\curlyvee{\mathbin}{AMSa}{"67}
+\DeclareMathSymbol\leftthreetimes{\mathbin}{AMSa}{"68}
+\DeclareMathSymbol\rightthreetimes{\mathbin}{AMSa}{"69}
+\DeclareMathSymbol\subseteqq{\mathrel}{AMSa}{"6A}
+\DeclareMathSymbol\supseteqq{\mathrel}{AMSa}{"6B}
+\DeclareMathSymbol\bumpeq{\mathrel}{AMSa}{"6C}
+\DeclareMathSymbol\Bumpeq{\mathrel}{AMSa}{"6D}
+\DeclareMathSymbol\lll{\mathrel}{AMSa}{"6E}
+\DeclareMathSymbol\ggg{\mathrel}{AMSa}{"6F}
+\DeclareMathDelimiter\ulcorner{4}{AMSa}{"70}{AMSa}{"70}
+\DeclareMathDelimiter\urcorner{5}{AMSa}{"71}{AMSa}{"71}
+\DeclareMathDelimiter\llcorner{4}{AMSa}{"78}{AMSa}{"78}
+\DeclareMathDelimiter\lrcorner{5}{AMSa}{"79}{AMSa}{"79}
+\xdef\yen  {\noexpand\mathhexbox\hexnumber@\symAMSa 55 }
+\xdef\checkmark{\noexpand\mathhexbox\hexnumber@\symAMSa 58 }
+\xdef\circledR {\noexpand\mathhexbox\hexnumber@\symAMSa 72 }
+\xdef\maltese  {\noexpand\mathhexbox\hexnumber@\symAMSa 7A }
+\DeclareMathSymbol\circledS{\mathord}{AMSa}{"73}
+\DeclareMathSymbol\pitchfork{\mathrel}{AMSa}{"74}
+\DeclareMathSymbol\dotplus{\mathbin}{AMSa}{"75}
+\DeclareMathSymbol\backsim{\mathrel}{AMSa}{"76}
+\DeclareMathSymbol\backsimeq{\mathrel}{AMSa}{"77}
+\DeclareMathSymbol\complement{\mathord}{AMSa}{"7B}
+\DeclareMathSymbol\intercal{\mathbin}{AMSa}{"7C}
+\DeclareMathSymbol\circledcirc{\mathbin}{AMSa}{"7D}
+\DeclareMathSymbol\circledast{\mathbin}{AMSa}{"7E}
+\DeclareMathSymbol\circleddash{\mathbin}{AMSa}{"7F}
+\DeclareMathSymbol\lvertneqq{\mathrel}{AMSb}{"00}
+\DeclareMathSymbol\gvertneqq{\mathrel}{AMSb}{"01}
+\DeclareMathSymbol\nleq{\mathrel}{AMSb}{"02}
+\DeclareMathSymbol\ngeq{\mathrel}{AMSb}{"03}
+\DeclareMathSymbol\nless{\mathrel}{AMSb}{"04}
+\DeclareMathSymbol\ngtr{\mathrel}{AMSb}{"05}
+\DeclareMathSymbol\nprec{\mathrel}{AMSb}{"06}
+\DeclareMathSymbol\nsucc{\mathrel}{AMSb}{"07}
+\DeclareMathSymbol\lneqq{\mathrel}{AMSb}{"08}
+\DeclareMathSymbol\gneqq{\mathrel}{AMSb}{"09}
+\DeclareMathSymbol\nleqslant{\mathrel}{AMSb}{"0A}
+\DeclareMathSymbol\ngeqslant{\mathrel}{AMSb}{"0B}
+\DeclareMathSymbol\lneq{\mathrel}{AMSb}{"0C}
+\DeclareMathSymbol\gneq{\mathrel}{AMSb}{"0D}
+\DeclareMathSymbol\npreceq{\mathrel}{AMSb}{"0E}
+\DeclareMathSymbol\nsucceq{\mathrel}{AMSb}{"0F}
+\DeclareMathSymbol\precnsim{\mathrel}{AMSb}{"10}
+\DeclareMathSymbol\succnsim{\mathrel}{AMSb}{"11}
+\DeclareMathSymbol\lnsim{\mathrel}{AMSb}{"12}
+\DeclareMathSymbol\gnsim{\mathrel}{AMSb}{"13}
+\DeclareMathSymbol\nleqq{\mathrel}{AMSb}{"14}
+\DeclareMathSymbol\ngeqq{\mathrel}{AMSb}{"15}
+\DeclareMathSymbol\precneqq{\mathrel}{AMSb}{"16}
+\DeclareMathSymbol\succneqq{\mathrel}{AMSb}{"17}
+\DeclareMathSymbol\precnapprox{\mathrel}{AMSb}{"18}
+\DeclareMathSymbol\succnapprox{\mathrel}{AMSb}{"19}
+\DeclareMathSymbol\lnapprox{\mathrel}{AMSb}{"1A}
+\DeclareMathSymbol\gnapprox{\mathrel}{AMSb}{"1B}
+\DeclareMathSymbol\nsim{\mathrel}{AMSb}{"1C}
+\DeclareMathSymbol\ncong{\mathrel}{AMSb}{"1D}
+\DeclareMathSymbol\nsubseteqq{\mathrel}{AMSb}{"22}
+\DeclareMathSymbol\nsupseteqq{\mathrel}{AMSb}{"23}
+\DeclareMathSymbol\subsetneqq{\mathrel}{AMSb}{"24}
+\DeclareMathSymbol\supsetneqq{\mathrel}{AMSb}{"25}
+\DeclareMathSymbol\subsetneq{\mathrel}{AMSb}{"28}
+\DeclareMathSymbol\supsetneq{\mathrel}{AMSb}{"29}
+\DeclareMathSymbol\nsubseteq{\mathrel}{AMSb}{"2A}
+\DeclareMathSymbol\nsupseteq{\mathrel}{AMSb}{"2B}
+\DeclareMathSymbol\nparallel{\mathrel}{AMSb}{"2C}
+\DeclareMathSymbol\nmid{\mathrel}{AMSb}{"2D}
+\DeclareMathSymbol\nshortmid{\mathrel}{AMSb}{"2E}
+\DeclareMathSymbol\nshortparallel{\mathrel}{AMSb}{"2F}
+\DeclareMathSymbol\nvdash{\mathrel}{AMSb}{"30}
+\DeclareMathSymbol\nVdash{\mathrel}{AMSb}{"31}
+\DeclareMathSymbol\nvDash{\mathrel}{AMSb}{"32}
+\DeclareMathSymbol\nVDash{\mathrel}{AMSb}{"33}
+\DeclareMathSymbol\ntrianglerighteq{\mathrel}{AMSb}{"34}
+\DeclareMathSymbol\ntrianglelefteq{\mathrel}{AMSb}{"35}
+\DeclareMathSymbol\ntriangleleft{\mathrel}{AMSb}{"36}
+\DeclareMathSymbol\ntriangleright{\mathrel}{AMSb}{"37}
+\DeclareMathSymbol\nleftarrow{\mathrel}{AMSb}{"38}
+\DeclareMathSymbol\nrightarrow{\mathrel}{AMSb}{"39}
+\DeclareMathSymbol\nLeftarrow{\mathrel}{AMSb}{"3A}
+\DeclareMathSymbol\nRightarrow{\mathrel}{AMSb}{"3B}
+\DeclareMathSymbol\nLeftrightarrow{\mathrel}{AMSb}{"3C}
+\DeclareMathSymbol\nleftrightarrow{\mathrel}{AMSb}{"3D}
+\DeclareMathSymbol\divideontimes{\mathbin}{AMSb}{"3E}
+\DeclareMathSymbol\varnothing{\mathord}{AMSb}{"3F}
+\DeclareMathSymbol\mho{\mathord}{AMSb}{"66}
+\DeclareMathSymbol\eth{\mathord}{AMSb}{"67}
+\DeclareMathSymbol\eqsim{\mathrel}{AMSb}{"68}
+\DeclareMathSymbol\beth{\mathord}{AMSb}{"69}
+\DeclareMathSymbol\gimel{\mathord}{AMSb}{"6A}
+\DeclareMathSymbol\daleth{\mathord}{AMSb}{"6B}
+\DeclareMathSymbol\lessdot{\mathrel}{AMSb}{"6C}
+\DeclareMathSymbol\gtrdot{\mathrel}{AMSb}{"6D}
+\DeclareMathSymbol\ltimes{\mathbin}{AMSb}{"6E}
+\DeclareMathSymbol\rtimes{\mathbin}{AMSb}{"6F}
+\DeclareMathSymbol\shortmid{\mathrel}{AMSb}{"70}
+\DeclareMathSymbol\shortparallel{\mathrel}{AMSb}{"71}
+\DeclareMathSymbol\smallsetminus{\mathbin}{AMSb}{"72}
+\DeclareMathSymbol\thicksim{\mathrel}{AMSb}{"73}
+\DeclareMathSymbol\thickapprox{\mathrel}{AMSb}{"74}
+\DeclareMathSymbol\approxeq{\mathrel}{AMSb}{"75}
+\DeclareMathSymbol\succapprox{\mathrel}{AMSb}{"76}
+\DeclareMathSymbol\precapprox{\mathrel}{AMSb}{"77}
+\DeclareMathSymbol\curvearrowleft{\mathrel}{AMSb}{"78}
+\DeclareMathSymbol\curvearrowright{\mathrel}{AMSb}{"79}
+\DeclareMathSymbol\digamma{\mathord}{AMSb}{"7A}
+\DeclareMathSymbol\varkappa{\mathord}{AMSb}{"7B}
+\DeclareMathSymbol\hslash{\mathord}{AMSb}{"7D}
+\DeclareMathSymbol\hbar{\mathord}{AMSb}{"7E}
+\DeclareMathSymbol\backepsilon{\mathrel}{AMSb}{"7F}
+}
+\def\interleave{{\parallel\!\!\vert}}
+\def\shortinterleave{\z@rel{\mathord\shortmid\mathord\shortparallel}}
+\def\napprox{\not\approx}
+\let\restriction\upharpoonright
+\let\Doteq\doteqdot
+\let\doublecup\Cup
+\let\llless\lll
+\let\gggtr\ggg
+\let\doublecap\Cap
+\def \nat   {{\mathbb N}}
+\def \integer   {{\mathbb Z}}
+\def \natone    {{\mathbb N}_1}
+\def \real  {{\mathbb R}}
+\def \bool  {{\mathbb B}}
+\let \divides   \div
+\def \div   {\z@bin{\mathrm{div}}}
+\def \mod   {\z@bin{\mathrm{mod}}}
+\def \succ  {\word{succ}}
+\def \expon {^}
+\let \num   \integer
+\let \nplus \natone
+\def \lnot  {\neg\;}
+\def \land  {\z@rel{\wedge}}
+\def \lor   {\z@rel{\vee}}
+\let \imp   \Rightarrow
+\let\iff    \Leftrightarrow
+\def \all   {\z@op{\xforall}}
+\def \exi   {\z@op{\xexists}}
+\def \exione    {\exists_1}
+\@ifpackageloaded{lucbr}{%
+\DeclareMathSymbol{\nexi}{0}{arrows}{"20}
+}{%
+\DeclareMathSymbol{\nexi}{\mathord}{AMSb}{"40}
+}
+\def \dot   {\z@rel{\bullet}}
+\def \true  {\keyword{true}}
+\def \false {\keyword{false}}
+\let \cond  \rightarrow
+\let \spot  \dot
+\mathcode`\@="8000% make @ active in mathmode
+{\catcode`\@=\active \gdef@{\dot}}
+\let \implies   \imp
+\let \forall    \all
+\let \exists    \exi
+\let \nexists   \nexi
+\let \emptyset  \varnothing
+\def \varemptyset  {\{\,\}}
+\def \pset  {\z@op{\mathbb P}}
+\def \psetone   {\pset_1}
+\def \fset  {\z@op{\mathbb F}}
+\def \fsetone   {\fset_1}
+\def \sset  {\z@op{\mathbb S}}
+\let \mem   \in
+\def \nem   {\not\mem}
+\def \uni   {\z@bin\cup}
+\def \int   {\z@bin\cap}
+\let \prod  \times
+\def \min   {\word{min}}
+\def \max   {\word{max}}
+\def \duni  {\z@Bigop{\lower0.25ex\hbox{$\uni$}}}
+\def \dint  {\z@Bigop{\lower0.25ex\hbox{$\int$}}}
+\def \upto  {\z@bin{\ldotp\ldotp}}
+\let \psubs \subset
+\let \subs  \subseteq
+\let \psups \supset
+\let \sups  \supseteq
+\def \diff  {\z@bin{\backslash}}
+\let \cross \prod
+\let \notin \nem
+\let \nmem  \nem
+\let \union \uni
+\let \inter \int
+\let \power \pset
+\let \finset    \fset
+\let \dunion    \duni
+\let \dinter    \dint
+\def \lambda    {\z@op{\xlambda}}
+\def \mu    {\z@op{\xmu}}
+\def \dom   {\keyword{dom}}
+\def \ran   {\keyword{ran}}
+\def \id    {\keyword{id}}
+\@ifpackageloaded{lucbr}{%
+\DeclareMathSymbol{\dres}{\mathbin}{letters}{"2F}
+\DeclareMathSymbol{\rres}{\mathbin}{letters}{"2E}
+}{%
+\DeclareMathSymbol{\dres}{\mathbin}{AMSa}{"43}
+\DeclareMathSymbol{\rres}{\mathbin}{AMSa}{"42}
+}
+\def \dsub  {\mathbin{\rlap{\raise.05ex\hbox{$-$}}{\dres}}}
+\def \rsub  {\mathbin{\rlap{\raise.05ex\hbox{$-$}}{\rres}}}
+\let \fovr  \oplus
+\let \cmp   \circ
+\def \fcmp  {\mathbin{\raise 0.6ex\hbox{\oalign{\hfil$\scriptscriptstyle
+     \mathrm{o}$\hfil\cr\hfil$\scriptscriptstyle\mathrm{9}$\hfil}}}}
+\def \inv   {^\sim}
+\def \limg  {(\!|}
+\def \rimg  {|\!)}
+\let \map   \mapsto
+\let \rel   \leftrightarrow
+\let \tfun  \rightarrow
+\let \tinj  \rightarrowtail
+\def \tsur  {\mathrel{\ooalign{$\tfun$\hfil\cr$\mkern4mu\tfun$}}}
+\def \pfun  {\p\tfun}
+\def \pinj  {\p\tinj}
+\def \psur  {\p\tsur}
+\def \ffun  {\f\tfun}
+\def \finj  {\f\tinj}
+\def \bij   {\mathrel{\ooalign{$\tinj$\hfil\cr$\mkern5mu\tfun$}}}
+\def \tcl   {^+}
+\def \rtcl  {^*}
+\def \iter  {^}
+\let \comp  \fcmp
+\let \ndres \dsub
+\let \nrres \rsub
+\let \fun   \tfun
+\let \inj   \tinj
+\let \surj  \tsur
+\let \psurj \psur
+\let \llless    \lll
+\let \gggtr \ggg
+\def \interleave    {{\parallel\!\!\vert}}
+\def \shortinterleave   {\z@rel{\mathord\shortmid\mathord\shortparallel}}
+\let \restriction   \upharpoonright
+\def \napprox   {\not\approx}
+\def \seq   {\keyword{seq}}
+\def \iseq {\keyword{iseq}}
+\def \seqone    {\seq_1}
+\def \emptyseq  {\lseq\,\rseq}
+\let \lseq  \langle
+\let \rseq  \rangle
+\def \head  {\word{head}}
+\def \tail  {\word{tail}}
+\def \front {\word{front}}
+\def \last  {\word{last}}
+\def \rev   {\word{rev}}
+\def \squash    {\word{squash}}
+\def \next  {\keyword{next}}
+\def \inseq {\keyword{in}}
+\@ifpackageloaded{lucbr}{%
+\DeclareMathSymbol{\sres}{2}{arrows}{"75}
+\DeclareMathSymbol{\ires}{2}{arrows}{"76}
+\DeclareMathSymbol{\@@cat}{\mathbin}{operators}{"5F}
+}{%
+\DeclareMathSymbol{\@@cat}{\mathbin}{AMSa}{"61}
+\DeclareMathSymbol{\sres}{\mathbin}{AMSa}{"16}
+\DeclareMathSymbol{\ires}{\mathbin}{AMSa}{"18}
+}
+\def \cat   {\mathbin{\raise 0.8ex\hbox{$\mathchar\@@cat$}}}
+\def \ssub  {\z@bin{\rlap{$-$}{\sres}}}
+\def \isub  {\z@bin{\rlap{$-$}{\ires}}}
+\def \dcat  {\z@op{\cat/}}
+\def \dovr  {\z@op{\fovr/}}
+\def \dcmp  {\z@op{\fcmp/}}
+\let \prefix    \subseteq
+\def \suffix    {\keyword{suffix}}
+\def \seqi  {\keyword{seq_\infty}}
+\def \partitions    {\keyword{partitions}}
+\def \partition {\keyword{partitions}}
+\def \disjoint  {\keyword{disjoint}}
+\def \subseq    {\keyword{subseq}}
+\let \filter    \sres
+\def \lsch  {\z@bigop{[}}
+\def \rsch  {\z@bigop{]}}
+\def \dparallel {\z@bigop{\parallel}\limits}
+\def \zand  {\z@bigbin\land}
+\def \zor   {\z@bigbin\lor}
+\def \zcmp  {\z@bigbin\fcmp}
+\def \zexi  {\z@bigop\exists}
+\def \zall  {\z@bigop\forall}
+\def \znot  {\z@bigop\neg}
+\def \zbar  {\z@bigbin\cbar}
+\def \zfor  {/}
+\def \zhide {\z@bigbin\backslash}
+\def \zimp  {\z@bigrel\imp}
+\def \zeq   {\z@bigrel\iff}
+\def \zovr  {\z@bigrel\oplus}
+\def \zpipe {\z@bigbin{\mathord>\!\!\mathord>}}
+\def \pre   {\keyword{pre}}
+\def \pred  {\keyword{pred}}
+\def \post  {\keyword{post}}
+\def \zproject  {\z@bigbin\sres}
+\def\rename{\@ifnextchar*{\z@rename}{\z@@rename}}
+\def\z@rename*[#1/#2]{\left[#1 \over #2\right]}
+\def\z@@rename[#1/#2]{\left[#1 \zfor #2\right]}
+\let \project   \zproject
+\let \import    \sres
+\let \semi  \zcmp
+\let \hide  \zhide
+\let\buni\uplus
+\def \emptybag  {\lbag\:\rbag}
+\def \lbag  {[\![}
+\def \rbag  {]\!]}
+\def \bag   {\keyword{bag}}
+\def \items {\word{items}}
+\let \inbag \inseq
+\def \bagcount  {\word{count}}
+\def \ddef  {\z@rel{\;::=\;}}
+\def \bbar  {\z@bigrel{|}}
+\let \cbar  \mid
+\def \lang  {\langle\!\langle}
+\def \rang  {\rangle\!\rangle}
+\def \sdef  {\z@rel{\widehat=}}
+\def \defs  {\z@smallrel{==}}
+\def \varsdef   {\z@rel\triangleq}
+\let \sdefs \sdef
+\mathcode`\|=\mid
+\let \ldata \lang
+\let \rdata \rang
+\def \lblot {\langle\!|}
+\def \rblot {|\!\rangle}
+\def \IMP   {\boldword{Import}}
+\let \env   \Rrightarrow
+\def \zlet  {\boldword{let}}
+\def \zin   {\boldword{in}}
+\def \zwhere    {\boldword{where}}
+\def\HOLE{\z@op{\hbox{$\lll\star\star\star\ggg$}}}
+\def\landd{} % to support qzed editor
+\def\semid{} % to support qzed editor
+\def\qzed{\ifz@inclass\else\zed\fi}
+\def\endqzed{\ifz@inclass\else\endzed\fi}
+\def\qua{\mbox{::}}
+\def\redef{\mbox{\textbf{~redef}}}
+\def\Init{I\!{\scriptstyle{NIT}}}
+\def\Exit{E\!{\scriptstyle{XIT}}}
+\def\Internal{I\!{\scriptstyle{NTERNAL}}}
+\def\Aux{A\!{\scriptstyle{UX}}}
+\def\intern{\mbox{\textsf{i}}}
+\def\thrm{\z@rel\vdash}
+\def\qed{\zsmall\Box}
+\let\Qed\Box
+\let\QED\square
+\def\BLACKQED{\zsmall\blacksquare}
+\let\ETH\qed
+\def\TH{\boldword{Theorem}}
+\def\LE{\boldword{Lemma}}
+\def\PR{\boldword{Proof}}
+\def\refines{\z@rel\sqsupseteq}
+\def\defines{\z@rel\sqsubseteq}
+\def\weakrefine{\z@rel{\raise0.2ex\rlap{\hbox{$\sqsupset$}}\lower1ex\hbox{$\sim$}}}
+\def\weakdefine{\z@rel{\raise0.2ex\rlap{\hbox{$\sqsubset$}}\lower1ex\hbox{$\sim$}}}
+\let\shows\thrm
+\def\childof{\z@rel\xsucc}
+\def\parentof{\z@rel\xprec}
+\let\weaksubclass\succsim
+\let\weaksupclass\precsim
+\def\hasa{\z@rel{\mathord\xsucc\!\!\!\mathord\xsucc}}
+\def\instancein{\z@rel{\mathord\xprec\!\!\!\mathord\xprec}}
+\def\subtype{\z@rel\sqsubset}
+\def\subtypeeq{\z@rel\sqsubseteq}
+\def\suptype{\z@rel\sqsupset}
+\def\suptypeeq{\z@rel\sqsupseteq}
+\let\inherits\childof
+\let\subclass\childof
+\let\isa\childof
+\let\supclass\parentof
+\let\instantiates\hasa
+\let\islikea\weaksubclass
+\def\poly{\mathord\downarrow}
+\def\widen#1{\z@op{{\overline{#1}}}}
+\def\atnext{\rlap{$\zSmall\bigcirc$}\kern0.01em\rlap{$\zSmall\bigcirc$}\kern0.01em\zSmall\bigcirc}
+\def\atlast{\rlap{$\zSmall\bigcirc$}\kern0.01em\rlap{$\zSmall\bigcirc$}\kern0.01em\rlap{$\kern0.01em\mathord-$}\zSmall\bigcirc}
+\def\always{\lower0.37ex\hbox{$\zbig\Box$}}
+\def\uptilnow{\rlap{$\kern0.02em\mathord-$}\lower0.37ex\hbox{$\zbig\Box$}}
+\def\eventually{\lower0.37ex\hbox{$\zbig\Diamond$}}
+\def\previously{\rlap{$\kern0.04em\mathord-$}\lower0.37ex\hbox{$\zbig\Diamond$}}
+\let\henceforth\always
+\def \mono  {\keyword{monotonic}}
+\def \porder    {\keyword{partial\_order}}
+\def \torder    {\keyword{total\_order}}
+\newbox\z@combox\newdimen\z@wdcalc
+\def\comment{\@ifnextchar*{\z@leftcomment}{\z@comment}}
+\def\z@comment#1{$\z@stopfield\z@addfield\z@startfield$%
+\global\setbox\z@combox\hbox{\quad[{\sf #1}]}\z@wdcalc=\wd\z@combox%
+\advance\z@wdcalc by \wd\z@curline\advance\z@wdcalc by \z@curindent%
+\advance\z@wdcalc by \zedleftsep\advance\z@wdcalc by \zedlinethickness%
+\advance\z@wdcalc by 2\zedindent\ifdim\z@wdcalc>\displaywidth\\%
+\fi&\box\z@combox\ignorespaces}
+\def\z@leftcomment*#1{\hbox{[{\sf #1}]}}
+\def \oid {{\bbold O}}
+\def \self   {\word{self}}
+\def \contained {\word{contained}}
+\let \classuni    \uni
+\def \visibility {\zproject}
+\def \invisibility {{\project\hspace{-0.63 em}\cross}}
+\def \cid {{\bigcirc\mbox{\scriptsize{\hspace{-0.78em}}\mbox{\tiny{C}}}}}
+\def \sid {{\bigcirc\mbox{\scriptsize{\hspace{-0.74em}}\mbox{\tiny{S}}}}}
+\def \eid {{\bigcirc\mbox{\scriptsize{\hspace{-0.74em}}\mbox{\tiny{E}}}}}
+\def \pll {~\parallel~}
+\def \plo {~\parallel_{!}~}
+\def \sqc {~\semi~}
+\def \cnj {~\zand~}
+\def \gch {~[\mbox{\hspace{-0.06em}}]~}
+\def \enh {~\dot~}
+\def \dsqc {\mbox{{\Large $\fcmp~$}}}
+\def \dgch {\mbox{{\Large $[\mbox{\hspace{-0.06em}}]$}}}
+\def \dcnj {\mbox{{\Large $\land$}}}
+\def \dpll {\mbox{{\Large $\parallel$}}}
+\def \dplo {\mbox{{\Large $\parallel_{!}$}}}
+\newcount\z@stackmin
+\newcount\z@stackmax
+\newcount\z@stacktop
+\newdimen\@gtempa \z@stackmin=\allocationnumber
+\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa
+\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa
+\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa
+\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa
+\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa
+\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa
+\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa
+\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa
+\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa
+\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa
+\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa
+\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa
+\newdimen\@gtempa
+\z@stackmax=\allocationnumber
+\dimen\z@stackmin=0pt
+\newbox\z@curline
+\newdimen\z@curindent
+\dimen\z@curindent=0pt
+\def\z@space{{}\;{}}
+\newbox\z@curfield
+\def\z@startline{\setbox\z@curline\hbox{}%
+     \global\z@curindent\dimen\z@stacktop
+     \z@startfield\ignorespaces}
+\def\z@stopline{\z@stopfield
+    \z@addfield
+    \hbox{\hskip\z@curindent \box\z@curline}}
+
+\def\z@startfield{\global\setbox\z@curfield\hbox\bgroup}
+\def\z@stopfield{\egroup}
+\def\z@addfield{\global\setbox\z@curline\hbox{\unhbox
+     \z@curline\unhbox\z@curfield}}
+
+\def\z@pushmargin{\hbox{\kern0pt}$%
+  \z@stopfield
+  \z@addfield
+  \ifnum \z@stacktop < \z@stackmax
+    \global\advance\z@stacktop \@ne
+  \else
+    \@latexerr{Z margin stack overflow (too many \string\M's)}
+    \@ehd
+  \fi
+  \global\dimen\z@stacktop\z@curindent
+  \global\advance\dimen\z@stacktop \wd\z@curline
+  \z@startfield\ignorespaces
+  $\relax}
+\def\z@popmargin{\ifnum \z@stacktop > \z@stackmin
+    \global\advance\z@stacktop \m@ne \ignorespaces
+  \else
+    \@latexerr{Z Margin stack underflow (too many \string\O's)}
+    \@ehd
+  \fi}
+\def\M{\z@pushmargin} \def\O{\z@popmargin} \def\S{\z@space}
+\z@stacktop\z@stackmin
+\newdimen\zedindent \zedindent=\leftmargini
+\newdimen\zedleftsep    \zedleftsep=1em
+\newdimen\zedtab    \zedtab=2em
+\newdimen\zedbar    \zedbar=8em
+\newdimen\zedlinethickness  \zedlinethickness=0.4pt
+\newdimen\zedcornerheight   \zedcornerheight=0pt
+\newcount\z@cols
+\newif\ifz@firstline    \z@firstlinefalse
+\newif\ifz@inclass  \z@inclassfalse
+\newif\ifz@inenv    \z@inenvfalse
+\newif\ifz@leftmargin   \z@leftmargintrue
+\newif\ifz@incols   \z@incolsfalse
+\newif\ifleftnames  \leftnamesfalse
+\def\leftschemas{\leftnamestrue}
+\newif\ifz@inbox    \z@inboxfalse
+\newskip\zedbaselineskip    \zedbaselineskip\baselineskip
+\newbox\zstrutbox   \setbox\zstrutbox=\copy\strutbox
+\def\zstrut{\relax\ifmmode\copy\zstrutbox\else\unhcopy\zstrutbox\fi}
+\def\zedbaselinestretch{1}
+\def\baselinestretch{1}
+\newcount\interzedlinepenalty   \interzedlinepenalty=10000  %never break
+\newcount\preboxpenalty \preboxpenalty=0    %break easily
+\newcount\forcepagepenalty  \forcepagepenalty=-10000    %always break
+\interdisplaylinepenalty=100    %break sometimes
+\def\zedsize#1{\def\z@size{#1}}
+\def\z@size{}
+\newskip\z@adskip\newskip\z@bdskip\newskip\z@adsskip\newskip\z@bdsskip
+\def\z@changesize{%
+\z@adskip\abovedisplayskip\z@bdskip\belowdisplayskip% save skips
+\z@adsskip\abovedisplayshortskip\z@bdsskip\belowdisplayshortskip
+\z@size % change size
+\abovedisplayskip\z@adskip\belowdisplayskip\z@bdskip% restore skips
+\abovedisplayshortskip\z@adsskip\belowdisplayshortskip\z@bdsskip}
+\def\z@zeroskips{\abovedisplayskip\z@\belowdisplayskip\z@
+    \abovedisplayshortskip\z@\belowdisplayshortskip\z@}
+\def\@setfontsize#1#2#3{\@nomath#1%
+    \ifx\protect\@typeset@protect
+      \let\@currsize#1%
+    \fi
+    \fontsize{#2}{#3}\selectfont
+\setlength{\zedbaselineskip}{\baselineskip/\real{\baselinestretch}}%
+    \zedbaselineskip\zedbaselinestretch\zedbaselineskip
+    \setbox\zstrutbox\hbox{\vrule height.7\zedbaselineskip
+    depth.3\zedbaselineskip width\z@}}
+\def\z@narrow{\advance\linewidth by -\zedindent}
+\def\z@wide{\advance\linewidth by \zedindent}
+\def\z@hrulefill{\leaders\hrule height\zedlinethickness\hfill}
+\def\z@topline#1{\omit\@ifnextchar[{\z@@topline{#1}}{\z@@topline{#1}[]}}
+\def\z@@topline#1[#2]{\hbox to\linewidth{\zstrut\ifleftnames\else
+    \vrule height\zedlinethickness width\zedlinethickness
+    \hbox to\zedleftsep{\z@hrulefill}\fi#1\z@hrulefill
+    \smash{\vrule height\zedlinethickness width\zedlinethickness
+    depth\zedcornerheight}\hbox{\sf #2}}\cr}
+\def\z@dbltopline#1{\omit\@ifnextchar[{\z@@dbltopline{#1}}{\z@@dbltopline{#1}[]}}
+\def\z@@dbltopline#1[#2]{\z@@topline{#1}[#2]%
+\noalign{\kern-\baselineskip
+    \kern-\zedlinethickness
+    \kern-\doublerulesep \nobreak}%
+\omit\z@@topline{\hphantom{#1}}[\hphantom{#2}]%
+\noalign{\kern\doublerulesep
+    \kern\zedlinethickness \nobreak}}
+\def\z@botline{\also\omit\hbox to\linewidth{\z@hrulefill
+\smash{\vrule height\zedcornerheight width\zedlinethickness
+    depth 0pt}}\cr}
+\def\z@@botline[#1]{\hbox to\linewidth{\vrule\z@hrulefill\hbox{\sf\smash{#1}}}\also}
+\def\zedline{\also\omit\@ifnextchar[{\z@@botline}{\z@@botline[]}}
+\def\where{\also \omit \hbox to\zedbar{\z@hrulefill}\cr\also}
+\let \ST    \where
+\def\z@left{\ifz@inbox\vrule width\zedlinethickness\hskip\zedleftsep\fi}
+\def\z@env{\global\z@firstlinetrue\z@changesize
+    $$
+    \z@inenvtrue
+    \baselineskip\zedbaselineskip
+    \parskip=0pt\lineskip=0pt\z@narrow
+    \advance\displayindent by \zedindent
+    \def\\{\crcr}% Must have \def and not \let for nested alignments.
+    \everycr={\noalign{\ifz@firstline \global\z@firstlinefalse
+    \else \penalty\interzedlinepenalty \fi}}
+    \tabskip=0pt}
+\def\endz@env{$$
+ \global\@ignoretrue
+}
+\def\z@format{\halign to\linewidth\bgroup%
+    \zstrut\z@left\z@startline\ignorespaces$\@lign##$\z@stopline\hfil%
+    \tabskip=0pt plus1fil%
+    &\hbox to 0pt{\hss\@lign##}\tabskip=0pt\cr}
+\def\z@boxenv{\z@narrow\let\also=\als@ \let\Also=\Als@ \let\ALSO=\ALS@
+    \z@inboxtrue \predisplaypenalty=\preboxpenalty \z@env\z@format}
+\def\z@outnonbox{\z@outclasscheck\z@leavevmode\z@env}
+\def\z@inoutbox{\z@leavevmode\z@makeouter\z@inclassfalse\z@boxenv}
+\def\@but{\noalign{\nointerlineskip}}
+\def\z@nopar{\global\@endpetrue}
+\def\z@leavevmode{\ifvmode\if@inlabel\indent\else\if@noskipsec\indent\else
+    \if@nobreak\global\@nobreakfalse\everypar={}\fi
+    {\parskip=0pt\noindent}\fi\fi\fi}
+\def\also{\crcr\noalign{\vskip\jot}}
+\def\Also{\crcr\noalign{\vskip2\jot}}
+\def\ALSO{\Also\Also}
+\def\als@{\crcr\@but\omit\vrule height\jot width\zedlinethickness \cr \@but}
+\def\Als@{\crcr\@but\omit\vrule height2\jot width\zedlinethickness \cr \@but}
+\def\ALS@{\crcr\@but\omit\vrule height4\jot width\zedlinethickness \cr \@but}
+\def\znewpage{\also\noalign{\penalty\forcepagepenalty}\also}
+\def\zbreak{\also\noalign{\penalty\interdisplaylinepenalty\vskip-\jot}\also}
+\def\Zbreak{\also\noalign{\penalty\interdisplaylinepenalty}\also}
+\def\ZBREAK{\Also\noalign{\penalty\interdisplaylinepenalty}\Also}
+\def\t#1{\hskip #1\zedtab}
+\def\flushr#1{\crcr&#1\quad\cr}
+\def\z@inclasscheck{\ifz@inclass\else
+    \@latexerr{This Z environment is only allowed within a class}
+{Perhaps you forgot to include a \string\begin\string{class\string}
+somewhere^^Jor you are trying to print a file that needs updating.^^J\@ehc} \fi}
+\def\z@outclasscheck{\ifz@inclass
+    \@latexerr{This Z environment is not allowed inside a class}
+{This environment doesn't really make sense within a class.^^J%
+If you really want it then I'll try my best to fit in in.^^J\@ehc}\else
+\ifz@inenv \@latexerr{New Z environment declared before previous
+one is completed}
+{I suspect that you've forgotten to finish the last environment.^^J%
+You are trying to nest environments and this can only be done inside classes^^J%
+besides, the environment you have started isn't valid within classes any way.^^JI suggest that you type \space X <return> \space to quit and then correct your document.}
+\fi\fi}
+\def\z@makeouter{%
+ \ifz@inenv
+   \ifz@inclass\z@inenvfalse
+    \hskip-\zedleftsep \advance\linewidth by -\zedlinethickness
+    \zedindent=\zedleftsep \zedleftsep=0.8\zedleftsep
+    \zedbar=0.8\zedbar \zedtab=0.8\zedtab
+    \oz@parbox{\linewidth}\bgroup
+    \z@zeroskips
+   \else
+ \@latexerr{Incorrect place for Z environment; nesting is
+  allowed only inside classes}
+   {You've either forgotten to finish the last environment,^^J%
+   you've forgotten to include a
+   \string\begin\string{class\string} somewhere^^J%
+   or you are trying to print a file that needs updating.^^J%
+   (Then again, you might just be trying to do something^^J%
+    that the author of these macros didn't intend you to do)^^J\@ehc}
+   \fi
+ \else
+   \bgroup
+ \fi
+}
+\def \z@makeinner{\egroup
+   \global\z@curindent\z@
+}
+\def \classbreak{\also\egroup$$\vskip -\ht\zstrutbox
+    \vskip -\abovedisplayskip\vskip -\belowdisplayskip\z@wide\z@boxenv\also}
+\def\zed{\z@outnonbox\z@inboxfalse\z@format}
+\def\endzed{\crcr\egroup\endz@env}
+\let\[=\zed
+\def\]{\crcr\egroup$$\ignorespaces}
+\def\argue{\z@outnonbox\interzedlinepenalty=\interdisplaylinepenalty
+    \openup 1\jot \z@format
+    \noalign{\vskip-\jot}}% equal vspace above and below argue display
+\let\endargue=\endzed
+\def\infrule{\z@outnonbox\halign\bgroup
+    \zstrut\quad$\@lign##$\quad\hfil&\quad\@lign##\hfil\cr}
+\let\endinfrule=\endzed
+\def\derive{\crcr\also\@but\omit\z@hrulefill%
+    \@ifnextchar[{\z@sidecondition}{\cr\also\@but}}
+\def\Derive{\crcr\also\@but\omit\z@hrulefill\cr\@but
+    \noalign{\kern-\dp\zstrutbox
+    \kern\doublerulesep \nobreak}%
+\omit\derive}
+\def\z@sidecondition[#1]{&$\smash{\lower 0.2ex\hbox{$[\;#1\;]$}}$\cr\also\@but}
+\def\syntax{\z@outnonbox\halign\bgroup
+    \zstrut$\@lign##$\hfil &\hfil$\@lign{}##{}$\hfil
+    &$\@lign##$\hfil &\qquad\@lign-- ##\hfil\cr}
+\let\endsyntax=\endzed
+\def\schema#1{\z@inoutbox\z@topline{$\,#1\,$}}
+\def\endschema{\z@botline \endzed \z@makeinner \z@nopar}
+\@namedef{anonschema}{\leftnamesfalse\z@inoutbox\z@topline{}}
+\expandafter\let\csname endanonschema\endcsname=\endschema
+\def\genschema#1#2{\z@inoutbox\z@topline{$\,#1\:[#2]\,$}}
+\let\endgenschema=\endschema
+\def\axdef{\z@inoutbox}
+\def\endaxdef{\endzed\z@makeinner}
+\def\uniqdef{\leftnamesfalse\z@inoutbox\z@dbltopline{}}
+\let\enduniqdef=\endschema
+\def\gendef{\@ifnextchar[{\z@gendef}{\z@@gendef}}
+\def\z@gendef[#1]{\leftnamesfalse\z@inoutbox\z@dbltopline{$\,[#1]\,$}}
+\def\z@@gendef#1{\leftnamesfalse\z@inoutbox\z@dbltopline{$\,[#1]\,$}}
+\let\endgendef=\endschema
+\def\gengendef{\@ifnextchar[{\z@gengendef}{\z@@gengendef}}
+\def\z@gengendef[#1]{\leftnamesfalse\z@inoutbox\z@dbltopline{$\,#1\,$}}
+\def\z@@gengendef#1{\leftnamesfalse\z@inoutbox\z@dbltopline{$\,#1\,$}}
+\let\endgengendef=\endschema
+\def\class#1{\z@leavevmode\z@makeouter\z@inclasstrue
+    \z@boxenv\z@topline{$\,#1\,$}}
+\let\endclass\endschema
+\def\op{\z@inclasscheck\schema}
+\let\endop\endschema
+\def\state{\z@inclasscheck\anonschema}
+\let\endstate\endschema
+\def\init{\z@inclasscheck\schema{\Init}}
+\let\endinit\endschema
+\let\const\axdef
+\let\endconst\endaxdef
+\def\type{\z@inclasscheck}
+\let\endtype\relax
+\def\sidebyside{\@ifnextchar[{\z@columns}{\z@columns[2]}}
+\def\z@columns[#1]{\z@leavevmode\z@cols#1 \z@makeouter\z@narrow%
+    $$\lineskip=0pt\z@incolstrue
+    \predisplaysize\maxdimen
+    \ifz@leftmargin\hskip-\zedindent\z@leftmarginfalse\fi
+    \setbox0=\hbox to \linewidth\bgroup\z@zeroskips%
+    \divide\zedbar by \z@cols \divide\zedleftsep by \z@cols
+    \divide\zedtab by \z@cols \divide\linewidth by \z@cols
+   \oz@parbox[t]{\linewidth}\bgroup\z@wide}
+\def\nextside{\egroup\hss\oz@parbox[t]{\linewidth}\bgroup\z@wide}
+\newdimen\z@temp
+\def\endsidebyside{\egroup\egroup
+    \z@temp\ht0 \advance\z@temp by \dp0\advance\z@temp by-\dp\zstrutbox
+    \hbox{\raise\z@temp\box0}\endz@env\z@makeinner\z@nopar}
+\def\zpar{\z@leavevmode
+    \ifz@inenv\z@inclasstrue\fi% fudge to let zpar in all boxes
+    \z@makeouter\z@changesize
+    \advance\linewidth by -\z@curindent
+    \advance\linewidth by -\wd\z@curline
+    \hskip-\wd\z@curline\advance\linewidth by -\zedindent$$
+    \ifz@leftmargin\hskip-\zedindent\fi% adjustment for first column
+    \advance\displayindent by \zedindent
+    \advance\displaywidth by -\zedindent
+    \advance\displayindent by \z@curindent
+    \advance\displayindent by \wd\z@curline
+    \advance\displaywidth by -\z@curindent
+    \advance\displaywidth by -\wd\z@curline
+    \global\setbox\z@curline\hbox{}
+    \z@narrow\oz@parbox[b]{\linewidth}\bgroup\hfil\break}
+\def\endzpar{\egroup$$\z@makeinner\z@nopar}
+\def \classcom{\zpar\sf}
+\let \endclasscom=\endzpar
+\def\proof{\zpar$\PR$\zpar}
+\def\endproof{\endzpar\endzpar}
+\def\zseq#1{\lseq #1 \rseq}
+\def\zset#1{\{ #1 \}}
+\def\zimg#1{\limg #1 \rimg}
+\def\zsch#1{\lsch #1 \rsch}
+\def\zimgset#1{\zimg\zset{#1}}
+\def\fuzzcompatible{%
+\let\defs\sdef
+\let\empty\emptyset
+}
+\endinput
+%%
+%% End of file `oz.sty'.

+ 472 - 0
paper/paralist.sty

@@ -0,0 +1,472 @@
+%%
+%% This is file `paralist.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% paralist.dtx  (with options: `package')
+%% 
+%% Copyright 1998-2002 Bernd Schandl
+%% email schandl@gmx.net
+%% www   http://schandl.gmxhome.de/paralist
+%% 
+%% This file can be redistributed and/or modified under the terms
+%% of the LaTeX Project Public License distributed from CTAN
+%% archives in the directory macros/latex/base/lppl.txt; either
+%% version 1 of the license, or (at your option) any later version.
+%% 
+%% \CharacterTable
+%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+%%   Digits        \0\1\2\3\4\5\6\7\8\9
+%%   Exclamation   \!     Double quote  \"     Hash (number) \#
+%%   Dollar        \$     Percent       \%     Ampersand     \&
+%%   Acute accent  \'     Left paren    \(     Right paren   \)
+%%   Asterisk      \*     Plus          \+     Comma         \,
+%%   Minus         \-     Point         \.     Solidus       \/
+%%   Colon         \:     Semicolon     \;     Less than     \<
+%%   Equals        \=     Greater than  \>     Question mark \?
+%%   Commercial at \@     Left bracket  \[     Backslash     \\
+%%   Right bracket \]     Circumflex    \^     Underscore    \_
+%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
+%%   Right brace   \}     Tilde         \~}
+%%
+\ProvidesPackage{paralist}%
+          [2002/03/18 v2.3b Extended list environments (BS)]
+\NeedsTeXFormat{LaTeX2e}
+\newif\if@plnewitem\@plnewitemtrue
+\newif\if@plnewenum\@plnewenumtrue
+\newif\if@plalwaysadjust\@plalwaysadjustfalse
+\newif\if@plneveradjust\@plneveradjustfalse
+\newif\if@plneverdecrease\@plneverdecreasefalse
+\newif\if@pldefblank\@pldefblankfalse
+\newif\if@plpointedenum\@plpointedenumfalse
+\newif\if@plpointlessenum\@plpointlessenumfalse
+\newif\if@plflushright\@plflushrighttrue
+\newif\if@plloadcfg\@plloadcfgtrue
+\DeclareOption{newitem}{\@plnewitemtrue}
+\DeclareOption{olditem}{\@plnewitemfalse}
+\DeclareOption{newenum}{\@plnewenumtrue}
+\DeclareOption{oldenum}{\@plnewenumfalse}
+\DeclareOption{alwaysadjust}{\@plalwaysadjusttrue}
+\DeclareOption{neveradjust}{\@plneveradjusttrue}
+\DeclareOption{neverdecrease}{\@plneverdecreasetrue}
+\DeclareOption{increaseonly}{\@plneverdecreasetrue
+  \PackageWarningNoLine{Paralist}{Option increaseonly deprecated.
+    \MessageBreak Use option neverdecrease instead}}
+\DeclareOption{defblank}{\@pldefblanktrue}
+\DeclareOption{pointedenum}{\@plpointedenumtrue}
+\DeclareOption{pointlessenum}{\@plpointlessenumtrue}
+\DeclareOption{cfg}{\@plloadcfgtrue}
+\DeclareOption{nocfg}{\@plloadcfgfalse}
+\DeclareOption{flushright}{\@plflushrighttrue}
+\DeclareOption{flushleft}{\@plflushrightfalse}
+\ExecuteOptions{newitem,newenum,cfg,flushright}
+\ProcessOptions\relax
+\if@plalwaysadjust\@plneveradjustfalse\fi
+\newlength{\pltopsep}
+\newlength{\plpartopsep}
+\newlength{\plitemsep}
+\newlength{\plparsep}
+\setlength{\pltopsep}{0pt}
+\setlength{\plpartopsep}{0pt}
+\setlength{\plitemsep}{0pt}
+\setlength{\plparsep}{0pt}
+\def\if@empty#1#2#3{%
+  \def\@tempa{#1}%
+  \ifx\@tempa\@empty#2\else#3\fi}
+\def\pl@item[#1]{%
+  \if@noitemarg
+    \@noitemargfalse
+    \if@nmbrlist
+      \refstepcounter{\@listctr}%
+    \fi
+  \fi
+  \settowidth{\@tempdima}{#1}%
+  \ifdim\@tempdima>\z@\makelabel{{#1}}\nobreakspace\fi
+  \ignorespaces
+  }
+\def\paradescriptionlabel#1{{\normalfont\bfseries #1}}
+\if@plflushright
+  \def\enumlabel#1{\hss#1}
+\else
+  \def\enumlabel#1{#1\hfil}
+\fi
+\if@plflushright
+  \def\itemlabel#1{\hss#1}
+\else
+  \def\itemlabel#1{#1\hfil}
+\fi
+\newif\if@plmylabel\@plmylabelfalse
+\newif\if@pldoadjust\@pldoadjustfalse
+\def\@adjust@enum@labelwidth{%
+  \if@plneveradjust\else
+    \if@plalwaysadjust\@pldoadjusttrue\else
+      \if@plmylabel\@pldoadjusttrue\fi
+    \fi
+  \fi
+  \if@pldoadjust
+    \csname c@\@enumctr\endcsname7
+    \settowidth{\@tempdima}{%
+      \csname label\@enumctr\endcsname\hspace{\labelsep}}%
+    \advance\@listdepth by 1\relax
+    \if@plneverdecrease
+      \ifdim\@tempdima >
+        \csname leftmargin\romannumeral\@listdepth\endcsname
+          \csname leftmargin\romannumeral\@listdepth\endcsname
+            \@tempdima
+      \fi
+    \else
+      \csname leftmargin\romannumeral\@listdepth\endcsname
+        \@tempdima
+    \fi
+    \advance\@listdepth by -1\relax
+  \fi
+  \@pldoadjustfalse
+  \@plmylabelfalse}
+\def\@adjust@item@labelwidth{%
+  \if@plneveradjust\else
+    \if@plalwaysadjust\@pldoadjusttrue\else
+      \if@plmylabel\@pldoadjusttrue\fi
+    \fi
+  \fi
+  \if@pldoadjust
+    \settowidth{\@tempdima}{%
+      \csname\@itemitem\endcsname\hspace{\labelsep}}%
+    \advance\@listdepth by 1\relax
+    \if@plneverdecrease
+      \ifdim\@tempdima >
+        \csname leftmargin\romannumeral\@listdepth\endcsname
+          \csname leftmargin\romannumeral\@listdepth\endcsname
+            \@tempdima
+      \fi
+    \else
+      \csname leftmargin\romannumeral\@listdepth\endcsname
+        \@tempdima
+    \fi
+    \advance\@listdepth by -1\relax
+  \fi
+  \@pldoadjustfalse
+  \@plmylabelfalse}
+\newtoks\pl@lab
+\def\pl@qmark{?}
+\def\pl@label#1#2{%
+  \edef\pl@the{\noexpand#1{\@enumctr}}%
+  \pl@lab\expandafter{\the\pl@lab\csname the\@enumctr\endcsname}%
+  \advance\@tempcnta1
+  \pl@loop}
+\def\pl@space{\afterassignment\pl@sp@ce\let\@tempa= }
+\def\pl@sp@ce{\pl@lab\expandafter{\the\pl@lab\space}\pl@loop}
+\def\pl@group#1{\pl@lab\expandafter{\the\pl@lab{#1}}\pl@loop}
+\def\pl@other#1{\pl@lab\expandafter{\the\pl@lab#1}\pl@loop}
+\def\pl@loop{\futurelet\pl@temp\pl@loop@}
+\def\pl@loop@{%
+  \ifx A\pl@temp         \def\@tempa{\pl@label\Alph  }\else
+  \ifx a\pl@temp         \def\@tempa{\pl@label\alph  }\else
+  \ifx i\pl@temp         \def\@tempa{\pl@label\roman }\else
+  \ifx I\pl@temp         \def\@tempa{\pl@label\Roman }\else
+  \ifx 1\pl@temp         \def\@tempa{\pl@label\arabic}\else
+  \ifx \@sptoken\pl@temp \let\@tempa\pl@space         \else
+  \ifx \bgroup\pl@temp   \let\@tempa\pl@group         \else
+  \ifx \@@@\pl@temp      \let\@tempa\@gobble          \else
+                         \let\@tempa\pl@other
+                         \pl@hook
+                 \fi\fi\fi\fi\fi\fi\fi\fi
+  \@tempa}
+\providecommand\pl@hook{}
+\def\@enumlabel@#1[#2]{%
+  \@plmylabeltrue
+  \@tempcnta0
+  \pl@lab{}%
+  \let\pl@the\pl@qmark
+  \expandafter\pl@loop\@gobble#2\@@@
+  \ifnum\@tempcnta=1\else
+    \PackageWarning{paralist}{Incorrect label; no or multiple
+      counters.\MessageBreak The label is: \@gobble#2}%
+  \fi
+  \expandafter\edef\csname label\@enumctr\endcsname{\the\pl@lab}%
+  \expandafter\let\csname the\@enumctr\endcsname\pl@the
+  #1}
+\def\@itemlabel@#1[#2]{%
+  \@plmylabeltrue
+  \def\pl@itemitem{#2}%
+  \def\@itemitem{pl@itemitem}%
+  #1}
+\def\asparaenum{%
+  \ifnum\@enumdepth>\thr@@
+    \@toodeep
+  \else
+    \advance\@enumdepth\@ne
+    \edef\@enumctr{enum\romannumeral\the\@enumdepth}%
+  \fi
+  \@ifnextchar[{\@enumlabel@{\@asparaenum@}[}{\@asparaenum@}}
+\def\@asparaenum@{%
+  \expandafter\list\csname label\@enumctr\endcsname{%
+    \usecounter{\@enumctr}%
+    \labelwidth\z@
+    \labelsep.5em
+    \leftmargin\z@
+    \parsep\parskip
+    \itemsep\z@
+    \topsep\z@
+    \partopsep\parskip
+    \itemindent\parindent
+    \advance\itemindent\labelsep
+    \def\makelabel##1{##1}}}
+\let\endasparaenum\endlist
+\def\inparaenum{%
+  \ifnum\@enumdepth>\thr@@
+    \@toodeep
+  \else
+    \advance\@enumdepth\@ne
+    \edef\@enumctr{enum\romannumeral\the\@enumdepth}%
+  \fi
+  \@ifnextchar[{\@enumlabel@{\@inparaenum@}[}{\@inparaenum@}}
+\def\@inparaenum@{%
+  \usecounter{\@enumctr}%
+  \def\@itemlabel{\csname label\@enumctr\endcsname}%
+  \let\@item\pl@item
+  \def\makelabel##1{##1}%
+  \ignorespaces}
+\let\endinparaenum\ignorespacesafterend
+\def\compactenum{%
+  \ifnum\@enumdepth>\thr@@
+    \@toodeep
+  \else
+    \advance\@enumdepth\@ne
+    \edef\@enumctr{enum\romannumeral\the\@enumdepth}%
+  \fi
+  \@ifnextchar[{\@enumlabel@{\@compactenum@}[}{\@compactenum@}}
+\def\@compactenum@{%
+  \@adjust@enum@labelwidth
+  \expandafter\list\csname label\@enumctr\endcsname{%
+    \usecounter{\@enumctr}%
+    \parsep\plparsep
+    \itemsep\plitemsep
+    \topsep\pltopsep
+    \partopsep\plpartopsep
+    \labelwidth
+      \csname leftmargin\romannumeral\@listdepth\endcsname
+    \advance\labelwidth-\labelsep
+    \let\makelabel\enumlabel}}
+\let\endcompactenum\endlist
+\if@plnewenum
+  \def\enumerate{%
+    \ifnum \@enumdepth >\thr@@
+      \@toodeep
+    \else
+      \advance\@enumdepth \@ne
+      \edef\@enumctr{enum\romannumeral\the\@enumdepth}%
+    \fi
+    \@ifnextchar[{\@enumlabel@{\@enumerate@}[}{\@enumerate@}}
+  \def\@enumerate@{%
+    \@adjust@enum@labelwidth
+    \expandafter\list\csname label\@enumctr\endcsname{%
+      \usecounter{\@enumctr}%
+      \labelwidth
+        \csname leftmargin\romannumeral\@listdepth\endcsname
+      \advance\labelwidth-\labelsep
+      \let\makelabel\enumlabel}}
+\fi
+\def\asparaitem{%
+  \ifnum\@itemdepth>\thr@@
+    \@toodeep
+  \else
+    \advance\@itemdepth\@ne
+    \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}%
+  \fi
+  \@ifnextchar[{\@itemlabel@{\@asparaitem@}}{\@asparaitem@}}
+\def\@asparaitem@{%
+  \expandafter\list\csname\@itemitem\endcsname{%
+    \labelwidth\z@
+    \labelsep.5em
+    \leftmargin\z@
+    \parsep\parskip
+    \itemsep\z@
+    \topsep\z@
+    \partopsep\parskip
+    \itemindent\parindent
+    \advance\itemindent\labelsep
+    \def\makelabel##1{##1}}}
+\let\endasparaitem\endlist
+\def\inparaitem{%
+  \ifnum\@itemdepth>\thr@@
+    \@toodeep
+  \else
+    \advance\@itemdepth\@ne
+    \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}%
+  \fi
+  \@ifnextchar[{\@itemlabel@{\@inparaitem@}}{\@inparaitem@}}
+\def\@inparaitem@{%
+  \def\@itemlabel{\csname\@itemitem\endcsname}%
+  \let\@item\pl@item
+  \def\makelabel##1{##1}%
+  \ignorespaces}
+\let\endinparaitem\ignorespacesafterend
+\def\compactitem{%
+  \ifnum\@itemdepth>\thr@@
+    \@toodeep
+  \else
+    \advance\@itemdepth\@ne
+    \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}%
+  \fi
+  \@ifnextchar[{\@itemlabel@{\@compactitem@}}{\@compactitem@}}
+\def\@compactitem@{%
+  \@adjust@item@labelwidth
+  \expandafter\list\csname\@itemitem\endcsname{%
+    \parsep\plparsep
+    \itemsep\plitemsep
+    \topsep\pltopsep
+    \partopsep\plpartopsep
+    \labelwidth
+      \csname leftmargin\romannumeral\@listdepth\endcsname
+    \advance\labelwidth-\labelsep
+    \let\makelabel\itemlabel}}
+\let\endcompactitem\endlist
+\if@plnewitem
+  \def\itemize{%
+    \ifnum \@itemdepth >\thr@@
+      \@toodeep
+    \else
+      \advance\@itemdepth\@ne
+      \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}%
+    \fi
+    \@ifnextchar[{\@itemlabel@{\@itemize@}}{\@itemize@}}
+  \def\@itemize@{%
+    \@adjust@item@labelwidth
+    \expandafter\list\csname\@itemitem\endcsname{%
+      \labelwidth
+        \csname leftmargin\romannumeral\@listdepth\endcsname
+      \advance\labelwidth-\labelsep
+      \let\makelabel\itemlabel}}
+\fi
+\def\asparadesc{%
+  \list{}{%
+    \labelwidth\z@
+    \labelsep.5em
+    \leftmargin\z@
+    \parsep\parskip
+    \itemsep\z@
+    \topsep\z@
+    \partopsep\parskip
+    \itemindent\parindent
+    \advance\itemindent\labelsep
+    \let\makelabel\paradescriptionlabel}}
+\let\endasparadesc\endlist
+\def\inparadesc{%
+  \let\@itemlabel\@empty
+  \let\@item\pl@item
+  \let\makelabel\paradescriptionlabel
+  \ignorespaces}
+\let\endinparadesc\ignorespacesafterend
+\def\compactdesc{%
+  \list{}{%
+    \parsep\plparsep
+    \itemsep\plitemsep
+    \topsep\pltopsep
+    \partopsep\plpartopsep
+    \labelwidth\z@
+    \itemindent-\leftmargin
+    \let\makelabel\descriptionlabel}}
+\let\endcompactdesc\endlist
+\if@pldefblank
+  \def\asparablank{%
+    \list{}{%
+      \labelwidth\z@
+      \labelsep\z@
+      \leftmargin\z@
+      \parsep\parskip
+      \itemsep\z@
+      \topsep\z@
+      \partopsep\parskip
+      \itemindent\parindent
+      \advance\itemindent\labelsep
+      \def\makelabel##1{##1}}}
+  \let\endasparablank\endlist
+  \def\inparablank{%
+    \let\@itemlabel\@empty
+    \let\@item\pl@item
+    \ignorespaces}
+  \let\endinparablank\ignorespacesafterend
+\fi
+\def\setdefaultitem#1#2#3#4{%
+  \if@empty{#1}{}{\def\labelitemi{#1}}%
+  \if@empty{#2}{}{\def\labelitemii{#2}}%
+  \if@empty{#3}{}{\def\labelitemiii{#3}}%
+  \if@empty{#4}{}{\def\labelitemiv{#4}}}
+\def\defaultitem{%
+  \PackageWarning{Paralist}{Macro \protect\defaultitem\space
+    deprecated. \MessageBreak Use macro \protect\setdefaultitem
+    \space instead!! \MessageBreak Used}
+  \setdefaultitem}
+\newif\if@pltemp
+\def\setdefaultenum#1#2#3#4{%
+  \if@plneveradjust\@pltemptrue\else\@pltempfalse\fi
+  \@plneveradjusttrue
+  \if@empty{#1}{}{%
+    \def\@enumctr{enumi}%
+    \@enumlabel@{\relax}[[#1]}%
+  \if@empty{#2}{}{%
+    \def\@enumctr{enumii}%
+    \@enumlabel@{\relax}[[#2]}%
+  \if@empty{#3}{}{%
+    \def\@enumctr{enumiii}%
+    \@enumlabel@{\relax}[[#3]}%
+  \if@empty{#4}{}{%
+    \def\@enumctr{enumiv}%
+    \@enumlabel@{\relax}[[#4]}%
+  \if@pltemp\@plneveradjusttrue\else\@plneveradjustfalse\fi
+  \@plmylabelfalse
+  \relax}
+\def\defaultenum{%
+  \PackageWarning{Paralist}{Macro \protect\defaultenum\space
+    deprecated. \MessageBreak Use macro \protect\setdefaultenum
+    \space instead!! \MessageBreak Used}
+  \setdefaultitem}
+\def\setdefaultleftmargin#1#2#3#4#5#6{%
+  \if@empty{#1}{}{\leftmargini#1}%
+  \if@empty{#2}{}{\leftmarginii#2}%
+  \if@empty{#3}{}{\leftmarginiii#3}%
+  \if@empty{#4}{}{\leftmarginiv#4}%
+  \if@empty{#5}{}{\leftmarginv#5}%
+  \if@empty{#6}{}{\leftmarginvi#6}%
+  \relax}
+\def\defaultleftmargin#1#2#3#4{%
+  \setdefaultleftmargin{#1}{#2}{#3}{#4}{}{}%
+  \PackageWarning{Paralist}{Macro \protect\defaultleftmargin
+    \space deprecated. \MessageBreak Use macro
+    \protect\setdefaultleftmargin\space instead!!
+    \MessageBreak But note that it has six arguments!
+    \MessageBreak Used}}
+\def\pl@pointxxxenum{%
+  \def\theenumi{\arabic{enumi}}%
+  \def\theenumii{\theenumi.\arabic{enumii}}%
+  \def\theenumiii{\theenumii.\arabic{enumiii}}%
+  \def\theenumiv{\theenumiii.\arabic{enumiv}}%
+  \def\p@enumi{}%
+  \def\p@enumii{}%
+  \def\p@enumiii{}%
+  \def\p@enumiv{}}
+\def\pl@pointedenum{%
+  \def\labelenumi{\theenumi.}%
+  \def\labelenumii{\theenumii.}%
+  \def\labelenumiii{\theenumiii.}%
+  \def\labelenumiv{\theenumiv.}}
+\def\pl@pointlessenum{%
+  \def\labelenumi{\theenumi}%
+  \def\labelenumii{\theenumii}%
+  \def\labelenumiii{\theenumiii}%
+  \def\labelenumiv{\theenumiv}}
+\def\pointedenum{\pl@pointxxxenum\pl@pointedenum}
+\def\pointlessenum{\pl@pointxxxenum\pl@pointlessenum}
+\if@plpointedenum\pointedenum\fi
+\if@plpointlessenum\pointlessenum\fi
+\if@plloadcfg
+  \InputIfFileExists{paralist.cfg}{%
+    \PackageInfo{Paralist}{%
+      Using the configuration file paralist.cfg}}{}
+\fi
+
+\endinput
+%%
+%% End of file `paralist.sty'.

+ 747 - 0
paper/picinpar.sty

@@ -0,0 +1,747 @@
+% This is picinpar.sty
+% Macros for making windows with LaTeX
+%
+% By Friedhelm Sowa, Heinrich-Heine-University D\"usseldorf,
+%                    Computing Center
+%                    In case of emergency try to get the email adress
+%                    after having checked the input :-)
+%                    Okay, for those who are too lazy:
+%                          tex@ze8.rz.uni-duesseldorf.de
+%                          sowa@convex.rz.uni-duesseldorf.de
+%
+% Incorporated are basic ideas of Alan Hoenig (Thanks Alan!)
+% Thanks to Phil Taylor, who gave some useful hints during his
+% tutorial at the EURO TeX 92 in Prague.
+%
+% Also thanks to Ulrik Vieth, who incorporated the macros for
+% generating captions within the windows.
+%
+%----------------
+% Known problems:
+%
+%    - Don't use \samepage
+%    - Use \footnotemark within and \footnotetext outside the
+%      window-environment instead of \footnote
+%    - When using the epic-package load picinpar before epic
+%      like \documentstyle[...,picinpar,epic]{...}
+%----------------
+%
+%                       Here we go
+%
+% Counts
+\newcount\br     \newcount\bl
+\newcount\na     \newcount\nb  \newcount\tcdsav
+\newcount\tcl    \newcount\tcd \newcount\tcn
+\newcount\cumtcl \newcount\cumpartcl
+% Dimens
+\newdimen\lftside   \newdimen\rtside
+\newdimen\hpic      \newdimen\vpic
+\newdimen\strutilg  \newdimen\picwd
+\newdimen\topheight \newdimen\ilg
+\newdimen\lpic      \newdimen\cumpar
+% Tokens
+\newtoks\twa \newtoks\la \newtoks\ra
+\newtoks\ha  \newtoks\pictoc
+% Boxes
+\newbox\rawtext   \newbox\holder
+\newbox\windowbox \newbox\wartext
+\newbox\finaltext \newbox\aslice    \newbox\bslice
+\newbox\wbox      \newbox\wstrutbox \newbox\picbox
+\newbox\waslice   \newbox\wbslice   \newbox\fslice
+% Another strut
+\def\wstrut{\relax\ifmmode\copy\wstrutbox\else\unhcopy\wstrutbox\fi}
+%
+\long\def\window[#1,#2,#3,#4] {%
+% #1 is an integer---no.  of lines down from par top
+% #2 is l, r or c what means left, right or centered
+%    default is, that the picture is printed at the left side
+% #3 is the material for setting a graphic box
+% #4 is the explanation for the graphic
+\vskip\parskip
+\global\cumpar=0pt
+\global\cumpartcl=0
+\global\cumtcl=0
+    \tcd=#1
+    \lftside=0pt \rtside=0pt
+%    \hpic=\linewidth
+    \twa={} \la={} \ra={} \ha={}
+\setbox\wbox=\hbox{(}
+\computeilg
+\pictoc={#3}
+\setbox\windowbox=\vbox{\hbox{#3}}
+\setbox\wbox=\vbox{\hbox{\noindent#4}}
+\picwd=\wd\windowbox
+\hpic=\picwd
+\vpic=\ht\windowbox\advance\vpic\dp\windowbox
+\if #2c\lftside=\linewidth\advance\lftside-\picwd\rtside=0.5\lftside
+       \lftside=\rtside
+\else \if #2r\lftside=\linewidth\advance\lftside-\picwd
+              \rtside=0pt
+      \else\rtside=\linewidth\advance\rtside-\picwd
+           \lftside=0pt
+      \fi
+\fi
+%
+% In case of a centered picture, that does not allow text beside
+% we have to add some glue between preceding text, window and
+% following text.
+%
+\if #2c
+ \ifdim\rtside<72pt
+  \rtside=0pt\lftside=0pt
+  \setbox\windowbox=\vbox{%
+    \hrule width\picwd height0pt depth0pt
+    \vskip.5\parskip\box\windowbox\vskip.5\parskip
+    \hrule width\picwd height0pt depth0pt}
+  \vpic=\ht\windowbox\advance\vpic\dp\windowbox
+ \fi
+ \parskip0pt % Within the window area a \parskip>0pt may look ugly
+\fi
+\ifnum\picwd=0\setbox\picbox=\vbox{\hbox{\noindent#4}}   % without picture
+                               \hpic=\wd\picbox % calculate dimensions
+              \ifnum\lftside=0\rtside=\linewidth\advance\rtside-\hpic
+              \else\ifnum\rtside=0\lftside=\linewidth\advance\lftside-\hpic
+              \else\rtside=0.5\linewidth\advance\rtside-0.5\hpic
+                   \lftside=\rtside
+              \fi\fi
+\else\setbox\picbox=\vbox{\hsize=\hpic\vbox to\vpic{\box\windowbox\vfill}%
+\ifdim\ht\wbox>0pt\vskip\ilg\vbox{\hsize=\hpic\noindent#4
+%
+% See above, this is the second part of glue
+%
+\if #2c
+ \ifdim\rtside=0pt \ifdim\lftside=0pt
+ \vskip\parskip\hrule width\hpic height0pt depth0pt
+ \fi \fi
+\fi
+}
+\fi}\fi
+\vpic=\ht\picbox\advance\vpic\dp\picbox
+\ifdim\lftside>0pt\advance\lftside-0.5\baselineskip\fi  % put in a distance
+\ifdim\rtside>0pt\advance\rtside-0.5\baselineskip\fi    % between text and
+                                                        % window
+\global\br=\rtside \global\bl=\lftside
+\ifnum\picwd=0
+\ifdim\vpic>0pt\picwd=\hpic
+\else\vpic=\ht\picbox\advance\vpic\dp\picbox
+\fi
+\fi
+    \global\tcl=0 \lpic=0pt
+    \loop\global\advance\tcl by 1 \lpic=\tcl\baselineskip
+    \ifdim\lpic<\vpic\repeat
+    \vpic=\lpic
+    \global\cumtcl=\tcl
+%
+% Here we know exactly the number of indented lines and
+% are able to generate the tokens for the \parshape list
+%
+    \ifnum\bl>0\la={ 0pt \lftside}\fi
+    \ifnum\br>0\ra={ 0pt \rtside}\fi
+    \ifnum\tcd>0\ha={ 0pt \linewidth}\fi
+    \ifnum\tcl<1\global\tcl=1\fi
+    \createparshapespec
+    \tcd=#1                        % restore the lintel
+    \global\tcdsav=#1
+%
+% This is a very tricky part of the package. Some day there
+% will exist a detailed documentation.
+%
+\ifdim\parskip>0pt
+    \def\par{\hfill\vadjust{\vskip0pt\vbox to\parskip{\vss}}
+             \global\advance\cumpartcl by 1
+             \global\advance\cumpar by \parskip
+             \global\lpic=\ht\wstrutbox
+             \global\advance\lpic by \dp\wstrutbox
+             \ifdim\cumpar<\lpic
+             \else\advance\cumpar by -\lpic
+                  \advance\cumtcl by -1
+             \fi
+             \egroup\global\tcd=\tcdsav
+             \setbox\wartext=\vbox{\unvbox\rawtext}
+\setbox\rawtext=\vbox\bgroup
+\clubpenalty=0\widowpenalty=0
+\tolerance=1000
+\global\lpic=\ht\wstrutbox
+\global\advance\lpic by \dp\wstrutbox
+%
+% Pick up header lines
+%
+\ifnum\tcd>0\vbadness=10000\splittopskip0pt
+ \loop\setbox\holder=\vsplit\wartext to \lpic
+  \hpic=\wd\holder\prune\holder\hpic
+  \ifdim\ht\holder=\parskip
+   \hbox{\vrule height\parskip width0pt depth0pt}
+   \typeout{A paragraph ended within headlines! Please change }
+   \typeout{the number of headlines for the window environment!}
+   \global\advance\tcd by -1
+  \else\hbox{\vbox{\box\holder\unskip}}
+   \global\advance\tcd by -1
+  \fi
+ \ifnum\tcd>0\repeat
+ \global\tcd=0
+ \ifdim\ht\wartext>0pt
+ \ifdim\ht\wartext=\parskip\global\advance\tcdsav by 1
+       \setbox\holder=\vsplit\wartext to \lpic
+       \hbox{\vrule height\parskip width0pt depth0pt}
+       \global\advance\cumpar by -\parskip
+       \global\advance\cumpartcl by -1
+ \fi\fi
+\fi
+%
+% Pick up lines beside window, the rest too
+%
+\global\tcn=0
+\topheight=0pt
+\ifdim\ht\wartext>0pt\vbadness=10000\splittopskip0pt
+ \loop\setbox\holder=\vsplit\wartext to \lpic
+  \hpic=\wd\holder\prune\holder\hpic
+  \ifdim\ht\holder=\parskip
+  \hbox{\vrule height\parskip width0pt depth0pt}
+  \global\advance\topheight by \parskip
+  \else
+   \setbox\fslice=\hbox{\box\holder}
+    \hpic=\ht\fslice
+    \advance\hpic by\dp\fslice
+   \ifdim\hpic>\lpic
+   \global\advance\topheight by\hpic
+   \hbox{\vbox{\box\fslice\vss}}
+   \else\ifdim\hpic=0pt\relax
+   \else\global\advance\topheight by \lpic
+   \hbox{\vbox{\box\fslice}}\fi\fi
+  \fi
+ \ifdim\ht\wartext>0pt\repeat
+\tcn=0
+\loop\advance\tcn by 1
+\advance\topheight by -\lpic
+\ifdim\topheight>0pt\repeat
+\hpic=\topheight
+\ifdim\hpic<0pt\advance\tcn by -1\fi
+\global\topheight=\tcn\lpic
+\fi
+%
+% If the indented part is not completed we have to generate a
+% new token for the \parshape list
+%
+\ifnum\tcn<\cumtcl
+\global\tcl=\cumtcl
+\global\advance\topheight by\cumpartcl\parskip
+             \global\advance\tcl by -\tcn \global\twa={}
+             \ifnum\tcl>0
+\global\vpic=\topheight
+\global\topheight=\tcl\lpic
+\global\advance\vpic by \topheight
+\global\advance\vpic by \lpic
+             \createparshapespec
+             \parshape=\tcn \the\twa
+             \else\parshape=0
+             \fi
+\else\parshape=0\fi}
+\else\def\par{\\}
+\fi % new definition of \par in case of \parskip>0 ends here
+%
+% This is where we start to pick up the paragraph(s)
+%
+    \setbox\rawtext=\vbox\bgroup\unvbox\rawtext\unskip
+    \clubpenalty=0\widowpenalty=0
+    \tolerance=1000
+    \parshape=\tcn \the\twa }
+%
+\def\endwindow{%
+    \global\tcd=\tcdsav
+    \egroup\vskip\parskip\parshape=0 % reset parshape; end \box\rawtext
+    \vbadness=10000
+    \splittopskip=0pt
+%
+% Typeset the lines above the window
+%
+\ifnum\tcd>0\setbox\holder=\vsplit\rawtext to \tcd\baselineskip
+\tcn=\tcd
+\loop\advance\tcn -1
+\setbox\fslice=\vsplit\holder to\baselineskip
+\prune\fslice\linewidth
+\topheight=0pt
+\ifnum\dp\fslice>\dp\wstrutbox
+       \advance\topheight-\dp\fslice
+       \advance\topheight\dp\wstrutbox
+       \advance\topheight\ilg\fi
+\hbox to\linewidth{\box\fslice}
+\vskip-\topheight
+\ifdim\ht\holder>0pt\repeat
+\fi
+%
+% Now we build the boxes beside the window
+%
+\global\topheight=\tcl\baselineskip
+\ifnum\cumpartcl>0\global\tcl=\cumtcl
+      \global\topheight=\vpic
+\fi
+\ifnum\bl>0\ifnum\br>0\multiply\topheight by 2\fi\fi
+\ifnum\bl>0\setbox\holder=\vsplit\rawtext to\topheight
+\else\ifnum\br>0\setbox\holder=\vsplit\rawtext to\topheight\fi\fi
+\tcn=\tcl \na=0 \nb=0
+\ifnum\bl>0\ifnum\br>0\multiply\tcn by 2\fi\fi
+\ifnum\bl>0\na=\tcn\ifnum\br>0\divide\na by 2\fi\fi
+\ifnum\br>0\nb=\tcn\ifnum\bl>0\divide\nb by 2\fi\fi
+\ifnum\na=0\ifnum\nb=0
+      \setbox\waslice=\vbox to\vpic{\vss}
+      \setbox\wbslice=\vbox to\vpic{\vss}
+      \bl=1\br=1
+      \vskip\ilg
+\fi\fi
+%
+% both sides
+%
+\ifnum\na>0 \ifnum\nb>0
+\loop\advance\nb -1
+\advance\na -1
+\setbox\aslice=\vsplit\holder to\baselineskip
+\prune\aslice\lftside
+\setbox\waslice=\vbox{\unvbox\waslice\hbox
+to\lftside{\box\aslice\hfil}}
+\setbox\bslice=\vsplit\holder to\baselineskip
+\prune\bslice\rtside
+\setbox\wbslice=\vbox{\unvbox\wbslice\hbox
+to\rtside{\box\bslice\hfil}}
+\ifnum\nb>0\repeat
+\fi\fi
+%
+% only text on the left side
+%
+\ifnum\na>0
+    \loop\advance\na -1
+    \setbox\aslice=\vsplit\holder to\baselineskip
+    \prune\aslice\lftside
+    \setbox\waslice=\vbox{\unvbox\waslice\hbox
+    to\lftside{\box\aslice\hfil}}
+    \ifdim\ht\holder>0pt\repeat
+\fi
+%
+% only text on the right side
+%
+\ifnum\nb>0
+    \loop\advance\nb -1
+    \setbox\bslice=\vsplit\holder to\baselineskip
+    \prune\bslice\rtside
+    \setbox\wbslice=\vbox{\unvbox\wbslice\hbox
+    to\rtside{\box\bslice\hfil}}
+    \ifdim\ht\holder>0pt\repeat
+\fi
+%
+% fixing the dimensions of the window part
+%
+\ifnum\bl=0\topheight=\ht\wbslice
+\else\ifnum\br=0\topheight=\ht\waslice
+      \else\ifdim\ht\waslice>\ht\wbslice\topheight=\ht\waslice
+            \else\topheight=\ht\wbslice\fi\fi\fi
+%
+% ship out the window material to the main vertical list
+%
+\setbox\windowbox=\vbox{\hbox to\linewidth{%
+\ifnum\bl>0\box\waslice\hfill\fi%
+\vbox to\topheight{\hrule width\picwd height0pt depth0pt\vskip0pt%
+\vfill\unvbox\picbox%
+\ifnum\picwd>0\vfill\fi%
+\vss}\ifnum\br>0\hfill\box\wbslice\fi}}%
+\unvbox\windowbox%
+\loop
+ \setbox\bslice=\vsplit\rawtext to\baselineskip
+ \prune\bslice\linewidth
+ \setbox\wbslice=\vbox{\hbox to\linewidth{\box\bslice\hfil}}
+ \unvbox\wbslice
+ \ifdim\ht\rawtext>0pt
+\repeat
+}% FINITO
+%
+% What else do we need?
+%
+\def\prune#1#2{
+% take a \vbox containing a single \hbox,
+% \unvbox it, and cancel the \lastskip
+% put in a \hbox of width #2
+ \unvbox#1 \setbox#1=\lastbox % \box#1 now is an \hbox
+ \ifdim\ht#1=\parskip
+ \setbox#1=\hbox to#2{\vrule height\parskip depth0pt width0pt\hfill}
+ \else\ifdim\ht#1=0pt\relax
+ \else\setbox#1=\hbox to#2{\wstrut\unhbox#1\unskip}\fi\fi}
+%
+% Here the token \twa is generated.
+% It's not so difficult as it looks like.
+%
+\def\createparshapespec{%
+\global\tcn=0
+\ifnum\bl>0\global\tcn=\tcl\else\ifnum\br>0\global\tcn=\tcl\fi\fi
+\na=0 \nb=0
+\ifnum\bl>0\ifnum\br>0\multiply\tcn by 2\fi\fi
+\ifnum\bl>0\na=\tcn\ifnum\br>0\divide\na by 2\fi\fi
+\ifnum\br>0\nb=\tcn\ifnum\bl>0\divide\nb by 2\fi\fi
+\global\advance\tcn by\tcd \global\advance\tcn by1
+\ifnum\tcd>0
+\loop\twa=\expandafter{\the\twa\the\ha}\advance\tcd -1
+\ifnum\tcd>0\repeat
+\fi
+\ifnum\bl>0 \ifnum\br>0
+\loop\twa=\expandafter{\the\twa\the\la}\advance\na -1
+\twa=\expandafter{\the\twa\the\ra}\advance\nb -1
+\ifnum\na>0\repeat
+\fi\fi
+\ifnum\na>0
+\loop\twa=\expandafter{\the\twa\the\la}\advance\na -1
+\ifnum\na>0\repeat
+\fi
+\ifnum\nb>0
+\loop\twa=\expandafter{\the\twa\the\ra}\advance\nb -1
+\ifnum\nb>0\repeat
+\fi
+\global\twa=\expandafter{\the\twa 0pt \the\linewidth}}
+%
+\def\computeilg{% compute the interline glue
+ \tcl=0\ilg=0pt\strutilg=0pt
+ \loop\setbox\wbox=\hbox{\char\tcl}
+ \ifdim\ht\wbox>\ilg\ilg=\ht\wbox\fi
+ \ifdim\dp\wbox>\strutilg\strutilg=\dp\wbox\fi
+ \advance\tcl by 1
+ \ifnum\tcl<128\repeat
+ \ht\wbox=\ilg
+ \dp\wbox=\strutilg
+ \strutilg=\ht\wbox %\advance\strutilg by\ilg
+ \ifdim\strutilg>\baselineskip
+  \typeout{character with height greater baselineskip found in font}
+  \typeout{baselineskip changed to 1.5 of that height!}
+  \baselineskip=1.5\strutilg
+ \fi
+ \global\ilg=\baselineskip
+ \global\advance\ilg-\ht\wbox \global\advance\ilg-\dp\wbox
+ \strutilg=\ht\wbox \advance\strutilg by\ilg
+ \setbox\wstrutbox=\hbox{\vrule height\strutilg depth\dp\wbox width0pt}}
+%
+% frames
+%
+\def\framepic#1{\vbox{%
+\hsize\expandafter\wd\csname #1box\endcsname
+\advance\hsize .8pt \hrule%
+\hbox to\hsize%
+{\vrule\hfill\vbox to\expandafter\ht\csname #1box\endcsname{%
+\expandafter\box\csname #1box\endcsname }\hfill\vrule}\hrule\vss}}
+%
+\def\wframepic#1{\vbox{%
+\hsize\expandafter\wd\csname #1box\endcsname
+\advance\hsize 3.8pt\hrule%
+\hbox to\hsize%
+{\vrule\hfill\vbox{\kern1.5pt%
+\expandafter\box\csname #1box\endcsname
+\kern1.5pt}\hfill\vrule}\hrule\vss}}
+%
+% caption
+%
+\def\winstepcounter#1{\global\advance\csname c@#1\endcsname 1
+    {\let\@elt\@stpelt \csname cl@#1\endcsname}}
+
+\def\winrefstepcounter#1{\winstepcounter{#1}\let\@tempa\protect
+\def\protect{\noexpand\protect\noexpand}%
+\edef\@currentlabel{\csname p@#1\endcsname\csname the#1\endcsname}%
+\let\protect\@tempa}
+\long\def\w@dblarg#1{\@ifnextchar[{#1}{\w@xdblarg{#1}}}
+\long\def\w@xdblarg#1#2\par{#1[{#2}]#2\par}
+
+\def\wincaption{\winrefstepcounter\@captype \w@dblarg{\@wincaption\@captype}}
+
+\long\def\@wincaption#1[#2]#3\par{\par\addcontentsline{\csname
+  ext@#1\endcsname}{#1}{\protect\numberline{\csname
+  the#1\endcsname}{\ignorespaces #2}}\begingroup
+    \@parboxrestore
+    \normalsize
+    \@makewincaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par
+  \endgroup}
+
+\long\def\@makewincaption#1#2{%
+   \setbox\@tempboxa\hbox{\footnotesize{\bf #1:\enspace}{#2}}%
+   \ifdim\wd\@tempboxa>\picwd
+      {\footnotesize{\bf #1:\enspace}{#2\par}}
+   \else
+      \hbox to\picwd{\hfil\box\@tempboxa\hfil}
+   \fi}
+
+\long\def\figwindow[#1,#2,#3,#4] {%
+     \advance\c@figure -1
+     \begin{window}[#1,#2,{#3},{\def\@captype{figure}%
+        \wincaption#4\par}] }
+
+\long\def\tabwindow[#1,#2,#3,#4] {%
+     \advance\c@table -1
+     \begin{window}[#1,#2,{#3},{\def\@captype{table}%
+        \wincaption#4\par}] }
+
+\def\endfigwindow{\end{window}}
+\def\endtabwindow{\end{window}}
+\endinput
+%%%
+\documentstyle[german,picinpar]{article}
+\setlength{\parskip}{.66\baselineskip}
+\setlength{\parindent}{0pt}
+\begin{document}
+\section*{Beispiele zu {\tt picinpar.sty}}
+\font\yn=cmss17 scaled \magstep5 %oder sonst was gro"ses (yinit?)
+\begin{verbatim}
+\begin{window}[0,l,{\yn V},{}]
+or einigen Jahren wurde von ...
+... Abschnitts erfolgten automatisch.
+\end{window}
+\end{verbatim}
+
+\begin{window}[0,l,{\yn V},{}]
+or einigen Jahren wurde von Donald E.~Knuth im TUGboat ein kleines
+Problem mit der Bitte um L"osung vorgestellt. Es handelte sich darum,
+in einem Paragraphen ein Fenster zu erzeugen, in das man beliebigen Text
+oder eine Zeichnung hineinsetzen kann. Prompt kamen dann in den folgenden
+Ausgaben L"osungsvorschl"age: Einer von DEK pers"onlich, der andere von
+Alan Hoenig. Der letztgenannte brachte die elegantere L"osung, die keine
+manuellen Korrekturen mehr notwendig machte. Sein Makro verlangte lediglich
+in den Parametern Informationen "uber die Breite und H"ohe der
+freizulassenden Stelle im Paragraphen. Die Einz"uge und der Satz der
+Fragmente des Abschnitts erfolgten automatisch.
+\end{window}
+
+\begin{verbatim}
+\begin{figwindow}[2,r,{
+\unitlength1cm
+\begin{picture}(3,1.4)
+\put(0.7,0.7){\circle*{0.2}}     \put(0.7,0.7){\circle{1.2}}
+\put(0.7,0.7){\vector(0,1){0.6}} \put(2.5,0.7){\circle*{0.5}}
+\end{picture}
+},{Kreise und Pfeile}]
+Was leisten nun diese Macros ...
+... sieht hierbei wie folgt aus:
+\end{figwindow}
+\end{verbatim}
+
+\begin{figwindow}[2,r,{
+\unitlength1cm
+\begin{picture}(3,1.4)
+\put(0.7,0.7){\circle*{0.2}}     \put(0.7,0.7){\circle{1.2}}
+\put(0.7,0.7){\vector(0,1){0.6}} \put(2.5,0.7){\circle*{0.5}}
+\end{picture}
+},{Kreise und Pfeile}]
+Was leisten nun diese Macros? Einen kleinen Eindruck hat man schon
+zu Anfang dieses Artikels bekommen: der erste Buchstabe des Absatzes
+ist in einer anderen Schriftgr"o"se gedruckt und in den Absatz eingepa"st.
+Es mu"s aber nicht unbedingt Text sein, der so einger"uckt wird. Es kann
+ebenso eine \verb?picture?--Umgebung sein, die so in den Absatz eingef"ugt
+wird. Das rechts stehende Beispiel, das aus "'\LaTeX , Eine Einf"uhrung"'
+bekannt sein d"urfte, ist in einer \verb?minipage?--Umgebung gesetzt
+worden. Die Eingabe im Text sieht hierbei wie oben aus.
+\end{figwindow}
+
+\begin{verbatim}
+\begin{tabwindow}[1,r,{
+\begin{tabular}[t]{|r|l|r@{:}l|}
+\hline
+1&HSV&12&0\\
+...
+\end{tabular}
+},{Tabelle}]
+Auch der Satz von Tabellen in ...
+... w"urde sie etwas durchh"angen.
+
+Nachdem die Tastatur gequ"alt ...
+... noch die Nummerierung stimmt.
+\end{tabwindow}
+\end{verbatim}
+
+\begin{tabwindow}[1,r,{
+\begin{tabular}[t]{|r|l|r@{:}l|}
+\hline
+1&HSV&12&0\\
+\hline
+2&MSV&11&1\\
+\hline
+3&VfB&10&2\\
+\hline
+4&SVW&9&3\\
+\hline
+5&1.\ FCK&8&4\\
+\hline
+\end{tabular}
+},{Tabelle}]
+Auch der Satz von Tabellen in ein Fenster ist kein gro"ses Problem.
+Man nimmt einfach eine Tabelle, oder denkt sich auch eine aus.
+Dann wird daf"ur Sorge getragen, da"s sie auch mit der unteren
+Zeile ausgerichtet wird. Ansonsten w"urde sie etwas durchh"angen.
+
+Nachdem die Tastatur gequ"alt und das Hirn zermartert wurde kommt
+dann so etwas heraus, wie es hier rechts zu sehen ist. Sogar die
+Tabellenbezeichnung ist erschienen. Aber wirklich interessant wird's,
+wenn auch bei der n"achsten Tabelle noch die Nummerierung stimmt.
+\end{tabwindow}
+
+\begin{verbatim}
+\begin{tabwindow}[2,l,{
+\begin{tabular}[t]{|r|l|r@{:}l|}
+...
+\end{tabular}
+},{Tabelle}]
+Was wahnsinnig ...
+... sagt's denn?
+\end{tabwindow}
+\end{verbatim}
+
+\begin{tabwindow}[2,l,{
+\begin{tabular}[t]{|r|l|r@{:}l|}
+\hline
+1&HSV&12&0\\
+\hline
+2&MSV&11&1\\
+\hline
+3&VfB&10&2\\
+\hline
+4&SVW&9&3\\
+\hline
+5&1.\ FCK&8&4\\
+\hline
+\end{tabular}
+},{Tabelle}]
+Was wahnsinnig auflockernd wirkt, ist der st"andige Positionswechsel
+von Abbildungen auf einer Seite. Das Auge wird nicht m"ude bei
+der Erkundung der typographischen Vielfalt, die in gedruckten
+Werken enthalten ist. Aber man sollte sich nichtsdestotrotz doch
+auf die wesentlichen Mitteilungen konzentrieren, die mit derartigen
+Werken vermittelt werden sollen.
+
+Was sind aber nun die essentiellen Informationen? Naja, ein kleines
+{\tt l} und eine {\tt 2} bewirkt ein g"anzlich anderes Erscheinungsbild
+der Realit"at, wie sie mit den Augen eines Fu"sballfans der sechziger
+Jahre gesehen sein k"onnte. Bevor wir es vergessen: Da war doch noch
+die Unsicherheit wegen der Nummerierung von Tabellen. Na also, wer
+sagt's denn?
+\end{tabwindow}
+
+\begin{verbatim}
+\begin{tabwindow}[4,c,{
+\begin{tabular}[t]{|r|l|r@{:}l|r@{:}l|}
+...
+\end{tabular}
+},{Tabelle}]
+\sloppy
+Aber jetzt wird alles auf ...
+... genug der Beispiele.
+\end{tabwindow}
+\end{verbatim}
+
+\begin{tabwindow}[4,c,{
+\begin{tabular}[t]{|r|l|r@{:}l|r@{:}l|}
+\hline
+1&HSV&12&0&14&1\\
+\hline
+2&MSV&11&1&10&4\\
+\hline
+3&VfB&10&2&12&9\\
+\hline
+4&SVW&9&3&11&9\\
+\hline
+5&1.\ FCK&8&4&10&10\\
+\hline
+\end{tabular}
+},{Tabelle}]
+\sloppy
+Aber jetzt wird alles auf die Spitze getrieben. Oder vielmehr
+in die Mitte gesetzt. Ja doch, auch der zentrierte Satz einer Tabelle
+ist ebenfalls kein gro"ses Problem. Ein Problem ist jedoch, wie denn
+der Text gelesen werden soll. Erst die linke Spalte und dann die
+rechte oder einfach von links nach rechts? Oft kann man es nicht
+falsch machen. Das tr"ostet doch ungemein!
+
+Nun noch ein kleiner Hinweis in eigener Sache:
+Beim zentrierten Satz ist es schon besser, wenn der Abstand zwischen
+den Abschnitten auf $0pt$ gesetzt wird oder nur ein Paragraph verwendet
+wird. Der Grund? Die Abst"ande k"onnen unabh"angig vom Zeilenabstand
+sein und so ist ein optisch korrekter Satz der Spalten rechts und
+links vom Fenster etwas m"uhsam {\tt :-)}. Um nichts dem Zufall zu
+"uberlassen wird dies gleich von {\tt picinpar} erledigt.
+\end{tabwindow}
+
+Jetzt noch der Fall, bei dem eine Abbildung zentriert in den Text gesetzt
+werden soll, aber rechts und links so wenig Platz ($<=72pt$) bleibt,
+da"s dort die Probleme mit den Trennungen zu gro"s werden w"urden. Als
+Beispiel wird im Fenster die \TeX{}--Eingabe zu diesem Fall gezeigt. Um
+gleich etwaigen Problemen vorzubeugen, wird zun"achst wie folgt vorgegangen:
+
+{\parskip0pt\topsep0pt
+\begin{verbatim}
+\newbox\pppbox
+\setbox\pppbox=\vbox{\hsize=11cm
+\begin{verbatim}
+\begin{figwindow}[4,c,{\wframepic{ppp}
+},
+{Die Eingabe zu diesem Textteil!}]
+Diese Vorgehensweise ist wegen der Benutzung
+...
+dem Einsatz im Wege.
+\end{figwindow}
+\end{verbatim}
+\verb?\end{verbatim}?
+\begin{verbatim}
+}
+\end{verbatim}
+}
+\newbox\pppbox
+\setbox\pppbox=\vbox{\hsize=11cm
+\begin{verbatim}
+\begin{figwindow}[4,c,{\wframepic{ppp}
+},
+{Die Eingabe zu diesem Textteil!}]
+Diese Vorgehensweise ist wegen der Benutzung
+...
+dem Einsatz im Wege.
+\end{figwindow}
+\end{verbatim}
+}
+\begin{figwindow}[4,c,{\wframepic{ppp}},
+{Die Eingabe zu diesem Textteil!}]
+Diese Vorgehensweise ist wegen der Benutzung von {\tt figwindow} und
+der {\tt verbatim} dargestellten Eingabe notwendig. Aber ist ja auch egal.
+Wichtig ist einfach, da"s festgestellt wird, ob rechts und links vom
+zentrierten Bild noch genug Platz frei ist, um dort Text ohne gro"se
+Probleme zu setzen. Die Wahl von $72pt$ ist mehr oder weniger willk"urlich
+vorgenommen worden. Letztlich h"angt diese Grenze ja auch von der
+verwendeten Sprache ab. Falls also nicht genug Platz an den Seiten
+vorhanden ist, dann wird einfach nach dem Fenster mit dem Text fortgefahren.
+Noch mal schnell ein Blick auf die Nummerierung der Abbildungen...
+Ja, stimmt genau. Jetzt steht also dem Einsatz nichts im Wege.
+\end{figwindow}
+
+\begin{window}[3,r,{\arraycolsep=2.5pt \def\arraystretch{.75}
+$\left(\begin{array}{ccccccccc}%
+	 *&*&*&*&&&&&\\
+        **&*&*&*&*&&&&\\ \cline{3-6}
+	 *&*&\multicolumn{1}{|c}{*}&*&*&\multicolumn{1}{c|}{*}&&&\\
+	 &*&\multicolumn{1}{|c}{*}&*&*&\multicolumn{1}{c|}{*}&*&&\\
+	 &&\multicolumn{1}{|c}{*}&*&*&\multicolumn{1}{c|}{*}&*&*&\\ \cline{3-6}
+	 &&&*&*&*&*&*&*\\
+	 &&&&*&*&*&*&*\\
+	 &&&&&*&*&*&*\\
+	 &&&&&&*&*&*
+	 \end{array}
+   \right)$},{}]
+Doch halt! Es handelt sich hier ja um \TeX{}. Und das ist Grund genug, auch
+noch kurz auf mathematischen Formelsatz einzugehen. Sowohl im Fenster als
+auch im Text neben dem Fenster k"onnen Formeln erscheinen, deren Dimensionen
+beim Satz weitestgehend ber"ucksichtigt werden. Da ist also rechts ein
+{\tt array} und hier folgt eine Formel:
+
+\def\formel#1#2#3#4#5{#1(#4)-#1(#3)=
+\int_{#3}^{#4}\sum_{j=0}^{#5}#2(x_j)
+\prod_{{k=0}\atop{k\not= j}}^{#5}
+{x-x_k\over x_j-x_k}\; dx}
+$\formel Ffabn$
+
+Der zentrierte Satz von Formeln neben dem Text ist bisher mit
+{\tt picinpar.sty} nicht m"oglich, vielleicht kommt es aber eines
+Tages. Und "uberhaupt hat sich gerade der Mathematiksatz als gro"ses
+Problem bei der Entwicklung herausgestellt, da doch viel {\tt glue} in
+den {\tt boxes} verwendet wird. Aber es geht ja doch so halbwegs.
+\end{window}
+\vfill
+\centerline{Friedhelm Sowa, Heinrich--Heine--Universit"at D"usseldorf,
+Universit"atsrechenzentrum}
+\centerline{Email: sowa@convex.rz.uni-duesseldorf.de {\sl oder}
+tex@ze8.rz.uni-duesseldorf.de}
+\end{document}

+ 27 - 0
paper/references.bib

@@ -0,0 +1,27 @@
+%% This BibTeX bibliography file was created using BibDesk.
+%% http://bibdesk.sourceforge.net/
+
+
+%% Created for Quinten Soetens at 2010-04-22 14:05:52 +0200 
+
+
+%% Saved with string encoding Unicode (UTF-8) 
+
+
+@comment{jabref-meta: selector_publisher:}
+@comment{jabref-meta: selector_author:}
+@comment{jabref-meta: selector_journal:}
+@comment{jabref-meta: selector_keywords:}
+
+
+
+@book{Demeyer2008,
+	Annote = {book},
+	Author = {Serge Demeyer and St{\'e}phane Ducasse and Oscar Nierstrasz},
+	Isbn = {978-3-9523341-2-6},
+	Keywords = {olit scg-pub snf-none jb09 skipdoi stefPub moose-pub},
+	Publisher = {Square Bracket Associates},
+	Title = {Object-Oriented Reengineering Patterns},
+	Url = {http://www.iam.unibe.ch/~scg/OORP},
+	Year = {2008},
+	Bdsk-Url-1 = {http://www.iam.unibe.ch/~scg/OORP}}

Разница между файлами не показана из-за своего большого размера
+ 1529 - 0
paper/titlesec.sty


+ 141 - 23
sccd/compiler/DEVS_generator.py

@@ -14,7 +14,6 @@ Platforms = Enum("Threads", "GameLoop", "EventLoop")
 
 
 class DEVSGenerator(Visitor):
-
     def __init__(self, platform):
         self.platform = platform
         self.writer = StatefulWriter()
@@ -61,8 +60,8 @@ class DEVSGenerator(Visitor):
         self.writer.beginConstructor()
         self.writer.beginMethodBody()
 
-        self.writer.addAssignment(GLC.SelfProperty("to_send"),
-                                  f"[(\"{class_diagram.default_class.name}\", 0, \"Start\")]")
+        self.writer.addAssignment(GLC.SelfProperty("to_send"), f"[(None, \"{class_diagram.default_class.name}\", 0, Event(\"start_instance\", None, None))]")
+
         self.writer.endMethodBody()
         self.writer.endConstructor()
         self.writer.endClass()
@@ -91,7 +90,13 @@ class DEVSGenerator(Visitor):
         self.writer.beginMethod("extTransition")
         self.writer.addFormalParameter("inputs")
         self.writer.beginMethodBody()
-        self.writer.add(GLC.ReturnStatement(GLC.SelfProperty("state")))
+
+        self.writer.addAssignment("all_inputs", "inputs[self.input]")
+        self.writer.beginForLoopIterateArray("all_inputs", "input")
+        self.writer.add(GLC.FunctionCall(GLC.SelfProperty("State.to_send.append"), ["input"]))
+        self.writer.endForLoopIterateArray()
+        self.writer.add(GLC.ReturnStatement(GLC.SelfProperty("State")))
+
         self.writer.endMethodBody()
         self.writer.endMethod()
 
@@ -107,8 +112,8 @@ class DEVSGenerator(Visitor):
         self.writer.beginMethodBody()
         self.writer.addAssignment("out_dict", "{}")
 
-        self.writer.beginForLoopIterateArray(GLC.SelfProperty("State.to_send"), "(target, id, message)")
-        self.writer.addAssignment(f"out_dict[self.output[target]]", "[(message, id)]")
+        self.writer.beginForLoopIterateArray(GLC.SelfProperty("State.to_send"), "(source, target, id, message)")
+        self.writer.addAssignment(f"out_dict[self.output[target]]", "[(source, target, id, message)]")
         self.writer.endForLoopIterateArray()
 
         self.writer.add(GLC.ReturnStatement("out_dict"))
@@ -198,15 +203,22 @@ class DEVSGenerator(Visitor):
         if not class_node.super_class_objs:
             if class_node.statechart:
                 super_classes.append("AtomicDEVS")
+                super_classes.append("ObjectManagerBase")
         if class_node.super_classes:
             for super_class in class_node.super_classes:
                 super_classes.append(super_class)
 
         self.writer.beginClass(f"{class_node.name}Instance", ["RuntimeClassBase"])
         self.writer.beginConstructor()
+        self.writer.addFormalParameter("atomdevs")
+
+        for p in class_node.constructors[0].getParams():
+            self.writer.addFormalParameter(p.getIdent(), p.getDefault())
+
         self.writer.beginMethodBody()
 
         self.writer.beginSuperClassConstructorCall("RuntimeClassBase")
+        self.writer.addActualParameter("atomdevs")
         self.writer.endSuperClassConstructorCall()
 
         self.writer.addAssignment(GLC.SelfProperty("associations"), "{}")
@@ -347,43 +359,145 @@ class DEVSGenerator(Visitor):
         self.writer.addFormalParameter("inputs")
         self.writer.beginMethodBody()
 
-        self.writer.addAssignment("all_inputs", "inputs[self.obj_manager_in]")
+        self.writer.addAssignment(GLC.SelfProperty("simulated_time"), GLC.AdditionExpression(GLC.SelfProperty("simulated_time"), GLC.SelfProperty("elapsed")))
+        self.writer.addAssignment("all_inputs", "[]")
 
-        self.writer.beginForLoopIterateArray("all_inputs", "input")
-        self.writer.beginIf(GLC.EqualsExpression("input[0]", GLC.String("Initialize")))
+        temp_list = class_node.inports
+        temp_list.extend(["obj_manager_in", "input"])
+        for inport in temp_list:
+            self.writer.beginIf(GLC.ArrayContains("inputs", GLC.SelfProperty(inport)))
+            self.writer.add(GLC.FunctionCall("all_inputs.extend", [f"inputs[self.{inport}]"]))
+            self.writer.endIf()
 
-        self.writer.add(GLC.FunctionCall("self.State.append", [GLC.FunctionCall(f"{class_node.name}Instance")]))
+        self.writer.beginForLoopIterateArray("all_inputs", "input")
+       
+        self.writer.beginIf(GLC.FunctionCall("isinstance", ["input", "str"]))
+        self.writer.addAssignment("tem", GLC.FunctionCall("eval", ["input"]))
+        self.writer.add(GLC.FunctionCall(GLC.SelfProperty("addInput"), ["tem"]))
         self.writer.endIf()
-        self.writer.beginElseIf(GLC.EqualsExpression("input[0]", GLC.String("Start")))
-        self.writer.add(GLC.FunctionCall(GLC.SelfProperty("State[input[1]].start")))
+
+        self.writer.beginElseIf(GLC.EqualsExpression("input[3].name", GLC.String("create_instance")))
+        self.writer.add(GLC.FunctionCall(GLC.SelfProperty("instances.add"), [GLC.FunctionCall(f"{class_node.name}Instance", ["self"])]))
+        self.writer.addAssignment("ev", GLC.FunctionCall("Event", ["\"instance_created\"", "None", "parameters=[f\"{input[0]}[{len(self.instances)-1}]\"]"]))
+        self.writer.add(GLC.FunctionCall(GLC.SelfProperty("to_send.append"), [f"(\"{class_node.name}\", TODO, input[2], ev)"]))
         self.writer.endElseIf()
-        self.writer.beginElseIf(GLC.EqualsExpression("input[0]", GLC.String("Delete")))
+
+        self.writer.beginElseIf(GLC.EqualsExpression("input[3].name", GLC.String("start_instance")))
+        # TODO: quick fix, self.instances should not be a set because need to acces at index
+        self.writer.addAssignment("instance", "list(self.instances)[input[2]]")
+        self.writer.add(GLC.FunctionCall("instance.start"))
+
+        self.writer.addAssignment("ev", GLC.FunctionCall("Event", ["\"instance_started\"", "None", "parameters=[TODO]"]))
+        self.writer.add(GLC.FunctionCall(GLC.SelfProperty("to_send.append"), ["(input[0], input[1], input[2], ev)"]))
         self.writer.endElseIf()
-        self.writer.beginElseIf(GLC.EqualsExpression("input[0]", GLC.String("Associate")))
+
+        self.writer.beginElseIf(GLC.EqualsExpression("input[3].name", GLC.String("delete_instance")))
+        self.writer.addAssignment("ev", GLC.FunctionCall("Event", ["\"instance_deleted\"", "None", "parameters=[TODO]"]))
+        self.writer.add(GLC.FunctionCall(GLC.SelfProperty("to_send.append"), ["(TODO, TODO, TODO, ev)"]))
         self.writer.endElseIf()
-        self.writer.beginElseIf(GLC.EqualsExpression("input[0]", GLC.String("Disassociate")))
+
+        self.writer.beginElseIf(GLC.EqualsExpression("input[3].name", GLC.String("associate_instance")))
+        self.writer.addAssignment("ev", GLC.FunctionCall("Event", ["\"instance_associated\"", "None", "parameters=[TODO]"]))
+        self.writer.add(GLC.FunctionCall(GLC.SelfProperty("to_send.append"), ["(TODO, TODO, TODO, ev)"]))
         self.writer.endElseIf()
+
+        self.writer.beginElseIf(GLC.EqualsExpression("input[3].name", GLC.String("disassociate_instance")))
+        self.writer.addAssignment("ev", GLC.FunctionCall("Event", ["\"instance_disassociated\"", "None", "parameters=[TODO]"]))
+        self.writer.add(GLC.FunctionCall(GLC.SelfProperty("to_send.append"), ["(TODO, TODO, TODO, ev)"]))
+        self.writer.endElseIf()
+
+        self.writer.beginElseIf(GLC.EqualsExpression("input[3].name", GLC.String("instance_created")))
+        self.writer.addAssignment("instance", "list(self.instances)[input[2]]")
+        self.writer.add(GLC.FunctionCall("instance.addEvent", ["input[3]"]))
+        self.writer.addAssignment("instance.associations['fields'].instances[0]", "input[3].parameters[0]")
+        self.writer.endElseIf()
+
+        self.writer.beginElseIf(GLC.EqualsExpression("input[3].name", GLC.String("instance_started")))
+        self.writer.addAssignment("instance", "list(self.instances)[input[2]]")
+        self.writer.add(GLC.FunctionCall("instance.addEvent", ["input[3]"]))
+        self.writer.endElseIf()
+
+        self.writer.beginElseIf(GLC.EqualsExpression("input[3].name", GLC.String("instance_deleted")))
+        self.writer.addAssignment("instance", "list(self.instances)[input[2]]")
+        self.writer.add(GLC.FunctionCall("instance.addEvent", ["input[3]"]))
+        self.writer.endElseIf()
+
+        self.writer.beginElseIf(GLC.EqualsExpression("input[3].name", GLC.String("instance_associated")))
+        self.writer.addAssignment("instance", "list(self.instances)[input[2]]")
+        self.writer.add(GLC.FunctionCall("instance.addEvent", ["input[3]"]))
+        self.writer.endElseIf()
+
+        self.writer.beginElseIf(GLC.EqualsExpression("input[3].name", GLC.String("instance_disassociated")))
+        self.writer.addAssignment("instance", "list(self.instances)[input[2]]")
+        self.writer.add(GLC.FunctionCall("instance.addEvent", ["input[3]"]))
+        self.writer.endElseIf()
+
+        self.writer.beginElseIf(GLC.EqualsExpression("input[3].name", GLC.String("set_association_name")))
+        self.writer.addAssignment("ev", "input[3]")
+        self.writer.add(GLC.FunctionCall(GLC.SelfProperty("addInput"), ["ev", "force_internal=True"]))
+        self.writer.endElseIf()
+
+
+
+
+
         self.writer.endForLoopIterateArray()
 
-        self.writer.add(GLC.ReturnStatement(GLC.SelfProperty("state")))
+        self.writer.add(GLC.ReturnStatement(GLC.SelfProperty("instances")))
         self.writer.endMethodBody()
         self.writer.endMethod()
 
         self.writer.beginMethod("intTransition")
         self.writer.beginMethodBody()
-        self.writer.add(GLC.ReturnStatement(GLC.SelfProperty("state")))
+        self.writer.addAssignment(GLC.SelfProperty("to_send"), "[]")
+        self.writer.add(GLC.FunctionCall(GLC.SelfProperty("handleInput")))
+        self.writer.add(GLC.FunctionCall(GLC.SelfProperty("stepAll")))
+        self.writer.add(GLC.ReturnStatement(GLC.SelfProperty("instances")))
         self.writer.endMethodBody()
         self.writer.endMethod()
 
         self.writer.beginMethod("outputFnc")
         self.writer.beginMethodBody()
-        self.writer.add(GLC.ReturnStatement("{}"))
+        self.writer.addAssignment("to_dict", "{}")
+        self.writer.beginForLoopIterateArray(GLC.SelfProperty("to_send"), "sending")
+        self.writer.beginIf(GLC.EqualsExpression("sending[0]", "None"))
+
+        self.writer.beginIf(GLC.ArrayContains("to_dict", "self.obj_manager_out"))
+        self.writer.add(GLC.FunctionCall("to_dict[self.obj_manager_out].append", ["sending"]))
+        self.writer.endIf()
+        self.writer.beginElse()
+        self.writer.addAssignment("to_dict[self.obj_manager_out]", "[sending]")
+        self.writer.endElse()
+        self.writer.endIf()
+        self.writer.beginElse()
+        self.writer.addAssignment("the_port", "None")
+        self.writer.beginForLoopIterateArray(GLC.SelfProperty("OPorts"), "port")
+        self.writer.beginIf(GLC.EqualsExpression("port.name", "sending[0]"))
+        self.writer.addAssignment("the_port", "port")
+        self.writer.endIf()
+        self.writer.endForLoopIterateArray()
+        self.writer.beginIf(GLC.ArrayContains("to_dict", "the_port"))
+        self.writer.add(GLC.FunctionCall("to_dict[the_port].append", ["sending"]))
+        self.writer.endIf()
+        self.writer.beginElse()
+        self.writer.addAssignment("to_dict[the_port]", "[sending]")
+        self.writer.endElse()
+        self.writer.endElse()
+        self.writer.endForLoopIterateArray()
+
+        self.writer.add(GLC.ReturnStatement("to_dict"))
         self.writer.endMethodBody()
         self.writer.endMethod()
 
         self.writer.beginMethod("timeAdvance")
         self.writer.beginMethodBody()
-        self.writer.add(GLC.ReturnStatement("INFINITY"))
+
+        self.writer.beginIf(GLC.NotExpression(GLC.EqualsExpression(GLC.FunctionCall("len", [GLC.SelfProperty("to_send")]), "0")))
+        self.writer.add(GLC.ReturnStatement("0"))
+        self.writer.endIf()
+
+        self.writer.add(GLC.ReturnStatement(GLC.FunctionCall(GLC.SelfProperty("getEarliestEventTime"))))
+
         self.writer.endMethodBody()
         self.writer.endMethod()
 
@@ -399,14 +513,15 @@ class DEVSGenerator(Visitor):
 
         self.writer.beginMethodBody()  # constructor body
 
+
         self.writer.beginSuperClassConstructorCall("AtomicDEVS")
         self.writer.addActualParameter("name")
         self.writer.endSuperClassConstructorCall()
 
-        if constructor.parent_class.name == constructor.parent_class.class_diagram.default_class.name:
-            self.writer.addAssignment(GLC.SelfProperty("State"), f"[{constructor.parent_class.name}Instance()]")
-        else:
-            self.writer.addAssignment(GLC.SelfProperty("State"), "[]")
+        self.writer.beginSuperClassConstructorCall("ObjectManagerBase")
+        self.writer.endSuperClassConstructorCall()
+
+        self.writer.addAssignment(GLC.SelfProperty("elapsed"), "0")
 
         self.writer.addAssignment(GLC.SelfProperty("obj_manager_in"),
                                   GLC.FunctionCall(GLC.SelfProperty("addInPort"), [GLC.String("obj_manager_in")]))
@@ -430,6 +545,9 @@ class DEVSGenerator(Visitor):
                 GLC.MapIndexedExpression(GLC.SelfProperty("outports"), GLC.String(p)),
                 GLC.FunctionCall(GLC.Property("controller", "addOutputPort"), [GLC.String(p), GLC.SelfExpression()]))
 
+        if constructor.parent_class.name == constructor.parent_class.class_diagram.default_class.name:
+            self.writer.add(GLC.FunctionCall(GLC.SelfProperty("instances.add"), [f"{constructor.parent_class.name}Instance(self)"]))
+
         self.writer.endMethodBody()
         self.writer.endConstructor()
 

+ 1 - 0
sccd/compiler/sccdc.py

@@ -17,6 +17,7 @@ from sccd.compiler.javascript_writer import JavascriptWriter
 from sccd.compiler.python_writer import PythonWriter
 
 def generate(input_file, output_file, target_language, platform):
+	#TODO: Set DEVS to platform and not to language.
 	sccd = xmlToSccd(input_file)
 
 	if not target_language:

+ 52 - 3
sccd/runtime/DEVS_statecharts_core.py

@@ -734,7 +734,50 @@ class ObjectManagerBase(object):
                
     def start(self):
         for i in self.instances:
-            i.start()                     
+            i.start()
+
+    def handleInput(self):
+        while not self.input_queue.isEmpty():
+            event_time = self.input_queue.getEarliestTime()
+            e = self.input_queue.pop()
+            
+            #TODO: tot nu toe zal dit werken maar niet 
+            #input_port = self.input_ports[e.getPort()]
+            input_port = e.getPort()
+
+            #target_instance = input_port.instance
+
+            target_instance = list(self.instances)[0]
+            #target_instance = self.State[0]
+            if target_instance == None:
+                self.broadcast(e, event_time - self.simulated_time)
+            else:
+                target_instance.addEvent(e, event_time - self.simulated_time)
+
+    def addInput(self, input_event_list, time_offset = 0, force_internal=False):
+        # force_internal is for narrow_cast events, otherwise these would arrive as external events (on the current wall-clock time)
+        if not isinstance(input_event_list, list):
+            input_event_list = [input_event_list]
+
+        for e in input_event_list:
+            if e.getName() == "":
+                raise InputException("Input event can't have an empty name.")
+            
+            #if e.getPort() not in self.IPorts:
+            #    raise InputException("Input port mismatch, no such port: " + e.getPort() + ".")
+                
+            if force_internal:
+                self.input_queue.add((0 if self.simulated_time is None else self.simulated_time) + time_offset, e)
+            else:
+                # TODO; changed this from self.accurate_time.get_wct() to self.simulated_time
+                self.input_queue.add((0 if self.simulated_time is None else 0) + time_offset, e)
+
+
+
+
+
+
+
 
     def handleEvent(self, e):
         self.handlers[e.getName()](e.getParameters())
@@ -796,13 +839,19 @@ class ObjectManagerBase(object):
             #new_instance = self.createInstance(class_name, parameters[3:])
 
             id = None
-            for index, i in enumerate(self.State):
+            for index, i in enumerate(self.instances):
                 if i == source:
                     id = index
                     break
 
             # Normally [3:] but instance cannot be past along, need to fix this
-            self.to_send.append((association_name, class_name, id, Event("create_instance", None, parameters[4:])))
+            #self.to_send.append((self.name, class_name, id, Event("create_instance", None, parameters[4:])))
+                
+
+            hulp = [association_name]
+            hulp.extend(parameters[3:])
+            #self.to_send.append((self.name, class_name, id, Event('create_instance', None, hulp)))
+            self.to_send.append((None, class_name, id, Event('create_instance', None, hulp)))
 
             #if not new_instance:
             #    raise ParameterException("Creating instance: no such class: " + class_name)

+ 3 - 1
sccd/runtime/libs/DEVui.py

@@ -85,7 +85,9 @@ class ui:
             elif event == ui.EVENTS.WINDOW_CLOSE :
                 #TODO: Quick fix, use a better version of pypdevs because this one can only send strings. Be sure to not set any spaces in the second argument otherwise it
                 # does not register
-                source = "self.State[0].field_window"
+                #source = "self.State[0].field_window"
+
+                source = "list(self.instances)[0].field_window"
                 ui.simulator.realtime_interrupt(f"{port} Event(\"{raise_name}\",self.{port},[{source}])")
                 
                 #controller.addInput(Event(raise_name, port, [source]))