http://www.cs.uml.edu/~lechner/COOL-LCP/lcp04s/lechner/lcp/doc/DFD.ppt http://www.cs.uml.edu/~lechner/COOL-LCP/lcp04s/stateModelIndexedFcnPtrArray.040913 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) ================= This note will discuss Hominid project enhancements by ajlopez in $PH/COOL-LCP/lco04s. These should also be studied for this exam2 in 05f523: RJLRef: $PH/COOL-LCP/04s522LCPUpdateProject.051126 This note is about Hominid project enhanceements The following reports are by ajlopez (completed Sept 2004) in $PH/COOL-LCP/: lcp04s/stateModelIndexedFcnPtrArray.040913 <<< reason for 2-pass mode These Data Flow Diagrams show how LCP code is built from now on: http://www.cs.uml.edu/~lechner/COOL-LCP/lcp04s/lechner/lcp/doc/DFD.ppt The actual olc architecture source code that JPsim and all other LCP-based projects use was the source for Hominid Team1 project. 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: http://www.cs.uml.edu/~lechner/COOL-LCP/lcp04s/lechner/lcp/olc/ (This only adds one paragraph and a few misc. comments to code from http://www.cs.uml.edu/~lechner/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 StateMmodelCreateCompletely is called. His report describing these changes is at: $PH/COOL-LCP/lcp04s/ajlopez/lcp/doc/FinalReport.doc ------------------------- From his 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/Team1. 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); } ... --------------------