91.522 OBJECT ORIENTED ANALYSIS AND DESIGN

FINAL PROJECT REPORT
SPRING 2002

 

DATE : 08/05/02

SUBMITTED BY

Azitha Yekula

Sreelatha Alugupally

Sujatha Mantri

[Revised 030823 - RJL]

   CONTENTS

 

  1.  Introduction

               1.1. Introduction to the Hominid and Grid application                   2

               1.2 Team and Tasks                                                                         2

 

        2.  Class Diagram (Hominid module only)                                            3

 

  3.   Schema file                                                                                      4

 

  4. StateModelDiagrams

          4.1 SMD for Hominid’s Direction class                                         5

          4.2 SMD for Hominid’s Location class                                          5

 

 5.   Object Communication Diagram                                                    6

 

 6.   Sequence Diagram                                                                            7

 

 7.   Description of the Assignments                                                        9

                                                                                         

 8. Viewdefs and Makefiles                                                                     10

 

 9.   Schema File                                                                                       11

 

10.  Problem Solving                                                                               12  

 

11.   References                                                                                        13 

 

Appendix A: Build Scripts                                                            

           A.1 Script file of compiling Schemafile                                              14

           A.2 Script file of compiling all .c files                                           16

Appendix B:         Input/Output files

B.1  Input files                                                                                 18                    

B.2  Output files                                                                           22-58

Appendix C:    Source Code                                                                 59-78


 

1. INTRODUCTION

 

 

1.1. Introduction to the Hominid and Grid application : This is Hominid navigation application where Hominid will move inside a Grid. Here the Grid contains 25 cells out of which 16 are path cells. Hominid will start its journey from cell (x, y) =(2,0) and the direction= West, and it should stop at the same point (2,0) with out hitting a wall. The navigation algorithm, which we implemented, is from FOOD book.

 

 

 

                           X    

0,0      1,0      2,0     3,0      4,0

 

0,1                                      4,1                                

 

0,2                                      4,2

 

0,2                                      4,3

 

0,4      1,4       2,4     3,4     4,4

 
   

                                                                                                              

     START

 
                                                                                                 1(North)

 

 


Y                                                                     2(West)                                                              

                                                                                                                 0(East)

 

 


                                                                                              3(South)     

                                                                                            

 

 

Figure 1.1 : Grid in which Hominid has to navigate.

 

 

1.2 Team & Tasks :

 

 Azitha Yekula and Sreelatha Alugupally :

 

·        Writing code for LCPmain.c, PAssigner.c, HDsetup.c , HLsetup.c and Makefile

·        Calling methods for Generating and Process events

·        Fixing up ‘DoTransition’ problem

·        Debugging and testing in each phase.

·        Preparation of final documentation.

 

 

Sujatha Mantri :

    

·        writing code related to BDE replay

·        changing .sch and .dat files, to accommodate BDE tables.

·        Debugging and testing for BDE replay.

·        Generating final script file.

2. CLASS DIAGRAM

 

 

The tables we created for Hominid-Grid application are

  GI   --  which contain all the cells on the Grid.

  HM --  it contails it’s GI id.

  HD  --  it holds the direction of the Hominid.

  HL  --  it holds the current location of the Hominid.

Assumption : Table PA is not part of the database, PAssigner.c is the  name of the single stepping function, which returns one event per step.

 

 

 


                          

 

                                1..1                                         

                                                                    1..1   

 


            0..*

GRid GI

 

GIid 

HNid

type

xcord

ycord

 

 

 
                               

                                                                             

 


                                1..1                                                                      

                                                    

                                                          

                                       0..*               1..1                                             

 

                                                             0..*                                

HominidDirection HD

 

HMid

GIid

direction

 

 

HdAction0()

HdAction1()

HdAction2()

HdAction3()

 

 

 
                                                                                   1..1

 

 


      

HominidLocation HO

 

HOid

AIid

Location

 

HlAction0()

HlAction1()

HlAction2()

HlAction3()

HlAction4()

 
                                                                                                                   2..2                                                                                                                                                                                                                      

                                                                                                                                                                                                                                                                                                                                                1..1

                                                                                                                  

                                                                                                                                                    

                                                                                             

 

 

 

 

 

 

 


Figure 2.1: UML class diagram for Hominid-Grid application.

                                                      3. SCHEMA FILE

 

 

Grid GI /* Grid which defines the cells of the Hominoid */

{

 GIid gridid       c8 1 /* Grid     Id         */

 HNid bdenodeid    c8 1 /* node id */

 type celltype     i4 0 /* Represents either   */

                    /*   0 -> Wall         */

                    /*   1 -> Path         */

 xcord cellxcord   i4 0 /* X-Co ordinate */

 ycord cellycord   i4 0 /* Y-Co ordinate */

}

 

Hominoid HM /* Hominoid which defines the object that moves in the Game*/

{

 HMid     hominoidid   c8 1 /* Hominoid Id   */

 GIid     gridid       c8 1 /* Grid     Id   */

 dir    direction    i4 0 /* Face Direction of Hominoid */

                    /* EAST  -> 0 */

                    /* NORTH -> 1 */

                    /* WEST  -> 2 */

                    /* SOUTH -> 3 */

}

 

HominoidDir HD  /* Hominoid details */

 {

  HDid HominoidId         c8 1 /* unique id of hominoid */

  AIid ActiveInstanceId   c8 s /* foreign key from AI table */

  dir  direction          i4 0 /* EAST=0, NORTH = 1, WEST=2, SOUTH=3 */

 }

 

Hominoidlocation HO  /* location coordinate of the hominoid */

 {

  HOid HominoidLocation c8 1 /* unique id of homonoid location */

  AIid ActiveInstanceId c8 s /* foreign key from AI table*/

  location location        i4 0  /* x-or-y-coordinate value */

 }

 


 

4. STATE MODELS

 

4.1 State Model for Homind’s Direction Class : This state HD has four states, namely EAST, WEST, NORTH and SOUTH. The transition from one state to another state is possible by generation of one of three events, TL (turn Left), TR(turm Right) or ADV(advance).

 

 

 

       AD/HY : decrement

 

 


      TR                                                          TR                                 

                                                         TL                            TL

 

 

 


            AD/HX : decr                                                                                     AD/HX : incr

                                                      TL                                  TL 

                                      TR                                                                   TR

D->S=3

 
 

 


                                                                    AD/HY : increment

           

 Figure 4.1: Hominid’s direction State Model                            

 

4.2 State Model for Homind’s Location Class : Hominid’s Location class HL, has 5 states, namely 0,1,2,3 and 4. Transition from one state to another state is possible by generating one of these two events, increment (incr) and decrement (decr).  

NOTE: There will be two distinct instances of this class, one for each coordinate.

 

 

 

Oval:   4 Oval:   3 Oval:   2 Oval:  1 Oval:   0                  incr                         incr                    incr                    incr           

 


                    decr                       decr                  decr                    decr

 

 

Figure 4.2: Hominid’s Location State Model

 

 

 

 

 

 

5. OBJECT COMMUNICATION DIAGRAM

 

 

There are three 'entity' classes in the Hominid Object Communications Model.

 

PA – this is a PathAssigner program which generates one of three events “turn Left”,

            “turn Right” or “advance” to Hominid’s direction instance HD.

 

HD – this is Hominid’s direction class; it remembers the Hominid's orientation D  in        {N|E|S|W} and it generates one of two events “increment’ or “decrement” to          each of Hominid’s Location (HO or HL) instances (HX and HY).

 

HO or HL? -  this class  holds the Hominid's Cartesian coordinate along one grid axis.  

            [NOTE: There are two object instances in class HL, one for X and one forY.

            This agrees with the multiplicity of the HD ---> HO or HL relation link.  RJL]                                          

 

 

 

 

 


      

 

                                            TL     ADV   TR

 

 

 

 

 

 

 


                                     increment              decrement                                    

 

Rounded Rectangle:       HL
 

 

 

 

 

 


Figure 4.1 : Object-Class Communication Diagram for Hominid-Grid application.

                        (in contrast to  Object-Instance Comunication Diagram, not shown)

 

 

 

                                 

6. SEQUENCE DIAGRAM

 

NAVIGATION BEGINS AT X=2, Y=0 AND D=WEST;

                One HD sends events to two HL instances HX and HY

 

PAssigner PA     HominidDirection HD     HominidXLocation     HominidYLocation                   

PA

 

HD

 

HX

 

HY

 
 


                                            

               ADV              

                                             decrement                                             

                                                                                         x=1

 

      

                   ADV

                                                   decrement                      

                                                                                         x=0

 


                  TL

                                               d=3

 

 

                  ADV

                                                                                           increment                   

                                                                                                                              y=1                                                                                                          

 


                 ADV

                                                                                            increment

                                                                                                                             y=2

                   

               ADV                                                       increment                                                                                 

          

                                                                                                                             y=3                                                                                                                 

               ADV          

                                                                              increment

                                                                                                           y=4                          

 


 

               TL                           d=0

 

 

             ADV

                                                       increment

                                                                                         x=1

 

HD

 

HX

 

HY

 
 

 


            ADV

 

                                                      increment

                                                                                        x=2

              ADV

 


                                                     increment

                                                                                         x=3                                                                                     

                 ADV

                                                      increment                         

                                                                                        x=4

 


                 TL                        d=1

 

 


                ADV

                                                                                             decrement

                                                                                                        y=3

 


                ADV

                                                                                              decrement

                                                                                                                            y=2

 


                 ADV

                                                                                                decrement          y=1

          

                ADV

                                                                                             decrement

                                                                                                          y=0

 

 


                   TL                      d=2

 

 

                  ADV

                                            decrement             

 


                                                                                        x=3

                ADV                           decrement

                                                                                        x=2

 

END OF THE NAVIGATION.

Figure 5.1 : Sequence diagram for Navigation of Hominid around the Grid.

 

7. DESCRIPTION OF THE ASSIGNMENTS

 

 

 

6.1 Asgnt 1:  In Asgnt 1, we draw an UML diagram for a Student-Information application, and wrote a schema and dat file associated to that. This is useful for understanding about information modeling, the concepts of Class, Object, attributes, relationships (associations) and inheritance. This also helps to understand the UML notation of representing information modeling. It gives a basice idea about schema and dat files.

 

6.2 Asgnt 2:  In Asgnt 2, we crated 2 reports, for the data file in Asgnt1. We complied the code using CHGEN V.11. This gives the understanding about CHGEN, it’s commands and notations. It helps in learning how to deal access and operate on the data which is store in .dat file.

 

6.3 Takehome Part of Exam I :  Here, we draw class diagrams for Hominid-Grid application, using three types of data structures, and implemented algorithm for isFacingWalll for each data structures. It is useful for understanding the Hominid-Grid application, the algorithm to solve it, and what are the different data structure we can use to solve that problem.

 

6.4 Asgnt 3:  In Asgnt3, we took a specific Grid with 25 cells, out of which 26 are path cells. And assuming an initial starting point, and by changing the facing direction of Hominid we counted the number of events generated for each direction. This helps us understanding how the events are generated and how it affect the navigation of the Hominid.

 

6.5 Asgnt 4: Here we navigated the Hominid around the Grid and recorded these moves in to a logfile, which can be used for BDEreplay. This gives an understanding about how BDE works and what input  are the input and output for that. This assignment also helps understanding the indepth detail about how schema, C/C++ code and BDE are interrelated.

 

6.5 Takehome Part of Exam2: Here we learned about StateModels and about ObjectLifeCycles. By using two StateModels for Hominid-Grid application, we are able to prodece a database, which consists of all the internal moves of the Hominid. This is helpful for understanding, how the objects communicate with each other, and in what sequence all the events are generated.

 

6.6 Final Project:  Here we are integrating all the concepts we learned, how the events are generated based on the StateModels and how they can be processed and how these moves can be used as an input for BDEreplay.

 

8. Viewdefs and Makefile

 

saturn.cs.uml.edu> cat th.viewdefs

define_view TakehomeView write

 

view_element TakehomeView SM 0

view_element TakehomeView AC 0

view_element TakehomeView ST 0

view_element TakehomeView AI 0

view_element TakehomeView TR 0

view_element TakehomeView ET 0

view_element TakehomeView EN 0

view_element TakehomeView EI 0

view_element TakehomeView HD 0

view_element TakehomeView HO 0

 

define_view HomView write

view_element HomView FO 0

view_element HomView GD 0

view_element HomView HG 0

view_element HomView HN 0

view_element HomView HA 0

view_element HomView HL 0

view_element HomView HP 0

view_element HomView HI 0

view_element HomView CG 0

view_element HomView GX 0

view_element HomView GI 0

view_element HomView HM 0

 

saturn.cs.uml.edu> cat Makefile

.SUFFIXES       :.c .C .o .cpp

 

.c.o .C.o .cpp.o        :

        gcc -DGENLOG -g -DDEBUG -DNEW_VERSION -DNO_GHOSTVARS  -c $<

 

OBJS    =       LCPmain.o PAssigner.o HDsetup.o HLsetup.o activeclass.o activeinstance.o eventinstance.o eventtype.o statemodel.o state.o processevent.o transition.o enable.o pr_delete.o pr_dump.o pr_free.o pr_load.o pr_stats.o pr_log.o

 

LCPmain :       $(OBJS)

        gcc -DGENLOG -ansi -g  -DDEBUG -DNEW_VERSION -DNO_GHOSTVARS -o LCPmain.exe $(OBJS)

 

 

 

                                                      9. SCHEMA FILE

 

 

Grid GI /* Grid which defines the cells of the Hominoid */

{

 GIid gridid       c8 1 /* Grid     Id         */

 HNid bdenodeid    c8 1 /* node id */

 type celltype     i4 0 /* Represents either   */

                    /*   0 -> Wall         */

                    /*   1 -> Path         */

 xcord cellxcord   i4 0 /* X-Co ordinate */

 ycord cellycord   i4 0 /* Y-Co ordinate */

}

 

