RJLRef: $PH/COOL-LCP/04s522LCPUpdateProject.051126refs.htm

     ($PH is http://www.cs.uml.edu/~lechner)

=================

This  note will discuss Hominid project enhancements by ajlopez in $PH/COOL-LCP/lcp04s. These should also be studied for this exam2 in 05f523:

 

     RJLRef: $PH/COOL-LCP/04s522LCPUpdateProject.051126refs.htm

 

This note is about Hominid project enhancements. The following reports are by ajlopez (completed Sept 2004) in $PH/COOL-LCP/:

 

$PH/COOL-LCP/lcp04s/stateModelIndexedFcnPtrArray.040913 explains why LCPsetup and LCPmain  must be compiled and run separately.

 

Data Flow Diagrams that show how LCP code is built from now on:

 

     $PH/COOL-LCP/lcp04s/lechner/lcp/doc/DFD.ppt

 

The original olc (Object Life Cycle) architecture source code  was used in JPsim and other LCP-based projects, most recently in $CASE/04s522/lcp04s and $CASE/04s522/setGame04s projects.

 

The original olc code was last checked out in 2001 from repository $JPROOT into $CASE/95s522/95solc/JPsim/olc/src.

 

The most recent updates to olcarch source code are by ajlopez  at

 

     $PH/COOL-LCP/lcp04s/lechner/lcp/olc/

 

(This adds one paragraph and a few misc. comments to code from

 

     $PH/COOL-LCP/lcp04s/ajlopez/lcp/olc/

 

AJLopez added code to generate an indexed array of function table pointers for each app schema class, and update the ActRtn index field of each ST-row when StateModelCreateCompletely is called.

His report describing these changes is at:

 

     $PH/COOL-LCP/lcp04s/ajlopez/lcp/doc/FinalReport.doc

 

 

-------------------------

From AJLopez' report:

 

Files modified in lcp04s:

In lcp/olc (olcarch):           Processevent.c, Statemodel.c

In lcp/src (Hominid application): LCPmain.c, H?setup.c, Navigate.c

 

New files in lcp/src:           LCPsetup.c

New files in lcp:       MakeHead.c,  Makesetup, Makerun,

     LCPgen (Shell file executing gen),

     LCPsetuprun (Shell file executing make Makesetup,

     LCPsetup.exe .setup, make Makerun, and LCPmain.exe)

---------------------------

AJLopez revised the source code of the prior Hominid project at  $CASE/02s522/CASE/Team1. Most 02s522 project docs are indexed at

 

     $PH/02s522 (see Team4HominidSchema.txt)

 

 

Other differences from $CASE/02s522/Team1 include changing  the

#included schema file name from "th.h" to "Hominid.h" in all files:

---------

cd $CASE/04s522/lcp04s

diff ajlopez/lcp/olc ../../02s522/Team1 | wc

    274     918    7413

----------

 

The main enhancement of olcarch in lcp04s was simplification of

how LCP's interpreter dispatches a state's action routine

in routine DoTransition in processevent.c:

-------------------

...

/* Alfredo Lopez */

extern void (*FunctTbl[]);    /*  in HDheader.h, HLheader.h */

/* FuncTbl is generated by makeHead.c for each Active Class */

...

void DoTransition( hcg_key STid, hcg_key AIid, hcg_key EIid)

{

// declare p as ptr to function with event instance pkey as argument:

   void (*p)(hcg_key);  //arg1's type could be more strict as (EI*)

 

   /* First, put the active instance into the correct state */

   ActiveInstanceSetState(AIid, StateGetName(STid));

 

   /* And call the action routine */ /* Alfredo Lopez */

   p = FunctTbl[STcurr->ActFunc];

   (*p)(EIid);

}

...

--------------------