Home
SGTEditor v1.0
Contents
1. Universit t Karlsruhe TH Institut fur Algorithmen und Kognitive Systeme der Fakultat fur Informatik SGTEDITOR v1 0 Reference Manual v1 1 M Arens April 2003 Contents 1 Introduction 1 1 Situation Graph Trees SGTs ce eee 2a pe e aaa a ea EC 1 2 DiaGen A Diagram Editor Generator Lo System requirements lt lt nd eh y s ca k neh AE A 2 The SGTEDITOR graphical user interface 21 Theedtor eem ke he e ee Lee ee hee eS BE oS 2 2 Ihe eegene ame e cae sone ls S ee ee ow pus a 2 2 1 Standard options file handling etc 222 Editing mod options 2 444642 244 ne Portari 223 Special SGT options ss sess See ee See nun 2 24 c omp nent specifie Options 222 u Herner a 29 ESS ARE 20 L Dama and load dialogs o e s A ee EE A EE e EI ta 2 3 2 Changing global SGT attributes lt e s ee caa poeu xaa sa 2 3 3 Adjusting force layout parameters 2 3 4 Situation graph property editor 2 3 5 Situation scheme property editor 2 3 5 1 Binding scheme dialog 2 3 5 2 Incremental state scheme dialog 3 SGT Editing A simple example 31 St rung POM sera e a ie cw s ae e a A RA A 3 2 Adding new components 2 42 66 2 4 cee e a ea a A a a 3 3 Editing situation schemes 0 0 ee eee eee ne OD 00 o AeA A A PB 10 10 10 10 10 12 12 13 14 11 3 4 Semantic zooming 3 5 Fine tuning of
2. x SGT Editor lol s J e j Denge Sange os Bue DES CARE NO_STATE_PREDICATES INO_ACTION_PREDICATES Figure 3 1 SGTEDITOR with one situation scheme added to editor pane x SGT Editor ol s Osa S lo el ANNs She a si DEET REM ED_UNDEFINED_SIT NO_STATE_PREDICATES NO_ACTION_PREDICATES Figure 3 2 SGTEDITOR with one situation scheme and one situation graph 3 2 ADDING NEW COMPONENTS 17 Lx lol sia File Edit View SGT Deg losse a ale ele m el relua raja Bolio d FR N Untitled ED_UNDEFINED_SIT NO_ST ATE_PRE DICAT ES INO_ACTION_PR EDICATE SI LED UNDEFINED SIT NO_STATE_PREDICATES NO_STATE_PREDICATES INO_ACTION_PREDICATES INO_ACTION_PREDICATES No Operations Figure 3 3 Some more situation schemes added diagram after each user interaction We then select SIT again and add e g two more situation schemes below the previously constructed simple SGT compare Fig 3 3 As we want to construct a specializing situation graph we will need to incorporate these two situations into a graph frame Thus we select GRAPH and add a new situation graph to the center of the two situation schemes Up to this point the new situation graph will be too small to surround both schemes To enlarge the graph we turn to SELECT mode and select the new graph frame The graph will turn red
3. Dissertation Fakult t fir Informatik der Universit t Karlsruhe TH Karlsruhe Juli 1996 erschienen in der Reihe Dissertationen zur K nstlichen Intelligenz DISKI 135 infix Verlag Sankt Augustin 1996 in German
4. SGTEDITOR as follows Because all rectangular shapes within SGTEDITOR are aligned with the coordinate A3 LAYOUT OF SGTS 43 l xel ul mel Figure A 1 Deriving a metric on situation schemes See text for further explanation axes Of the editor pane it can be assumed that the projections of both rectangles onto those axes result in the intervals xs1 zel and ys1 gell for the first rectangle and 1s2 xe2 and ys2 ye2 for the second rectangle Further we assume that zs1 lt xs2 and ysl lt ys2 which can always be achieved by sorting the intervals according to their lower bound The x distance of the rectangles then shall be defined as d Ri Ra min 0 xs2 zel This distance is zero whenever the two rectangles overlap in direction of the x axis otherwise the distance is given by the difference of the lower bound of the second interval and the upper bound of the first interval The y difference of the two rectangles is defined analogously as d R R2 min 0 ys2 yel The distance of the two rectangles then is defined as d Ry Ra yd Ri Re d Ri Ro A 3 2 Forces between situation schemes In the following we will define repulsion and attraction forces on situation schemes based on the metric on the graphical representation of situation schemes defined 44 APPENDIX A TECHNICAL ANNEX above The constants used in the following
5. Ed_SGTModel Reducer reducer p pseudo _ gt r T_SGTRoot r model p model s situation_scheme a rel1 situation_scheme_inside_situation_graph_frame a b sg situation_graph_frame b gt ss T_situation_scheme a b 4 ss graph sg self ss scheme s scheme is p prediction_edge b c rell prediction_edge_starts_inside_situation_scheme b a rel2 prediction_edge_ends_inside_situation_scheme c d s1 situation_scheme a s2 situation_scheme d pred T_prediction_edge a d pred edge p self pred fromSit s1 scheme pred toSit s2 scheme 33 p prediction_loop b c rel1 prediction_edge_starts_inside_situation_scheme b a rel2 prediction_edge_ends_inside_situation_scheme c a s1 situation_scheme a pred T_prediction_loop a pred edge p self pred fromToSit si scheme s specialization_edge b c rell specialization_edge_starts_inside_situation_scheme b a rel2 specialization_edge_ends_inside_situation_graph_frame c d sl situation_scheme a sgl situation_graph_frame d situation_scheme_inside_situation_graph_frame a d spec T_specialization_edge a d spec edge s self spec fromSit si scheme spec toGraph sgi self sg situation_graph_frame a TECHNICAL ANNEX A 2 SOME GRAMMARS gt ssg T_situation_graph
6. are recursively placed first and so on A 3 4 Default values for force layout paramters The layout algorithm described above can be controlled by several constants defining the minimum and optimal distance of situation schemes and situation graphs but also the maximum number of iterations the force layout should execute Those constants possess default values which are listed in the table below Description Name Value repulsion scale sit schemes Bee 1 000 x attraction scale sit schemes Grea 0 500 x 4 min distance of schemes dmin_sit 100 000 x m min distance of graphs Amin graph 100 000 x m max force on schemes TE 10 000 number of iteration steps Ia 200 max acceptable force to terminate iteration Faccept 0 500 Bibliography DiaGen 1 The DiaGen Project Homepage of the DiaGen project containing sources documentation and publications related to the DiaGen package http www2 informatik uni erlangen de DiaGen Gondran amp Minoux 84 M Gondran and M Minoux Graphs and Algorithms Wiley Series in Discrete Mathematics John Wiley amp Sons Ltd Chichester UK a o 1984 GPL 1 The GNU General Public License GNU Project Free Software Foundation http www gnu org copyleft Haag 1998 M Haag Bildfolgenauswertung zur Erkennung der Absichten von Stra enverkehrsteilnehmern Dissertation Fakult t f r Informatik der Universit t Karlsruhe TH Karlsruh
7. assumed that the user is familiar with standard operations always occuring due to graphical interfaces After starting the SGTEDITOR the graphical user interface should look like depicted in Fig 2 1 The main window of the SGTEDITOR consists of a menu top two rows of shortcut icons below the menu an editor desktop in the lower right and a splitted area consisting of a tree view upper part and a command pane lower part of the splitted area to the left of the main window 2 1 The editor menu The editor menu contains options for standard operations like file handling printing and basic editing In addition the menu has been extended with some special SGT operations All operations included in the menu are also represented as shortcut icons 2 2 The shortcut icons 2 2 1 Standard options file handling etc 5 This operation simply opens a new empty editor pane NEW 2 2 THE SHORTCUT ICONS La LOAD SAVE osa B ojo Sei AS oss ake Maja Elola 4 een p C Untitled No Operations Figure 2 1 GUI of the SGTEDITOR just after starting it This operation opens an existing diagram Note that this operation can only load diagrams which were saved with the standard save operation Both operations load and save use the standard JAVA serialization of classes to export import diagrams This operation can not
8. be used to load SIT files This operation saves the diagram shown in the actually selected editor pane Note that this operation will not create a SIT file but will like the open operation described above simply export the JAvA classes representing the diagram with standard JAVA serialization Nevertheless these open and save operations are quite useful if the layout of the actual diagram should be saved temporally SIT does not keep any of this layout information This operation will start the standard JAVA printing dialog The complete diagram of the selected editor pane will be printed Redi rection of the same diagram to be printed to a file is possible and at the present point of implementation the only way to obtain reusable figures of the diagrams CHAPTER 2 THE SGTEDITOR GRAPHICAL USER INTERFACE KH This operation revokes the last undoable action performed by the user Note that not all operations described here are undoable at the present point of implementation For further details on oper UNDO ations which are not yet undoable see Appendix 4 3 Neverthe less the undo operation is very useful for problems occuring due to wrongly added or deleted components as well as for problems related to layout insufficiencies Ou This operation re executes the last revoked operation See the pre viously described undo operation and Appendix 4 3 REDO x This operation deletes all selected components from the cur
9. definitions can be found in App A 3 4 A 3 2 1 Situation scheme repulsion The absolute value of a repulsion force between any two situation schemes sl and s2 within one situation graph is defined as 2 dnin sit Fre si 1 2 rep_si a AN psit 1 82 TERN et SE A force of this magnitude acts on the center point of both sl and s2 whereby the force on one scheme is oriented parallel to the connection line between both center points and away from the other scheme A 3 2 2 Situation scheme attraction The absolute value of an attraction force between each two situation schemes s1 and s2 connected by a prediction edge is defined as d s1 52 Fpreals1 s2 Cpred Gene w A force of this magnitude acts on the center points of both schemes whereby the force on one scheme is oriented parallel to the connection line between both center points and towards the other scheme A 3 3 Iterative force layout The forces defined above conform the so called spring embedding compare Kaufmann amp Wagner 2001 In this force layout approach a spring between each pair of compo nents of a graph is simulated In relaxed state these springs are assumed to possess a certain optimal length dmin_six in the equations above In case of elongation or contraction of the distance between components the simulated springs react with an antagonizing force in order to restore the optimal distance The actual layout of situation schem
10. the first official version of SGTEDITOR 4 2 Bugs The following list contains some errors and shortcomings of the present SGTEDITOR version 1 Insufficient error handling Presently all warnings errors and other messages of SGTEDITOR are prompted at the system shell from which the program was started It might be advantageous to incorporate these messages into the GUI of SGTEDITOR 2 Redo Undo Problems Several operations mainly concerning semantic zoom ing are not integrated into the action history of SGTEDITOR This history enables the program to undo user actions but also to redo those actions previ ously taken back by the user Future program versions might probably get rid of this problem 3 Redrawing errors SGTEDITOR does not redraw the present diagram when ever this would be appropriate This leads to redrawing errors which can mostly be removed by forcing SGTEDITOR to redraw the diagram Nevertheless future program should be more elaborate regarding this point 4 Awkward context menues The context menues in SGTEDITOR are invoked by so called popup triggers The decision whether or not a certain user action is a 29 30 CHAPTER 4 HISTORY BUGS amp FUTURE FEATURES popup trigger is made by the system on which SGTEDITOR currently operates Unfortunately different systems make different decisions with respect to this point For example speaking about right mouse clicks as popup triggers Linux XServe
11. 96 SIT files can also be reloaded into the SGTEDITOR however with one drawback the layout of the SGT automatically created by SGTEDITOR or adjusted by the user will be lost because SIT files do not save this kind of information In contrast saving an SGT as a diagram will keep all layout information for later reload However the file format created here is binary namely the file contains the serialized JAVA classes of the diagram Thus those files cannot be edited with other programs than the SGTEDITOR The SIT file resulting from the SGT created above is depicted in Fig 3 17 Note that situation names formerly used in the diagram were replaced by unique identifiers in the created SIT file CHAPTER 3 SGT EDITING A SIMPLE EXAMPLE automatically generated by SGTEditor DEFAULT NONINCREMENTAL GREEDY PLURAL DEPTH TRAVERSAL GRAPH gr_ED_SITGRAPHO START FINAL SIT sit_ED_SITO sit_ED_SITO active User note The user is active GRAPH gr_ED_SITGRAPH1 sit_ED_SITO START SIT sit_ED_SIT1 sit_ED_SIT1 sit_ED_SIT2 read User manual note User presently Learning vi FINAL SIT sit_ED_SIT2 sit_ED_SIT2 using User SGTEditor note User presently working with SGTEditor d Figure 3 17 SIT file resulting from the SGT created in the sections above Chapter 4 History Known Bugs amp Possible Future Features 4 1 History v1 0 The version v1 0 is
12. EX explanation of global SGT attributes concerning the SIT to logic conversion A 1 2 Local attributes The value of the global attribute action incrementality of an SGT can be overridden by more local settings for this attribute The attribute defines wether action predicates should be executed incrementally everytime the corresponding situation scheme can be instantiated or nonincrementally only if the corresponding situation scheme is the most special scheme that can presently be instantiated Thus a global value of NON INCREMENTAL sets all action predicates to nonincremental execution However the same attribute can locally be set for a situation graph to INCREMENTAL By this all action predicates of situation schemes inside that graph will be set to incremen tal execution Again the value can be set even more locally for situation schemes or even single action predicates and thus let the user define the incrementality of actions in a very detailed way A 2 Some Grammars A 21 SIT Grammar The SIT grammar used for SGTEDITOR is documented below In comparison to Schafer 1996 those parts of SIT files describing a terminology formerly introduced by TERM and those parts describing additional data in form of facts formerly intro duced by DATA are not supported anymore These parts are believed to be better defined in other terms of knowledge representations than in the SGT describing for mat Note also that no minim
13. GT is converted into logic and used further Future versions of SGTEDITOR might analyse the user s input for correctness in this sense Consistency checking The incremental state scheme of situations compare section 2 3 5 2 is not checked for consistency in the present version of SGTE DITOR Consistency in this context means that state predicates in more special situation schemes do not contradict state predicates in more general schemes for example It is not clear presently if such a check can be performed on the mere predicate strings or even with the help of an underlying inference engine Future versions of SGTEDITOR might incorporate such kinds of checks though Completeness checking An SGT normally tries to represent the possible behavior of an agent in a certain discourse Although this discourse might be very restricted the SGT should nevertheless represent all eventualities in that 4 3 POSSIBLE FUTURE FEATURES EN restricted discourse For example one situation of an SGT might be special ized into two sub cases according to one predicate which might hold or not Thus a very common question in the construction of an SGT is What happens if this predicate does not hold SGTEDITOR might probably indicate such alternatives to the user Further checks for completeness might be possible if SGTEDITOR was connected to other knowledge sources such as terminologies 32 CHAPTER 4 HISTORY BUGS amp FUTURE FEATU
14. Patient gerade nahe Agent Patient nichts_zwischen Agent Patient Action is Incremental SER arm tion note SitPoss drive_to_intersection_b lt NOT SET gt mM del State del Action Succ Sit Binding edit Binding Preds drive_to_intersection_behind_vehicle NP OP NP approach_stopping_line NP OP NP Specs ED_SITGRAPH3 parent default is lt NOT SET gt 8 lt NOT SET gt O INCREMENTAL O NONINCREMENTAL I Stan Sit 7 End Sit Incr State Close Figure 2 5 The property editor for situation schemes in the first column named Succ SIT and then clicking to the row in the table the prediction is meant to be placed The order of predictions is also indicated by small numbers in the editor pane This indication is updated after the situation scheme property editor has been closed The binding scheme of each prediction edge can be edited by selecting the desired binding scheme in the predictions table and then press the EDIT BINDING button This operation starts a new dialog which is described in Section 2 3 5 1 The next part of the situation scheme property editor deals with default values for action predicates inside the corresponding scheme Again the value of superior components can be kept NOT SET or the default can be set to one of the possible values INCREMENTAL NONINCREMENTAL Then two checkboxes let the user define the c
15. R IS ACTIVE as action predicate We want this scheme to be both a start and an end situation so we select both checkboxes compare Fig 3 10 Then this dialog is closed by pressing CLOSE After having closed the dialog the new entries for the top most situation scheme should have been updated Note that on some systems this right click on components might have no effect at all This problem arises due to different handling of so called popup triggers on e g Linux XServers and Windows See also Appendix 4 2 for more details regarding this problem 22 CHAPTER 3 SGT EDITING A SIMPLE EXAMPLE EN lol Ste File Edit View SGT Dien SJ elo xls ele ISA oss gt rich Mola slo 121 4 No Operations Figure 3 11 The resulting SGT after all three situation schemes have been edited in the editor pane If not try to redraw the diagram by clicking to ALL or even force SGTEDITOR to relayout the diagram clicking to INTELL and then to ALL After editing the properties of the other two situation schemes the result might look like depicted in Fig 3 11 Note that we also reordered the prediction edges of the lower left situation scheme as described in section 2 3 5 In the way described above more and more complex SGTs can be created First the structure is extended by disabling the Intelligent Mo
16. RES Appendix A Technical Annex A 1 Global and local attributes of SGTs A 1 1 Global attributes SGTs as introduced by Schafer 1996 have certain global attributes which mainly control the automatic translation of a SIT formulated SGT into a logic program compare Table A 1 These attributes can also be inspected and edited with SGTE DITOR though future versions of SIT t0 logic conversion might ignore some of these attributes All global attributes are stored inside a SIT file following the reserved word DEFAULT The most important attribute concerns the default incrementality of action predicates inside situation schemes This attribute can be overridden by lo cal attributes inside situation graphs inside situation schemes or even for every single action predicate The other global attributes only affect the translation of a SIT file into logic search strategy for example controls whether a situation analysis on the SGT should be done in breadth first or depth first search See Schafer 1996 for a detailed Attribute 1 value 2 value action incrementality NONINCREMENTAL INCREMENTAL evaluation strategy GREEDY NONGREEDY search strategy DEPTH BREADTH evaluation number PLURAL SINGULAR evaluation kind TRAVERSAL OCCURENCE Table A 1 Global attributes of SGTs and their possible values The default value for each global attribute is underlined 33 34 APPENDIX A TECHNICAL ANN
17. SGT layout 3 6 Creating views in single windows 3 7 Saving and reloading SGTs History Bugs amp Future Features 4 1 History A tb AE a e a 4 3 Possible Future Features Technical Annex A 1 Global and local attributes of SGTs A 1 1 Global attributes A 1 2 Local attributes A 2 Some Grammars A 2 1 SIT Grammar A 2 2 Hypergraph grammar of SGT Diagrams A 3 Layout of SGTs A 3 1 A 3 2 A 3 2 1 Situation scheme repulsion A 3 2 2 Situation scheme attraction A 3 3 A 3 4 Bibliography Metric on situation schemes Forces between situation schemes Iterative force layout Default values for force layout paramters CONTENTS Chapter 1 Introduction This reference manual describes the usage of the SGTEDITOR SGTEDITOR is a graphical editor for Situation Graph Trees SGTs which allows the graphical creation inspection and manipulation of SGTs It was implemented in JAVA utilizing the Di agram Editor Generator DiaGen described for example in Minas 1997 Minas 2001 The following sections outline SGTs and the DiaGen package to the extend neccessary for understanding the function of the SGTEDITOR One section will then state the system requirements for using SGT EDITOR The subsequent chapters describe in detail how to use the SGTEDITOR itself 1 1 Situation Graph Trees SGTs SGTs Kriiger 1991 Schafer 1996 are graph like structures modelling the behavior of agents They were successfully used in terms of high
18. _SGTs n Editing_SGTs active User No Operations Figure 3 14 Semantic zooming action predicates were hidden In addition the hidden specializing graph is indicated by a filled rectangle below the situation will be shown compare Fig 3 13 The first two items in this context menu relate to the tree view itself EXPAND SUBTREE will expand all children from the selected component downwards while FOLD SUBTREE will fold all those children The next two items HIDE and SHOW will hide or show respectively components in the editor pane If the context menu was invoked for a situation scheme the HIDE operation will hide all situation graphs specializing this situation scheme together with all graphs subordinated to these graphs The SHOW operation will show all these graphs again Invoked for a situation graph the HIDE operation will hide only this situation graph together with all subordinated graphs the SHOW operation will show them again The next eight items in the context menu hide or show state predicates of selected components HIDE STATE SHOW STATE will hide show all state predicates of a single situation scheme if executed for that scheme or if executed for a situation graph will hide show all state predicates of all schemes contained in that graph HIDE ACTION and SHOW ACTION will do the same for action predicates Each one of these four operations can also be a
19. _frame a Y Grammar grammar start N_situation_graph_tree lt model gt sgt N_situation_graph_tree r T_SGTRoot sgc N_situation_graph_complex _ 4 sgt model r model Ed_Semantics createSGT sgt model sgc graph H sgc N_situation_graph_complex b sg T_situation_graph_frame b sscs1 N_situation_scheme_complex_set b sgc sitList sscsi sitList sgc graph sscsi graph Ed_Semantics announceSituationGraph sgc graph sgc sitList H sscs N_situation_scheme_complex_set a lt lt ssc1 N_situation_scheme_complex _ a gt gt sscs graph ssci graph sscs sitList Ed_Semantics createSituationSchemeList lt lt ssc1 scheme gt gt Ed_Semantics setSitListOfGraph sscs graph sscs sitList H ssc1 N_situation_scheme_complex a b s1 T_situation_scheme a b speccomplex N_specialization_complex a c ssci graph si graph ssci scheme si scheme si T_situation_scheme a b ssci scheme si scheme ssci graph si graph speccomplex N_specialization_complex a c spec T_specialization_edge a c sgc N_situation_graph_complex c sc2 N_specialization_complex a _ Ed_Semantics addSpecializationEdge spec edge spec fromSit sgc graph 42 APPENDIX A TECHNICAL ANNEX spec T_specialization_edge a c sgc N_situation_graph_complex c E
20. all references on GUI components like shortcut icons the following sections will point to the previous chapter 3 1 Starting from scratch The first step is to start the SGTEDITOR Into the empty editor pane named UNTITLED in the lower right editor desktop compare Fig 2 1 new SGT components can already be added It is recommended to maximize this editor pane inside the editor desktop 3 2 Adding new components To add new components select one of the shortcut icons SIT GRAPH PREDICT LOOP or SPECIAL We will start here by adding a new situation scheme by selecting SIT and then clicking somewere into the editor pane The result of this action can be seen in Fig 3 1 the added situation scheme is depicted in black at this stage We will now add a new situation graph frame to the editor pane by selecting GRAPH and then click more or less exactly to the center of the previously added situation scheme compare Fig 3 2 Note that now both the situation scheme and the situation graph turned to blue color The SGTEDITOR indicates thereby that the diagram constructed so far corresponds to a correct SGT We will now add a specializing graph for the existing situation scheme We first zoom out ZOOMOUT therefore in order to obtain some more space for adding new components Then we disable the Intelligent Mode of SGTEDITOR INTELL because we do not want SGTEDITOR to re layout the 15 CHAPTER 3 SGT EDITING A SIMPLE EXAMPLE
21. d_Semantics addSpecializationEdge spec edge spec fromSit sgc graph embed pred T_prediction_edge a b into s1 N_situation_scheme_complex a c s2 N_situation_scheme_complex b c Ed_Semantics addPredictionEdge pred edge s1 scheme s2 scheme embed pred T_prediction_loop a into s1 N_situation_scheme_complex a _ Ed_Semantics addPredictionLoop pred edge s1 scheme A 3 Layout of SGTs The layout of SGTs is done by a hybrid algorithm consisting of two parts a force simulation algorithm see Kaufmann amp Wagner 2001 layouts the situation schemes inside each situation graph The situation graphs themselves are layouted by a standard tree layout algorithm A 3 1 Metric on situation schemes The layout of situation schemes inside situation graphs is computed by simulating forces on every situation scheme and iteratively moving these schemes according to those forces The computation of forces between situation schemes is based on a metric on these rectangular shapes which will be derived in the sequel Fig A l shows two rectangles similar to the graphical representation of situation schemes within SGTEDITOR A metric on such two rectangles Ri and Ra should not only take the center points xcl ycl and xc2 yc2 of these rectangles into ac count but should also pay attention to the width and height of those shapes h1 and wl h2 and w2 respectively Such a metric d R R2 of two rectangles was defined for
22. de INTELL and adding components Then after reactivation of the Intelligent Mode detailed properties of single components can be edited 3 4 Semantic zooming Although the semantic zooming options were implemented to cope with huge SGTs they will be demonstrated at the simple SGT created above To execute any of the semantic zooming operations first the tree view for the presently edited SGT has to be created This can be done by clicking to the RELAYOUT icon The tree view created by this action is then shown in the tree view panel top left of SGTEDITOR compare Fig 3 12 Each entry in this tree corresponds to a component of the SGT it was created for Upon left clicking to an entry the corresponding component in the editor pane will be selected When right clicking to an entry a context menu 3 4 SEMANTIC ZOOMING 23 x SGT Editor Diele 8 lo Sanne me eoa 9 O ED SITGRAPHO E Editing SGTs Figure 3 12 The tree view of the SGT was created and is depicted in the tree view panel top left of frame x SGT Editor CEA Djela e see AR elele sF a elol O ED_SITGRAPHO E Editing scts Figure 3 13 The tree view with opened context menu 24 CHAPTER 3 SGT EDITING A SIMPLE EXAMPLE EN lol Sie le Edit View SGT Diego 3 0 x ala al ale oss elite Mies o z 21 z ITGRAPH0 E Editing
23. e Juli 1998 erschienen in der Reihe Dissertationen zur K nstlichen Intelligenz DISKI 193 infix Verlag Sankt Augustin 1998 in German Haag amp Nagel 2000 M Haag and H H Nagel Incremental Recognition of Traffic Situations from Video Image Sequences Image and Vision Computing 18 2 2000 137 153 JAVA 1 Java 2 Platform Standard Edition http java sun com j2se Kaufmann amp Wagner 2001 M Kaufmann and D Wagner Eds Drawing Graphs Methods and Models LNCS 2025 Springer Verlag Berlin Heidelberg New York 2001 Kriiger 1991 W Kriiger Begriffsgraphen zur Situationsmodellierung in der Bildfol genauswertung Dissertation Fakultat fir Informatik der Universitat Karlsruhe TH Januar 1991 erschienen in Informatik Fachberichte 311 Springer Verlag Berlin Heidelberg New York 1992 in German Minas 1997 M Minas Diagram Editing with Hypergraph Parser Support Proc of the IEEE Symposium on Visual Languages VL 97 September 1997 Capri Italy IEEE Computer Society Press Los Alamitos CA USA 1997 pp 230 237 Minas 2001 M Minas Spezifikation und Generierung graphischer Diagrammeditoren Habilitationsschrift Friedrich Alexander Universit t Erlangen N rnberg 2001 Berichte aus der Informatik Shaker Verlag Aachen 2001 in German Sch fer 1996 K H Schafer Unscharfe zeitlogische Modellierung von Situationen und 46 Bibliography 47 Handlungen in der Bildfolgenauswertung und Robotik
24. ed in that graph The REDUCER defines the mapping from components and relations onto terminals of the grammar For example only those situation scheme components will be considered as terminals for situation schemes which also lie inside a situation graph component Thus the reducer section defines which basic constellations of components are desired and which are not The section GRAMMAR defines the hypergraph grammar for SGT diagrams itself While REDUCER defined more local attributes of SGT diagrams this section defines how situation schemes aggregate to graphs and graphs aggregate to an SGT Note that this grammar is basically a context free grammar with two exceptions the last two productions of this grammar are called embeddings see also Minas 2001 By these special productions the expressiveness of grammars for DiaGen is much more powerful than simple context free grammars package SIT Components component situation_scheme 1 Ed_SituationScheme Ed_SituationSchemeArea component situation_graph_frame 1 4 Ed_SituationGraph Ed_SituationGraphArea 3 component prediction_edge 2 Ed_PredictionEdge Ed_PredEdgeStart Ed_PredEdgeEnd 38 APPENDIX A TECHNICAL ANNEX component prediction_loop 2 Ed_PredictionLoop Ed_PredEdgeStart Ed_PredEdgeEnd com
25. eme fromToSit terminal T_situation_graph_frame 1 terminal T_specialization_edge 2 Ed_SpecializationEdge edge Ed_SituationScheme fromSit Ed_SituationGraph toGraph terminal T_SGTRoot 0 1 Ed_SGTModel model NonTerminals nonterminal N_situation_graph_tree 0 each sitGraph with frame and embedded graph for situations and prededges denotes the root of a situationgraphtree Ed_SGTModel model nonterminal N_situation_graph_complex 1 a situationgraphcomplex denotes ONE situation_graph_frame AND at least one situation_scheme which must lie inside this frame Ed_SituationGraph graph java util Vector sitList 3 nonterminal N_situation_scheme_complex 2 a situation_scheme_complex consists of a situation_scheme and specializations of this scheme which means a specialization_edge and a specializing situation_graph_complex Ed_SituationScheme scheme Ed_SituationGraph graph Ed_SituationGraph specGraph nonterminal N_situation_scheme_complex_set 1 a situation_scheme_comlex_set denotes all situation_scheme_comlexes which belong to one situation_graph Ed_SituationGraph graph java util Vector sitList nonterminal N_specialization_complex 2 40 APPENDIX A constraintmanager diagen editor param CustomizedConstraintMgr model_class SIT
26. engs drive_to_intersection_behind_vehicle patiens Patient Agent lt gt Patient orientierung Agent Patient vor richtung Agent Patient gerade nahe Agent Patient nichts_zwischen Agent Patient Figure 2 7 The dialog showing the incremental state scheme of one situation scheme add operation To delete a single binding constraint it has to be selected in the table and the DELETE BINDING button has to be pressed The complete binding scheme will be updated when the dialog is closed by pressing the CLOSE button 2 3 5 2 Incremental state scheme dialog This dialog is for mere inspection rather than for editing purposes The dialog shows all state predicates which have to become true in order to instantiate the situation scheme the dialog was invoked for The dialog is divided into two parts on the left the hierarchy of situation schemes from the root graph of the SGT down to the selected situation scheme is shown The state predicates of each of these situation schemes is given in the right part of the dialog The dialog can be closed by pressing the CLOSE button but is also closed when the superior situation scheme property editor is closed Chapter 3 SGT Editing A simple example The following section demonstrates the graphical construction of a new SGT with the SGTEDITOR However all aspects and techniques decribed in the following sections apply too for SGTs loaded from SIT sources for modification For
27. es can be acieved by an iterative process In each iteration all forces on every scheme are computed and added After force computa tion each scheme is moved along the resulting force acting on it The lengh of this movement is directly given by the magnitude of the acting force unless it is greater than the maximum allowed situation scheme movement in on iteration Fit mar see App A 3 4 After all components have been moved according the computed forces the next iteration starts This is done until either the maximum number of steps Kmaz is reached or the maximum force in one iteration steps does not exceed a minimum value of Faccent A3 LAYOUT OF SGTS 45 The situation graphs are directly placed according to a standard tree layout Starting with the root graph of the present SGT to be layouted all specializing graphs of situation schemes inside this graph are placed below the root graph keeping a minimum distance dmin grapn which can be defined by the user The order in which these graphs are place in horizontal direction from left to right is given first by the horizontal placement of situation schemes inside the root graph specializing graphs of left most schemes are placed first Secondly the order of specialization edges is taken into account if one scheme possesses more than one specializing graph those graphs are placed in ascending specialization order If one graph is placed all specializing graphs of schemes inside that graph
28. esult can be seen in Fig 3 16 3 6 Creating views in single windows The last operation described here was also implemented to cope with huge diagrams mainly for documentation purposes This operation allows the user to select a single situation graph to be the root graph of a new SGT diagram which is depicted inside a new editor pane This operation can be reached by creating or actualizing the tree view with RELAYOUT To view a situation graph in a single window select this graph in the tree view panel and open the context menu by right clicking on that graph Now select the item VIEW IN SINGLE WINDOW As a result a new editor pane opens inside the editor desktop which should only contain the selected graph as root and all situation graphs subordinated to the selected graph Thus a diagram of a sub SGT was created Note that this operation is only for documentation purposes at the present point of implementation the new editor pane therefore is marked as CLIPPING ONLY FOR VIEWING Editing operations done in this editor pane can only affect the layout within this pane but will not affect the original SGT or the corresponding diagram 3 7 SAVING AND RELOADING SGTS 27 3 7 Saving and reloading SGTs The SGT created above can be saved either as a SIT file or it can be saved as a diagram The first option creates files which can be edited easily with a text editor and can be further converted into logic programs compare Schafer 19
29. gs The dialog can be closed with the Or button confirming all changes made or with the CANCEL button ignoring all changes The DEFAULT button resets all attribute values to predefined defaults 2 3 3 Adjusting force layout parameters The dialog for adjusting force layout parameters is depicted in Fig 2 3 The dialog consists of seven textfields each holding the value of one parameter With the exception of the maximum number of iteration steps which is an integer value all these param eters are floating point values SITUATION REPULSION and SITUATION ATTRACTION 2 3 EXTRA DIALOGS 11 Edit SGT Attributes e NONINCREMENT AL O INCREMENTAL GREEDY NONGREEDY DEPTH BREADTH PLURAL SINGULAR TRAVERSAL OCCURRENCE osa Cewe ox Figure 2 2 The dialog for editing global attributes of an SGT Adjust Parameters for Force Layout Situaton Repulsion Situation Attraction Situaton Min Distance Graph Min Distance Max Force on Sit Max lterations Max acceptable Force Figure 2 3 The dialog for adjusting all parameters of the force layout algorithm scale the corresponding forces on situation schemes SITUATION and GRAPH MIN DISTANCE denote the minimum and optimal distance which should prevail between the corresponding diagram components MAX FORCE ON SIT holds the maximum step one situation scheme can make in one iteration step of the force layout algorithm MAX ACCEPTABLE FORCE deno
30. gt lt P_GRAPH gt lt P_SIT gt lt P_DEFAULT gt lt P_INCREMENTAL gt lt P_NONINCREMENTAL gt lt P_GREEDY gt lt P_NONGREEDY gt lt P_PLURAL gt lt P_SINGULAR gt lt P_BREADTH gt lt P_DEPTH gt lt P_TRAVERSAL gt lt P_OCCURRENCE gt lt P_START gt lt P_FINAL gt lt P_ASSIGN gt lt P_INFIX_RELATION gt lt P_COLON gt lt P_SEMICOLON gt lt P_COMMA gt lt P_OPEN_BRACE gt lt P_CLOSE_BRACE gt lt P_OPEN_ROUND_BRACE gt lt P_CLOSE_ROUND_BRACE gt lt P_SMALL_CHAR gt lt P_CAPITAL_CHAR gt lt P_DIGIT gt lt P_ANY_CHAR gt lt P_CHARACTER gt lt P_SIGN gt lt P_DIGIT_SEQ gt lt P_INTEGER gt lt P_FLOAT gt lt P_IDENTIFIER gt lt P_VARIABLE gt lt P_QUOTATION gt lt P_STRING gt APPENDIX A TECHNICAL ANNEX C Da ntl Ca ren rin den tet ei ew Den pn CRD rein nz GRAPH SIT DEFAULT INCREMENTAL NONINCREMENTAL GREEDY NONGREEDY PLURAL SINGULAR BREADTH DEPTH TRAVERSAL OCCURRENCE START FINAL lt gt wen gt n n non non nu d A nen yu u0061 u007a u0041 u005a u0030 u0039 u0021 u007e lt P_DIGIT gt lt P_SMALL CHAR gt lt P_CAPITAL CHAR gt _ WAS 1 1 P_DIGIT gt lt P_DIGIT gt P_SIGN gt lt P_DIGIT_SEQ gt P_SIGN gt lt P_DIGIT_SEQ gt lt P_DIGIT_SEQ gt P_SMALL_CHAR gt lt P_CHARACTER gt P_CAPITAL_CHAR gt
31. h a file can be Ki selected for saving the SGT depicted in the selected editor pane A file with the given name will be created if it does not yet ex ist Otherwise the existing file will be overwritten As a result of this operation the new file will contain the saved SGT in SIT notation SAVESIT 2 2 4 component specific options This operation is accessible in the lower left part of the main frame of the SGTEDITOR compare Fig 2 1 Depending on the com ponent presently selected in the actual editor pane this operation will invoke the component s property editor If no component is selected this operation is deactivated Of all SGT diagram com ponents only situation graphs and situation schemes possess prop erty editors While for situation graphs only some attributes can be edited there see Apppendix A 1 the property editor for situation schemes is much more functional and will be described in an extra section of this manual see section 2 3 4 EDIT 2 3 Extra dialogs 2 3 1 Save and load dialogs These dialogs are standard JAvA dialogs and will not be explained here 2 3 2 Changing global SGT attributes This dialog is depicted in Fig 2 2 The dialog mainly consists of five rows of row wise mutually exclusive checkboxes Bach row sets one of the global attributes of the SGT the dialog was invoked for Each attribute has two possible values See Appendix A 1 for a more detailed explanation of attribute meanin
32. iaGen is entirely written in Java and is based on the new Java 2 SDK It is therefore platform independent and can take full advantage of all the features of the new Java2D graphics API For example DiaGen supports unrestricted zooming and rendering quality is adjusted automatically during user interactions The standard editor created by DiaGen for a SGT hypergraph grammar compare A 2 2 provided the basis for the SGTEDITOR Implemented extensions were mainly concerned with layouting certain editing functionalities and semantic zooming Se mantic zooming describes view changes where details of the diagram are suppressed or restored Thus semantic zooming is no simple magnification of the whole diagram but a piecewise enlargement of some details due to the suppression of other details In SGTEDITOR semantic zooming can be performed by hiding or showing single situation graphs and by hiding or showing state and action predicates of situation schemes The constraint solver based layout facilities of DiaGen were replaced completely by a layout algorithm based on force simulation and knowledge about the structure of SGTs 1 3 System requirements To use the SGTEDITOR the JAVA SDK 2 is needed which can be obtained from JAVA 1 In addition to that the DiaGen package has to be installed DiaGen 1 Chapter 2 The SGTEDITOR graphical user interface The following sections describe the graphical user interface GUI of SGTEDITOR It is
33. l add Action del Action i Succ Sit Binding edit Binding ED_sITO 0 JED_SITGRAPH1 parent default is lt NOT SET gt lt NOT SET gt INCREMENTAL NONINCREMENTAL I Stan Sit End Sit Incr State Close Figure 3 9 The property editor for the top most situation scheme Properties of Editing SGTs Editing_SGTs State Predicate add State jactive User del State Action is Incremental add Action note The user is active lt NOT SET gt del Action i Succ Sit Binding edit Binding Edliting_SGTs U JED_SITGRAPH1 parent default is lt NOT SET gt lt NOT SET gt INCREMENTAL O NONINCREMENT AL vi Start sit w End Sit Incr State Close Figure 3 10 The same property editor as before with some entries changed property editor Alternatively this editor can be invoked by clicking to the EDIT icon in the lower left control panel We will start the property editor for the top most situation scheme first compare Fig 3 9 First we change the name of that situation scheme e g to EDITING SGTs Then we add a state predicate as described in section 2 3 4 for example ACTIVE USER The action scheme of this situation should only consist of a predicate which prints a string let s say The user is active to the output stream So we add NOTE THE USE
34. level conceptual descriptions of video sequences within the computer vision system XTRACK see Haag 1998 Haag amp Nagel 2000 The basic component of SGTs is the situation scheme A situation scheme describes the state of an agent together with the actions the agent is expected to execute whenever it is in that state Thus a situation scheme consists in addition to an identifier of a state scheme and an action scheme While situation schemes describe a single point in time they can be connected by directed edges called prediction edges to model possible sequences of situations Each prediction edge thus represents a temporal successor relation between situation schemes Prediction edges from one scheme back to that scheme are allowed and are called prediction loops Situation schemes together with prediction edges connecting them are called a situation graph Each situation scheme in such a graph can be marked as start or end situation A possible sequence of situations has to start end in the situation schemes marked accordingly 2 CHAPTER 1 INTRODUCTION Each situation scheme in a graph can be connected to another situation graph by a so called specialization edge This means that such a situation scheme is temporally or conceptually further particularized by the connected situation graph The situation scheme is called more general than the situation graph and the situation schemes it comprises While the connection
35. lt P_CHARACTER gt non rung won unn mano unu L lt lt lt lt lt A 2 2 Hypergraph grammar of SGT Diagrams The following hypergraph grammar was formulated to define the structure of correct SGT diagrams to DiaGen This definition is used by the DiaGen package to construct JAVA classes which then build the basis for SGTEDITOR The grammar file consists of six sections e The first section titled COMPONENTS defines all components which may constitute an SGT diagram Most of these components directly result in JAVA A 2 SOME GRAMMARS 37 classes representing the corresponding component The section RELATIONS defines all basic relations between components e g that an end point of an edge lies within a situation scheme or graph Although these relations are not visible in the SGT diagrams as components are they also result in JAVA classes defining whether or not they should hold in a particular case TERMINALS defines all terminal symbols used for the definition of the hypergraph grammar Each terminal can have certain attributes e g a terminal which represents a prediction edge will hold two references on situation schemes The section NONTERMINALS defines all other intermediate non terminals used by the hypergraph grammar Non terminals can have attributes too For ex ample a non terminal representing an entire situation graph will have an entry which holds a list of situation schemes contain
36. lt P_CLOSE_BRACE gt lt P_INCREMENTAL gt lt P_NONINCREMENTAL gt lt P_IDENTIFIER gt sit_name lt P_COMMA gt sit_name situation sit_attr lt P_SIT gt sit_name lt P_COLON gt prediction_list lt P_OPEN_BRACE gt state lt P_CLOSE_BRACE gt lt P_OPEN_BRACE gt action lt P_CLOSE_BRACE gt lt P_OPEN_BRACE gt state lt P_CLOSE_BRACE gt lt P_OPEN_BRACE gt action lt P_CLOSE_BRACE gt lt P_START gt lt P_FINAL gt lt P_INCREMENTAL gt lt P_NONINCREMENTAL gt sit_name lt P_OPEN_ROUND_BRACE gt bind_list lt P_CLOSE_ROUND_BRACE gt lt P_COMMA gt sit_name lt P_OPEN_ROUND_BRACE gt bind_list lt P_CLOSE_ROUND_BRACE gt lt P_IDENTIFIER gt binding lt P_COMMA gt binding lt P_VARIABLE gt lt P_ASSIGN gt lt P_VARIABLE gt lt P_VARIABLE gt relation lt P_SEMICOLON gt procedure lt P_SEMICOLON gt lt P_IDENTIFIER gt lt P_OPEN_ROUND_BRACE gt arg_list lt P_CLOSE_ROUND_BRACE gt infix_relation lt P_VARIABLE gt lt P_INFIX_RELATION gt lt P_VARIABLE gt lt P_VARIABLE gt individual lt P_COMMA gt lt P_VARIABLE gt individual lt P_INCREMENTAL gt lt P_NONINCREMENTAL gt lt P_IDENTIFIER gt lt P_OPEN_ROUND_BRACE gt arg_list lt P_CLOSE_ROUND_BRACE gt relation lt P_IDENTIFIER gt lt P_QUOTATION gt lt P_INTEGER gt lt P_FLOAT gt lt P_STRING gt BE i a at Wa 36 lt SINGLE_LINE_COMMENT gt lt MULTI_LINE_COMMENT
37. mal distance from each other and that the number of prediction edge crossings is as small as possible However the mere orientation of e g two situation schemes connected by a prediction edge is not determined by this Thus the layout of Fig 3 15 could also be altered in a way that the two lower situa tion schemes are stacked one on top of the other This can be done by first switching to SELECT mode and selecting the right most situation scheme Then click to the centered handle of that scheme and drag it beneath the previously left most situation scheme The situation graph surrounding both schemes and the prediction edge con necting both schemes should be updated automatically while dragging the situation 26 CHAPTER 3 SGT EDITING A SIMPLE EXAMPLE EN lol Ste File Edit View SGT oleja 2 0 gt lee aa Ele EST a Moa elo 121 4 SITGRAPHO i E untitled E Editing_SGTs wee 2 Editing_SGTs active User note The user is active a Leaming read User manual ote User presently learning 1 i Doing a Edit properties using UseggGTEd tor EY Show Propert note User presently working with SGT Editor No Operations Figure 3 16 Layout after dragging one situation and thereby stacking the lower two situation schemes one on top of the other because Intelligent Mode is still activated The r
38. of one situation scheme to more than one specializing graph is allowed circles due to specialization edges are forbidden Specialization edges are used to recursively create a tree like structure of situation schemes contained in situation graphs connected to less general situation graphs To define SGTs Sch fer 1996 developed the language SIT in which each aspect of an SGT can be described textually To further use an SGT described in a SIT textfile this file is converted into a logic format which can be evaluated by the inference engine F LIMETTE also developed by Schafer 1996 1 2 DiaGen A Diagram Editor Generator DiaGen is a generator for powerful diagram editors and is free software under the terms of the GNU General Public License GPL 1 Editors for new diagram types can be created with DiaGen by defining the structure of those diagram types as a hypergraph grammar This enables the generated editor not only to visualize diagrams but also to analyse the structure of those diagrams The structure information can then be used to layout the diagram components to build internal data structures representing the diagram semantics or simply to inform the user that the actual diagram or a certain part of it does not conform to the desired diagram structure The following description of DiaGen has been taken from DiaGen 1 dated February 2001 DiaGen is a system for easy developing of powerful diagram editors It c
39. onsists of two main parts e A framework of Java classes that provide generic functionality for editing and analyzing diagrams e A generator program that can produce Java source code for most of the function ality that depends on the concrete diagram language The combination of the following main features distinguishes DiaGen from other exist ing diagram editing analysis systems e DiaGen editors include an analysis module to recognize the structure and syn tactic correctness of diagrams on line during the editing process The structural analysis is based on hypergraph transformations and grammars which provide a flexible syntactic model and allow for efficient parsing DiaGen has been spe cially designed for fault tolerant parsing and handling of diagrams that are only partially correct 1 3 SYSTEM REQUIREMENTS 3 e DiaGen uses the structural analysis results to provide syntactic highlighting and an interactive automatic layout facility The layout mechanism is based on flexible geometric constraints and relies on an external constraint solving engine e DiaGen combines free hand editing in the manner of a drawing program with syntax directed editing for major structural modifications of the diagram The language implementor can therefore easily supply powerful syntax oriented op erations to support frequent editing tasks but she does not have to worry about explicitly considering every editing requirement that may arise e D
40. operation decreases the zoom factor for the currently selected editor pane The center point will be kept This operation adjusts both the center point of the current editor pane and its zoom factor in a way that the entire diagram contained in this pane will be seen This operation is extremely useful to cope with temporally visible repaint errors See Appendix 4 2 and Appendix 4 3 for more details on this problem This operation can be used to toggle through ambiguous user se lections If the user wants to select a component in an editor pane it can and will happen that more than one component is assigned to the selected position In such a case the component first set to that position thus the bottom most component will be selected All other components can be reached by using this cycle operation This operation lifts the presently selected component one step in the hierarchy of components assigned to a certain position in the editor pane A top most component will be reached last by the cycle operation described above This operation lowers the presently selected component one step in the hierarchy of components assigned to a certain position in the editor pane A bottom most component will be selected if the user clicks to a position in the editor pane This operation activates or deactivates the Intelligent Mode of the SGTEDITOR In the default setting which means activated the editor will parse the diagram sho
41. or pane will add a new situation graph at the clicked position The new situation graph will come with default values for width and height In order to incorporate any existing situation scheme into this new graph it might be necessary to switch to select mode aftwards and adjust the size of the new graph GRAPH A With this icon selected new prediction edges can be added to the selected editor pane Each first click to the editor pane defines the starting point of the new edge while every second click then defines the end point Note that misplaced starting points can be canceled by pressing the ESC button PREDICT If this icon is selected each click to the selected editor pane will add a new prediction loop at the clicked position Loop 2 2 THE SHORTCUT ICONS K SPECIAL IR ATTRIB Ke RELAYOUT 7 FORCES LOADSIT This icon switches to a mode in which new specialization edges can be added to the selected editor pane Like in the case of prediction edges each first click defines the starting point each second click defines the end point and ESC again cancels misplaced starting points This operation will invoke an extra dialog in which global attributes of the SGT edited in the selected editor pane can be modified See Appendix A 1 for a detailed description of attributes and their values Although these attributes are not visible in the editor pane itself they will be written to the destination file if
42. orner SGT Editor File Edit View SGT HERE Osa i gt gt le slajsle lele eea Mola elol 1914 ED_UNDEFINED_SIT NO_ST ATE_PREDICAT ES INO_ACTION_PREDICATES Edit properties a Szenen No Operations Figure 3 5 SGTEDITOR decides to declare lower graph as SGT 3 3 EDITING SITUATION SCHEMES 19 EN lol Ste File Edit View SGT Dee 2 gt gt Jaja ae ale Sela p leiten aa alo 2 al 4 Y Untitled ED_UNDEFINED_SIT NO_STATE_PBEDICAT ES NO_ACTION_HREDICATES ED UNDEFINED SIT NO_STATE_PREDICATES NO_STATE_PREDICATES Edit properties EY Show Propert INO_ACTION_PREDICATES INO_ACTION_PREDICATES No Operations Figure 3 6 Now both graphs build one single SGT then define start and end point of the new prediction edge by clicking first to the left then to the right lower situation scheme Then we select LOOP and click once to each situation scheme of the SGT Note that up to this point no layout is done for the SGT As a result each and every edge starts and ends wherever it was set compare Fig 3 7 To let SGTEDITOR update the layout of the new SGT reactivate the Intelligent Mode INTELL Then click to ALL once to center and maximize the SGT diagram The result is depicted in Fig 3 8 So far we just built up the structure of an SGT consis
43. orresponding situation scheme as start and or end situation The button INCR STATE invokes a new dialog showing the incremental state scheme of the situation scheme which is described in Section 2 3 5 2 The button CLOSE closes the situation scheme property editor and all subordinated dialogs 2 3 5 1 Binding scheme dialog This dialog compare Fig 2 6 first re displays the binding scheme it was invoked for in form of a table In this table each constraint of the binding scheme occupies one row The order of the rows can again be modified by clicking on the row to be moved and then clicking on the row this constraint is to be moved to Binding schemes comprise two different kinds of constraints variable releases and assignments New binding constraints can be added by filling the corresponding textfields below the table and then press the ADD ASSIGNMENT button the ADD RELEASE button respectively The textfields used for the new binding constraint will be reset after each 14 CHAPTER 2 THE SGTEDITOR GRAPHICAL USER INTERFACE add Assignment add Release del Binding Close Enter new releases here Enter new assignments here Figure 2 6 The dialog for editing a binding scheme of one prediction edge x Incr State of drive to intersection behind vehicle O s 2 cross agens Agent traj_aktiv Agent drive_to_intersection kreuzungszufahrtiLane auf Agent Lane f_richtung Agent Lane la
44. ponent specialization_edge 2 Ed_SpecializationEdge Ed_SpecEdgeStart Ed_SpecEdgeEnd component pseudo 1 Ed_SGTRoot Foo 3 Relations relation situation_scheme_inside_situation_graph_frame 2 Ed_SituationInsideGraph Ed_SituationSchemeArea Ed_SituationGraphArea relation prediction_edge_starts_inside_situation_scheme 2 Ed_PredEdgeStartsInsideSituationScheme Ed_PredEdgeStart Ed_SituationSchemeArea relation prediction_edge_ends_inside_situation_scheme 2 4 Ed_PredEdgeEndsInsideSituationScheme Ed_PredEdgeEnd Ed_SituationSchemeArea relation specialization_edge_starts_inside_situation_scheme 2 Ed_SpecEdgeStartsInsideScheme Ed_SpecEdgeStart Ed_SituationSchemeArea relation specialization_edge_ends_inside_situation_graph_frame 2 Ed_SpecEdgeEndsInsideScheme Ed_SpecEdgeEnd Ed_SituationGraphArea Terminals A 2 SOME GRAMMARS terminal T_situation_scheme 2 Ed_SituationScheme scheme Ed_SituationGraph graph terminal T_prediction_edge 2 4 Ed_PredictionEdge edge Ed_SituationScheme fromSit Ed_SituationScheme toSit terminal T_prediction_loop 1 Ed_PredictionLoop edge Ed_SituationSch
45. pplied recursively down specialization edges These recursive versions all begin with REc The last item VIEW IN SINGLE WINDOW will be explained in section 3 6 In our example compare Fig 3 14 we hid the specializing graph and also hid all action predicates 3 5 FINE TUNING OF SGT LAYOUT 25 Edit View SGT la 8 e gt eje a afale oss al lelol l2 TGRAPHO E Editing_SGTs p using Us er SG TEditor harel User presently working with SGTEditer No Operations Figure 3 15 Layout after adjusting some force parameters Compare Fig 3 12 for this graph layouted with default parameter values 3 5 Fine tuning of SGT layout Up to this point we simply accepted the layout which the SGTEDITOR created Now we take a look at the force parameters influencing this layout compare section 2 3 3 about adjusting the force parameters by clicking to FORCES For example the min imum distance between situation schemes and graphs could be decreased to 80 0 10 0 After a new layout RELAYOUT this results in the diagram depicted in Fig 3 15 Another aspect of fine tuning SGT layout deals with the relative orientation of situations inside a single graph This orientation is not fully determined by the force layout which mainly guarantees that no situations overlap that situation schemes are positioned in a user defined opti
46. rently selected editor pane This operation should be undoable Note that due to the diagram parsing performed after the deletion of any component the resulting diagram does not have to be correct DELETE de In contrast to the delete operation the cut operation deletes the currently selected components and stores them in the clipboard Stored components can be pasted afterwards even in any other ed itor pane Note though that due to diagram parsing the resulting diagram after cutting any components does not have to be correct CUT This operation stores all selected components of the current editor pane in the clipboard but leaves them in the editor pane too Copied components can then be pasted into any other editor pane m Copy This operation copies any component presently in the clipboard into the currently selected editor pane Note that the coordinates of any component from the clipboard will not simply be copied but the user will be asked to place the components at a new destination ER PASTE This operation increases the current zoom factor for the presently selected editor pane The current center point will be kept during zooming tp ZOOMIN CL This operation resets the zoom factor of the currently selected ed i itor pane to a value of 1 The center point before and after the rer zooming operation will be identical 2 2 THE SHORTCUT ICONS a ZOOMOUT CYCLE BOTTOM INTELL This
47. rs define the pressing of the right mouse button as trigger while Windows defines the release of the right mouse button as trigger As far as extensions of the classes generated by DiaGen were concerned these differences were taken into account There seems to be one class of the DiaGen package itself diagen editor ui IdleState to be exact which ignores these differences though Thus on Windows machines context menues for diagram components might not be reachable by right clicking to the component In these cases please use the EDIT button to edit the component or any other shortcut icon for other operations 4 3 Possible Future Features First all of the errors and shortcomings mentioned in the previous section should be eliminated In addition to this there are some features which a future version of SGTEDITOR might probably incorporate 1 Export of logic programs Presently SGTEDITOR can only write SGTs to SIT files Those SIT formulated SGTs can be converted into a logic pro gram by other tools and then be further used e g for image sequence evaluation Although this logic format is presently under revision future versions of SGTE DITOR could probably export SGTs into that logic format directly Syntax checking The action predicates and state predicates entered into sit uation schemes are not further investigated by SGTEDITOR but are simply stored Syntax errors in these predicates thus do not appear until the S
48. tes a special force value if no simulated force in the diagram reaches this value in one iteration step the whole iteration is terminated be fore the maximum step number was reached Again this dialog can be closed pressing the CLOSE button ignoring all changes or pressing the Or button accepting all changes The DEFAULT button resets all parameters to the predefined values given 12 CHAPTER 2 THE SGTEDITOR GRAPHICAL USER INTERFACE Properties of ED SITGRAPH2 Name ED_SIT GRAPH2 parent default is NONINCREMENT AL lt NOT SET gt INCREMENTAL 8 NONINCREMENTAL E W Figure 2 4 The property editor for situation graphs in Fig 2 3 2 3 4 Situation graph property editor This dialog compare Fig 2 4 shows all properties of the situation graph for which it was invoked In this dialog the default value NOT SET INCREMENTAL or NONIN CREMENTAL can be set for action predicates inside situation schemes contained in the corresponding situation graph see Appendix A 1 for details on attributes This de fault value is passed down from the global setting of the SGT itself to situation graphs and then to situation schemes The parent default value namely the value set in the SGT is also shown in this dialog The CLOSE button closes this dialog accepting all changes made 2 3 5 Situation scheme property editor This dialog compare Fig 2 5 shows all properties of the situation scheme for which it was invoked Most of
49. the SGT is saved to SIT This operation does two things first the layout algorithm is in voked for the selected editor pane again Secondly the tree view of the actual diagram is created or updated Note that any oper ation concerning the tree view should be preceded by one of these redoLayout operations This operation will invoke an extra dialog in which parameters of the layout algorithm can be modified The layout of SGT diagrams is based on simulated forces between situation schemes comprised within a situation graph The force acting between two situation schemes can be modified by scaling the repulsion between situa tion nodes the attraction between these nodes and the minimum and optimal distance which should prevail between two situation schemes The force simulation is performed iteratively The max imum step number and the maximum step size can be adjusted The layout of situation graphs a simple tree layout is controlled by the currently defined distance between two graphs This operation will invoke an extra dialog in which a SIT file can be selected for loading The selected SIT file will be parsed and the extracted SGT will be drawn into a new editor pane Note that once a new SGT was loaded the newly created diagram will first be parsed and then the layout algorithm will be executed twice on that diagram 10 CHAPTER 2 THE SGTEDITOR GRAPHICAL USER INTERFACE This operation will invoke an extra dialog in whic
50. these properties can be edited within this dialog The name of the corresponding situation scheme is shown and editable in a textfield at the top This textfield is followed by a table holding all state predicates of the scheme Each of these state predicates can be selected and edited A single state predicate can be deleted by selecting it and pressing the DELETE button to the right of the state predicates A new state predicate can be added by simply pressing the ADD button and typing in the new predicate string into the newly created entry of the table This new entry has to be confirmed by pressing ENTER The action predicates can be handled in the same way A table holds all predicates ADD and DELETE button are positioned to the right of the table The next table shows all predictions starting in the corresponding situation scheme Note that new predictions can only be added graphically as well as predictions can only be deleted graphically Here only the order of predictions as well as the binding scheme corresponding to each prediction can be edited The place of a single prediction can be changed by clicking to the prediction 2 3 EXTRA DIALOGS 13 Properties of drive to intersection behind vehicle Name drive_to_intersection_behind_vehicle State Predicate add State patiens Patient Agent lt gt Patient State jorientierung Agent Patient vor richtung Agent
51. ting of situation schemes graphs and edges All situation schemes are named the same ED_UNDEFINED_SIT and no scheme contains any state or action predicates Also the numbers given to edges presently just represent the order in which edges have been added The next steps will edit the situation schemes themselves and reorder some prediction edges 3 3 Editing situation schemes To edit a situation scheme switch to SELECT mode After selecting the situation scheme to be edited you can either right click to that scheme again this will show a context menu in which the item SHOW PROPERTIES will invoke the situation scheme 20 CHAPTER 3 SGT EDITING A SIMPLE EXAMPLE KS SGT Editor Os SACRA QEREG OBS Noa solar E Untitled ED_UNDEFINED_SIT cy PEL E IO_ACTION_PRE DICATES Figure 3 7 After adding some edges things get more and more messy x SGT Editor o L Deg E el DIERES Asa n ela slo Jal 4 A ED_UNDEFINED_SIT 2 NO_STATE_PREDICATES INO_ACTION_PRE DICATES 1 ED_UNDEFINED_SIT ED_UNDEFINED_SIT NO_STATE_PREDICATES NO_STATE_PREDICAT ES NO_ACTION_PREDICAT ES NO_ACTION_PR EDICATES Figure 3 8 The resulting SGT after reractivation of Intelligent Mode centering and maximization 3 3 EDITING SITUATION SCHEMES 21 Properties of ED UNDEFINED SIT JED_UNDEFINED_SIT Sate Predicate ag state del State Action is Incrementa
52. to indicate the selection and two handles will appear One in the center of thew graph lets us move the graph the other lower right corner lets us resize the graph compare Fig 3 4 To incorporate the two new situation schemes into the new graph resize it such that it surrounds both schemes The result can be seen in Fig 3 5 Now the lower new graph is colored blue the upper turned to black again because both graphs are not connected yet Thus SGTEDITOR has to decide which part of the diagram it has to declare as an SGT and which one should be ignored To declare the lower graph as specialization of the upper situation scheme we have to add a specialization edge Click to SPECIAL and then first to the upper situation scheme start point then to the lower situation graph end point Now both graphs turn blue because they are both part of the now connected SGT We want the two situation schemes to be connected by a prediction edge In addition we want each situation scheme in the graph to be self predicting i e connected to itself by a prediction edge We first click to PREDICT 18 CHAPTER 3 SGT EDITING A SIMPLE EXAMPLE SGT Editor Diele Ja kuaa AANA ala aaa mo EAA ED_UNDEFINED_SIT NO_ST ATE_PRE DICAT ES INO_ACT ION_PR EDICATE S Edit properties E Show Propert No Operations Figure 3 4 To resize a graph select it and move the handle in the lower right c
53. um durations for situation instantiation and no minimum acceptable truth values for state predicates can be defined with SIT files conforming the grammar below And a last point to be mentioned here is that the implicit typing of variables is forbidden now This implicit typing allowed for example state predicate like drive_on Agent lane L which was interpreted as two predicates namly the original one drive _on Agent L and an additional predicate stating that the variable L is of type lane thus lane L The two constraints expressed by the former one predicate have to be coded into two predicates directly now START global_attributes sit_graph_list global_attributes gt P_DEFAULT lt P_INCREMENTAL gt lt P_NONINCREMENTAL gt lt P_GREEDY gt lt P_NONGREEDY gt lt P_DEPTH gt lt P_BREADTH gt lt P_PLURAL gt lt P_SINGULAR gt A 2 SOME GRAMMARS sit_graph_list sit_graph graph_attr graph name super_list sit_list situation sit_attr prediction _ list sit name gt bind_list binding state action relation infix relation arg list procedure individual lt WHITE_SPACE gt 35 lt P_TRAVERSAL gt lt P_OCCURRENCE gt lt P_SEMICOLON gt sit_graph graph_attr lt P_GRAPH gt graph_name lt P_COLON gt super List lt P_OPEN_BRACE gt sit_list lt P_CLOSE_BRACE gt lt P_OPEN_BRACE gt sit_list
54. wn in the currently selected editor pane after each modification In addition to this the parsed dia gram will be re layouted Because both parsing and layout may be time consuming it is feasible to deactivate the Intelligent Mode for substantial diagram editing operations and reactivate it afterwards 8 CHAPTER 2 THE SGTEDITOR GRAPHICAL USER INTERFACE 2 2 2 Editing mode options he This icon switches to the select mode for the current editor pane which means that every left click to the editor pane will be in terpreted as a select operation while every right click will open a position dependent context menu In this mode most components are also draggable Note that after each drag operation the editor will perform a diagram parsing and layout if Intelligent Mode is activated SELECT This icon switches to pan mode in which the diagram shown in the selected editor pane can be moved arbitrarily with the mouse a This icon switches to zoom mode In this mode each left click will zoom in to the clicked position while every right click will zoom out from the clicked position ZOOM 2 2 3 Special SGT options E If this icon is selected each click to the selected editor pane will add a new situation scheme at the clicked position Like with every add operation described below the editor will perform a diagram parsing and layout if Intelligent Mode is activated O If this icon is selected each click to the selected edit
Download Pdf Manuals
Related Search
Related Contents
KT-2418 Operation Instruction - Sunsky [取扱説明書] 用 户 须 知 - Medipek DRE-01 取扱説明書:PDFファイル 1.9MB Samsung J1045V คู่มือการใช้งาน Deep-Level Transient Spectroscopy Actiontec GT701D User's Manual Copyright © All rights reserved.
Failed to retrieve file