Hominoid HM /* Hominoid which defines the object that moves in the Game*/

{

 HMid     hominoidid  c8 1        /* Hominoid Id   */

 GIid     gridid               c8 1     /* Grid     Id   */

 dir    direction              i4 0      /* Face Direction of Hominoid */

                    /* EAST  = 0,  NORTH = 1, WEST  = 2, SOUTH = 3 */

}

 

HominoidDir HD  /* Hominoid details */

 {

  HDid HominoidId         c8  1 /* unique id of hominoid */

  AIid ActiveInstanceId   c8  s   /* foreign key from AI table */

  dir  direction                    i4  0            /* EAST=0, NORTH = 1, WEST=2, SOUTH=3 */

 }

 

Hominoidlocation HO  /* location coordinate of the hominoid */

/* A last-minute renaming of HL to HO is forced by the prior HL class in BDE's schema.*/

 {

  HOid HominoidLocation c8 1             /* unique id of homonoid location */

  AIid ActiveInstanceId     c8  s             /* foreign key from AI table*/

  location location              i4   0            /* x-or-y-coordinate value */

 }

 

 

 

 

 

 


 

     

                                           10. PROBLEM SOLVING

 

 

·        To solve the problem of mapping in the DoTransition function, we are making a string comparision on the destination state. This state id (STid) is passed to DoTransition function from ProcessOneEvent function. We are getting  the name of the State using StateGetName(STid), and comparing that string with  9 available states in the Hominid-Grid application, and based on the match we are calling that particular function.    

         

                static FUNCTION3(

                void DoTransition,

                hcg_key, STid,

                hcg_key, AIid,

                hcg_key, EIid

                 )

                       {

                          if (strcmp("EAST", StateGetName(STid)) == 0)

                                  (*HdAction0)(EIid);

                         else if (strcmp("NORTH", StateGetName(STid)) == 0)

                                  (*HdAction1)(EIid);

                         else if (strcmp("WEST", StateGetName(STid)) == 0)

                                  (*HdAction2)(EIid);

                         else if (strcmp("SOUTH", StateGetName(STid)) == 0)

                                  (*HdAction3)(EIid);

                         else if (strcmp("0", StateGetName(STid)) == 0)

                                 (*HlAction0)(EIid);

                        else if (strcmp("1", StateGetName(STid)) == 0)

                                (*HlAction1)(EIid);

                       else if (strcmp("2", StateGetName(STid)) == 0)

                                (*HlAction2)(EIid);

                       else if (strcmp("3", StateGetName(STid)) == 0)

                              (*HlAction3)(EIid);

                       else if (strcmp("4", StateGetName(STid)) == 0)

                              (*HlAction4)(EIid);

                  }

 

 

 

 

 

 

 

 

 

                                                 11. REFERENCES

 

 

  1. Fundamentals of Object-Oriendted Design in UML” – MEILIR PAGE-JONES.

 

  1. OBJECT LIFE CYCLES Modelling the World in States “ -  SALLY SHLAER & STEPHEN J. MELLOR.

 

  1. /usr/proj3/case/93f523/93folc/base/src/build3  : olc3common.h

                                                                                         activeclass.c

                                                                                         activeclass.h

                                                                                         activeinstance.c

                                                                                         activeinstance.h

                                                                                         enable.c

                                                                                         enable.h

                                                                                         eventinstance.c

                                                                                         eventinstance.h

                                                                                         eventtype.c

                                                                                         eventtype.h

                                                                                         processevent.c

                                                                                         processevent.h

                                                                                         state.c

                                                                                         state.h

                                                                                         statemodel.c

                                                                                         statemodel.h

                                                                                         transition.c

                                                                                         transition.h

 

  1. GEN V.12 for .sch compilation :

       setenv CASE '/usr/proj3/case';

       alias gen3  /usr/proj3/case/gen/ver_12/sjaganat/executables/alpha/chgen12

 

  1. Handouts :  02s522Asgnt3and4.ppt

                         ChgenAccessMethods.ppt (RLJ – 96/9/19)

                         OOModelling abd Design.ppt (RLJ – 96/2/6)

                         test_architecture.c

                         StateDiagram MetaModel.ppt (RLJ – 2/9/96)

                         SM-DataModel.ppt (RLJ – 96/7/23)

                         02s522Exam2Solution.ppt

 

  1. BDE files : 95sbde_schema.sch                                       

                         /usr/proj3/case/bdealpha/bde/schema/94sbde_schema.sch                                                  

                         ringPathRev4.dat

 

7. This report:  /usr/proj3/case/02s522/Team4/02s522Team4ProjReptRev1.{doc,htm}

 

 

 

 

APPENDIX  A:  Build Scripts

 

saturn.cs.uml.edu> cat compile.script

Script started on Wed May  8 15:46:31 2002

%ls

94sbde_schema.sch        activeclass.h            eventtype.c              processevent.c.original  th.msdat

HDsetup.c                activeinstance.c         eventtype.h              processevent.h           th.sch

HLsetup.c                activeinstance.h         hdsetup.h                project.c                th.viewdefs

HominidDB.dat            compile.script           hlsetup.h                state.c                  transition.c

LCPmain.c                enable.c                 olc3common.h             state.h                  transition.h

Makefile                 enable.h                 passigner.h              statemodel.c

PAssigner.c              eventinstance.c          pathassigner.h           statemodel.h

activeclass.c            eventinstance.h          processevent.c           th.h

 

%setenv CASE '/usr/proj3/case';

alias gen3  /usr/proj3/case/gen/ver_12/sjaganat/executables/alpha/chgen12

gen3 -ansi -metafile -nobp -log th.sch

%alias gen3  /usr/proj3/case/gen/ver_12/sjaganat/executables/alpha/chgen12

%gen3 -ansi -metafile -nobp -log th.sch

 

Chgen V 12 by Sathya, report errors to Dr. Lechner:

 

 

CHGEN Chgen V 12 - Sathya, released Tue Mar 05 23:00:00 GMT 2002, Copyright 2002, University of Mass - Lowell

 

CHGEN-I-DEFAULTQUAL, Using default key size of 8 characters

CHGEN-I-NONDEFAULTQUAL, Using non-default command-line qualifier -ansi

CHGEN-I-NONDEFAULTQUAL, Using non-default command-line qualifier -nobp

CHGEN-I-NONDEFAULTQUAL, Using non-default command-line qualifier -metafile

CHGEN-I-NONDEFAULTQUAL, Using non-default command-line qualifier -log

temp = th.msdat

Processing Complete

 

%ls

94sbde_schema.sch        activeinstance.c         hdsetup.h                pr_log.c                 statemodel.h

HDsetup.c                activeinstance.h         hlsetup.h                pr_stats.c               th.h

HLsetup.c                compile.script           olc3common.h             processevent.c           th.msdat

HominidDB.dat            enable.c                 passigner.h              processevent.c.original  th.sch

LCPmain.c                enable.h                 pathassigner.h           processevent.h           th.viewdefs

Makefile                 eventinstance.c          pr_delete.c              project.c                transition.c

PAssigner.c              eventinstance.h          pr_dump.c                state.c                  transition.h

activeclass.c            eventtype.c              pr_free.c                state.h

activeclass.h            eventtype.h              pr_load.c                statemodel.c

%exit

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

saturn.cs.uml.edu> cat project.script

Script started on Tue May  7 13:58:07 2002

%ls^M^M

HDsetup.c         activeclass.c     eventinstance.c   olc3common.h      pr_log.c          state.h           th.viewdefs

HLsetup.c         activeclass.h     eventinstance.h   passigner.h       pr_stats.c        statemodel.c      transition.c

HominidDB.dat     activeinstance.c  eventtype.c       pr_delete.c       processevent.c    statemodel.h      transition.h

LCPmain.c         activeinstance.h  eventtype.h       pr_dump.c         processevent.h    th.h

Makefile          enable.c          hdsetup.h         pr_free.c         project.script    th.msdat

PAssigner.c       enable.h          hlsetup.h         pr_load.c         state.c           th.sch

 

%make^M^M

gcc -DGENLOG -g -DDEBUG -DNEW_VERSION -DNO_GHOSTVARS  -c LCPmain.c

gcc -DGENLOG -g -DDEBUG -DNEW_VERSION -DNO_GHOSTVARS  -c PAssigner.c

gcc -DGENLOG -g -DDEBUG -DNEW_VERSION -DNO_GHOSTVARS  -c HDsetup.c

gcc -DGENLOG -g -DDEBUG -DNEW_VERSION -DNO_GHOSTVARS  -c HLsetup.c

gcc -DGENLOG -g -DDEBUG -DNEW_VERSION -DNO_GHOSTVARS  -c activeclass.c

gcc -DGENLOG -g -DDEBUG -DNEW_VERSION -DNO_GHOSTVARS  -c activeinstance.c

gcc -DGENLOG -g -DDEBUG -DNEW_VERSION -DNO_GHOSTVARS  -c eventinstance.c

gcc -DGENLOG -g -DDEBUG -DNEW_VERSION -DNO_GHOSTVARS  -c eventtype.c

gcc -DGENLOG -g -DDEBUG -DNEW_VERSION -DNO_GHOSTVARS  -c statemodel.c

gcc -DGENLOG -g -DDEBUG -DNEW_VERSION -DNO_GHOSTVARS  -c state.c

state.c: In function `StateCreate':

state.c:49: warning: assignment makes integer from pointer without a cast

state.c: In function `StateGetActFunc':

state.c:60: warning: cast to pointer from integer of different size

gcc -DGENLOG -g -DDEBUG -DNEW_VERSION -DNO_GHOSTVARS  -c processevent.c

gcc -DGENLOG -g -DDEBUG -DNEW_VERSION -DNO_GHOSTVARS  -c transition.c

gcc -DGENLOG -g -DDEBUG -DNEW_VERSION -DNO_GHOSTVARS  -c enable.c

gcc -DGENLOG -g -DDEBUG -DNEW_VERSION -DNO_GHOSTVARS  -c pr_delete.c

gcc -DGENLOG -g -DDEBUG -DNEW_VERSION -DNO_GHOSTVARS  -c pr_dump.c

gcc -DGENLOG -g -DDEBUG -DNEW_VERSION -DNO_GHOSTVARS  -c pr_free.c

gcc -DGENLOG -g -DDEBUG -DNEW_VERSION -DNO_GHOSTVARS  -c pr_load.c

pr_load.c: In function `pr_link':

pr_load.c:2023: warning: comparison of distinct pointer types lacks a cast

pr_load.c:2024: warning: comparison of distinct pointer types lacks a cast

gcc -DGENLOG -g -DDEBUG -DNEW_VERSION -DNO_GHOSTVARS  -c pr_stats.c

gcc -DGENLOG -g -DDEBUG -DNEW_VERSION -DNO_GHOSTVARS  -c pr_log.c

gcc -DGENLOG -ansi -g  -DDEBUG -DNEW_VERSION -DNO_GHOSTVARS -o LCPmain.exe LCPmain.o PAssigner.o HDsetup.o HLsetup.o activecl$

 pr_free.o pr_load.o pr_stats.o pr_log.o

 

%ls^M^M

HDsetup.c         PAssigner.c       enable.h          hlsetup.h         pr_load.c         project.script    th.sch

HDsetup.o         PAssigner.o       enable.o          olc3common.h      pr_load.o         state.c           th.viewdefs

HLsetup.c         activeclass.c     eventinstance.c   passigner.h       pr_log.c          state.h           transition.c

HLsetup.o         activeclass.h     eventinstance.h   pr_delete.c       pr_log.o          state.o           transition.h

HominidDB.dat     activeclass.o     eventinstance.o   pr_delete.o       pr_stats.c        statemodel.c      transition.o

LCPmain.c         activeinstance.c  eventtype.c       pr_dump.c         pr_stats.o        statemodel.h

LCPmain.exe       activeinstance.h  eventtype.h       pr_dump.o         processevent.c    statemodel.o

LCPmain.o         activeinstance.o  eventtype.o       pr_free.c         processevent.h    th.h

Makefile          enable.c          hdsetup.h         pr_free.o         processevent.o    th.msdat

 


 

 

                                      Appendix B: INPUT AND OUTPUT FILES

 

 

 

B.1 Input files : HominidDB.dat

 

saturn.cs.uml.edu> cat HominidDB.dat

 SM650001 HDSM HD State Machine

 SM650002 HLSM HL State Machine

 AC650001 SM650001 HD's direction Active Class

 AC650002 SM650002 HD's advance Active Class

 ST650001 SM650001 HdAction0                        536897120 EAST

 ST650002 SM650001 HdAction1                        536898176 NORTH

 ST650003 SM650001 HdAction2                        536899200 WEST

 ST650004 SM650001 HdAction3                        536900256 SOUTH

 ST650005 SM650002 HlAction0                        536901536 0

 ST650006 SM650002 HlAction1                        536902720 1

 ST650007 SM650002 HlAction2                        536904096 2

 ST650008 SM650002 HlAction3                        536905472 3

 ST650009 SM650002 HlAction4                        536906848 4

 AI650001 AC650001 WEST                                                                             HDinstance                               

 AI650002 AC650002 0                                                                                HYinstance                               

 AI650003 AC650002 2                                                                                HXinstance                               

 TR650001 ST650001 ST650002

 TR650002 ST650001 ST650004

 TR650003 ST650001 ST650001

 TR650004 ST650003 ST650002

 TR650005 ST650003 ST650004

 TR650006 ST650003 ST650003

 TR650007 ST650002 ST650002

 TR650008 ST650002 ST650003

 TR650009 ST650002 ST650001

 TR650010 ST650004 ST650001

 TR650011 ST650004 ST650004

 TR650012 ST650004 ST650003

 TR650013 ST650005 ST650006

 TR650014 ST650006 ST650005

 TR650015 ST650006 ST650007

 TR650016 ST650007 ST650006

 TR650017 ST650007 ST650008

 TR650018 ST650008 ST650007

 TR650019 ST650008 ST650009

 TR650020 ST650009 ST650008

 ET650001 SM650001 HD01     turn Left

 ET650002 SM650001 HD02     turn Right

 ET650003 SM650001 HD03     advance

 ET650004 SM650002 HL01     increment

 ET650005 SM650002 HL02     decrement

 EN650001 ET650001 TR650001

 EN650002 ET650002 TR650002

 EN650003 ET650003 TR650003

 EN650004 ET650002 TR650004

 EN650005 ET650001 TR650005

 EN650006 ET650003 TR650006

 EN650007 ET650003 TR650007

 EN650008 ET650001 TR650008

 EN650009 ET650002 TR650009

 EN650010 ET650001 TR650010

 EN650011 ET650003 TR650011

 EN650012 ET650002 TR650012

 EN650013 ET650004 TR650013

 EN650014 ET650005 TR650014

 EN650015 ET650004 TR650015

 EN650016 ET650005 TR650016

 EN650017 ET650004 TR650017

 EN650018 ET650005 TR650018

 EN650019 ET650004 TR650019

 EN650020 ET650005 TR650020

 HG000001 FS010000 HN010000 LECHNER      19FEB02/2224 19FEB02/2224 ringPath.dat

$

 HN000004 HG000001 FS010000 R  60.0000  60.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0

$

 HN000005 HG000001 FS010000 R  60.0000 110.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0

$

 HN000006 HG000001 FS010000 R  60.0000 160.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0

$

 HN000007 HG000001 FS010000 R  60.0000 210.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0

$

 HN000008 HG000001 FS010000 R  60.0000 260.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0

$

 HN000009 HG000001 FS010000 R 110.0000 260.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0

$

 HN000010 HG000001 FS010000 R 160.0000 260.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0

$

 HN000011 HG000001 FS010000 R 210.0000 260.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0

$

 HN000012 HG000001 FS010000 R 260.0000 260.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0

$

 HN000013 HG000001 FS010000 R 260.0000 210.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0

$

 HN000014 HG000001 FS010000 R 260.0000 160.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0

$

 HN000015 HG000001 FS010000 R 260.0000 110.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0

$

 HN000016 HG000001 FS010000 R 260.0000  60.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0

$

 HN000017 HG000001 FS010000 R 210.0000  60.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0

$

 HN000018 HG000001 FS010000 R 160.0000  60.0000  48.0000  46.0000 Fixed                      19.0000 -44.0000       30

$

 HN000019 HG000001 FS010000 R 110.0000  60.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0

$

 HN000020 HG000001 FS010000 R  59.0000  59.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0

$

 HA000001 HN000018 DA010009  19.0000 -14.0000   0.0000       37       16 *helvetica-bold-r*140*    EAST

$

 CG000001 HG000001 370.0000  25.0000  50.0000   0.0000

 CG000002 HG000001 514.0000 459.0000 372.0000  74.0000

 CG000003 HG000001 173.0000 450.0000 290.0000  58.0000

 GX000001 CG000001 DA010009   0.0000 Fixed                      36.0000  -6.0000       72       13 ringPath.dat

$

 GX000002 CG000002 DA010009   0.0000 *helvetica-bold-r*180*    175.0000  -8.0000      331       21 ringPath.dat: Oth for

Homi$

 GX000003 CG000002 DA010009   0.0000 *helvetica-bold-r*180*    175.0000 -29.0000      304       21 Created 020219 then

edited$

 GX000004 CG000003 DA010009   0.0000 *helvetica-bold-r*140*    141.7466 -64.0000      246       16 HN.HGid was HG000000

and n$

 GX000005 CG000003 DA010009   0.0000 *helvetica-bold-r*140*    141.0000 -107.0000      218       16 editing to HG000001

to be$

 GX000006 CG000003 DA010009   0.0000 *helvetica-bold-r*140*    141.0000 -150.0000      218       16 ManualAdd:prevLine

yPos h$

GI000000 HN000020 1 0 0

GI000001 HN000019 1 1 0

GI000002 HN000018 1 2 0

GI000003 HN000017 1 3 0

GI000004 HN000016 1 4 0

GI000005 HN000015 1 4 1

GI000006 HN000014 1 4 2

GI000007 HN000013 1 4 3

GI000008 HN000012 1 4 4

GI000009 HN000011 1 3 4

GI000010 HN000010 1 2 4

GI000011 HN000009 1 1 4

GI000012 HN000008 1 0 4

GI000013 HN000007 1 0 3

GI000014 HN000006 1 0 2

GI000015 HN000005 1 0 1

HM000001 GI000002 0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

B.2 Output files : LCPmain.exe

                              Hominid.dat

                              hompathlog.txt

                              hompathlogDB1.dat

                              logdata.txt

 

 

saturn.cs.uml.edu> LCPmain.exe

Warning: unknown table $ found in scanned datafile HominidDB.dat, ignored.

Warning: unknown table $ found in scanned datafile HominidDB.dat, ignored.

Warning: unknown table $ found in scanned datafile HominidDB.dat, ignored.

Warning: unknown table $ found in scanned datafile HominidDB.dat, ignored.

Warning: unknown table $ found in scanned datafile HominidDB.dat, ignored.

Warning: unknown table $ found in scanned datafile HominidDB.dat, ignored.

Warning: unknown table $ found in scanned datafile HominidDB.dat, ignored.

Warning: unknown table $ found in scanned datafile HominidDB.dat, ignored.

Warning: unknown table $ found in scanned datafile HominidDB.dat, ignored.

Warning: unknown table $ found in scanned datafile HominidDB.dat, ignored.

Warning: unknown table $ found in scanned datafile HominidDB.dat, ignored.

Warning: unknown table $ found in scanned datafile HominidDB.dat, ignored.

Warning: unknown table $ found in scanned datafile HominidDB.dat, ignored.

Warning: unknown table $ found in scanned datafile HominidDB.dat, ignored.

Warning: unknown table $ found in scanned datafile HominidDB.dat, ignored.

Warning: unknown table $ found in scanned datafile HominidDB.dat, ignored.

Warning: unknown table $ found in scanned datafile HominidDB.dat, ignored.

Warning: unknown table $ found in scanned datafile HominidDB.dat, ignored.

Warning: unknown table $ found in scanned datafile HominidDB.dat, ignored.

Warning: unknown table $ found in scanned datafile HominidDB.dat, ignored.

Warning: unknown table Ho found in scanned datafile HominidDB.dat, ignored.

Warning: unknown table ed found in scanned datafile HominidDB.dat, ignored.

Warning: unknown table an found in scanned datafile HominidDB.dat, ignored.

Warning: unknown table to found in scanned datafile HominidDB.dat, ignored.

Warning: unknown table yP found in scanned datafile HominidDB.dat, ignored.

Warning: unknown table  found in scanned datafile HominidDB.dat, ignored.

Warning: unknown table  found in scanned datafile HominidDB.dat, ignored.

Warning: unknown table  found in scanned datafile HominidDB.dat, ignored.

Warning: unknown table () found in datafile, ignored.

Warning: unknown table ($) found in datafile, ignored.

Warning: unknown table ($) found in datafile, ignored.

Warning: unknown table ($) found in datafile, ignored.

Warning: unknown table ($) found in datafile, ignored.

Warning: unknown table ($) found in datafile, ignored.

Warning: unknown table ($) found in datafile, ignored.

Warning: unknown table ($) found in datafile, ignored.

Warning: unknown table ($) found in datafile, ignored.

Warning: unknown table ($) found in datafile, ignored.

Warning: unknown table ($) found in datafile, ignored.

Warning: unknown table ($) found in datafile, ignored.

Warning: unknown table ($) found in datafile, ignored.

Warning: unknown table ($) found in datafile, ignored.

Warning: unknown table ($) found in datafile, ignored.

Warning: unknown table ($) found in datafile, ignored.

Warning: unknown table ($) found in datafile, ignored.

Warning: unknown table ($) found in datafile, ignored.

Warning: unknown table ($) found in datafile, ignored.

Warning: unknown table ($) found in datafile, ignored.

Warning: unknown table ($) found in datafile, ignored.

Warning: unknown table (Ho) found in datafile, ignored.

Warning: unknown table (ed) found in datafile, ignored.

Warning: unknown table (an) found in datafile, ignored.

Warning: unknown table (to) found in datafile, ignored.

Warning: unknown table (yP) found in datafile, ignored.

 Warning: unknown table () found in datafile, ignored.

Warning: unknown table () found in datafile, ignored.

Warning: unknown table () found in datafile, ignored.

 

 

 ***************************************************************************************

 

 

            HOMINID IS AT  X = 2, Y =  0, DIRECTION =  2,  AND ABOUT TO ADVANCE ONE CELL.

The primary key deleted is HM000001

 Warning: null HA.DAid : expanded to at most '?^ for pkey 201326594x

 Warning: null HA.txtfont : expanded to at most '?^ for pkey 201326594x

 

CURRENT STATE  = WEST

 

 Iam in HdAction2

 

 GENERATING AN EVENT FOR DECREMEMENT

 The primary key deleted is EI000001

 

 

 

 ***************************************************************************************

 

 

            HOMINID IS AT  X = 2, Y =  0, DIRECTION =  2,  AND ABOUT TO ADVANCE ONE CELL.

The primary key deleted is HM000002

 Warning: null HA.DAid : expanded to at most '?^ for pkey 201326595x

 Warning: null HA.txtfont : expanded to at most '?^ for pkey 201326595x

 

CURRENT STATE  = 2

 

 Iam in HlAction1

The primary key deleted is EI000002

 

CURRENT STATE  = WEST

 

 Iam in HdAction2

 

 GENERATING AN EVENT FOR DECREMEMENT

 The primary key deleted is EI000003

 

 

   ***************************************************************************************

 

 

            HOMINID IS AT  X = 1, Y =  0, DIRECTION =  2,  AND ABOUT TO ADVANCE ONE CELL.

The primary key deleted is HM000003

 Warning: null HA.DAid : expanded to at most '?^ for pkey 201326596x

 Warning: null HA.txtfont : expanded to at most '?^ for pkey 201326596x

 

CURRENT STATE  = 1

 

 Iam in Hlaction0

The primary key deleted is EI000004

 

CURRENT STATE  = WEST

 

 Iam in HdAction2

 

 GENERATING AN EVENT FOR DECREMEMENT

 The primary key deleted is EI000005

 

 

 

 ***************************************************************************************

 

 

            HOMINID IS AT  X = 0, Y =  0, DIRECTION =  2,  AND ABOUT TO MAKE A LEFT

The primary key deleted is HM000004

 Warning: null HA.DAid : expanded to at most '?^ for pkey 201326597x

 Warning: null HA.txtfont : expanded to at most '?^ for pkey 201326597x

 

CURRENT STATE  = 0

The primary key deleted is EI000006

 

CURRENT STATE  = WEST

 

 Iam in HdAction3

The primary key deleted is EI000007

 

 

 

 ***************************************************************************************

 

 

            HOMINID IS AT  X = 0, Y =  0, DIRECTION =  3,  AND ABOUT TO ADVANCE ONE CELL.

The primary key deleted is HM000005

 Warning: null HA.DAid : expanded to at most '?^ for pkey 201326598x

 Warning: null HA.txtfont : expanded to at most '?^ for pkey 201326598x

 

CURRENT STATE  = SOUTH

 

 Iam in HdAction3

 

 GENERATING AN EVENT FOR DECREMENT

The primary key deleted is EI000008

 

 

***************************************************************************************

 

 

            HOMINID IS AT  X = 0, Y =  0, DIRECTION =  3,  AND ABOUT TO ADVANCE ONE CELL.

The primary key deleted is HM000006

 Warning: null HA.DAid : expanded to at most '?^ for pkey 201326599x

 Warning: null HA.txtfont : expanded to at most '?^ for pkey 201326599x

 

CURRENT STATE  = 0

 

 Iam in HlAction1

The primary key deleted is EI000009

 

CURRENT STATE  = SOUTH

 

 Iam in HdAction3

 

 GENERATING AN EVENT FOR DECREMENT

The primary key deleted is EI000010

 

 

 

 ***************************************************************************************

 

 

            HOMINID IS AT  X = 0, Y =  1, DIRECTION =  3,  AND ABOUT TO ADVANCE ONE CELL.

The primary key deleted is HM000007

 Warning: null HA.DAid : expanded to at most '?^ for pkey 201326600x

 Warning: null HA.txtfont : expanded to at most '?^ for pkey 201326600x

 

CURRENT STATE  = 1

 

 Iam in HlAction2

The primary key deleted is EI000011

 

CURRENT STATE  = SOUTH

 

 Iam in HdAction3

 

 GENERATING AN EVENT FOR DECREMENT

The primary key deleted is EI000012

 

 

 

 ***************************************************************************************

 

 

            HOMINID IS AT  X = 0, Y =  2, DIRECTION =  3,  AND ABOUT TO ADVANCE ONE CELL.

The primary key deleted is HM000008

 Warning: null HA.DAid : expanded to at most '?^ for pkey 201326601x

 Warning: null HA.txtfont : expanded to at most '?^ for pkey 201326601x

 

CURRENT STATE  = 2

 

 Iam in HlAction3

The primary key deleted is EI000013

 

CURRENT STATE  = SOUTH

 

 Iam in HdAction3

 

 GENERATING AN EVENT FOR DECREMENT

The primary key deleted is EI000014

 

 

 ***************************************************************************************

 

 

            HOMINID IS AT  X = 0, Y =  3, DIRECTION =  3,  AND ABOUT TO ADVANCE ONE CELL.

The primary key deleted is HM000009

 Warning: null HA.DAid : expanded to at most '?^ for pkey 201326602x

 Warning: null HA.txtfont : expanded to at most '?^ for pkey 201326602x

 

CURRENT STATE  = 3

 

 Iam in HlAction4

The primary key deleted is EI000015

 

CURRENT STATE  = SOUTH

 

 Iam in HdAction3

 

 GENERATING AN EVENT FOR DECREMENT

The primary key deleted is EI000016

 

***************************************************************************************

 

 

            HOMINID IS AT  X = 0, Y =  4, DIRECTION =  3,  AND ABOUT TO MAKE A LEFT

The primary key deleted is HM000010

 Warning: null HA.DAid : expanded to at most '?^ for pkey 201326603x

 Warning: null HA.txtfont : expanded to at most '?^ for pkey 201326603x

 

CURRENT STATE  = 4

The primary key deleted is EI000017

 

CURRENT STATE  = SOUTH

 

 Iam in HdAction0

The primary key deleted is EI000018

 

 

 

 ***************************************************************************************

 

 

            HOMINID IS AT  X = 0, Y =  4, DIRECTION =  0,  AND ABOUT TO ADVANCE ONE CELL.

The primary key deleted is HM000011

 Warning: null HA.DAid : expanded to at most '?^ for pkey 201326604x

 Warning: null HA.txtfont : expanded to at most '?^ for pkey 201326604x

 

CURRENT STATE  = EAST

 

 Iam in HdAction0

 

 GENERATING AN EVENT FOR DECREMENT

The primary key deleted is EI000019

 

***************************************************************************************

 

 

            HOMINID IS AT  X = 0, Y =  4, DIRECTION =  0,  AND ABOUT TO ADVANCE ONE CELL.

The primary key deleted is HM000012

 Warning: null HA.DAid : expanded to at most '?^ for pkey 201326605x

 Warning: null HA.txtfont : expanded to at most '?^ for pkey 201326605x

 

CURRENT STATE  = 0

 

 Iam in HlAction1

The primary key deleted is EI000020

 

CURRENT STATE  = EAST

 

 Iam in HdAction0

 

 GENERATING AN EVENT FOR DECREMENT

The primary key deleted is EI000021

 

***************************************************************************************

 

 

            HOMINID IS AT  X = 1, Y =  4, DIRECTION =  0,  AND ABOUT TO ADVANCE ONE CELL.

The primary key deleted is HM000013

 Warning: null HA.DAid : expanded to at most '?^ for pkey 201326606x

 Warning: null HA.txtfont : expanded to at most '?^ for pkey 201326606x

 

CURRENT STATE  = 1

 

 Iam in HlAction2

The primary key deleted is EI000022

 

CURRENT STATE  = EAST

 

 Iam in HdAction0

 

 GENERATING AN EVENT FOR DECREMENT

The primary key deleted is EI000023

 

 

 

 ***************************************************************************************

 

 

            HOMINID IS AT  X = 2, Y =  4, DIRECTION =  0,  AND ABOUT TO ADVANCE ONE CELL.

The primary key deleted is HM000014

 Warning: null HA.DAid : expanded to at most '?^ for pkey 201326607x

 Warning: null HA.txtfont : expanded to at most '?^ for pkey 201326607x

 

CURRENT STATE  = 2

 

 Iam in HlAction3

The primary key deleted is EI000024

 

CURRENT STATE  = EAST

 

 Iam in HdAction0

 

 GENERATING AN EVENT FOR DECREMENT

The primary key deleted is EI000025

 

 

 

 ***************************************************************************************

 

 

            HOMINID IS AT  X = 3, Y =  4, DIRECTION =  0,  AND ABOUT TO ADVANCE ONE CELL.

The primary key deleted is HM000015

 Warning: null HA.DAid : expanded to at most '?^ for pkey 201326608x

 Warning: null HA.txtfont : expanded to at most '?^ for pkey 201326608x

 

CURRENT STATE  = 3

 

 Iam in HlAction4

The primary key deleted is EI000026

 

CURRENT STATE  = EAST

 

 Iam in HdAction0

 

 GENERATING AN EVENT FOR DECREMENT

The primary key deleted is EI000027

 

 

***************************************************************************************

 

 

            HOMINID IS AT  X = 4, Y =  4, DIRECTION =  0,  AND ABOUT TO MAKE A LEFT

The primary key deleted is HM000016

 Warning: null HA.DAid : expanded to at most '?^ for pkey 201326609x

 Warning: null HA.txtfont : expanded to at most '?^ for pkey 201326609x

 

CURRENT STATE  = 4

The primary key deleted is EI000028

 

CURRENT STATE  = EAST

 

 Iam in HdAction1

The primary key deleted is EI000029

 

 

 

 ***************************************************************************************

 

 

            HOMINID IS AT  X = 4, Y =  4, DIRECTION =  1,  AND ABOUT TO ADVANCE ONE CELL.

The primary key deleted is HM000017

 Warning: null HA.DAid : expanded to at most '?^ for pkey 201326610x

 Warning: null HA.txtfont : expanded to at most '?^ for pkey 201326610x

 

CURRENT STATE  = NORTH

 

 Iam in HdAction1

 

 GENERATING AN EVENT FOR y LOC DECREMENT

The primary key deleted is EI000030

 

 

***************************************************************************************

 

 

            HOMINID IS AT  X = 4, Y =  4, DIRECTION =  1,  AND ABOUT TO ADVANCE ONE CELL.

The primary key deleted is HM000018

 Warning: null HA.DAid : expanded to at most '?^ for pkey 201326611x

 Warning: null HA.txtfont : expanded to at most '?^ for pkey 201326611x

 

CURRENT STATE  = 4

 

 Iam in HlAction3

The primary key deleted is EI000031

 

CURRENT STATE  = NORTH

 

 Iam in HdAction1

 

 GENERATING AN EVENT FOR y LOC DECREMENT

The primary key deleted is EI000032

 

 

***************************************************************************************

 

 

            HOMINID IS AT  X = 4, Y =  3, DIRECTION =  1,  AND ABOUT TO ADVANCE ONE CELL.

The primary key deleted is HM000019

 Warning: null HA.DAid : expanded to at most '?^ for pkey 201326612x

 Warning: null HA.txtfont : expanded to at most '?^ for pkey 201326612x

 

CURRENT STATE  = 3

 

 Iam in HlAction2

The primary key deleted is EI000033

 

CURRENT STATE  = NORTH

 

 Iam in HdAction1

 

 GENERATING AN EVENT FOR y LOC DECREMENT

The primary key deleted is EI000034

 

 

***************************************************************************************

 

 

            HOMINID IS AT  X = 4, Y =  2, DIRECTION =  1,  AND ABOUT TO ADVANCE ONE CELL.

The primary key deleted is HM000020

 Warning: null HA.DAid : expanded to at most '?^ for pkey 201326613x

 Warning: null HA.txtfont : expanded to at most '?^ for pkey 201326613x

 

CURRENT STATE  = 2

 

 Iam in HlAction1

The primary key deleted is EI000035

 

CURRENT STATE  = NORTH

 

 Iam in HdAction1

 

 GENERATING AN EVENT FOR y LOC DECREMENT

The primary key deleted is EI000036

 

 

 

 ***************************************************************************************

 

 

            HOMINID IS AT  X = 4, Y =  1, DIRECTION =  1,  AND ABOUT TO ADVANCE ONE CELL.

The primary key deleted is HM000021

 Warning: null HA.DAid : expanded to at most '?^ for pkey 201326614x

 Warning: null HA.txtfont : expanded to at most '?^ for pkey 201326614x

 

CURRENT STATE  = 1

 

 Iam in Hlaction0

The primary key deleted is EI000037

 

CURRENT STATE  = NORTH

 

 Iam in HdAction1

 

 GENERATING AN EVENT FOR y LOC DECREMENT

The primary key deleted is EI000038

 

 

***************************************************************************************

 

 

            HOMINID IS AT  X = 4, Y =  0, DIRECTION =  1,  AND ABOUT TO MAKE A LEFT

The primary key deleted is HM000022

 Warning: null HA.DAid : expanded to at most '?^ for pkey 201326615x

 Warning: null HA.txtfont : expanded to at most '?^ for pkey 201326615x

 

CURRENT STATE  = 0

The primary key deleted is EI000039

 

CURRENT STATE  = NORTH

 

 Iam in HdAction2

The primary key deleted is EI000040

 

 

***************************************************************************************

 

 

            HOMINID IS AT  X = 4, Y =  0, DIRECTION =  2,  AND ABOUT TO ADVANCE ONE CELL.

The primary key deleted is HM000023

 Warning: null HA.DAid : expanded to at most '?^ for pkey 201326616x

 Warning: null HA.txtfont : expanded to at most '?^ for pkey 201326616x

 

CURRENT STATE  = WEST

 

 Iam in HdAction2

 

 GENERATING AN EVENT FOR DECREMEMENT

 The primary key deleted is EI000041

 

 

 

 ***************************************************************************************

 

 

            HOMINID IS AT  X = 4, Y =  0, DIRECTION =  2,  AND ABOUT TO ADVANCE ONE CELL.

The primary key deleted is HM000024

 Warning: null HA.DAid : expanded to at most '?^ for pkey 201326617x

 Warning: null HA.txtfont : expanded to at most '?^ for pkey 201326617x

 

CURRENT STATE  = 4

 

 Iam in HlAction3

The primary key deleted is EI000042

 

CURRENT STATE  = WEST

 

 Iam in HdAction2

 

 GENERATING AN EVENT FOR DECREMEMENT

 The primary key deleted is EI000043

 

 

***************************************************************************************

 

 

            HOMINID IS AT  X = 3, Y =  0, DIRECTION =  2,  AND ABOUT TO ADVANCE ONE CELL.

The primary key deleted is HM000025

 Warning: null HA.DAid : expanded to at most '?^ for pkey 201326618x

 Warning: null HA.txtfont : expanded to at most '?^ for pkey 201326618x

 

CURRENT STATE  = 3

 

 Iam in HlAction2

The primary key deleted is EI000044

 

CURRENT STATE  = WEST

 

 Iam in HdAction2

 

 GENERATING AN EVENT FOR DECREMEMENT

 The primary key deleted is EI000045

 

                          

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

saturn.cs.uml.edu> Hominid.dat

SM660001 HDSM HD State Machine

 SM660002 HLSM HL State Machine

 AC660001 SM660001 HD's direction Active Class

 AC660002 SM660002 HD's advance Active Class

 ST660001 SM660001 HdAction0                        536897120 EAST

 ST660002 SM660001 HdAction1                        536898176 NORTH

 ST660003 SM660001 HdAction2                        536899200 WEST

 ST660004 SM660001 HdAction3                        536900256 SOUTH

 ST660005 SM660002 HlAction0                        536901536 0

 ST660006 SM660002 HlAction1                        536902720 1

 ST660007 SM660002 HlAction2                        536904096 2

 ST660008 SM660002 HlAction3                        536905472 3

 ST660009 SM660002 HlAction4                        536906848 4

 AI660001 AC660001 WEST                                                                             HDinstance                               $

 AI660002 AC660002 0                                                                                HYinstance                               $

 AI660003 AC660002 2                                                                                HXinstance                               $

 TR660001 ST660001 ST660002

 TR660002 ST660001 ST660004

 TR660003 ST660001 ST660001

 TR660004 ST660003 ST660002

 TR660005 ST660003 ST660004

 TR660006 ST660003 ST660003

 TR660007 ST660002 ST660002

 TR660008 ST660002 ST660003

 TR660009 ST660002 ST660001

 TR660010 ST660004 ST660001

 TR660011 ST660004 ST660004

 TR660012 ST660004 ST660003

 TR660013 ST660005 ST660006

 TR660014 ST660006 ST660005

 TR660015 ST660006 ST660007

 TR660016 ST660007 ST660006

 TR660017 ST660007 ST660008

 TR660018 ST660008 ST660007

 TR660019 ST660008 ST660009

 TR660020 ST660009 ST660008

 ET660001 SM660001 HD01     turn Left

 ET660002 SM660001 HD02     turn Right

 ET660003 SM660001 HD03     advance

 ET660004 SM660002 HL01     increment

 ET660005 SM660002 HL02     decrement

 EN660001 ET660001 TR660001

 EN660002 ET660002 TR660002

 EN660003 ET660003 TR660003

 EN660004 ET660002 TR660004

 EN660005 ET660001 TR660005

 EN660006 ET660003 TR660006

 EN660007 ET660003 TR660007

 EN660008 ET660001 TR660008

 EN660009 ET660002 TR660009

 EN660010 ET660001 TR660010

 EN660011 ET660003 TR660011

 EN660012 ET660002 TR660012

 EN660013 ET660004 TR660013

 EN660014 ET660005 TR660014

 EN660015 ET660004 TR660015

 EN660016 ET660005 TR660016

 EN660017 ET660004 TR660017

 EN660018 ET660005 TR660018

 EN660019 ET660004 TR660019

 EN660020 ET660005 TR660020

 EI010046 AI660001 AI660003 ET660005        0        0   0.0000   0.0000 decrement                                                           $

 HG010001 FS010000 HN010000 LECHNER      19FEB02/2224 19FEB02/2224 ringPath.dat

 HN010004 HG010001 FS010000 R  60.0000  60.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0        0              $

 HN010005 HG010001 FS010000 R  60.0000 110.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0        0              $

 HN010006 HG010001 FS010000 R  60.0000 160.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0        0              $

 HN010007 HG010001 FS010000 R  60.0000 210.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0        0              $

 HN010008 HG010001 FS010000 R  60.0000 260.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0        0              $

 HN010009 HG010001 FS010000 R 110.0000 260.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0        0              $

 HN010010 HG010001 FS010000 R 160.0000 260.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0        0              $

 HN010011 HG010001 FS010000 R 210.0000 260.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0        0              $

 HN010012 HG010001 FS010000 R 260.0000 260.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0        0              $

 HN010013 HG010001 FS010000 R 260.0000 210.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0        0              $

 HN010014 HG010001 FS010000 R 260.0000 160.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0        0              $

 HN010015 HG010001 FS010000 R 260.0000 110.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0        0              $

 HN010016 HG010001 FS010000 R 260.0000  60.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0        0              $

 HN010017 HG010001 FS010000 R 210.0000  60.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0        0              $

 HN010018 HG010001 FS010000 R 160.0000  60.0000  48.0000  46.0000 Fixed                      19.0000 -44.0000       30        0              $

 HN010019 HG010001 FS010000 R 110.0000  60.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0        0              $

 HN010020 HG010001 FS010000 R  59.0000  59.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0        0              $

HA010001 HN010018 DA010009  19.0000 -14.0000   0.0000       37       16 *helvetica-bold-r*140*    EAST                                      $

 HA010002 HN010018            0.0000   0.0000   0.0000        0        0                           WEST                                      $

 HA010003 HN010018            0.0000   0.0000   0.0000        0        0                           WEST                                      $

 HA010004 HN010019            0.0000   0.0000   0.0000        0        0                           WEST                                      $

 HA010005 HN010020            0.0000   0.0000   0.0000        0        0                           WEST                                      $

 HA010006 HN010020            0.0000   0.0000   0.0000        0        0                           SOUTH                                     $

 HA010007 HN010020            0.0000   0.0000   0.0000        0        0                           SOUTH                                     $

 HA010008 HN010005            0.0000   0.0000   0.0000        0        0                           SOUTH                                     $

 HA010009 HN010006            0.0000   0.0000   0.0000        0        0                           SOUTH                                     $

 HA010010 HN010007            0.0000   0.0000   0.0000        0        0                           SOUTH                                     $

 HA010011 HN010008            0.0000   0.0000   0.0000        0        0                           SOUTH                                     $

 HA010012 HN010008            0.0000   0.0000   0.0000        0        0                           EAST                                      $

 HA010013 HN010008            0.0000   0.0000   0.0000        0        0                           EAST                                      $

 HA010014 HN010009            0.0000   0.0000   0.0000        0        0                           EAST                                      $

 HA010015 HN010010            0.0000   0.0000   0.0000        0        0                           EAST                                      $

 HA010016 HN010011            0.0000   0.0000   0.0000        0        0                           EAST                                      $

 HA010017 HN010012            0.0000   0.0000   0.0000        0        0                           EAST                                      $

 HA010018 HN010012            0.0000   0.0000   0.0000        0        0                           NORTH                                     $

 HA010019 HN010012            0.0000   0.0000   0.0000        0        0                           NORTH                                     $

 HA010020 HN010013            0.0000   0.0000   0.0000        0        0                           NORTH                                     $

 HA010021 HN010014            0.0000   0.0000   0.0000        0        0                           NORTH                                     $

 HA010022 HN010015            0.0000   0.0000   0.0000        0        0                           NORTH                                     $

 HA010023 HN010016            0.0000   0.0000   0.0000        0        0                           NORTH                                     $

 HA010024 HN010016            0.0000   0.0000   0.0000        0        0                           WEST                                      $

 HA010025 HN010016            0.0000   0.0000   0.0000        0        0                           WEST                                      $

 HA010026 HN010017            0.0000   0.0000   0.0000        0        0                           WEST                                      $

CG010001 HG010001 370.0000  25.0000  50.0000   0.0000

 CG010002 HG010001 514.0000 459.0000 372.0000  74.0000

 CG010003 HG010001 173.0000 450.0000 290.0000  58.0000

 GX010001 CG010001 DA010009   0.0000 Fixed                      36.0000  -6.0000       72       13 ringPath.dat                              $

 GX010002 CG010002 DA010009   0.0000 *helvetica-bold-r*180*    175.0000  -8.0000      331       21 ringPath.dat: Oth for                     $

 GX010003 CG010002 DA010009   0.0000 *helvetica-bold-r*180*    175.0000 -29.0000      304       21 Created 020219 then                       $

 GX010004 CG010003 DA010009   0.0000 *helvetica-bold-r*140*    141.7466 -64.0000      246       16 HN.HGid was HG000000                      $

 GX010005 CG010003 DA010009   0.0000 *helvetica-bold-r*140*    141.0000 -107.0000      218       16 editing to HG000001                      $

 GX010006 CG010003 DA010009   0.0000 *helvetica-bold-r*140*    141.0000 -150.0000      218       16 ManualAdd:prevLine                       $

 GI010000 HN010020        1        0        0

 GI010001 HN010019        1        1        0

 GI010002 HN010018        1        2        0

 GI010003 HN010017        1        3        0

 GI010004 HN010016        1        4        0

 GI010005 HN010015        1        4        1

 GI010006 HN010014        1        4        2

 GI010007 HN010013        1        4        3

 GI010008 HN010012        1        4        4

 GI010009 HN010011        1        3        4

 GI010010 HN010010        1        2        4

 GI010011 HN010009        1        1        4

 GI010012 HN010008        1        0        4

 GI010013 HN010007        1        0        3

 GI010014 HN010006        1        0        2

 GI010015 HN010005        1        0        1

 HM010026 GI010003        2

 HD010001 AI660001        3

 HD010002 AI660001        0

 HD010003 AI660001        1

 HD010004 AI660001        2

 HO010001 AI660003        1

 HO010002 AI660003        0

 HO010003 AI660002        1

 HO010004 AI660002        2

 HO010005 AI660002        3

 HO010006 AI660002        4

 HO010007 AI660003        1

 HO010008 AI660003        2

 HO010009 AI660003        3

 HO010010 AI660003        4

 HO010011 AI660002        3

 HO010012 AI660002        2

 HO010013 AI660002        1

 HO010014 AI660002        0

 HO010015 AI660003        3

 HO010016 AI660003        2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

saturn.cs.uml.edu> hompathlog.txt

SR

WA 0

VN TakehomeView

 EI000001 AI650001 AI650001 ET650003        0        0   0.0000   0.0000 advance                                                             $

WA 0

DL HM000001

WA 0

VN HomView

 HM000002 GI000002        2

WA 0

 HA000002 HN000018            0.0000   0.0000   0.0000        0        0       WEST                                      $

WA 0

VN TakehomeView

 EI000002 AI650001 AI650003 ET650005        0        0   0.0000   0.0000 decrement                                                           $

WA 0

DL EI000001

WA 0

 EI000003 AI650001 AI650001 ET650003        0        0   0.0000   0.0000 advance                                                             $

WA 0

DL HM000002

WA 0

VN HomView

 HM000003 GI000002        2

WA 0

 HA000003 HN000018            0.0000   0.0000   0.0000        0        0             WEST                     $

WA 0

VN TakehomeView

 HO000001 AI650003        1

WA 0

DL EI000002

WA 0

 EI000004 AI650001 AI650003 ET650005        0        0   0.0000   0.0000 decrement                                                           $

WA 0

DL EI000003

WA 0

 EI000005 AI650001 AI650001 ET650003        0        0   0.0000   0.0000 advance                                                             $

WA 0

DL HM000003

WA 0

VN HomView

 HM000004 GI000001        2

WA 0

 HA000004 HN000019            0.0000   0.0000   0.0000        0        0       WEST                                      $

 WA 0

VN TakehomeView

 HO000002 AI650003        0

WA 0

DL EI000004

WA 0

 EI000006 AI650001 AI650003 ET650005        0        0   0.0000   0.0000 decrement                                                           $

WA 0

DL EI000005

WA 0

 EI000007 AI650001 AI650001 ET650001        0        0   0.0000   0.0000 turn Left                                                           $

WA 0

DL HM000004

WA 0

VN HomView

 HM000005 GI000000        2

WA 0

 HA000005 HN000020            0.0000   0.0000   0.0000        0        0        WEST                                      $

WA 0

DL EI000006

WA 0

VN TakehomeView

 HD000001 AI650001        3

WA 0

DL EI000007

WA 0

 EI000008 AI650001 AI650001 ET650003        0        0   0.0000   0.0000 advance                                                             $

WA 0

DL HM000005

WA 0

VN HomView

 HM000006 GI000000        3

WA 0

 HA000006 HN000020            0.0000   0.0000   0.0000        0        0          SOUTH                                     $

WA 0

VN TakehomeView

 EI000009 AI650001 AI650002 ET650004        0        0   0.0000   0.0000 increment                                                           $

WA 0

DL EI000008

WA 0

 EI000010 AI650001 AI650001 ET650003        0        0   0.0000   0.0000 advance                                                             $

WA 0

DL HM000006

WA 0

VN HomView

 HM000007 GI000000        3

WA 0

 HA000007 HN000020            0.0000   0.0000   0.0000        0        0        SOUTH                                     $

WA 0

VN TakehomeView

 HO000003 AI650002        1

WA 0

DL EI000009

WA 0

 EI000011 AI650001 AI650002 ET650004        0        0   0.0000   0.0000 increment                                                           $

WA 0

DL EI000010

WA 0

 EI000012 AI650001 AI650001 ET650003        0        0   0.0000   0.0000 advance                                                             $

WA 0

DL HM000007

WA 0

VN HomView

 HM000008 GI000015        3

WA 0

 HA000008 HN000005            0.0000   0.0000   0.0000        0        0       SOUTH                                     $

WA 0

VN TakehomeView

 HO000004 AI650002        2

WA 0

DL EI000011

WA 0

 EI000013 AI650001 AI650002 ET650004        0        0   0.0000   0.0000 increment                                                           $

WA 0

DL EI000012

WA 0

 EI000014 AI650001 AI650001 ET650003        0        0   0.0000   0.0000 advance                                                             $

WA 0

DL HM000008

WA 0

VN HomView

 HM000009 GI000014        3

WA 0

 HA000009 HN000006            0.0000   0.0000   0.0000        0        0           SOUTH                                     $

 WA 0

VN TakehomeView

 HO000005 AI650002        3

WA 0

DL EI000013

WA 0

 EI000015 AI650001 AI650002 ET650004        0        0   0.0000   0.0000 increment                                                           $

WA 0

DL EI000014

WA 0

 EI000016 AI650001 AI650001 ET650003        0        0   0.0000   0.0000 advance                                                             $

WA 0

DL HM000009

WA 0

VN HomView

 HM000010 GI000013        3

WA 0

 HA000010 HN000007            0.0000   0.0000   0.0000        0        0           SOUTH                                     $

WA 0

VN TakehomeView

 HO000006 AI650002        4

WA 0

DL EI000015

WA 0

 EI000017 AI650001 AI650002 ET650004        0        0   0.0000   0.0000 increment                                                           $

WA 0

DL EI000016

WA 0

 EI000018 AI650001 AI650001 ET650001        0        0   0.0000   0.0000 turn Left                                                           $

WA 0

DL HM000010

WA 0

VN HomView

 HM000011 GI000012        3

WA 0

 HA000011 HN000008            0.0000   0.0000   0.0000        0        0        SOUTH                                     $

WA 0

DL EI000017

WA 0

VN TakehomeView

 HD000002 AI650001        0

WA 0

DL EI000018

WA 0

 EI000019 AI650001 AI650001 ET650003        0        0   0.0000   0.0000 advance                                                             $

WA 0

DL HM000011

WA 0

VN HomView

 HM000012 GI000012        0

WA 0

 HA000012 HN000008            0.0000   0.0000   0.0000        0        0       EAST                                      $

WA 0

VN TakehomeView

 EI000020 AI650001 AI650003 ET650004        0        0   0.0000   0.0000 increment                                                           $

WA 0

DL EI000019

WA 0

 EI000021 AI650001 AI650001 ET650003        0        0   0.0000   0.0000 advance                                                             $

WA 0

DL HM000012

WA 0

VN HomView

 HM000013 GI000012        0

WA 0

 HA000013 HN000008            0.0000   0.0000   0.0000        0        0           EAST                                      $

 WA 0

VN TakehomeView

 HO000007 AI650003        1

WA 0

DL EI000020

WA 0

 EI000022 AI650001 AI650003 ET650004        0        0   0.0000   0.0000 increment                                                           $

WA 0

DL EI000021

WA 0

 EI000023 AI650001 AI650001 ET650003        0        0   0.0000   0.0000 advance                                                             $

WA 0

DL HM000013

WA 0

VN HomView

 HM000014 GI000011        0

WA 0

 HA000014 HN000009            0.0000   0.0000   0.0000        0        0       EAST                                      $

WA 0

VN TakehomeView

 HO000008 AI650003        2

WA 0

DL EI000022

WA 0

 EI000024 AI650001 AI650003 ET650004        0        0   0.0000   0.0000 increment                                                           $

WA 0

DL EI000023

WA 0

 EI000025 AI650001 AI650001 ET650003        0        0   0.0000   0.0000 advance                                                             $

WA 0

DL HM000014

WA 0

VN HomView

 HM000015 GI000010        0

WA 0

 HA000015 HN000010            0.0000   0.0000   0.0000        0        0         EAST                                      $

  WA 0

VN TakehomeView

 HO000009 AI650003        3

WA 0

DL EI000024

WA 0

 EI000026 AI650001 AI650003 ET650004        0        0   0.0000   0.0000 increment                                                           $

WA 0

DL EI000025

WA 0

 EI000027 AI650001 AI650001 ET650003        0        0   0.0000   0.0000 advance                                                             $

WA 0

DL HM000015

WA 0

VN HomView

 HM000016 GI000009        0

WA 0

 HA000016 HN000011            0.0000   0.0000   0.0000        0        0           EAST                                      $

 WA 0

VN TakehomeView

 HO000010 AI650003        4

WA 0

DL EI000026

WA 0

 EI000028 AI650001 AI650003 ET650004        0        0   0.0000   0.0000 increment                                                           $

WA 0

DL EI000027

WA 0

 EI000029 AI650001 AI650001 ET650001        0        0   0.0000   0.0000 turn Left                                                           $

WA 0

DL HM000016

WA 0

VN HomView

 HM000017 GI000008        0

WA 0

 HA000017 HN000012            0.0000   0.0000   0.0000        0        0            EAST                                      $

WA 0

DL EI000028

WA 0

VN TakehomeView

 HD000003 AI650001        1

WA 0

DL EI000029

WA 0

 EI000030 AI650001 AI650001 ET650003        0        0   0.0000   0.0000 advance                                                             $

WA 0

DL HM000017

WA 0

VN HomView

 HM000018 GI000008        1

WA 0

 HA000018 HN000012            0.0000   0.0000   0.0000        0        0          NORTH                                     $

 WA 0

VN TakehomeView

 EI000031 AI650001 AI650002 ET650005        0        0   0.0000   0.0000 decrement                                                           $

WA 0

DL EI000030

WA 0

 EI000032 AI650001 AI650001 ET650003        0        0   0.0000   0.0000 advance                                                             $

WA 0

DL HM000018

WA 0

VN HomView

 HM000019 GI000008        1

WA 0

 HA000019 HN000012            0.0000   0.0000   0.0000        0        0          NORTH                                     $

WA 0

VN TakehomeView

 HO000011 AI650002        3

WA 0

DL EI000031

WA 0

 EI000033 AI650001 AI650002 ET650005        0        0   0.0000   0.0000 decrement                                                           $

WA 0

DL EI000032

WA 0

 EI000034 AI650001 AI650001 ET650003        0        0   0.0000   0.0000 advance                                                             $

WA 0

DL HM000019

WA 0

VN HomView

 HM000020 GI000007        1

WA 0

 HA000020 HN000013            0.0000   0.0000   0.0000        0        0          NORTH                                     $

 HA000020 HN000013            0.0000   0.0000   0.0000        0        0            NORTH                                     $

WA 0

VN TakehomeView

 HO000012 AI650002        2

WA 0

DL EI000033

WA 0

 EI000035 AI650001 AI650002 ET650005        0        0   0.0000   0.0000 decrement                                                           $

WA 0

DL EI000034

WA 0

 EI000036 AI650001 AI650001 ET650003        0        0   0.0000   0.0000 advance                                                             $

WA 0

DL HM000020

WA 0

VN HomView

 HM000021 GI000006        1

WA 0

 HA000021 HN000014            0.0000   0.0000   0.0000        0        0        NORTH                                     $

 WA 0

VN TakehomeView

 HO000013 AI650002        1

WA 0

DL EI000035

WA 0

 EI000037 AI650001 AI650002 ET650005        0        0   0.0000   0.0000 decrement                                                           $

WA 0

DL EI000036

WA 0

 EI000038 AI650001 AI650001 ET650003        0        0   0.0000   0.0000 advance                                                             $

WA 0

DL HM000021

WA 0

VN HomView

 HM000022 GI000005        1

WA 0

 HA000022 HN000015            0.0000   0.0000   0.0000        0        0            NORTH                                     $

WA 0

VN TakehomeView

 HO000014 AI650002        0

WA 0

DL EI000037

WA 0

 EI000039 AI650001 AI650002 ET650005        0        0   0.0000   0.0000 decrement                                                           $

WA 0

DL EI000038

WA 0

 EI000040 AI650001 AI650001 ET650001        0        0   0.0000   0.0000 turn Left                                                           $

WA 0

DL HM000022

WA 0

VN HomView

 HM000023 GI000004        1

WA 0

 HA000023 HN000016            0.0000   0.0000   0.0000        0        0          NORTH                                     $

 WA 0

DL EI000039

WA 0

VN TakehomeView

 HD000004 AI650001        2

WA 0

DL EI000040

WA 0

 EI000041 AI650001 AI650001 ET650003        0        0   0.0000   0.0000 advance                                                             $

WA 0

DL HM000023

WA 0

VN HomView

 HM000024 GI000004        2

WA 0

 HA000024 HN000016            0.0000   0.0000   0.0000        0        0             WEST                                      $

WA 0

VN TakehomeView

 EI000042 AI650001 AI650003 ET650005        0        0   0.0000   0.0000 decrement                                                           $

WA 0

DL EI000041

WA 0

 EI000043 AI650001 AI650001 ET650003        0        0   0.0000   0.0000 advance                                                             $

WA 0

DL HM000024

WA 0

VN HomView

 HM000025 GI000004        2

WA 0

 HA000025 HN000016            0.0000   0.0000   0.0000        0        0         WEST                                      $

 WA 0

VN TakehomeView

 HO000015 AI650003        3

WA 0

DL EI000042

WA 0

 EI000044 AI650001 AI650003 ET650005        0        0   0.0000   0.0000 decrement                                                           $

WA 0

DL EI000043

WA 0

 EI000045 AI650001 AI650001 ET650003        0        0   0.0000   0.0000 advance                                                             $

WA 0

DL HM000025

WA 0

VN HomView

 HM000026 GI000003        2

WA 0

 HA000026 HN000017            0.0000   0.0000   0.0000        0        0       WEST                                      $

WA 0

VN TakehomeView

 HO000016 AI650003        2

WA 0

DL EI000044

WA 0

 EI000046 AI650001 AI650003 ET650005        0        0   0.0000   0.0000 decrement                                                           $

WA 0

DL EI000045

 

 

 

 

 

saturn.cs.uml.edu> hompathlogDB1.dat

SM650001 HDSM HD State Machine

 SM650002 HLSM HL State Machine

 AC650001 SM650001 HD's direction Active Class

 AC650002 SM650002 HD's advance Active Class

 ST650001 SM650001 HdAction0                        536897120 EAST

 ST650002 SM650001 HdAction1                        536898176 NORTH

 ST650003 SM650001 HdAction2                        536899200 WEST

 ST650004 SM650001 HdAction3                        536900256 SOUTH

 ST650005 SM650002 HlAction0                        536901536 0

 ST650006 SM650002 HlAction1                        536902720 1

 ST650007 SM650002 HlAction2                        536904096 2

 ST650008 SM650002 HlAction3                        536905472 3

 ST650009 SM650002 HlAction4                        536906848 4

 AI650001 AC650001 WEST                                                                             HDinstance                               $

 AI650002 AC650002 0                                                                                HYinstance                               $

 AI650003 AC650002 2                                                                                HXinstance                               $

 TR650001 ST650001 ST650002

 TR650002 ST650001 ST650004

 TR650003 ST650001 ST650001

 TR650004 ST650003 ST650002

 TR650005 ST650003 ST650004

 TR650006 ST650003 ST650003

 TR650007 ST650002 ST650002

 TR650008 ST650002 ST650003

 TR650009 ST650002 ST650001

 TR650010 ST650004 ST650001

 TR650011 ST650004 ST650004

 TR650012 ST650004 ST650003

 TR650013 ST650005 ST650006

 TR650014 ST650006 ST650005

 TR650015 ST650006 ST650007

 TR650016 ST650007 ST650006

 TR650017 ST650007 ST650008

 TR650018 ST650008 ST650007

 TR650019 ST650008 ST650009

 TR650020 ST650009 ST650008

 ET650001 SM650001 HD01     turn Left

 ET650002 SM650001 HD02     turn Right

 ET650003 SM650001 HD03     advance

 ET650004 SM650002 HL01     increment

 ET650005 SM650002 HL02     decrement

 EN650001 ET650001 TR650001

 EN650002 ET650002 TR650002

 EN650003 ET650003 TR650003

 EN650004 ET650002 TR650004

 EN650005 ET650001 TR650005

 EN650006 ET650003 TR650006

 EN650007 ET650003 TR650007

 EN650008 ET650001 TR650008

 EN650009 ET650002 TR650009

 EN650010 ET650001 TR650010

 EN650011 ET650003 TR650011

 EN650012 ET650002 TR650012

 EN650013 ET650004 TR650013

 EN650014 ET650005 TR650014

 EN650015 ET650004 TR650015

 EN650016 ET650005 TR650016

 EN650017 ET650004 TR650017

 EN650018 ET650005 TR650018

 EN650019 ET650004 TR650019

 EN650020 ET650005 TR650020

 HG000001 FS010000 HN010000 LECHNER      19FEB02/2224 19FEB02/2224 ringPath.dat

 HN000004 HG000001 FS010000 R  60.0000  60.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0        0              $

 HN000005 HG000001 FS010000 R  60.0000 110.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0        0              $

 HN000006 HG000001 FS010000 R  60.0000 160.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0        0              $

 HN000007 HG000001 FS010000 R  60.0000 210.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0        0              $

 HN000008 HG000001 FS010000 R  60.0000 260.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0        0              $

 HN000009 HG000001 FS010000 R 110.0000 260.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0        0              $

 HN000010 HG000001 FS010000 R 160.0000 260.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0        0              $

 HN000011 HG000001 FS010000 R 210.0000 260.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0        0              $

 HN000012 HG000001 FS010000 R 260.0000 260.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0        0              $

 HN000013 HG000001 FS010000 R 260.0000 210.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0        0              $

 HN000014 HG000001 FS010000 R 260.0000 160.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0        0              $

 HN000015 HG000001 FS010000 R 260.0000 110.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0        0              $

 HN000016 HG000001 FS010000 R 260.0000  60.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0        0              $

 HN000017 HG000001 FS010000 R 210.0000  60.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0        0              $

 HN000018 HG000001 FS010000 R 160.0000  60.0000  48.0000  46.0000 Fixed                      19.0000 -44.0000       30        0              $

 HN000019 HG000001 FS010000 R 110.0000  60.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0        0              $

 HN000020 HG000001 FS010000 R  59.0000  59.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0        0              $

 HA000001 HN000018 DA010009  19.0000 -14.0000   0.0000       37       16 *helvetica-bold-r*140*    EAST                                      $

 CG000001 HG000001 370.0000  25.0000  50.0000   0.0000

 CG000002 HG000001 514.0000 459.0000 372.0000  74.0000

 CG000003 HG000001 173.0000 450.0000 290.0000  58.0000

 GX000001 CG000001 DA010009   0.0000 Fixed                      36.0000  -6.0000       72       13 ringPath.dat                              $

 GX000002 CG000002 DA010009   0.0000 *helvetica-bold-r*180*    175.0000  -8.0000      331       21 ringPath.dat: Oth for                     $

 GX000003 CG000002 DA010009   0.0000 *helvetica-bold-r*180*    175.0000 -29.0000      304       21 Created 020219 then                       $

 GX000004 CG000003 DA010009   0.0000 *helvetica-bold-r*140*    141.7466 -64.0000      246       16 HN.HGid was HG000000                      $

 GX000005 CG000003 DA010009   0.0000 *helvetica-bold-r*140*    141.0000 -107.0000      218       16 editing to HG000001                      $

 GX000006 CG000003 DA010009   0.0000 *helvetica-bold-r*140*    141.0000 -150.0000      218       16 ManualAdd:prevLine                       $

 GI000000 HN000020        1        0        0

 GI000001 HN000019        1        1        0

 GI000002 HN000018        1        2        0

 GI000003 HN000017        1        3        0

 GI000004 HN000016        1        4        0

 GI000005 HN000015        1        4        1

 GI000006 HN000014        1        4        2

 GI000007 HN000013        1        4        3

 GI000008 HN000012        1        4        4

 GI000009 HN000011        1        3        4

 GI000010 HN000010        1        2        4

 GI000011 HN000009        1        1        4

 GI000012 HN000008        1        0        4

 GI000013 HN000007        1        0        3

 GI000014 HN000006        1        0        2

 GI000015 HN000005        1        0        1

 HM000001 GI000002        0

 

 

saturn.cs.uml.edu> logdata.txt

LogDataFile HominidDB.dat

 SM650001 HDSM HD State Machine

 SM650002 HLSM HL State Machine

 AC650001 SM650001 HD's direction Active Class

 AC650002 SM650002 HD's advance Active Class

 ST650001 SM650001 HdAction0                        536897120 EAST                                                                           $

 ST650002 SM650001 HdAction1                        536898176 NORTH                                                                          $

 ST650003 SM650001 HdAction2                        536899200 WEST                                                                           $

 ST650004 SM650001 HdAction3                        536900256 SOUTH                                                                          $

 ST650005 SM650002 HlAction0                        536901536 0                                                                              $

 ST650006 SM650002 HlAction1                        536902720 1                                                                              $

 ST650007 SM650002 HlAction2                        536904096 2                                                                              $

 ST650008 SM650002 HlAction3                        536905472 3                                                                              $

 ST650009 SM650002 HlAction4                        536906848 4                                                                              $

 AI650001 AC650001 WEST                                                                             HDinstance                               $

 AI650002 AC650002 0                                                                                HYinstance                               $

 AI650003 AC650002 2                                                                                HXinstance                               $

 TR650001 ST650001 ST650002

 TR650002 ST650001 ST650004

 TR650003 ST650001 ST650001

 TR650004 ST650003 ST650002

 TR650005 ST650003 ST650004

 TR650006 ST650003 ST650003

 TR650007 ST650002 ST650002

 TR650008 ST650002 ST650003

 TR650009 ST650002 ST650001

 TR650010 ST650004 ST650001

 TR650011 ST650004 ST650004

 TR650012 ST650004 ST650003

 TR650013 ST650005 ST650006

 TR650014 ST650006 ST650005

 TR650015 ST650006 ST650007

 TR650016 ST650007 ST650006

 TR650017 ST650007 ST650008

 TR650018 ST650008 ST650007

 TR650019 ST650008 ST650009

 TR650020 ST650009 ST650008

 ET650001 SM650001 HD01     turn Left

 ET650002 SM650001 HD02     turn Right

 ET650003 SM650001 HD03     advance

 ET650004 SM650002 HL01     increment

 ET650005 SM650002 HL02     decrement

 EN650001 ET650001 TR650001

 EN650002 ET650002 TR650002

 EN650003 ET650003 TR650003

 EN650004 ET650002 TR650004

 EN650005 ET650001 TR650005

 EN650006 ET650003 TR650006

 EN650007 ET650003 TR650007

 EN650008 ET650001 TR650008

 EN650009 ET650002 TR650009

 EN650010 ET650001 TR650010

 EN650011 ET650003 TR650011

 EN650012 ET650002 TR650012

 EN650013 ET650004 TR650013

 EN650014 ET650005 TR650014

 EN650015 ET650004 TR650015

 EN650016 ET650005 TR650016

 EN650017 ET650004 TR650017

 EN650018 ET650005 TR650018

 EN650019 ET650004 TR650019

 EN650020 ET650005 TR650020

 HG000001 FS010000 HN010000 LECHNER      19FEB02/2224 19FEB02/2224 ringPath.dat

$

 HN000004 HG000001 FS010000 R  60.0000  60.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0

$

 HN000005 HG000001 FS010000 R  60.0000 110.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0

$

 HN000006 HG000001 FS010000 R  60.0000 160.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0

$

 HN000007 HG000001 FS010000 R  60.0000 210.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0

$

 HN000008 HG000001 FS010000 R  60.0000 260.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0

$

 HN000009 HG000001 FS010000 R 110.0000 260.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0

$

 HN000010 HG000001 FS010000 R 160.0000 260.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0

$

 HN000011 HG000001 FS010000 R 210.0000 260.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0

$

 HN000012 HG000001 FS010000 R 260.0000 260.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0

$

 HN000013 HG000001 FS010000 R 260.0000 210.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0

$

 HN000014 HG000001 FS010000 R 260.0000 160.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0

$

 HN000015 HG000001 FS010000 R 260.0000 110.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0

$

 HN000016 HG000001 FS010000 R 260.0000  60.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0

$

 HN000017 HG000001 FS010000 R 210.0000  60.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0

$

 HN000018 HG000001 FS010000 R 160.0000  60.0000  48.0000  46.0000 Fixed                      19.0000 -44.0000       30

$

 HN000019 HG000001 FS010000 R 110.0000  60.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0

$

 HN000020 HG000001 FS010000 R  59.0000  59.0000  49.0000  49.0000 Fixed                       0.0000   0.0000        0

$

 HA000001 HN000018 DA010009  19.0000 -14.0000   0.0000       37       16 *helvetica-bold-r*140*    EAST

$

 CG000001 HG000001 370.0000  25.0000  50.0000   0.0000

 CG000002 HG000001 514.0000 459.0000 372.0000  74.0000

 CG000003 HG000001 173.0000 450.0000 290.0000  58.0000

 GX000001 CG000001 DA010009   0.0000 Fixed                      36.0000  -6.0000       72       13 ringPath.dat

$

 GX000002 CG000002 DA010009   0.0000 *helvetica-bold-r*180*    175.0000  -8.0000      331       21 ringPath.dat: Oth for

Homi$

 GX000003 CG000002 DA010009   0.0000 *helvetica-bold-r*180*    175.0000 -29.0000      304       21 Created 020219 then

edited$

 GX000004 CG000003 DA010009   0.0000 *helvetica-bold-r*140*    141.7466 -64.0000      246       16 HN.HGid was HG000000

and n$

 GX000005 CG000003 DA010009   0.0000 *helvetica-bold-r*140*    141.0000 -107.0000      218       16 editing to HG000001

to be$

 GX000006 CG000003 DA010009   0.0000 *helvetica-bold-r*140*    141.0000 -150.0000      218       16 ManualAdd:prevLine

yPos h$

GI000000 HN000020 1 0 0

GI000001 HN000019 1 1 0

GI000002 HN000018 1 2 0

GI000003 HN000017 1 3 0

GI000004 HN000016 1 4 0

GI000005 HN000015 1 4 1

GI000006 HN000014 1 4 2

GI000007 HN000013 1 4 3

GI000008 HN000012 1 4 4

GI000009 HN000011 1 3 4

GI000010 HN000010 1 2 4

GI000011 HN000009 1 1 4

GI000012 HN000008 1 0 4

GI000013 HN000007 1 0 3

GI000014 HN000006 1 0 2

GI000015 HN000005 1 0 1

HM000001 GI000002 0

 

 

 

 

 

 

 

 

 

 

 

APPENDIX C:  SOURCE CODE

 

 

Files included   :           LCPmain.c

                                        PAssigner.c

                                        passigner.h

                                        HDsetup.c

                                        hdsetup.h

                                        HLsetup.c

                                        hlsetup.h

                                        th.viewdefs

                                        Makefile

                          

 

 

saturn.cs.uml.edu> cat LCPmain.c

 

#define MAIN

#include <stdio.h>

#include "th.h"

#include "passigner.h"

#include "processevent.h"

 

int loopcontrol= TRUE;

int firstpass=TRUE;

 

int currX=2, currY=0;

int direction=2;

int NoOfEvents=0;

 

 

/* This is the MAIN program, which calls single stepping */

/* function PA_main(), and when it returns the control   */

/* it calls ProcessEvents method to process the event    */

 

int main()

{

 

 /* initializing the database */

 pr_init("th.viewdefs", "HominidDB.dat");

 

 /* loading the database */

 pr_load("TakehomeView", "HominidDB.dat");

 

 

/* logging the changes */

 hcg_log = 0;

 pr_startlog("hompathlog.txt","TakehomeView");

while(loopcontrol== TRUE )

   {

 

 

        /* function call for PAssigner.c */

        PA_main();

 

    

   /* method call for processing events */

 

        ProcessEvents(EventQueueOrder,1);

 

       /* takes care of the extra event generated by advance call*/

       if(NoOfEvents ==1)

        {

                 ProcessEvents(EventQueueOrder,1);

                        NoOfEvents=0;

        }

 

 

        /* condition for stopping the navigation */

        if(!firstpass)

         {

         if(currX == 2 && currY == 0)

          {

                loopcontrol = FALSE;

                break;

          }

     }

    else

     {

       firstpass = FALSE;

     }

 

   }

 

 pr_dump("TakehomeView", "Hominid.dat", 1, "w");

 

 

 return 0;

}

 

 

saturn.cs.uml.edu> cat PAssigner.c

 

#include <stdio.h>

#include <string.h>

#include <time.h>

#include "th.h"

#include "passigner.h"

#include "hdsetup.h"

#include "hlsetup.h"

#include "eventinstance.h"

#include "activeclass.h"

#include "activeinstance.h"

#include "statemodel.h"

#include "processevent.h"

#include "olc3common.h"

 

 

int nextX, nextY;

extern int currX, currY;

 

int isonpath;

int facingwall;

extern int NoOfEvents;

extern int direction;

static int L=0,R=0;

 

 

struct HM *HM_elt;

struct HA *HA_elt;

 

char* getdirString(int direction)

{

        char* dirString;

        if(direction == 0)

                dirString = "EAST";

        else if(direction == 1)

                dirString = "NORTH";

        else if(direction ==2)

                dirString = "WEST";

        else if(direction = 3)

                dirString = "SOUTH";

 

        return dirString;

}

 

 

/* This is a single stepping function which generates one event  */

/* per call and returns control to LCPmain.c  */

void PA_main()

 

{

 NoOfEvents=1;

 if(facingWall() ==1)

       {

        advance(1);

        L=R=0;

        return;

       }

 

 

    else if(facingWall() == 0 && L==0 && R==0)

       {

          turnLeft();

          L=1;

          return;

       }

 

    else if(facingWall() == 0 && L==1 && R==0)

           {

                   turnRight();

                    R=1;

                    return;

           }

     else if(facingWall()==0 && L==1 && R ==1)

           {

                    turnRight();

                    L=R=0;

                    return;

           }

 

 

 

}

 

/* returns whether the cell is on path or not */

 

int isonPath(int nextX, int nextY)

{

    isonpath=0;

    table_loop("HomView", GI)

    {

      if( GIcurr->xcord == nextX && GIcurr->ycord == nextY)

        {

           if(GIcurr->type==1)

            {

              isonpath=1;

              return isonpath;

            }

        }

    }

 return isonpath;

}

 

/* returns whether the Hominid is facing wall or not */

int facingWall()

{

        facingwall = 0;

        if (direction == 0)

        {

                nextX=currX+1;

                nextY=currY;

 

        }

        if (direction == 1)

        {

                nextX=currX;

                nextY=currY-1;

        }

        if (direction == 2)

        {

               nextX=currX-1;

               nextY=currY;

        }

        if (direction == 3)

        {

                nextX=currX;

                nextY=currY+1;

 

        }

 

        if (isonPath(nextX, nextY)==1)

           facingwall= 1;

        else

           facingwall=0;

 

return facingwall;

}

 

/* generates an event that makes Hominid makes a left turn */

void turnLeft()

{

 

       printf("\n\n\n *************************************************************************************** \n\n\n");

       printf( "            HOMINID IS AT  X = %d, Y =  %d, DIRECTION =  %d,  AND ABOUT TO MAKE A LEFT\n",currX, currY,

direction);

 

      /* generating event for turn left */

      GenerateEvent("HDinstance","HDinstance","HD01",0,0,0,0,"turn Left");

 

        /* updating database for BDE replay */

         table_loop("HomView", GI)

        {       if( GIcurr->xcord == currX && GIcurr->ycord == currY)

                 {

                        table_loop("HomView", HM)

                          {   pr_delete(HM);

                                  HM_elt = pr_create(HM);

                                  pr_set_key(HM_elt, GIid, GIcurr->GIid);

                                  //pr_set_int(HM_elt, dir, currentDirection);

                                  pr_set_int(HM_elt, dir, direction);

                                  pr_add("HomView",HM,HM_elt);

                                }

                            table_loop("HomView", HA)

                         {  // pr_delete(HA);

                                 HA_elt = pr_create(HA);

                                 pr_set_key(HA_elt, HNid, GIcurr->HNid);

                                 //pr_set_str(HA_elt, hlabel, getdirString(currentDirection));

 

                                 pr_set_str(HA_elt, hlabel,getdirString(direction));

                                  pr_add("HomView",HA,HA_elt);

                       

                         }

                  }

        }

 

 

}

 

 

 

 

 

/* generates an event that makes Hominid makes a right turn */

void turnRight()

{

      printf("\n\n\n *************************************************************************************** \n\n\n");

       printf( "            HOMINID IS AT  X = %d, Y =  %d, DIRECTION =  %d,  AND ABOUT TO MAKE A RIGHT\n",currX, currY,

direction);

 

     /* generating event for turn right */

     GenerateEvent("HDinstance","HDinstance","HD02",0,0,0,0,"turn Right");

 

        /* updating database for BDE replay */

 

        table_loop("HomView", GI)

        {    if( GIcurr->xcord == currX && GIcurr->ycord == currY)

                        {

                  table_loop("HomView", HM)

                  {   pr_delete(HM);

                      HM_elt = pr_create(HM);

                      pr_set_key(HM_elt, GIid, GIcurr->GIid);

                      //pr_set_int(HM_elt, dir, currentDirection);

                     pr_set_int(HM_elt, dir, direction);

                     pr_add("HomView",HM,HM_elt);

 

                                 }

                 table_loop("HomView", HA)

                { //  pr_delete(HA);

                    HA_elt = pr_create(HA);

                    pr_set_key(HA_elt, HNid, GIcurr->HNid);

                    //pr_set_str(HA_elt,hlabel, getdirString(currentDirection));

                    pr_set_str(HA_elt,hlabel, getdirString(direction));

                    pr_add("HomView",HA,HA_elt);

                }

                        }

        }

 

 

 

}

 

 

 

 

 

/* generates an event that makes Hominid advance one cell */

void advance(int numSquares)

{

    printf("\n\n\n *************************************************************************************** \n\n\n");

     printf( "            HOMINID IS AT  X = %d, Y =  %d, DIRECTION =  %d,  AND ABOUT TO ADVANCE ONE CELL. \n",currX, currY,

direction);

 

   /* generating event for advance */

 

    GenerateEvent("HDinstance", "HDinstance", "HD03",0,0,0,0,"advance");

 

 

    /* updating database for BDE replay */

 

          table_loop("HomView", GI)

        {

            if( GIcurr->xcord == currX && GIcurr->ycord == currY)

                        {

                table_loop("HomView", HM)

                {   pr_delete(HM);

                    HM_elt = pr_create(HM);

                    pr_set_key(HM_elt, GIid, GIcurr->GIid);

                    //pr_set_int(HM_elt, dir, currentDirection);

                    pr_set_int(HM_elt, dir, direction);

                    pr_add("HomView",HM,HM_elt);

                }

 

 

                                 table_loop("HomView", HA)

                {  // pr_delete(HA);

                    HA_elt = pr_create(HA);

                    pr_set_key(HA_elt, HNid, GIcurr->HNid);

                    //pr_set_str(HA_elt, hlabel, getdirString(currentDirection));

                    pr_set_str(HA_elt, hlabel, getdirString(direction));

                    pr_add("HomView",HA,HA_elt);

                    //advOk = true;

    }

               }

 

        }

 

 

}

 

int getX()

{

        return currX;

}

int getY()

{

        return currY;

}

 

 

 

saturn.cs.uml.edu> cat passigner.h

#if !defined(PASSIGNER_H)

#define PASSIGNER_H

 

#include <stdio.h>

/* header file for PAssigner.c */

 

void PA_main();

int isonPath(int , int );

int facingWall();

void turnLeft();

void turnRight();

void advance(int);

int getX();

int getY();

 

#endif

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

saturn.cs.uml.edu> cat HDsetup.c

#include <stdio.h>

 

#include "th.h"

#include "activeclass.h"

#include "activeinstance.h"

#include "eventinstance.h"

#include "statemodel.h"

#include "processevent.h"

#include "hdsetup.h"

 

/**

  *

  *  Function defination

  **/

extern int direction;

extern int NoOfEvents;

 

PROTOTYPE(void HDsetup,   (void))

PROTOTYPE(void HdAction0, (hcg_key EIid))

PROTOTYPE(void HdAction1, (hcg_key EIid))

PROTOTYPE(void HdAction2, (hcg_key EIid))

PROTOTYPE(void HdAction3, (hcg_key EIid))

 

 

/**

  *  HOMINID DIRECTION SETUP

  **/

FUNCTION(

void HDsetup

)

{

 

   hcg_key HDSMid;

   hcg_key HDACid;

   hcg_key HDAIid;

 

static EventTypeList HDEventTypes[] = {

       {"HD01", "turn Left"},

       {"HD02", "turn Right"},

       {"HD03", "advance"}};

 

static StateList HDStates[] = {

       {"EAST",  "HdAction0", HdAction0},

       {"NORTH", "HdAction1", HdAction1},

       {"WEST",  "HdAction2", HdAction2},

       {"SOUTH", "HdAction3", HdAction3}};

static StateTransitionList HDTransitions[] = {

       {"EAST", "NORTH", "HD01"},

       {"EAST", "SOUTH", "HD02"},

       {"EAST", "EAST",  "HD03"},

 

       {"WEST", "NORTH", "HD02"},

       {"WEST", "SOUTH", "HD01"},

       {"WEST", "WEST",  "HD03"},

 

       {"NORTH", "NORTH","HD03"},

       {"NORTH", "WEST", "HD01"},

       {"NORTH", "EAST", "HD02"},

 

       {"SOUTH", "EAST", "HD01"},

       {"SOUTH", "SOUTH","HD03"},

       {"SOUTH", "WEST", "HD02"}};

 

 

 

HDSMid = StateModelCreateCompletely("HD State Machine", "HDSM",

                                     ARRAY_SIZE(HDEventTypes),

                                        HDEventTypes,

                                     ARRAY_SIZE(HDStates), HDStates,

                                     ARRAY_SIZE(HDTransitions),

                                        HDTransitions);

 

HDACid = ActiveClassCreate("HD's direction Active Class", HDSMid);

 

HDAIid = ActiveInstanceCreate("HDinstance", HDACid, "WEST");

}

 

/* function call assosiated with HD state EAST */

FUNCTION1(void HdAction0,hcg_key, EIid)

{

  hcg_key HDid;

  hcg_key AIid;

  struct HD *HD_elt;

  hcg_key AIid2;

 

  printf("\n Iam in HdAction0 \n");

 

 /* stores the ToThisActiveInstance id for comparision */

 

 AIid2 = EventInstanceGetAIid2(EIid);

 

 

  if (strcmp(EventInstanceGetText(EIid), "advance")==0)

   {

        printf("\n GENERATING AN EVENT FOR DECREMENT \n");

        GenerateEvent("HDinstance","HXinstance","HL01",0,0,0,0,"increment");

        NoOfEvents++;

        return;

   }

     /*setting the global variable */

     direction=0;

 

     HD_elt = pr_create(HD);

     pr_set_key(HD_elt, AIid,AIid2);

     pr_set_int(HD_elt,dir, direction);

     pr_add("TakehomeView",HD,HD_elt);

 

}

 

/* function call assosiated with HD state NORTH */

FUNCTION1(void HdAction1,hcg_key,EIid)

{

  hcg_key HDid;

  hcg_key AIid;

  struct HD *HD_elt;

  hcg_key AIid2;

 

printf("\n Iam in HdAction1 \n");

 AIid2 = EventInstanceGetAIid2(EIid);

/* stores the ToThisActiveInstance id for comparision */

 

if (strcmp(EventInstanceGetText(EIid), "advance" )==0)

 {

        printf(" \n GENERATING AN EVENT FOR y LOC DECREMENT \n");

        GenerateEvent("HDinstance","HYinstance","HL02",0,0,0,0,"decrement");

        NoOfEvents++;

        return;

 }

     /*setting the global variable */

     direction=1;

 

     HD_elt = pr_create(HD);

     pr_set_key(HD_elt, AIid,AIid2);

     pr_set_int(HD_elt,dir, direction);

     pr_add("TakehomeView",HD,HD_elt);

 

}

/* function call assosiated with HD state WEST */

FUNCTION1(void HdAction2,hcg_key,EIid)

{

 

  hcg_key HDid;

  hcg_key AIid;

  struct HD *HD_elt;

  hcg_key AIid2;

 

  printf("\n I am in HdAction2 \n");

 

 AIid2 = EventInstanceGetAIid2(EIid);

 

/* stores the ToThisActiveInstance id for comparision */

if (strcmp(EventInstanceGetText(EIid), "advance") == 0)

 {

  printf("\n GENERATING AN EVENT FOR DECREMEMENT \n ");

  GenerateEvent("HDinstance","HXinstance","HL02",0,0,0,0,"decrement");

  NoOfEvents++;

  return;

 }

 

     /*setting the global variable */

     direction=2;

 

     HD_elt = pr_create(HD);

     pr_set_key(HD_elt, AIid,AIid2);

     pr_set_int(HD_elt,dir, direction);

     pr_add("TakehomeView",HD,HD_elt);

 

}

 

/* function call assosiated with HD state SOUTH */

FUNCTION1(void HdAction3,hcg_key,EIid)

{

  hcg_key HDid;

  hcg_key AIid;

  struct HD *HD_elt;

  hcg_key AIid2;

 

 printf("\n Iam in HdAction3 \n");

 AIid2 = EventInstanceGetAIid2(EIid);

/* stores the ToThisActiveInstance id for comparision */

 

 if (strcmp( EventInstanceGetText(EIid), "advance" )==0)

 {

  printf("\n GENERATING AN EVENT FOR DECREMENT \n");

  GenerateEvent("HDinstance","HYinstance","HL01",0,0,0,0,"increment");

  NoOfEvents++;

  return;

 }

     /*setting the global variable */

     direction=3;

 

     HD_elt = pr_create(HD);

     pr_set_key(HD_elt, AIid,AIid2);

     pr_set_int(HD_elt,dir, direction);

     pr_add("TakehomeView",HD,HD_elt);

 

 

}

 

 

 

saturn.cs.uml.edu> cat hdsetup.h

#if !defined(HDSETUP_H)

#define HDSETUP_H

 

#include <stdio.h>

 

/*header file for HDsetup.c */

 

# if !defined OLC3COMMON_H

#    include "olc3common.h"

# endif

 

 

PROTOTYPE(void HDsetup,   (void))

PROTOTYPE(void HdAction0, (hcg_key EIid))

PROTOTYPE(void HdAction1, (hcg_key EIid))

PROTOTYPE(void HdAction2, (hcg_key EIid))

PROTOTYPE(void HdAction3, (hcg_key EIid))

 

#endif

 

 

 

 

 

 

 

 

saturn.cs.uml.edu> cat HLsetup.c

#include <stdio.h>

 

#include "th.h"

#include "hdsetup.h"

#include "hlsetup.h"

#include "activeclass.h"

#include "activeinstance.h"

#include "eventinstance.h"

#include "statemodel.h"

#include "processevent.h"

#include "olc3common.h"

 

/**

  *

  *  Function defination

  *

  **/

 

extern int currX, currY;

 

PROTOTYPE(void HLsetup,   (void))

PROTOTYPE(void HlAction0, (hcg_key EIid))

PROTOTYPE(void HlAction1, (hcg_key EIid))

PROTOTYPE(void HlAction2, (hcg_key EIid))

PROTOTYPE(void HlAction3, (hcg_key EIid))

PROTOTYPE(void HlAction4, (hcg_key EIid))

 

/*

 * HOMINID  LOCATION  SETUP

 **/

 

FUNCTION(

void HLsetup

)

{

 

   hcg_key HLSMid;

   hcg_key HLACid;

   hcg_key HXAIid;

   hcg_key HYAIid;

 

static EventTypeList HLEventTypes[] = {

       {"HL01", "increment"},

       {"HL02", "decrement"}};

 

static StateList HLStates[] = {

       {"0", "HlAction0", HlAction0},

       {"1", "HlAction1", HlAction1},

       {"2", "HlAction2", HlAction2},

       {"3", "HlAction3", HlAction3},

       {"4", "HlAction4", HlAction4}};

static StateTransitionList HLTransitions[] = {

       {"0", "1", "HL01"},

       {"1", "0", "HL02"},

       {"1", "2", "HL01"},

       {"2", "1", "HL02"},

       {"2", "3", "HL01"},

       {"3", "2", "HL02"},

       {"3", "4", "HL01"},

       {"4", "3", "HL02"}};

 

 

 

   HLSMid = StateModelCreateCompletely("HL State Machine", "HLSM",

                                     ARRAY_SIZE(HLEventTypes),

                                     HLEventTypes,

                                     ARRAY_SIZE(HLStates), HLStates,

                                     ARRAY_SIZE(HLTransitions),

                                     HLTransitions);

 

   HLACid = ActiveClassCreate("HD's advance Active Class", HLSMid);

 

 

   HYAIid = ActiveInstanceCreate("HYinstance", HLACid, "0");

 

   HXAIid = ActiveInstanceCreate("HXinstance", HLACid, "2");

}

int update;

/* function call associated with HL, state = 0*/

 

FUNCTION1(void HlAction0,hcg_key,EIid)

{

 hcg_key HOid;

 hcg_key AIid;

 struct HO *HO_elt;

 hcg_key  AIid2;

 

    printf("\n Iam in Hlaction0 \n" );

 

    /* stores ToThisActiveInstance ID for string comparision */

    AIid2 = EventInstanceGetAIid2(EIid);

 

 

 if( strcmp(ActiveInstanceGetName(AIid2),"HXinstance")==0)

  {

        currX=0;

        update=0;

   }

  else if( strcmp(ActiveInstanceGetName(AIid2),"HYinstance")==0)

  {

      currY=0;

      update=0;

  }

 

 HO_elt = pr_create(HO);

     pr_set_key(HO_elt, AIid,AIid2);

     pr_set_int(HO_elt,location, update);

     pr_add("TakehomeView",HO,HO_elt);

 

}

/* function call associated with HL, state = 1*/

FUNCTION1(void HlAction1,hcg_key,EIid)

{

 hcg_key HOid;

 hcg_key AIid;

 struct HO *HO_elt;

 hcg_key  AIid2;

 

    printf("\n Iam in HlAction1 \n");

 

  /* stores ToThisActiveInstance ID for string comparision */

  AIid2 = EventInstanceGetAIid2(EIid);

 

 

  if( strcmp(ActiveInstanceGetName(AIid2),"HXinstance")==0)

  {

        currX=1;

        update=1;

   }

  else if( strcmp(ActiveInstanceGetName(AIid2),"HYinstance")==0)

  {

      currY=1;

      update=1;

  }

 

 HO_elt = pr_create(HO);

     pr_set_key(HO_elt, AIid,AIid2);

     pr_set_int(HO_elt,location, update);

     pr_add("TakehomeView",HO,HO_elt);

}

 

/* function call associated with HL, state = 2*/

FUNCTION1(void HlAction2,hcg_key,EIid)

{

 hcg_key HOid;

 hcg_key AIid;

 struct HO *HO_elt;

 hcg_key AIid2;

 

 printf("\n Iam in HlAction2 \n");

 

 /* stores ToThisActiveInstance ID for string comparision */

 AIid2 = EventInstanceGetAIid2(EIid);

 

 

  if( strcmp(ActiveInstanceGetName(AIid2),"HXinstance")==0)

  {

        currX=2;

        update=2;

   }

  else if( strcmp(ActiveInstanceGetName(AIid2),"HYinstance")==0)

  {

      currY=2;

      update=2;

  }

 

 HO_elt = pr_create(HO);

     pr_set_key(HO_elt, AIid,AIid2);

     pr_set_int(HO_elt,location, update);

     pr_add("TakehomeView",HO,HO_elt);

 

}

 

 

/* function call associated with HL, state = 3*/

FUNCTION1(void HlAction3,hcg_key,EIid)

{

 hcg_key HOid;

 hcg_key AIid;

 struct HO *HO_elt;

 

hcg_key AIid2;

printf("\n Iam in HlAction3 \n");

 

  /* stores ToThisActiveInstance ID for string comparision */

  AIid2 = EventInstanceGetAIid2(EIid);

 

 

  if( strcmp(ActiveInstanceGetName(AIid2),"HXinstance")==0)

  {

        currX=3;

        update=3;

   }

  else if( strcmp(ActiveInstanceGetName(AIid2),"HYinstance")==0)

  {

      currY=3;

      update=3;

  }

  HO_elt = pr_create(HO);

     pr_set_key(HO_elt, AIid,AIid2);

     pr_set_int(HO_elt,location, update);

     pr_add("TakehomeView",HO,HO_elt);

 

}

 

/* function call associated with HL, state = 4*/

FUNCTION1(void HlAction4,hcg_key,EIid)

{

 hcg_key HOid;

 hcg_key AIid;

 struct HO *HO_elt;

 

 hcg_key AIid2;

printf("\n Iam in HlAction4 \n");

 

  /* stores ToThisActiveInstance ID for string comparision */

  AIid2 = EventInstanceGetAIid2(EIid);

 

 

 

  if( strcmp(ActiveInstanceGetName(AIid2),"HXinstance")==0)

  {

        currX=4;

        update=4;

   }

  else if( strcmp(ActiveInstanceGetName(AIid2),"HYinstance")==0)

  {

      currY=4;

      update=4;

  }

  HO_elt = pr_create(HO);

     pr_set_key(HO_elt, AIid,AIid2);

     pr_set_int(HO_elt,location, update);

     pr_add("TakehomeView",HO,HO_elt);

 

}

 

 

saturn.cs.uml.edu> cat hlsetup.h

#if !defined(HLSETUP_H)

#define HLSETUP_H

 

#include <stdio.h>

 

/* header file for HLsetup.c */

 

# if !defined OLC3COMMON_H

#    include "olc3common.h"

# endif

 

 

PROTOTYPE(void HLsetup,   (void))

PROTOTYPE(void HlAction0, (hcg_key EIid))

PROTOTYPE(void HlAction1, (hcg_key EIid))

PROTOTYPE(void HlAction2, (hcg_key EIid))

PROTOTYPE(void HlAction3, (hcg_key EIid))

PROTOTYPE(void HlAction4, (hcg_key EIid))

 

#endif